1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

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.
This commit is contained in:
Philip Rebohle 2019-08-07 05:41:33 +02:00
parent bd40b05720
commit 590834660e
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -369,27 +369,11 @@ namespace dxvk {
if (m_execBarriers.isBufferDirty(slice, DxvkAccess::Write)) if (m_execBarriers.isBufferDirty(slice, DxvkAccess::Write))
m_execBarriers.recordCommands(m_cmd); m_execBarriers.recordCommands(m_cmd);
constexpr VkDeviceSize updateThreshold = 256; m_cmd->cmdFillBuffer(
slice.handle,
if (length <= updateThreshold * sizeof(uint32_t)) { slice.offset,
std::array<uint32_t, updateThreshold> data; slice.length,
value);
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_execBarriers.accessBuffer(slice, m_execBarriers.accessBuffer(slice,
VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT,