Mesa (master): i965/gen6/blorp: Set need_workaround_flush immediately after primitive
Chad Versace
chadversary at kemper.freedesktop.org
Thu Jan 9 23:04:30 UTC 2014
Module: Mesa
Branch: master
Commit: 5e0cd58de4261e9dca7a15037192e7e9426a0207
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5e0cd58de4261e9dca7a15037192e7e9426a0207
Author: Chad Versace <chad.versace at linux.intel.com>
Date: Mon Dec 23 17:46:51 2013 -0800
i965/gen6/blorp: Set need_workaround_flush immediately after primitive
This patch makes the workaround code in gen6 blorp follow the pattern
established in the regular draw path. It shouldn't result in any
behavioral change.
On gen6, there are two places where we emit 3D_CMD_PRIM: brw_emit_prim()
and gen6_blorp_emit_primitive(). brw_emit_prim() sets
need_workaround_flush immediately after emitting the primitive, but
blorp does not. Blorp sets need_workaround_flush at the bottom of
brw_blorp_exec().
This patch moves the need_workaround_flush from brw_blorp_exec() to
gen6_blorp_emit_primitive(). There is no need to set
need_workaround_flush in gen7_blorp_emit_primitive() because the
workaround applies only to gen6.
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
src/mesa/drivers/dri/i965/brw_blorp.cpp | 1 -
src/mesa/drivers/dri/i965/gen6_blorp.cpp | 3 +++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_blorp.cpp b/src/mesa/drivers/dri/i965/brw_blorp.cpp
index ab3e75c..0939a31 100644
--- a/src/mesa/drivers/dri/i965/brw_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/brw_blorp.cpp
@@ -274,7 +274,6 @@ retry:
*/
brw->state.dirty.brw = ~0;
brw->state.dirty.cache = ~0;
- brw->batch.need_workaround_flush = true;
brw->ib.type = -1;
intel_batchbuffer_clear_cache(brw);
diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
index 441d61f..929d7b5 100644
--- a/src/mesa/drivers/dri/i965/gen6_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
@@ -1010,6 +1010,9 @@ gen6_blorp_emit_primitive(struct brw_context *brw,
OUT_BATCH(0);
OUT_BATCH(0);
ADVANCE_BATCH();
+
+ /* Only used on Sandybridge; harmless to set elsewhere. */
+ brw->batch.need_workaround_flush = true;
}
static void
More information about the mesa-commit
mailing list