summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_to_ssa.c
diff options
context:
space:
mode:
authorJuha-Pekka Heikkila <[email protected]>2016-10-11 13:54:58 +0300
committerMarek Olšák <[email protected]>2016-10-31 11:53:38 +0100
commit3bf6c6c3adb8e5dc2488fda93aa7dde3ca256b34 (patch)
tree396d46880e024cee0d55d49df60f1f16be3a197a /src/compiler/nir/nir_to_ssa.c
parent4d4335c81a3f7d8434d9983881a63abcbc29dd5c (diff)
nir: zero allocated memory where needed
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_to_ssa.c')
-rw-r--r--src/compiler/nir/nir_to_ssa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_to_ssa.c b/src/compiler/nir/nir_to_ssa.c
index 6accdd24b3f..e0998d4bb01 100644
--- a/src/compiler/nir/nir_to_ssa.c
+++ b/src/compiler/nir/nir_to_ssa.c
@@ -476,7 +476,7 @@ init_rewrite_state(nir_function_impl *impl, rewrite_state *state)
state->mem_ctx = ralloc_parent(impl);
state->ssa_map = _mesa_hash_table_create(NULL, _mesa_hash_pointer,
_mesa_key_pointer_equal);
- state->states = ralloc_array(NULL, reg_state, impl->reg_alloc);
+ state->states = rzalloc_array(NULL, reg_state, impl->reg_alloc);
foreach_list_typed(nir_register, reg, node, &impl->registers) {
assert(reg->index < impl->reg_alloc);