glsl: Fix typo in ir_unop_b2i implementation
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 11 Jul 2016 22:38:00 +0000 (15:38 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 17 Aug 2016 09:52:39 +0000 (10:52 +0100)
This won't affect the output, but it was, technically, wrong.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/compiler/glsl/ir_constant_expression.cpp

index 6f9d18dd471030d9250858d706f26dcecde416a9..fa8d7f758b038cc5b0af831d97d036bbfd689428 100644 (file)
@@ -603,7 +603,7 @@ ir_expression::constant_expression_value(struct hash_table *variable_context)
    case ir_unop_b2i:
       assert(op[0]->type->base_type == GLSL_TYPE_BOOL);
       for (unsigned c = 0; c < op[0]->type->components(); c++) {
-         data.u[c] = op[0]->value.b[c] ? 1 : 0;
+         data.i[c] = op[0]->value.b[c] ? 1 : 0;
       }
       break;
    case ir_unop_i2b: