Mesa (master): glsl: Fix typo in ir_unop_f2u implementation

Ian Romanick idr at kemper.freedesktop.org
Wed Aug 17 10:01:29 UTC 2016


Module: Mesa
Branch: master
Commit: cf58e3f52248f670e5269bc2180db091d022aa47
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf58e3f52248f670e5269bc2180db091d022aa47

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Tue Jul 12 17:06:34 2016 -0700

glsl: Fix typo in ir_unop_f2u implementation

This won't affect the output, but it was, technically, wrong.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>

---

 src/compiler/glsl/ir_constant_expression.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/glsl/ir_constant_expression.cpp b/src/compiler/glsl/ir_constant_expression.cpp
index fa8d7f7..a9613b2 100644
--- a/src/compiler/glsl/ir_constant_expression.cpp
+++ b/src/compiler/glsl/ir_constant_expression.cpp
@@ -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:




More information about the mesa-commit mailing list