i965/msaa: Add backend support for centroid interpolation.
authorPaul Berry <stereotype441@gmail.com>
Mon, 18 Jun 2012 20:52:02 +0000 (13:52 -0700)
committerPaul Berry <stereotype441@gmail.com>
Mon, 25 Jun 2012 18:03:26 +0000 (11:03 -0700)
commitd1056541e239dfcee0ad6af2fd2d9fab37dbf025
treee4b3657bf56c7ab28cf6d503f4138183d87544e5
parentcf0e7aa9f8bc9c175ebd9b2ab3a8bfec4afc5abf
i965/msaa: Add backend support for centroid interpolation.

This patch causes the fragment shader to be configured correctly (and
the correct code to be generated) for centroid interpolation.  This
required two changes: brw_compute_barycentric_interp_modes() needs to
determine when centroid barycentric coordinates need to be included in
the pixel shader thread payload, and
fs_visitor::emit_general_interpolation() needs to interpolate using
the correct set of barycentric coordinates.

Fixes piglit tests "EXT_framebuffer_multisample/interpolation {2,4}
centroid-edges" on i965.

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