remove extra region merge checks
continuous-integration/drone/push Build is passing Details

pull/1/head
cosmonaut 2021-01-31 16:29:38 -08:00
parent 952cf974b4
commit d99bd756f4
1 changed files with 1 additions and 8 deletions

View File

@ -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;
}
}