glsl: Extend ir_expression_operation for GLSL 3.00 pack/unpack functions (v2)
authorChad Versace <chad.versace@linux.intel.com>
Mon, 19 Nov 2012 18:48:25 +0000 (10:48 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Fri, 25 Jan 2013 05:11:41 +0000 (21:11 -0800)
commitee5921ad0dfb11eebe666b03eab2ac1875c11280
tree4695529a3ed11ceb1d65690b982c128b904f58d1
parent3a88d71d3558d756b0567efe4f22179d2606367c
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 <ian.d.romanick@intel.com>
Reviewed-by: Matt Tuner <mattst88@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/glsl/ir.cpp
src/glsl/ir.h
src/glsl/ir_validate.cpp
src/mesa/program/ir_to_mesa.cpp