Same-access-type barrier should not be a no-op

docs-and-cleanup
cosmonaut 2022-12-27 20:51:09 -08:00
parent 528abfad76
commit 124f202d2c
1 changed files with 0 additions and 10 deletions

View File

@ -2672,11 +2672,6 @@ static void VULKAN_INTERNAL_BufferMemoryBarrier(
VulkanResourceAccessType prevAccess, nextAccess; VulkanResourceAccessType prevAccess, nextAccess;
const VulkanResourceAccessInfo *prevAccessInfo, *nextAccessInfo; const VulkanResourceAccessInfo *prevAccessInfo, *nextAccessInfo;
if (buffer->resourceAccessType == nextResourceAccessType)
{
return;
}
memoryBarrier.sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER; memoryBarrier.sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER;
memoryBarrier.pNext = NULL; memoryBarrier.pNext = NULL;
memoryBarrier.srcAccessMask = 0; memoryBarrier.srcAccessMask = 0;
@ -2751,11 +2746,6 @@ static void VULKAN_INTERNAL_ImageMemoryBarrier(
VulkanResourceAccessType prevAccess; VulkanResourceAccessType prevAccess;
const VulkanResourceAccessInfo *pPrevAccessInfo, *pNextAccessInfo; const VulkanResourceAccessInfo *pPrevAccessInfo, *pNextAccessInfo;
if (*resourceAccessType == nextAccess)
{
return;
}
memoryBarrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; memoryBarrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
memoryBarrier.pNext = NULL; memoryBarrier.pNext = NULL;
memoryBarrier.srcAccessMask = 0; memoryBarrier.srcAccessMask = 0;