mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-05 01:24:14 +01:00
[dxvk] Free existing staging buffer before creating a new one
This commit is contained in:
parent
17a1b0ad44
commit
146fbd492f
@ -39,6 +39,9 @@ namespace dxvk {
|
||||
if (alignedOffset + alignedSize > m_size || m_buffer == nullptr) {
|
||||
info.size = m_size;
|
||||
|
||||
// Free resources first if possible, in some rare
|
||||
// situations this may help avoid a memory allocation.
|
||||
m_buffer = nullptr;
|
||||
m_buffer = m_device->createBuffer(info,
|
||||
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
|
||||
alignedOffset = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user