mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +01:00
[dxvk] Don't log memory errors prematurely
Fallback allocations are a thing.
This commit is contained in:
parent
f36a536288
commit
3bee390d91
@ -276,6 +276,12 @@ namespace dxvk {
|
||||
if (req.dedicated.requiresDedicatedAllocation && (info.flags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)) {
|
||||
allocation = allocateDedicatedMemory(req.core.memoryRequirements,
|
||||
info.flags & ~VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, &info.dedicated);
|
||||
|
||||
if (unlikely(!allocation)) {
|
||||
logMemoryError(req.core.memoryRequirements);
|
||||
logMemoryStats();
|
||||
}
|
||||
|
||||
return DxvkMemory(std::move(allocation));
|
||||
}
|
||||
}
|
||||
@ -286,6 +292,11 @@ namespace dxvk {
|
||||
if (unlikely(!allocation) && (info.flags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)) {
|
||||
allocation = allocateMemory(req.core.memoryRequirements,
|
||||
info.flags & ~VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
|
||||
|
||||
if (unlikely(!allocation)) {
|
||||
logMemoryError(req.core.memoryRequirements);
|
||||
logMemoryStats();
|
||||
}
|
||||
}
|
||||
|
||||
return DxvkMemory(std::move(allocation));
|
||||
@ -379,9 +390,6 @@ namespace dxvk {
|
||||
}
|
||||
}
|
||||
|
||||
logMemoryError(requirements);
|
||||
logMemoryStats();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user