From 21eb682b39bfd8330d29f0634e8b622216c3339b Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Fri, 14 Feb 2025 19:54:25 +0100 Subject: [PATCH] [dxvk] Track indirect draw buffer access --- src/dxvk/dxvk_context.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 3b3aaa97e..0ff67c855 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -967,6 +967,9 @@ namespace dxvk { descriptor.buffer.buffer, descriptor.buffer.offset + offset, count, stride); + + if (unlikely(m_state.id.argBuffer.buffer()->hasGfxStores())) + accessDrawBuffer(offset, count, stride, sizeof(VkDrawIndirectCommand)); } } @@ -986,6 +989,12 @@ namespace dxvk { cntDescriptor.buffer.buffer, cntDescriptor.buffer.offset + countOffset, maxCount, stride); + + if (unlikely(m_state.id.argBuffer.buffer()->hasGfxStores())) + accessDrawBuffer(offset, maxCount, stride, sizeof(VkDrawIndirectCommand)); + + if (unlikely(m_state.id.cntBuffer.buffer()->hasGfxStores())) + accessDrawCountBuffer(countOffset); } } @@ -1016,6 +1025,9 @@ namespace dxvk { descriptor.buffer.buffer, descriptor.buffer.offset + offset, count, stride); + + if (unlikely(m_state.id.argBuffer.buffer()->hasGfxStores())) + accessDrawBuffer(offset, count, stride, sizeof(VkDrawIndexedIndirectCommand)); } } @@ -1035,6 +1047,12 @@ namespace dxvk { cntDescriptor.buffer.buffer, cntDescriptor.buffer.offset + countOffset, maxCount, stride); + + if (unlikely(m_state.id.argBuffer.buffer()->hasGfxStores())) + accessDrawBuffer(offset, maxCount, stride, sizeof(VkDrawIndexedIndirectCommand)); + + if (unlikely(m_state.id.cntBuffer.buffer()->hasGfxStores())) + accessDrawCountBuffer(countOffset); } }