glsl: Modify varying packing to use a temporary exec_list.
authorPaul Berry <stereotype441@gmail.com>
Wed, 10 Apr 2013 21:25:13 +0000 (14:25 -0700)
committerPaul Berry <stereotype441@gmail.com>
Fri, 2 Aug 2013 03:23:08 +0000 (20:23 -0700)
commitf2ecc8482673c8aec9c3f009fce6c072d8c6f20a
tree9e06a10082c34475e1d5400d9de2e41570acd420
parent3b0cf7027daebb8bea6af35d8d2ad4ed19fa7b5a
glsl: Modify varying packing to use a temporary exec_list.

This patch modifies lower_packed_varyings to store the packing code it
generates in a temporary exec_list, and then splice that list into the
shader's main() function when it's done.  This paves the way for
supporting geometry shader outputs, where we'll have to splice a clone
of the packing code before every call to EmitVertex().

As a side benefit, varying packing code is now emitted in the same
order for inputs and outputs; this should make debug output a little
easier to read.

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