diff options
author | Kristian H. Kristensen <[email protected]> | 2019-04-10 13:10:48 -0700 |
---|---|---|
committer | Kristian H. Kristensen <[email protected]> | 2019-04-19 16:17:37 +0000 |
commit | 15605cc9d481dccc8f4dff0e6471600809d56980 (patch) | |
tree | 9b2f14d6af23ae765e0e9c63e32a7fcb0abbaa02 /src/compiler | |
parent | 3ecfe206481a8a7a89d12804a2cafd2fc0b24817 (diff) |
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 <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 547764982dc..0aeac769452 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -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]; |