OSDN Git Service

glsl/linker: Adapt flat varying handling in preparation for geometry shaders.
authorPaul Berry <stereotype441@gmail.com>
Sat, 6 Apr 2013 17:50:46 +0000 (10:50 -0700)
committerPaul Berry <stereotype441@gmail.com>
Tue, 9 Apr 2013 17:25:57 +0000 (10:25 -0700)
commit32d2b2aa2c784d9f37de21e0ed973e5ee1edb658
tree724ad9ddc6c184620eeb6251ff01cfd28e4cc378
parent8687c40c2dde6cd64f67396333765f6aa9c82f6a
glsl/linker: Adapt flat varying handling in preparation for geometry shaders.

When a varying is consumed by transform feedback, but is not used by
the fragment shader, assign_varying_locations() sets its interpolation
type to "flat" in order to ensure that lower_packed_varyings never has
to deal with non-flat integral varyings (the GLSL spec doesn't require
integral vertex outputs to be flat if they aren't consumed by the
fragment shader).

A similar situation will arise when geometry shader support is added,
since the GLSL spec only requires integral vertex shader outputs to be
flat when they are consumed by the fragment shader.  This patch
modifies the linker to handle this situation too.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/glsl/link_varyings.cpp