mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +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:
parent
bd40b05720
commit
590834660e
@ -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<uint32_t, updateThreshold> 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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user