Cap oversized soft-memory allocations at 512MB

* This allows a larger soft-memory limit without allocating too much memory in
  one block, but still allows low soft-memory limits to cap the size of memory
  blocks.
This commit is contained in:
baldurk
2024-12-06 16:24:16 +00:00
parent 9703cf23e3
commit bc5bd00205
+1 -1
View File
@@ -348,7 +348,7 @@ MemoryAllocation WrappedVulkan::AllocateMemoryForResource(bool buffer, VkMemoryR
}
uint64_t initStateLimitMB = RenderDoc::Inst().GetCaptureOptions().softMemoryLimit;
if(initStateLimitMB > 0)
if(initStateLimitMB > 0 && initStateLimitMB < 512)
allocSize = RDCMAX(initStateLimitMB, allocSize);
uint32_t memoryTypeIndex = 0;