mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-01 19:29:16 +01:00
[dxvk] Limit vkCmdUpdateBuffer size to 4kB
This should help prevent issues with command buffers becoming too big. Larger uploads will use a staging buffer instead.
This commit is contained in:
parent
198c9389af
commit
e05c961b9e
@ -636,7 +636,9 @@ namespace dxvk {
|
||||
// Vulkan specifies that small amounts of data (up to 64kB) can
|
||||
// be copied to a buffer directly if the size is a multiple of
|
||||
// four. Anything else must be copied through a staging buffer.
|
||||
if ((size <= 65536) && ((size & 0x3) == 0) && ((offset & 0x3) == 0)) {
|
||||
// We'll limit the size to 4kB in order to keep command buffers
|
||||
// reasonably small, we do not know how much data apps may upload.
|
||||
if ((size <= 4096) && ((size & 0x3) == 0) && ((offset & 0x3) == 0)) {
|
||||
m_cmd->cmdUpdateBuffer(
|
||||
buffer->handle(),
|
||||
offset, size, data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user