From c402c62fde398ac47ec39a9e8d0a9ae777f07bef Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 28 Oct 2024 03:21:58 +0100 Subject: [PATCH] [dxvk] Use out-of-order transfer helper in updateBuffer --- src/dxvk/dxvk_context.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 808813bd..597aacbc 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -1997,18 +1997,17 @@ namespace dxvk { VkDeviceSize offset, VkDeviceSize size, const void* data) { - bool replaceBuffer = this->tryInvalidateDeviceLocalBuffer(buffer, size); - auto bufferSlice = buffer->getSliceHandle(offset, size); + DxvkCmdBuffer cmdBuffer = DxvkCmdBuffer::InitBuffer; - if (!replaceBuffer) { - this->spillRenderPass(true); + if (!prepareOutOfOrderTransfer(buffer, offset, size, DxvkAccess::Write)) { + spillRenderPass(true); flushPendingAccesses(*buffer, offset, size, DxvkAccess::Write); + + cmdBuffer = DxvkCmdBuffer::ExecBuffer; } - DxvkCmdBuffer cmdBuffer = replaceBuffer - ? DxvkCmdBuffer::InitBuffer - : DxvkCmdBuffer::ExecBuffer; + auto bufferSlice = buffer->getSliceHandle(offset, size); m_cmd->cmdUpdateBuffer(cmdBuffer, bufferSlice.handle,