Mesa (20.3): st/mesa: fix uninitialized/random clip plane state vars in lower_ucp
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Dec 1 17:45:02 UTC 2020
Module: Mesa
Branch: 20.3
Commit: b52bb0dc5c03f66172948f53661557a8f32fa5b7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b52bb0dc5c03f66172948f53661557a8f32fa5b7
Author: Marek Olšák <marek.olsak at amd.com>
Date: Thu Nov 12 16:37:40 2020 -0500
st/mesa: fix uninitialized/random clip plane state vars in lower_ucp
Fixes: 584f27326c1 - st/mesa: factor ucp-lowering logic into helper
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6946>
(cherry picked from commit fdd3a448aeba8dc79f6d758d0219962daa55772b)
---
.pick_status.json | 2 +-
src/mesa/state_tracker/st_program.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 6f0c75d6519..94464004e02 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -202,7 +202,7 @@
"description": "st/mesa: fix uninitialized/random clip plane state vars in lower_ucp",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "584f27326c1560cc23538cb76fb734ab492ccc3c"
},
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 413e5ba5c84..1c521883dba 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -666,7 +666,7 @@ lower_ucp(struct st_context *st,
PIPE_CAP_NIR_COMPACT_ARRAYS);
bool use_eye = st->ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX] != NULL;
- gl_state_index16 clipplane_state[MAX_CLIP_PLANES][STATE_LENGTH];
+ gl_state_index16 clipplane_state[MAX_CLIP_PLANES][STATE_LENGTH] = {{0}};
for (int i = 0; i < MAX_CLIP_PLANES; ++i) {
if (use_eye) {
clipplane_state[i][0] = STATE_CLIPPLANE;
More information about the mesa-commit
mailing list