From f6a99d1167b14a3ada7c1d6f41a5cc6f13290e0d Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 29 May 2014 00:06:08 -0700 Subject: i965: Don't emit SURFACE_STATEs for gather workarounds on Broadwell. As far as I can tell, Broadwell doesn't need any of the SURFACE_STATE workarounds for textureGather() bugs, so there's no need to emit a second set of identical copies. To keep things simple, just point the gather surface index base to the same place as the texture surface index base. Signed-off-by: Kenneth Graunke Reviewed-by: Chris Forbes Cc: "10.2" --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/mesa/drivers/dri/i965/brw_wm_surface_state.c') diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index c9d9614..3279d3b 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -829,12 +829,14 @@ brw_update_texture_surfaces(struct brw_context *brw) /* emit alternate set of surface state for gather. this * allows the surface format to be overriden for only the * gather4 messages. */ - if (vs && vs->UsesGather) - update_stage_texture_surfaces(brw, vs, &brw->vs.base, true); - if (gs && gs->UsesGather) - update_stage_texture_surfaces(brw, gs, &brw->gs.base, true); - if (fs && fs->UsesGather) - update_stage_texture_surfaces(brw, fs, &brw->wm.base, true); + if (brw->gen < 8) { + if (vs && vs->UsesGather) + update_stage_texture_surfaces(brw, vs, &brw->vs.base, true); + if (gs && gs->UsesGather) + update_stage_texture_surfaces(brw, gs, &brw->gs.base, true); + if (fs && fs->UsesGather) + update_stage_texture_surfaces(brw, fs, &brw->wm.base, true); + } brw->state.dirty.brw |= BRW_NEW_SURFACES; } -- cgit v1.1