glsl: Properly pack GS output varyings
authorPaul Berry <stereotype441@gmail.com>
Wed, 10 Apr 2013 23:32:40 +0000 (16:32 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 2 Aug 2013 03:23:12 +0000 (20:23 -0700)
commit72219acf6bd415063f93ce8b9be954a225be4b49
treee69130c17ba328a815ec918853bbb6af2857d03f
parentf2ecc8482673c8aec9c3f009fce6c072d8c6f20a
glsl: Properly pack GS output varyings

In geometry shaders, outputs are consumed at the time of a call to
EmitVertex() (as opposed to all other shader types, where outputs are
consumed when the shader exits).  Therefore, when packing geometry
shader output varyings using lower_packed_varyings, we need to do the
packing at the time of the EmitVertex() call.

This patch accomplishes that by adding a new visitor class,
lower_packed_varyings_gs_splicer, which is responsible for splicing
the varying packing code into place wherever EmitVertex() is found.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/lower_packed_varyings.cpp