i965/fs: Stop wasting input attribute space on gl_FragCoord and gl_FrontFacing.
authorPaul Berry <stereotype441@gmail.com>
Tue, 3 Sep 2013 05:18:27 +0000 (22:18 -0700)
committerPaul Berry <stereotype441@gmail.com>
Mon, 16 Sep 2013 19:53:32 +0000 (12:53 -0700)
commit3a83b20dcccf21ec184e35bcfa9bc577379dfd51
tree075fff01d4438826bf20efd0f6852595cc8e53c3
parent0af1252ae478a28a76326a5c5d784864327793e2
i965/fs: Stop wasting input attribute space on gl_FragCoord and gl_FrontFacing.

Previously, if a fragment shader accessed gl_FragCoord or
gl_FrontFacing, we would assign them their own slots in the fragment
shader input attribute array, using up space that could be made
available to real varyings.  This was not strictly necessary (since
these values are not true varyings, and are instead computed from
other data available in the FS payload).  But we had to do it anyway
because the SF/SBE setup code assumed that every 1 bit in the
gl_program::InputsRead bitfield corresponded to a genuine varying
variable.

Now that the SF/SBE code consults brw_wm_prog_data and only sets up
the attributes that the fragment shader actually needs, we don't have
to do this anymore.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/gen6_sf_state.c