mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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) {
|
if (alignedOffset + alignedSize > m_size || m_buffer == nullptr) {
|
||||||
info.size = m_size;
|
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,
|
m_buffer = m_device->createBuffer(info,
|
||||||
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
|
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
|
||||||
alignedOffset = 0;
|
alignedOffset = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user