From 8735a06f3cc36ee113edc848dcb4d6e756eb63b6 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Fri, 24 Mar 2023 03:04:53 +0300 Subject: [PATCH] vk: GTX970 workaround --- rpcs3/Emu/RSX/VK/vkutils/device.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/rpcs3/Emu/RSX/VK/vkutils/device.cpp b/rpcs3/Emu/RSX/VK/vkutils/device.cpp index a7ce8c9bb5..042617e6af 100644 --- a/rpcs3/Emu/RSX/VK/vkutils/device.cpp +++ b/rpcs3/Emu/RSX/VK/vkutils/device.cpp @@ -678,9 +678,21 @@ namespace vk } if (g_cfg.video.disable_vulkan_mem_allocator) + { m_allocator = std::make_unique(dev, pdev); + } else + { m_allocator = std::make_unique(dev, pdev); + } + + if (pgpu->props.deviceID == 0x13c2) + { + // GTX970 workaround/hack + // The driver reports a full working 4GB of memory which is incorrect. + // Limit to ~3GB to allow vma to avoid running over the headroom of 0.5G. + memory_map.device_local_total_bytes = 3072 * 0x100000; + } } void render_device::destroy()