summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-06-11 13:49:00 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-11 13:49:00 -0700
commit565185cd8f3ea636d3d2aaad9218d63323390464 (patch)
tree57256a8f67d876f6d9e19afad6b7cc93080ed6fe
parent332920a940a0f60322389a604933e3dc60d96547 (diff)
Use ir_unop_b2i when converting a bool-to-int and add a missing break
The previous code just had dumb cut-and-paste errors.
-rw-r--r--ast_function.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ast_function.cpp b/ast_function.cpp
index 300108cb73e..06498b0e379 100644
--- a/ast_function.cpp
+++ b/ast_function.cpp
@@ -154,8 +154,9 @@ convert_component(ir_rvalue *src, const glsl_type *desired_type)
return new ir_expression(ir_unop_f2i, desired_type, src, NULL);
else {
assert(b == GLSL_TYPE_BOOL);
- return new ir_expression(ir_unop_f2b, desired_type, src, NULL);
+ return new ir_expression(ir_unop_b2i, desired_type, src, NULL);
}
+ break;
case GLSL_TYPE_FLOAT:
switch (b) {
case GLSL_TYPE_UINT: