summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_draw.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-01-09 23:07:56 -0800
committerKenneth Graunke <kenneth@whitecape.org>2015-02-17 15:24:14 -0800
commit0b499abb51c80867ad034f2a6d9fcb1e86d021cc (patch)
tree6a8a351443a4f7b1883aaa82dda1294832fab1d4 /src/mesa/drivers/dri/i965/brw_draw.c
parent92163482bda87216764edc0beca3ca090678038d (diff)
downloadexternal_mesa3d-0b499abb51c80867ad034f2a6d9fcb1e86d021cc.zip
external_mesa3d-0b499abb51c80867ad034f2a6d9fcb1e86d021cc.tar.gz
external_mesa3d-0b499abb51c80867ad034f2a6d9fcb1e86d021cc.tar.bz2
i965: Do Sandybridge workaround flushes before each primitive.
Sandybridge requires the post-sync non-zero workaround in a ton of places, and if you ever miss one, the GPU usually hangs. Currently, we try to track exactly when a workaround flush is necessary (via the brw->batch.need_workaround_flush flag). This is tricky to get right, and we've botched it several times in the past. This patch unconditionally performs the post-sync non-zero flush at the start of each primitive's state upload (including BLORP). We drop the needs_workaround_flush flag, and drop all the other callers, as the flush has already been performed. We have no data to indicate that simply flushing all the time will hurt performance, and it has the potential to help stability. v2: Add post-sync workaround to initial GPU state upload to be extra cautious (suggested by Chad Versace). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_draw.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index b7e42cb..2d3de45 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -276,9 +276,6 @@ static void brw_emit_prim(struct brw_context *brw,
OUT_BATCH(base_vertex_location);
ADVANCE_BATCH();
- /* Only used on Sandybridge; harmless to set elsewhere. */
- brw->batch.need_workaround_flush = true;
-
if (brw->always_flush_cache) {
intel_batchbuffer_emit_mi_flush(brw);
}