summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/ir.cpp
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-03-30 11:18:30 +0200
committerNicolai Hähnle <[email protected]>2017-04-05 15:25:51 +0200
commitd37b7b5232e419135776f9a6169adb4aad3900fb (patch)
treec7bb5487102ab2b727b2de527c8f5ce0a87d0847 /src/compiler/glsl/ir.cpp
parentb8440ec9fa1ddaf33b590fcf9120122e3acbf497 (diff)
glsl: add ARB_shader_ballot operations
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/compiler/glsl/ir.cpp')
-rw-r--r--src/compiler/glsl/ir.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/compiler/glsl/ir.cpp b/src/compiler/glsl/ir.cpp
index f80bd811ac0..2bbc7a1cf72 100644
--- a/src/compiler/glsl/ir.cpp
+++ b/src/compiler/glsl/ir.cpp
@@ -381,6 +381,14 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
this->type = glsl_type::int_type;
break;
+ case ir_unop_ballot:
+ this->type = glsl_type::uint64_t_type;
+ break;
+
+ case ir_unop_read_first_invocation:
+ this->type = op0->type;
+ break;
+
case ir_unop_vote_any:
case ir_unop_vote_all:
case ir_unop_vote_eq:
@@ -496,6 +504,10 @@ ir_expression::ir_expression(int op, ir_rvalue *op0, ir_rvalue *op1)
this->type = op0->type->get_scalar_type();
break;
+ case ir_binop_read_invocation:
+ this->type = op0->type;
+ break;
+
default:
assert(!"not reached: missing automatic type setup for ir_expression");
this->type = glsl_type::float_type;