mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-01 16:24:12 +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:
parent
c600b43d73
commit
3b70e23e2c
@ -191,7 +191,7 @@ namespace dxvk {
|
||||
|
||||
DxvkMemoryStats DxvkMemoryAllocator::getMemoryStats() {
|
||||
std::lock_guard<std::mutex> lock(m_mutex);
|
||||
|
||||
|
||||
DxvkMemoryStats totalStats;
|
||||
|
||||
for (size_t i = 0; i < m_memProps.memoryHeapCount; i++) {
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user