Skip to content

Commit

Permalink
Vulkan: Same-access-type barrier should not be a no-op
Browse files Browse the repository at this point in the history
  • Loading branch information
thatcosmonaut authored and flibitijibibo committed Dec 28, 2022
1 parent fe3f3a9 commit b1c55d7
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/FNA3D_Driver_Vulkan.c
Expand Up @@ -4680,11 +4680,6 @@ static void VULKAN_INTERNAL_BufferMemoryBarrier(
VulkanResourceAccessType prevAccess, nextAccess;
const VulkanResourceAccessInfo *prevAccessInfo, *nextAccessInfo;

if (*resourceAccessType == nextResourceAccessType)
{
return;
}

SDL_LockMutex(renderer->passLock);

memoryBarrier.sType = VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER;
Expand Down Expand Up @@ -4765,11 +4760,6 @@ static void VULKAN_INTERNAL_ImageMemoryBarrier(
VulkanResourceAccessType prevAccess;
const VulkanResourceAccessInfo *pPrevAccessInfo, *pNextAccessInfo;

if (*resourceAccessType == nextAccess)
{
return;
}

SDL_LockMutex(renderer->passLock);

memoryBarrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
Expand Down Expand Up @@ -4906,13 +4896,6 @@ static VulkanBuffer* VULKAN_INTERNAL_CreateBuffer(

buffer->usedRegion->vulkanBuffer = buffer; /* lol */

VULKAN_INTERNAL_BufferMemoryBarrier(
renderer,
buffer->resourceAccessType,
buffer->buffer,
&buffer->resourceAccessType
);

return buffer;
}

Expand Down

0 comments on commit b1c55d7

Please sign in to comment.