i965/gs: Fixup gl_PointSize on entry to geometry shaders.
authorPaul Berry <stereotype441@gmail.com>
Sat, 13 Jul 2013 03:17:13 +0000 (20:17 -0700)
committerPaul Berry <stereotype441@gmail.com>
Tue, 8 Oct 2013 19:44:24 +0000 (12:44 -0700)
commitd14fcd7db7501cc5dbbcefac166238d9a49ccd84
tree331eb6d8571fb48a08154a325984a034e37299b7
parent8f758b0b92f6105c9615740096fa1206befe343b
i965/gs: Fixup gl_PointSize on entry to geometry shaders.

gl_PointSize is stored in the w component of VARYING_SLOT_PSIZ, but
the geometry shader infrastructure assumes that it should look for all
geometry shader inputs of type float in the x component.  So when
compiling a geomtery shader that uses a gl_PointSize input, fix it up
during the shader prolog by moving the w component to the x component.

This is similar to how we emit fixups and workarounds for vertex
shader attributes.

Fixes piglit test spec/glsl-1.50/execution/geometry/core-inputs.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp