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;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue