i965/gen6+: Parameterize barycentric interpolation modes.
authorPaul Berry <stereotype441@gmail.com>
Sat, 22 Oct 2011 00:20:32 +0000 (17:20 -0700)
committerPaul Berry <stereotype441@gmail.com>
Thu, 27 Oct 2011 22:31:53 +0000 (15:31 -0700)
commite04bdeae82797dbdcf6f544a997a4626fdfd4aee
treee84f3f73a94b9c99bfc6fc4e60cf8de9f0fae285
parent102bdd26e1acf1ebf75ef85b62df2400239fd480
i965/gen6+: Parameterize barycentric interpolation modes.

This patch modifies the fragment shader back-end so that instead of
using a single delta_x/delta_y register pair to store barycentric
coordinates, it uses an array of such register pairs, one for each
possible intepolation mode.

When setting up the WM, we intstruct it to only provide the
barycentric coordinates that are actually needed by the fragment
shader--that is computed by brw_compute_barycentric_interp_modes().
Currently this function returns just
BRW_WM_PERSPECTIVE_PIXEL_BARYCENTRIC, because this is the only
interpolation mode we support.  However, that will change in a later
patch.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_defines.h
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
src/mesa/drivers/dri/i965/brw_wm.c
src/mesa/drivers/dri/i965/brw_wm.h
src/mesa/drivers/dri/i965/gen6_wm_state.c
src/mesa/drivers/dri/i965/gen7_wm_state.c