[Mesa-dev] [PATCH 2/4] anv: Implement a VF cache invalidate workaround
Jason Ekstrand
jason at jlekstrand.net
Wed Aug 22 01:57:49 UTC 2018
Known to fix nothing whatsoever but it's in the docs.
---
src/intel/vulkan/genX_cmd_buffer.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 18f80e8d1bd..75b3dd54275 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -1743,6 +1743,9 @@ genX(cmd_buffer_apply_pipe_flushes)(struct anv_cmd_buffer *cmd_buffer)
}
if (bits & ANV_PIPE_INVALIDATE_BITS) {
+ if (bits & ANV_PIPE_VF_CACHE_INVALIDATE_BIT)
+ anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pipe);
+
anv_batch_emit(&cmd_buffer->batch, GENX(PIPE_CONTROL), pipe) {
pipe.StateCacheInvalidationEnable =
bits & ANV_PIPE_STATE_CACHE_INVALIDATE_BIT;
@@ -1754,6 +1757,12 @@ genX(cmd_buffer_apply_pipe_flushes)(struct anv_cmd_buffer *cmd_buffer)
bits & ANV_PIPE_TEXTURE_CACHE_INVALIDATE_BIT;
pipe.InstructionCacheInvalidateEnable =
bits & ANV_PIPE_INSTRUCTION_CACHE_INVALIDATE_BIT;
+
+ if (pipe.VFCacheInvalidationEnable) {
+ pipe.PostSyncOperation = WriteImmediateData;
+ pipe.Address =
+ (struct anv_address) { &cmd_buffer->device->workaround_bo, 0 };
+ }
}
bits &= ~ANV_PIPE_INVALIDATE_BITS;
--
2.17.1
More information about the mesa-dev
mailing list