mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-01-20 07:15:38 +00:00
GPU/HW: Ensure buffers are freed prior to recreating
This commit is contained in:
parent
3749b812a3
commit
4c0250716d
|
@ -472,6 +472,11 @@ void GPU_HW::UpdateSettings(const Settings& old_settings)
|
||||||
|
|
||||||
if (framebuffer_changed)
|
if (framebuffer_changed)
|
||||||
{
|
{
|
||||||
|
// When using very high upscaling, it's possible that we don't have enough VRAM for two sets of buffers.
|
||||||
|
// Purge the pool, and idle the GPU so that all video memory is freed prior to creating the new buffers.
|
||||||
|
g_gpu_device->PurgeTexturePool();
|
||||||
|
g_gpu_device->ExecuteAndWaitForGPUIdle();
|
||||||
|
|
||||||
if (!CreateBuffers())
|
if (!CreateBuffers())
|
||||||
Panic("Failed to recreate buffers.");
|
Panic("Failed to recreate buffers.");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue