summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.cpp
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2013-01-21 14:12:37 -0800
committerMatt Turner <[email protected]>2013-01-25 14:10:23 -0800
commitb64b174b0a7a309dd924d6dace126b0a80e9ea76 (patch)
tree011a801c8c8f803ab1dcac6acec60a2a96249e9e /src/glsl/ir.cpp
parentb0239ce9600c5484c3e424fea23b28e13d11a891 (diff)
glsl: Extend ir_expression_operation for ARB_shading_language_packing
For each function {pack,unpack}{Snorm,Unorm}4x8, add a corresponding opcode to enum ir_expression_operation. Validate the new opcodes in ir_validate.cpp. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/glsl/ir.cpp')
-rw-r--r--src/glsl/ir.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index 4c5115b98cf..954995db387 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -316,7 +316,9 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
break;
case ir_unop_pack_snorm_2x16:
+ case ir_unop_pack_snorm_4x8:
case ir_unop_pack_unorm_2x16:
+ case ir_unop_pack_unorm_4x8:
case ir_unop_pack_half_2x16:
this->type = glsl_type::uint_type;
break;
@@ -327,6 +329,11 @@ ir_expression::ir_expression(int op, ir_rvalue *op0)
this->type = glsl_type::vec2_type;
break;
+ case ir_unop_unpack_snorm_4x8:
+ case ir_unop_unpack_unorm_4x8:
+ this->type = glsl_type::vec4_type;
+ break;
+
default:
assert(!"not reached: missing automatic type setup for ir_expression");
this->type = op0->type;
@@ -478,10 +485,14 @@ static const char *const operator_strs[] = {
"dFdx",
"dFdy",
"packSnorm2x16",
+ "packSnorm4x8",
"packUnorm2x16",
+ "packUnorm4x8",
"packHalf2x16",
"unpackSnorm2x16",
+ "unpackSnorm4x8",
"unpackUnorm2x16",
+ "unpackUnorm4x8",
"unpackHalf2x16",
"unpackHalf2x16_split_x",
"unpackHalf2x16_split_y",