mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
synced 2024-11-10 10:41:52 +00:00
VmaBlockVector::Defragment: Minor fix for case when VMA_DEBUG_DETECT_CORRUPTION != 0.
This commit is contained in:
parent
e31dd15ff5
commit
58a9e406f1
@ -12119,9 +12119,13 @@ void VmaBlockVector::Defragment(
|
||||
|
||||
const VkMemoryPropertyFlags memPropFlags =
|
||||
m_hAllocator->m_MemProps.memoryTypes[m_MemoryTypeIndex].propertyFlags;
|
||||
const bool isHostVisible = (memPropFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) != 0;
|
||||
const bool isHostCoherent = (memPropFlags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) != 0;
|
||||
|
||||
const bool canDefragmentOnCpu = maxCpuBytesToMove > 0 && maxCpuAllocationsToMove > 0 &&
|
||||
(memPropFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) != 0;
|
||||
const bool canDefragmentOnGpu = maxGpuBytesToMove > 0 && maxGpuAllocationsToMove > 0;
|
||||
isHostVisible;
|
||||
const bool canDefragmentOnGpu = maxGpuBytesToMove > 0 && maxGpuAllocationsToMove > 0 &&
|
||||
(VMA_DEBUG_DETECT_CORRUPTION == 0 || !(isHostVisible && isHostCoherent));
|
||||
|
||||
// There are options to defragment this memory type.
|
||||
if(canDefragmentOnCpu || canDefragmentOnGpu)
|
||||
|
Loading…
Reference in New Issue
Block a user