summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-11 10:58:05 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-11 10:58:05 +0000
commitcbe8bed83f0b4097958c4541ad7809a05e6c6f43 (patch)
treee1bf16447efc8ec127df83290c1bbeaf85e8ab49
parent6193f2f00fa7205f9d736340318c66d116dca53e (diff)
sna/gen7: Mention the depth-stall required before changing VS state
Because one day we may actually start using VS! Copied from the addition of the w/a to Mesa by Kenneth Graunke. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen7_render.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index 5740a421..5294547b 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -476,6 +476,15 @@ gen7_emit_state_base_address(struct sna *sna)
static void
gen7_disable_vs(struct sna *sna)
{
+ /* For future reference:
+ * A PIPE_CONTROL with post-sync op set to 1 and a depth stall needs
+ * to be emitted just prior to change VS state, i.e. 3DSTATE_VS,
+ * 3DSTATE_URB_VS, 3DSTATE_CONSTANT_VS,
+ * 3DSTATE_BINDING_TABLE_POINTER_VS, 3DSTATE_SAMPLER_STATE_POINTER_VS.
+ *
+ * Here we saved by the full-flush incurred when emitting
+ * the batchbuffer.
+ */
OUT_BATCH(GEN7_3DSTATE_VS | (6 - 2));
OUT_BATCH(0); /* no VS kernel */
OUT_BATCH(0);