[Mesa-dev] [PATCH resend 2/7] i965: Pass resource streamer enable flags on batchbuffer start

Abdiel Janulgue abdiel.janulgue at linux.intel.com
Mon Jun 1 05:14:25 PDT 2015


This is passed on the kernel to enable the resource streamer enable bit
on MI_BATCHBUFFER_START

Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
---
 src/mesa/drivers/dri/i965/brw_context.h       | 1 +
 src/mesa/drivers/dri/i965/intel_batchbuffer.c | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index abc11f6..3f8e59d 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -1140,6 +1140,7 @@ struct brw_context
    bool no_simd8;
    bool use_rep_send;
    bool scalar_vs;
+   bool has_resource_streamer;
 
    /**
     * Some versions of Gen hardware don't do centroid interpolation correctly
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
index ed659ed..a2a3a95 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
@@ -267,6 +267,11 @@ throttle(struct brw_context *brw)
    }
 }
 
+/* Drop when RS headers get pulled to libdrm */
+#ifndef I915_EXEC_RESOURCE_STREAMER
+#define I915_EXEC_RESOURCE_STREAMER (1<<16)
+#endif
+
 /* TODO: Push this whole function into bufmgr.
  */
 static int
@@ -293,7 +298,8 @@ do_flush_locked(struct brw_context *brw)
       if (brw->gen >= 6 && batch->ring == BLT_RING) {
          flags = I915_EXEC_BLT;
       } else {
-         flags = I915_EXEC_RENDER;
+         flags = I915_EXEC_RENDER |
+            (brw->has_resource_streamer ? I915_EXEC_RESOURCE_STREAMER : 0);
       }
       if (batch->needs_sol_reset)
 	 flags |= I915_EXEC_GEN7_SOL_RESET;
-- 
1.9.1



More information about the mesa-dev mailing list