mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
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 24555f5462)
This commit is contained in:
parent
c39e3319ca
commit
7830c29f6e
2 changed files with 2 additions and 2 deletions
|
|
@ -1210,7 +1210,7 @@
|
|||
"description": "nir/lower_alpha_test: rzalloc state slots",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue