i965: fix PIPE_CONTROL command for gen6.
authorZou Nan hai <nanhai.zou@intel.com>
Tue, 18 May 2010 08:22:40 +0000 (16:22 +0800)
committerEric Anholt <eric@anholt.net>
Fri, 28 May 2010 19:51:48 +0000 (12:51 -0700)
Signed-off-by: Zou Nan hai <nanhai.zou@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/intel/intel_batchbuffer.c

index de5134008f2672206d66a2c1e834981d03eb907b..446ce29984323062468ad84be4c19f59b0f7763c 100644 (file)
@@ -275,7 +275,16 @@ intel_batchbuffer_emit_mi_flush(struct intel_batchbuffer *batch)
 {
    struct intel_context *intel = batch->intel;
 
-   if (intel->gen >= 4) {
+   if (intel->gen >= 6) {
+      BEGIN_BATCH(4);
+      OUT_BATCH(_3DSTATE_PIPE_CONTROL);
+      OUT_BATCH(PIPE_CONTROL_INSTRUCTION_FLUSH |
+               PIPE_CONTROL_WRITE_FLUSH |
+               PIPE_CONTROL_NO_WRITE);
+      OUT_BATCH(0); /* write address */
+      OUT_BATCH(0); /* write data */
+      ADVANCE_BATCH();
+   } else if (intel->gen >= 4) {
       BEGIN_BATCH(4);
       OUT_BATCH(_3DSTATE_PIPE_CONTROL |
                PIPE_CONTROL_WRITE_FLUSH |