forked from MoonsideGames/Refresh
Same-access-type barrier should not be a no-op
parent
528abfad76
commit
124f202d2c
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue