[Mesa-dev] [PATCH 7/7] i965/cs: Emit MEDIA_STATE_FLUSH after WALKER

Jordan Justen jordan.l.justen at intel.com
Fri Apr 24 16:33:44 PDT 2015


Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 src/mesa/drivers/dri/i965/brw_compute.c | 5 +++++
 src/mesa/drivers/dri/i965/brw_defines.h | 1 +
 2 files changed, 6 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_compute.c b/src/mesa/drivers/dri/i965/brw_compute.c
index 06ef448..d41d68a 100644
--- a/src/mesa/drivers/dri/i965/brw_compute.c
+++ b/src/mesa/drivers/dri/i965/brw_compute.c
@@ -74,6 +74,11 @@ brw_emit_gpgpu_walker(struct brw_context *brw, const GLuint *num_groups)
    OUT_BATCH(right_mask);
    OUT_BATCH(0xffffffff);
    ADVANCE_BATCH();
+
+   BEGIN_BATCH(2);
+   OUT_BATCH(MEDIA_STATE_FLUSH << 16 | (2 - 2));
+   OUT_BATCH(0);
+   ADVANCE_BATCH();
 }
 
 
diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
index cd25511..4c88309 100644
--- a/src/mesa/drivers/dri/i965/brw_defines.h
+++ b/src/mesa/drivers/dri/i965/brw_defines.h
@@ -2451,6 +2451,7 @@ enum brw_wm_barycentric_interp_mode {
 
 #define MEDIA_VFE_STATE                         0x7000
 #define MEDIA_INTERFACE_DESCRIPTOR_LOAD         0x7002
+#define MEDIA_STATE_FLUSH                       0x7004
 #define GPGPU_WALKER                            0x7105
 
 #endif
-- 
2.1.4



More information about the mesa-dev mailing list