mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-05 12:20:07 +00:00
Minor fix: Add missing mutex lock to VmaBlockVector::IsEmpty
This commit is contained in:
parent
6d6b0672b5
commit
023976ad24
@ -6265,7 +6265,7 @@ public:
|
|||||||
|
|
||||||
void GetPoolStats(VmaPoolStats* pStats);
|
void GetPoolStats(VmaPoolStats* pStats);
|
||||||
|
|
||||||
bool IsEmpty() const { return m_Blocks.empty(); }
|
bool IsEmpty();
|
||||||
bool IsCorruptionDetectionEnabled() const;
|
bool IsCorruptionDetectionEnabled() const;
|
||||||
|
|
||||||
VkResult Allocate(
|
VkResult Allocate(
|
||||||
@ -11814,6 +11814,12 @@ void VmaBlockVector::GetPoolStats(VmaPoolStats* pStats)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool VmaBlockVector::IsEmpty()
|
||||||
|
{
|
||||||
|
VmaMutexLockRead lock(m_Mutex, m_hAllocator->m_UseMutex);
|
||||||
|
return m_Blocks.empty();
|
||||||
|
}
|
||||||
|
|
||||||
bool VmaBlockVector::IsCorruptionDetectionEnabled() const
|
bool VmaBlockVector::IsCorruptionDetectionEnabled() const
|
||||||
{
|
{
|
||||||
const uint32_t requiredMemFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
const uint32_t requiredMemFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
|
||||||
|
Loading…
Reference in New Issue
Block a user