summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_validate.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-08-23 12:21:33 -0700
committerEric Anholt <[email protected]>2010-08-23 13:05:53 -0700
commit5e9ac94cc44ef4f97063d7b696411b2a4be16f36 (patch)
tree0efbbc6d6f05a37a380bc380d6f3139580e7b1b8 /src/glsl/ir_validate.cpp
parent47003a8f653db881fbafc96fca93aba38ea3ebc2 (diff)
mesa: Add new ir_unop_any() expression operation.
The previous any() implementation would generate arg0.x || arg0.y || arg0.z. Having an expression operation for this makes it easy for the backend to generate something easier (DPn + SNE for 915 FS, .any predication on 965 VS)
Diffstat (limited to 'src/glsl/ir_validate.cpp')
-rw-r--r--src/glsl/ir_validate.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index 6e08fa4025a..9ea11dd400e 100644
--- a/src/glsl/ir_validate.cpp
+++ b/src/glsl/ir_validate.cpp
@@ -223,6 +223,11 @@ ir_validate::visit_leave(ir_expression *ir)
assert(ir->type->base_type == GLSL_TYPE_FLOAT);
break;
+ case ir_unop_any:
+ assert(ir->operands[0]->type->base_type == GLSL_TYPE_BOOL);
+ assert(ir->type == glsl_type::bool_type);
+ break;
+
case ir_unop_trunc:
case ir_unop_ceil:
case ir_unop_floor: