diff options
author | Paul Berry <[email protected]> | 2011-10-21 17:20:32 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2011-10-27 15:31:53 -0700 |
commit | e04bdeae82797dbdcf6f544a997a4626fdfd4aee (patch) | |
tree | e84f3f73a94b9c99bfc6fc4e60cf8de9f0fae285 /src/mesa/drivers/dri/i965/brw_wm.h | |
parent | 102bdd26e1acf1ebf75ef85b62df2400239fd480 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h index efd18e96bec..76cf4533b56 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.h +++ b/src/mesa/drivers/dri/i965/brw_wm.h @@ -215,6 +215,7 @@ struct brw_wm_compile { uint8_t source_w_reg; uint8_t aa_dest_stencil_reg; uint8_t dest_depth_reg; + uint8_t barycentric_coord_reg[BRW_WM_BARYCENTRIC_INTERP_MODE_COUNT]; uint8_t nr_payload_regs; GLuint computes_depth:1; /* could be derived from program string */ GLuint source_depth_to_render_target:1; |