glsl: Fix typo in ir_unop_f2u implementation
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 13 Jul 2016 00:06:34 +0000 (17:06 -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 fa8d7f758b038cc5b0af831d97d036bbfd689428..a9613b256b1b3c0ab00a3e0acf86fe4fd95a1ed5 100644 (file)
@@ -573,7 +573,7 @@ ir_expression::constant_expression_value(struct hash_table *variable_context)
    case ir_unop_f2u:
       assert(op[0]->type->base_type == GLSL_TYPE_FLOAT);
       for (unsigned c = 0; c < op[0]->type->components(); c++) {
-         data.i[c] = (unsigned) op[0]->value.f[c];
+         data.u[c] = (unsigned) op[0]->value.f[c];
       }
       break;
    case ir_unop_i2f: