mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxvk] Only use half of the DEVICE_LOCAL | HOST_VISIBLE heap on Nvidia
Seems to help with random crashes in FFXIV and potentially other games on 450 series drivers.
This commit is contained in:
parent
e435e071e0
commit
16a51f3c03
@ -177,6 +177,17 @@ namespace dxvk {
|
||||
m_memTypes[i].chunkSize = pickChunkSize(i);
|
||||
}
|
||||
|
||||
/* Work around an issue on Nvidia drivers where using the entire
|
||||
* device_local | host_visible heap can cause crashes, presumably
|
||||
* due to subsequent internal driver allocations failing */
|
||||
if (m_device->properties().core.properties.vendorID == uint16_t(DxvkGpuVendor::Nvidia)) {
|
||||
for (uint32_t i = 0; i < m_memProps.memoryTypeCount; i++) {
|
||||
constexpr VkMemoryPropertyFlags flags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
|
||||
|
||||
if ((m_memTypes[i].memType.propertyFlags & flags) == flags)
|
||||
m_memTypes[i].heap->budget = m_memTypes[i].heap->properties.size / 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user