nir_lower_system_values: Add ASSERTED to assert-only variable

Fixes: 1e0e4657 ("spirv/nir: wire ray interection triangle position fetch")
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22994>
This commit is contained in:
Jesse Natalie
2023-05-12 09:18:46 -07:00
committed by Marge Bot
parent ef831c137f
commit edcecfa817
+1 -1
View File
@@ -253,7 +253,7 @@ lower_system_value_instr(nir_builder *b, nir_instr *instr, void *_state)
return nir_select_from_ssa_def_array(b, cols, num_cols, column);
} else if (glsl_type_is_array(var->type)) {
unsigned num_elems = glsl_get_length(var->type);
const struct glsl_type *elem_type = glsl_get_array_element(var->type);
ASSERTED const struct glsl_type *elem_type = glsl_get_array_element(var->type);
assert(glsl_get_components(elem_type) == intrin->dest.ssa.num_components);
nir_ssa_def *elems[4];