OSDN Git Service

glsl: Evaluate constant GLSL ES 3.00 pack/unpack expressions (v3)
authorChad Versace <chad.versace@linux.intel.com>
Mon, 19 Nov 2012 19:14:24 +0000 (11:14 -0800)
committerChad Versace <chad.versace@linux.intel.com>
Fri, 25 Jan 2013 05:24:10 +0000 (21:24 -0800)
commit542c7a30224211de8d7df5025a5308559f33197b
tree6e5f07ef557a33a31c6db450041464ebc407f897
parent529b6d1f3d80f5651bdb477c20fdbb6f6a4d9746
glsl: Evaluate constant GLSL ES 3.00 pack/unpack expressions (v3)

That is, evaluate constant expressions of the following functions:
  packSnorm2x16  unpackSnorm2x16
  packUnorm2x16  unpackUnorm2x16
  packHalf2x16   unpackHalf2x16

v2: Reuse _mesa_pack_float_to_half and its inverse to evaluate
    pack/unpackHalf2x16. [for idr]
v3: Whitespace fixes. [for mattst88]
    Don't cast neg floats directly to uint16; use an intermediate cast to
    int16. [for paul]

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v2)
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Matt Tuner <mattst88@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
src/glsl/ir_constant_expression.cpp