1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 23:52:20 +01:00

[dxvk] Don't log memory errors prematurely

Fallback allocations are a thing.
This commit is contained in:
Philip Rebohle 2024-09-23 00:22:33 +02:00 committed by Philip Rebohle
parent f36a536288
commit 3bee390d91

View File

@ -276,6 +276,12 @@ namespace dxvk {
if (req.dedicated.requiresDedicatedAllocation && (info.flags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)) { if (req.dedicated.requiresDedicatedAllocation && (info.flags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)) {
allocation = allocateDedicatedMemory(req.core.memoryRequirements, allocation = allocateDedicatedMemory(req.core.memoryRequirements,
info.flags & ~VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, &info.dedicated); info.flags & ~VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, &info.dedicated);
if (unlikely(!allocation)) {
logMemoryError(req.core.memoryRequirements);
logMemoryStats();
}
return DxvkMemory(std::move(allocation)); return DxvkMemory(std::move(allocation));
} }
} }
@ -286,6 +292,11 @@ namespace dxvk {
if (unlikely(!allocation) && (info.flags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)) { if (unlikely(!allocation) && (info.flags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)) {
allocation = allocateMemory(req.core.memoryRequirements, allocation = allocateMemory(req.core.memoryRequirements,
info.flags & ~VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT); info.flags & ~VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
if (unlikely(!allocation)) {
logMemoryError(req.core.memoryRequirements);
logMemoryStats();
}
} }
return DxvkMemory(std::move(allocation)); return DxvkMemory(std::move(allocation));
@ -379,9 +390,6 @@ namespace dxvk {
} }
} }
logMemoryError(requirements);
logMemoryStats();
return nullptr; return nullptr;
} }