1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 01:24:11 +01:00

[dxvk] Allow overcommitting non-device local memory

If allocations on host-local memory types fail, we can rely on
Vulkan's error reporting. May fix issues on systems with small amounts of VRAM.
This commit is contained in:
Philip Rebohle 2018-05-29 14:56:41 +02:00
parent c600b43d73
commit 3b70e23e2c
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -260,7 +260,8 @@ namespace dxvk {
DxvkDeviceMemory DxvkMemoryAllocator::tryAllocDeviceMemory(
DxvkMemoryType* type,
VkDeviceSize size) {
if (type->heap->stats.memoryAllocated + size > type->heap->properties.size)
if ((type->memType.propertyFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)
&& (type->heap->stats.memoryAllocated + size > type->heap->properties.size))
return DxvkDeviceMemory();
DxvkDeviceMemory result;