glsl: Optimize redundant pack(unpack()) and unpack(pack()) combinations
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 12 Oct 2016 22:31:22 +0000 (15:31 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Fri, 20 Jan 2017 23:41:23 +0000 (15:41 -0800)
commit81952814a37ecdbf112454eb7cb0cec090887a8a
treea2e9de58b6900bafddfd7200761f6af58fc5ea80
parent7122d851aa7d4bae028df2ade1e91ba2347e8bfe
glsl: Optimize redundant pack(unpack()) and unpack(pack()) combinations

The lowering passes 64-bit integer operations will generate a lot of
these.

v2: Modify the HANDLE_PACK_UNPACK_INVERSE so that the breaks apply to
the switch instead of the 'do { } while(true)' loop.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/compiler/glsl/opt_algebraic.cpp