mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[dxvk] Don't suballocate large staging buffer allocations
Otherwise we'll risk wasting almost half the staging buffer memory. Creating a temporary buffer is cheap enough, so just do that.
This commit is contained in:
parent
b9201db554
commit
08ecd49c66
@ -31,7 +31,7 @@ namespace dxvk {
|
||||
VkDeviceSize alignedSize = dxvk::align(size, align);
|
||||
VkDeviceSize alignedOffset = dxvk::align(m_offset, align);
|
||||
|
||||
if (alignedSize >= m_size) {
|
||||
if (2 * alignedSize > m_size) {
|
||||
return DxvkBufferSlice(m_device->createBuffer(info,
|
||||
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user