mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-05 12:20:07 +00:00
VmaAllocator_T::FreeMemory: Fixed synchronization bug for cases when an allocation becomes lost at the same time as it is being freed.
This commit is contained in:
parent
a5d5ffafe2
commit
c5b223fe4b
@ -11542,8 +11542,7 @@ void VmaAllocator_T::FreeMemory(const VmaAllocation allocation)
|
||||
{
|
||||
VMA_ASSERT(allocation);
|
||||
|
||||
if(allocation->CanBecomeLost() == false ||
|
||||
allocation->GetLastUseFrameIndex() != VMA_FRAME_INDEX_LOST)
|
||||
if(TouchAllocation(allocation))
|
||||
{
|
||||
if(VMA_DEBUG_INITIALIZE_ALLOCATIONS)
|
||||
{
|
||||
@ -11762,7 +11761,7 @@ void VmaAllocator_T::GetAllocationInfo(VmaAllocation hAllocation, VmaAllocationI
|
||||
Warning: This is a carefully designed algorithm.
|
||||
Do not modify unless you really know what you're doing :)
|
||||
*/
|
||||
uint32_t localCurrFrameIndex = m_CurrentFrameIndex.load();
|
||||
const uint32_t localCurrFrameIndex = m_CurrentFrameIndex.load();
|
||||
uint32_t localLastUseFrameIndex = hAllocation->GetLastUseFrameIndex();
|
||||
for(;;)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user