summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_sf.c
diff options
context:
space:
mode:
authorChris Forbes <chrisf@ijw.co.nz>2013-07-07 02:56:14 +1200
committerChris Forbes <chrisf@ijw.co.nz>2013-08-01 20:58:19 +1200
commit9f51499d28f80cbbafa4c1489637e1a6a68d9345 (patch)
tree61a8cef92720590201eac9f214767f8263674238 /src/mesa/drivers/dri/i965/brw_sf.c
parentc6f3036179dc187770caa741da0aa073b807b1cf (diff)
i965 Gen4/5: Introduce 'interpolation map' alongside the VUE map
The interpolation map (in brw->interpolation_mode) is a new auxiliary structure alongside the post-GS VUE map, which describes the interpolation modes for each VUE slot, for use by the clip and SF stages. This patch introduces a new state atom to compute the interpolation map, and adjusts the program keys for the clip and SF stages, but it is not actually used yet. [V1-2]: Signed-off-by: Olivier Galibert <galibert at pobox.com> V3: Updated for vue_map changes, intel -> brw merge, etc. (Chris Forbes) V4: Compute interpolation map as a new state atom rather than tacking it on the front of the clip setup V5: Rework commit message, make interpolation_mode_map a struct. Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Paul Berry <stereotype441@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_sf.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index d73973c1dd..b062c0b5a6 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -189,6 +189,9 @@ brw_upload_sf_prog(struct brw_context *brw)
if ((ctx->Point.SpriteOrigin == GL_LOWER_LEFT) != render_to_fbo)
key.sprite_origin_lower_left = true;
+ /* BRW_NEW_INTERPOLATION_MAP */
+ key.interpolation_mode = brw->interpolation_mode;
+
/* _NEW_LIGHT | _NEW_PROGRAM */
key.do_flat_shading = (ctx->Light.ShadeModel == GL_FLAT);
key.do_twoside_color = ((ctx->Light.Enabled && ctx->Light.Model.TwoSide) ||
@@ -215,7 +218,9 @@ const struct brw_tracked_state brw_sf_prog = {
.dirty = {
.mesa = (_NEW_HINT | _NEW_LIGHT | _NEW_POLYGON | _NEW_POINT |
_NEW_TRANSFORM | _NEW_BUFFERS | _NEW_PROGRAM),
- .brw = (BRW_NEW_REDUCED_PRIMITIVE | BRW_NEW_VUE_MAP_GEOM_OUT)
+ .brw = (BRW_NEW_REDUCED_PRIMITIVE |
+ BRW_NEW_VUE_MAP_GEOM_OUT |
+ BRW_NEW_INTERPOLATION_MAP)
},
.emit = brw_upload_sf_prog
};