iris: CS stall on VF cache invalidate workarounds
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 18 Jan 2019 07:44:09 +0000 (23:44 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:11 +0000 (10:26 -0800)
See commit 31e4c9ce400341df9b0136419b3b3c73b8c9eb7e in i965.

src/gallium/drivers/iris/iris_blorp.c
src/gallium/drivers/iris/iris_state.c

index cd5f919bdca052ecfc31878f91da5a0d60d32fb5..c372c7f6be5289a0b95fafa57e2818d6f237aa9c 100644 (file)
@@ -216,7 +216,8 @@ blorp_vf_invalidate_for_vb_48b_transitions(struct blorp_batch *blorp_batch,
    }
 
    if (need_invalidate) {
-      iris_emit_pipe_control_flush(batch, PIPE_CONTROL_VF_CACHE_INVALIDATE);
+      iris_emit_pipe_control_flush(batch, PIPE_CONTROL_VF_CACHE_INVALIDATE |
+                                          PIPE_CONTROL_CS_STALL);
    }
 }
 
index 49075418d3bffb82d12289eeb54953d8ab6e0e3d..999edfd10e435bcbf69a71b8f52199af487fb35b 100644 (file)
@@ -4546,7 +4546,8 @@ iris_upload_dirty_render_state(struct iris_context *ice,
 
                high_bits = res->bo->gtt_offset >> 32ull;
                if (high_bits != ice->state.last_vbo_high_bits[i]) {
-                  flush_flags |= PIPE_CONTROL_VF_CACHE_INVALIDATE;
+                  flush_flags |= PIPE_CONTROL_VF_CACHE_INVALIDATE |
+                                 PIPE_CONTROL_CS_STALL;
                   ice->state.last_vbo_high_bits[i] = high_bits;
                }
 
@@ -4671,7 +4672,8 @@ iris_upload_render_state(struct iris_context *ice,
       /* The VF cache key only uses 32-bits, see vertex buffer comment above */
       uint16_t high_bits = bo->gtt_offset >> 32ull;
       if (high_bits != ice->state.last_index_bo_high_bits) {
-         iris_emit_pipe_control_flush(batch, PIPE_CONTROL_VF_CACHE_INVALIDATE);
+         iris_emit_pipe_control_flush(batch, PIPE_CONTROL_VF_CACHE_INVALIDATE |
+                                             PIPE_CONTROL_CS_STALL);
          ice->state.last_index_bo_high_bits = high_bits;
       }
    }