glsl_to_nir: Initialize debug variable
If we want to assert on found == true when the loop exits early, we need to initialize it to false. Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
3ecfe20648
commit
15605cc9d4
|
@ -523,7 +523,7 @@ nir_visitor::visit(ir_variable *ir)
|
||||||
var->type = wrap_type_in_array(explicit_ifc_type, ir->type);
|
var->type = wrap_type_in_array(explicit_ifc_type, ir->type);
|
||||||
} else {
|
} else {
|
||||||
/* Otherwise, this variable is one entry in the interface */
|
/* Otherwise, this variable is one entry in the interface */
|
||||||
UNUSED bool found;
|
UNUSED bool found = false;
|
||||||
for (unsigned i = 0; i < explicit_ifc_type->length; i++) {
|
for (unsigned i = 0; i < explicit_ifc_type->length; i++) {
|
||||||
const glsl_struct_field *field =
|
const glsl_struct_field *field =
|
||||||
&explicit_ifc_type->fields.structure[i];
|
&explicit_ifc_type->fields.structure[i];
|
||||||
|
|
Loading…
Reference in New Issue