From 590834660ea9a576bcd686ec2e7296932f699ff4 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 7 Aug 2019 05:41:33 +0200 Subject: [PATCH] Revert "[dxvk] Use vkCmdUpdateBuffer to clear tiny buffers" This reverts commit 311661e4041e182e9bd6d8a6bd3d168901bb5c87. This once fixed Far Cry Primal, but now for some reason it breaks Far Cry Primal. Fixes #1155. --- src/dxvk/dxvk_context.cpp | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index fc15b9157..15fe96a5a 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -369,27 +369,11 @@ namespace dxvk { if (m_execBarriers.isBufferDirty(slice, DxvkAccess::Write)) m_execBarriers.recordCommands(m_cmd); - constexpr VkDeviceSize updateThreshold = 256; - - if (length <= updateThreshold * sizeof(uint32_t)) { - std::array data; - - for (uint32_t i = 0; i < length / sizeof(uint32_t); i++) - data[i] = value; - - m_cmd->cmdUpdateBuffer( - DxvkCmdBuffer::ExecBuffer, - slice.handle, - slice.offset, - slice.length, - data.data()); - } else { - m_cmd->cmdFillBuffer( - slice.handle, - slice.offset, - slice.length, - value); - } + m_cmd->cmdFillBuffer( + slice.handle, + slice.offset, + slice.length, + value); m_execBarriers.accessBuffer(slice, VK_PIPELINE_STAGE_TRANSFER_BIT,