diff options
author | Abdiel Janulgue <abdiel.janulgue@linux.intel.com> | 2014-06-20 11:56:48 -0700 |
---|---|---|
committer | Abdiel Janulgue <abdiel.janulgue@linux.intel.com> | 2014-08-31 21:04:08 +0300 |
commit | a5f02b6696c3ce9ed87e017a537a37d09e288702 (patch) | |
tree | 61c44d2e5e150a958dafd2f8386d3f80912a7cda | |
parent | f3401451070f1b38cc8ed17f486923f03eaeb828 (diff) |
glsl: Add ir_unop_saturate
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
-rw-r--r-- | src/glsl/ir.cpp | 2 | ||||
-rw-r--r-- | src/glsl/ir.h | 1 | ||||
-rw-r--r-- | src/glsl/ir_validate.cpp | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index b289c29756d..739a9f41257 100644 --- a/src/glsl/ir.cpp +++ b/src/glsl/ir.cpp @@ -255,6 +255,7 @@ ir_expression::ir_expression(int op, ir_rvalue *op0) case ir_unop_dFdy_fine: case ir_unop_bitfield_reverse: case ir_unop_interpolate_at_centroid: + case ir_unop_saturate: this->type = op0->type; break; @@ -534,6 +535,7 @@ static const char *const operator_strs[] = { "bit_count", "find_msb", "find_lsb", + "sat", "noise", "interpolate_at_centroid", "+", diff --git a/src/glsl/ir.h b/src/glsl/ir.h index e9051732bcc..8003f88ce3d 100644 --- a/src/glsl/ir.h +++ b/src/glsl/ir.h @@ -1250,6 +1250,7 @@ enum ir_expression_operation { ir_unop_find_lsb, /*@}*/ + ir_unop_saturate, ir_unop_noise, /** diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp index 5b20677825c..97a581dc2d5 100644 --- a/src/glsl/ir_validate.cpp +++ b/src/glsl/ir_validate.cpp @@ -241,6 +241,7 @@ ir_validate::visit_leave(ir_expression *ir) case ir_unop_log: case ir_unop_exp2: case ir_unop_log2: + case ir_unop_saturate: assert(ir->operands[0]->type->base_type == GLSL_TYPE_FLOAT); assert(ir->type == ir->operands[0]->type); break; |