summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2023-04-18 12:23:21 -0400
committerDylan Baker <dylan.c.baker@intel.com>2023-04-26 09:43:09 -0700
commitc67e28251e6730e3954c72c0ab64f5fcc62e4e03 (patch)
treeaf1568cc64e0f124377f893bb0c929b298af6108
parent83f545d659028c764cdc202110f97a121f877773 (diff)
downloadmesa-c67e28251e6730e3954c72c0ab64f5fcc62e4e03.tar.gz
nir/lower_alpha_test: rzalloc state slots
this otherwise leads to uninitialized memory cc: mesa-stable Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22558> (cherry picked from commit 24555f5462e97e80ffe20f47a279d3c344fa6ea2)
-rw-r--r--.pick_status.json2
-rw-r--r--src/compiler/nir/nir_lower_alpha_test.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 88a6d41e29f..8b9eebe3774 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -3904,7 +3904,7 @@
"description": "nir/lower_alpha_test: rzalloc state slots",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null
diff --git a/src/compiler/nir/nir_lower_alpha_test.c b/src/compiler/nir/nir_lower_alpha_test.c
index 6ac2cfc8d8e..89b6c7366a8 100644
--- a/src/compiler/nir/nir_lower_alpha_test.c
+++ b/src/compiler/nir/nir_lower_alpha_test.c
@@ -100,7 +100,7 @@ nir_lower_alpha_test(nir_shader *shader, enum compare_func func,
glsl_float_type(),
"gl_AlphaRefMESA");
var->num_state_slots = 1;
- var->state_slots = ralloc_array(var, nir_state_slot, 1);
+ var->state_slots = rzalloc_array(var, nir_state_slot, 1);
memcpy(var->state_slots[0].tokens,
alpha_ref_state_tokens,
sizeof(var->state_slots[0].tokens));