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:
Kristian H. Kristensen 2019-04-10 13:10:48 -07:00 committed by Kristian H. Kristensen
parent 3ecfe20648
commit 15605cc9d4
1 changed files with 1 additions and 1 deletions

View File

@ -523,7 +523,7 @@ nir_visitor::visit(ir_variable *ir)
var->type = wrap_type_in_array(explicit_ifc_type, ir->type);
} else {
/* 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++) {
const glsl_struct_field *field =
&explicit_ifc_type->fields.structure[i];