Commit d70df998 authored by Jesse Natalie's avatar Jesse Natalie Committed by Erik Faye-Lund
Browse files

nir: Reset metadata for algebraic passes on empty functions

parent 7bfaa132
......@@ -913,8 +913,12 @@ nir_algebraic_impl(nir_function_impl *impl,
* anything other than constants and ALU instructions.
*/
struct util_dynarray states = {0};
if (!util_dynarray_resize(&states, uint16_t, impl->ssa_alloc))
if (!util_dynarray_resize(&states, uint16_t, impl->ssa_alloc)) {
#ifndef NDEBUG
impl->valid_metadata &= ~nir_metadata_not_properly_reset;
#endif
return false;
}
memset(states.data, 0, states.size);
struct hash_table *range_ht = _mesa_pointer_hash_table_create(NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment