radeonsi: Synchronize a streamout write after read hazard.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 11 Apr 2016 13:53:43 +0000 (15:53 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tue, 12 Apr 2016 11:55:38 +0000 (13:55 +0200)
Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_descriptors.c

index 6dd2e4fd89d52df773dabdfc216f2fa757800d63..b3792c234745510a2a5ef397a08303a2b8886e7f 100644 (file)
@@ -883,6 +883,12 @@ static void si_set_streamout_targets(struct pipe_context *ctx,
                                 SI_CONTEXT_VS_PARTIAL_FLUSH;
        }
 
+       /* All readers of the streamout targets need to be finished before we can
+        * start writing to the targets.
+        */
+       if (num_targets)
+               sctx->b.flags |= SI_CONTEXT_PS_PARTIAL_FLUSH;
+
        /* Streamout buffers must be bound in 2 places:
         * 1) in VGT by setting the VGT_STRMOUT registers
         * 2) as shader resources