1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-12 04:08:52 +01:00

[dxvk] Use out-of-order transfer helper in updateBuffer

This commit is contained in:
Philip Rebohle 2024-10-28 03:21:58 +01:00
parent cf2c81f5ef
commit c402c62fde

View File

@ -1997,18 +1997,17 @@ namespace dxvk {
VkDeviceSize offset, VkDeviceSize offset,
VkDeviceSize size, VkDeviceSize size,
const void* data) { const void* data) {
bool replaceBuffer = this->tryInvalidateDeviceLocalBuffer(buffer, size); DxvkCmdBuffer cmdBuffer = DxvkCmdBuffer::InitBuffer;
auto bufferSlice = buffer->getSliceHandle(offset, size);
if (!replaceBuffer) { if (!prepareOutOfOrderTransfer(buffer, offset, size, DxvkAccess::Write)) {
this->spillRenderPass(true); spillRenderPass(true);
flushPendingAccesses(*buffer, offset, size, DxvkAccess::Write); flushPendingAccesses(*buffer, offset, size, DxvkAccess::Write);
cmdBuffer = DxvkCmdBuffer::ExecBuffer;
} }
DxvkCmdBuffer cmdBuffer = replaceBuffer auto bufferSlice = buffer->getSliceHandle(offset, size);
? DxvkCmdBuffer::InitBuffer
: DxvkCmdBuffer::ExecBuffer;
m_cmd->cmdUpdateBuffer(cmdBuffer, m_cmd->cmdUpdateBuffer(cmdBuffer,
bufferSlice.handle, bufferSlice.handle,