i965: Emit post-sync non-zero flush before 3DSTATE_DRAWING_RECTANGLE.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 24 Oct 2013 07:36:42 +0000 (00:36 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 28 Oct 2013 18:29:29 +0000 (11:29 -0700)
This is another non-pipelined command that needs a flush on Sandybridge.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Xinkai Chen <yeled.nova@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
src/mesa/drivers/dri/i965/brw_misc_state.c

index 5d1c27d8babdcb224c474f7bf933e944be0afcf7..70b0dbd4c00b60f6625bed5c9ab8d3864dbc4dac 100644 (file)
@@ -48,6 +48,10 @@ static void upload_drawing_rect(struct brw_context *brw)
 {
    struct gl_context *ctx = &brw->ctx;
 
+   /* 3DSTATE_DRAWING_RECTANGLE is non-pipelined. */
+   if (brw->gen == 6)
+      intel_emit_post_sync_nonzero_flush(brw);
+
    BEGIN_BATCH(4);
    OUT_BATCH(_3DSTATE_DRAWING_RECTANGLE << 16 | (4 - 2));
    OUT_BATCH(0); /* xmin, ymin */