glsl: Add a lowering pass for packing varyings.
authorPaul Berry <stereotype441@gmail.com>
Sun, 9 Dec 2012 23:25:38 +0000 (15:25 -0800)
committerPaul Berry <stereotype441@gmail.com>
Fri, 14 Dec 2012 18:49:21 +0000 (10:49 -0800)
commit1745a4d751a4184771628ad2be1336439c831afb
tree765826df68889fd36b5c2fec92c6251e17d7d4a6
parentf3993107f0b997195c4d97b95c47e84220f10b6d
glsl: Add a lowering pass for packing varyings.

This lowering pass generates GLSL code that manually packs varyings
into vec4 slots, for the benefit of back-ends that don't support
packed varyings natively.

No functional change--the lowering pass is not yet used.

Reviewed-by: Eric Anholt <eric@anholt.net>
v2: Don't use ir_hierarchical_visitor--just loop over instructions
directly.  Also, make the names of the packed varyings include the
names of the original varyings that were packed into them.
src/glsl/Makefile.sources
src/glsl/ir_optimization.h
src/glsl/lower_packed_varyings.cpp [new file with mode: 0644]