vk: GTX970 workaround

This commit is contained in:
kd-11 2023-03-24 03:04:53 +03:00 committed by kd-11
parent d35fecbeea
commit 8735a06f3c

View file

@ -678,9 +678,21 @@ namespace vk
}
if (g_cfg.video.disable_vulkan_mem_allocator)
{
m_allocator = std::make_unique<vk::mem_allocator_vk>(dev, pdev);
}
else
{
m_allocator = std::make_unique<vk::mem_allocator_vma>(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()