radeonsi: don't invalidate VMEM L1 for memory barriers for index buffers
authorMarek Olšák <marek.olsak@amd.com>
Mon, 10 Oct 2016 15:39:43 +0000 (17:39 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 12 Oct 2016 16:29:40 +0000 (18:29 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_state.c

index ddf6cfe14dee0ec6f063b066b804caa906cae0e8..34f3ed7264b982584e3c94dc301a275ab4c5b444 100644 (file)
@@ -3366,6 +3366,7 @@ static void si_texture_barrier(struct pipe_context *ctx)
                         SI_CONTEXT_CS_PARTIAL_FLUSH;
 }
 
+/* This only ensures coherency for shader image/buffer stores. */
 static void si_memory_barrier(struct pipe_context *ctx, unsigned flags)
 {
        struct si_context *sctx = (struct si_context *)ctx;
@@ -3392,9 +3393,9 @@ static void si_memory_barrier(struct pipe_context *ctx, unsigned flags)
        }
 
        if (flags & PIPE_BARRIER_INDEX_BUFFER) {
-               sctx->b.flags |= SI_CONTEXT_INV_VMEM_L1;
-
-               /* Indices are read through TC L2 since VI. */
+               /* Indices are read through TC L2 since VI.
+                * L1 isn't used.
+                */
                if (sctx->screen->b.chip_class <= CIK)
                        sctx->b.flags |= SI_CONTEXT_INV_GLOBAL_L2;
        }