summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2011-09-27 14:27:58 -0700
committerEric Anholt <[email protected]>2011-09-28 12:09:09 -0700
commit344f94bb006188931b09939aafc7cc96609c4f5a (patch)
tree9c6a97137b1369f5005233deaf1b3995d4dae22f /src
parent1d59de1456ba55d32bbe0c0ae45a9358e31e1cd2 (diff)
glsl: Fix assertion checking types of constant bitshift expressions.
Bitshifts are one of the rare places that GLSL allows mixed base types without an implicit conversion occurring. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/glsl/ir_constant_expression.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index f0299a2c4a0..56a423761b5 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -69,7 +69,9 @@ ir_expression::constant_expression_value()
}
if (op[1] != NULL)
- assert(op[0]->type->base_type == op[1]->type->base_type);
+ assert(op[0]->type->base_type == op[1]->type->base_type ||
+ this->operation == ir_binop_lshift ||
+ this->operation == ir_binop_rshift);
bool op0_scalar = op[0]->type->is_scalar();
bool op1_scalar = op[1] != NULL && op[1]->type->is_scalar();