Address GPU hung due to skipping selection of 3D pipeline in blorp when RS
is switched on. I've yet to figure out the reason for this.

Signed-off-by: Abdiel Janulgue <abdiel.janul...@linux.intel.com>
---
 src/mesa/drivers/dri/i965/gen6_blorp.cpp |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/gen6_blorp.cpp 
b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
index a88148e..a67bdf5 100644
--- a/src/mesa/drivers/dri/i965/gen6_blorp.cpp
+++ b/src/mesa/drivers/dri/i965/gen6_blorp.cpp
@@ -50,11 +50,22 @@ gen6_blorp_emit_batch_head(struct brw_context *brw,
                            const brw_blorp_params *params)
 {
    struct gl_context *ctx = &brw->intel.ctx;
+   struct intel_context *intel = &brw->intel;
 
    /* To ensure that the batch contains only the resolve, flush the batch
     * before beginning and after finishing emitting the resolve packets.
     */
    intel_flush(ctx);
+
+   /* When we have resource streamer enabled. GPU hungs if 3D pipe
+      is not selected even if invariant state is initially selected
+      3D pipe already.*/
+   if (intel->is_haswell) {
+      /* Select the 3D pipeline (as opposed to media) */
+      BEGIN_BATCH(1);
+      OUT_BATCH(brw->CMD_PIPELINE_SELECT << 16 | 0);
+      ADVANCE_BATCH();
+   }
 }
 
 
-- 
1.7.9.5

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to