diff options
author | Chad Versace <[email protected]> | 2012-11-19 10:48:25 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2013-01-24 21:11:41 -0800 |
commit | ee5921ad0dfb11eebe666b03eab2ac1875c11280 (patch) | |
tree | 4695529a3ed11ceb1d65690b982c128b904f58d1 /src/mesa/program/ir_to_mesa.cpp | |
parent | 3a88d71d3558d756b0567efe4f22179d2606367c (diff) |
glsl: Extend ir_expression_operation for GLSL 3.00 pack/unpack functions (v2)
For each function {pack,unpack}{Snorm,Unorm,Half}2x16, add a corresponding
opcode to enum ir_expression_operation. Validate the new opcodes in
ir_validate.cpp.
Also, add opcodes for scalarized variants of the Half2x16 functions. (The
code generator for the i965 fragment shader requires that all vector
operations be scalarized. A lowering pass, to be added later, will
scalarize the Half2x16 functions).
v2: Fix assertion message in ir_to_mesa [for idr].
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Matt Tuner <[email protected]>
Signed-off-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/program/ir_to_mesa.cpp')
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 4723ec3578b..544b4a93c23 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -1427,7 +1427,17 @@ ir_to_mesa_visitor::visit(ir_expression *ir) case ir_unop_fract: emit(ir, OPCODE_FRC, result_dst, op[0]); break; - + case ir_unop_pack_snorm_2x16: + case ir_unop_pack_unorm_2x16: + case ir_unop_pack_half_2x16: + case ir_unop_unpack_snorm_2x16: + case ir_unop_unpack_unorm_2x16: + case ir_unop_unpack_half_2x16: + case ir_unop_unpack_half_2x16_split_x: + case ir_unop_unpack_half_2x16_split_y: + case ir_binop_pack_half_2x16_split: + assert(!"not supported"); + break; case ir_binop_min: emit(ir, OPCODE_MIN, result_dst, op[0], op[1]); break; |