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; VkDeviceSize newOffset, newSize;
int32_t insertionIndex = 0; int32_t insertionIndex = 0;
int32_t i; int32_t i;
uint8_t regionMerged = 0;
/* look for an adjacent region to merge */ /* look for an adjacent region to merge */
for (i = allocation->freeRegionCount - 1; i >= 0; i -= 1) 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_RemoveMemoryFreeRegion(allocation->freeRegions[i]);
VULKAN_INTERNAL_NewMemoryFreeRegion(allocation, newOffset, newSize); VULKAN_INTERNAL_NewMemoryFreeRegion(allocation, newOffset, newSize);
/* allow fallthrough in case there is also a free region on the right */ return;
regionMerged = 1;
} }
/* check right side */ /* check right side */
@ -1613,11 +1611,6 @@ static void VULKAN_INTERNAL_NewMemoryFreeRegion(
VULKAN_INTERNAL_RemoveMemoryFreeRegion(allocation->freeRegions[i]); VULKAN_INTERNAL_RemoveMemoryFreeRegion(allocation->freeRegions[i]);
VULKAN_INTERNAL_NewMemoryFreeRegion(allocation, newOffset, newSize); VULKAN_INTERNAL_NewMemoryFreeRegion(allocation, newOffset, newSize);
regionMerged = 1;
}
if (regionMerged)
{
return; return;
} }
} }