forked from MoonsideGames/Refresh
remove extra region merge checks
parent
952cf974b4
commit
d99bd756f4
|
@ -1588,7 +1588,6 @@ static void VULKAN_INTERNAL_NewMemoryFreeRegion(
|
|||
VkDeviceSize newOffset, newSize;
|
||||
int32_t insertionIndex = 0;
|
||||
int32_t i;
|
||||
uint8_t regionMerged = 0;
|
||||
|
||||
/* look for an adjacent region to merge */
|
||||
for (i = allocation->freeRegionCount - 1; i >= 0; i -= 1)
|
||||
|
@ -1601,8 +1600,7 @@ static void VULKAN_INTERNAL_NewMemoryFreeRegion(
|
|||
|
||||
VULKAN_INTERNAL_RemoveMemoryFreeRegion(allocation->freeRegions[i]);
|
||||
VULKAN_INTERNAL_NewMemoryFreeRegion(allocation, newOffset, newSize);
|
||||
/* allow fallthrough in case there is also a free region on the right */
|
||||
regionMerged = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
/* check right side */
|
||||
|
@ -1613,11 +1611,6 @@ static void VULKAN_INTERNAL_NewMemoryFreeRegion(
|
|||
|
||||
VULKAN_INTERNAL_RemoveMemoryFreeRegion(allocation->freeRegions[i]);
|
||||
VULKAN_INTERNAL_NewMemoryFreeRegion(allocation, newOffset, newSize);
|
||||
regionMerged = 1;
|
||||
}
|
||||
|
||||
if (regionMerged)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue