i965: Add PIPE_CONTRTOL_DATA_CACHE flush to brw_emit_mi_flush().
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 29 Aug 2017 05:00:12 +0000 (22:00 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 30 Aug 2017 23:59:22 +0000 (16:59 -0700)
Although we're phasing out brw_emit_mi_flush(), we still use it in some
places in order to "flush everything".  In a number of those places, we
write data to a buffer that we may then bind as an image surface, SSBO,
or atomic buffer.  Those usages require us to flush the data cache.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_pipe_control.c

index 063b814b9a3a78e0b5e3315dec59aea06a4b3509..460b8f73b6d986674c30c0397395cc02ccea3e48 100644 (file)
@@ -449,6 +449,7 @@ brw_emit_mi_flush(struct brw_context *brw)
       if (devinfo->gen >= 6) {
          flags |= PIPE_CONTROL_INSTRUCTION_INVALIDATE |
                   PIPE_CONTROL_CONST_CACHE_INVALIDATE |
+                  PIPE_CONTROL_DATA_CACHE_FLUSH |
                   PIPE_CONTROL_DEPTH_CACHE_FLUSH |
                   PIPE_CONTROL_VF_CACHE_INVALIDATE |
                   PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE |