[Mesa-stable] [PATCH 4/4] anv/blorp: Flush the texture cache in UpdateBuffer

Jason Ekstrand jason at jlekstrand.net
Fri Mar 31 23:17:11 UTC 2017


Cc: "13.0 17.0" <mesa-stable at lists.freedesktop.org>
---
 src/intel/vulkan/anv_blorp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
index 72a468a..f26f5e5 100644
--- a/src/intel/vulkan/anv_blorp.c
+++ b/src/intel/vulkan/anv_blorp.c
@@ -690,6 +690,11 @@ void anv_CmdUpdateBuffer(
 
    assert(max_update_size < MAX_SURFACE_DIM * 4);
 
+   /* We're about to read data that was written from the CPU.  Flush the
+    * texture cache so we don't get anything stale.
+    */
+   cmd_buffer->state.pending_pipe_bits |= ANV_PIPE_TEXTURE_CACHE_INVALIDATE_BIT;
+
    while (dataSize) {
       const uint32_t copy_size = MIN2(dataSize, max_update_size);
 
-- 
2.5.0.400.gff86faf



More information about the mesa-stable mailing list