diff --git a/src/Refresh_Driver_Vulkan.c b/src/Refresh_Driver_Vulkan.c index 837d876..336a6a2 100644 --- a/src/Refresh_Driver_Vulkan.c +++ b/src/Refresh_Driver_Vulkan.c @@ -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; } }