Skip to content

Commit

Permalink
vk: use correct swapchain image sync state
Browse files Browse the repository at this point in the history
Swapchain framebuffer image being in VK_IMAGE_LAYOUT_PRESENT_SRC_KHR layout has zero access flags, and is probably synced with bottom-of-pipe stage.

At least this does please validation layers.
  • Loading branch information
w23 committed Dec 19, 2024
1 parent 149cd01 commit 6ac2fe3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ref/vk/vk_swapchain.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,12 @@ r_vk_swapchain_framebuffer_t R_VkSwapchainAcquire( VkSemaphore sem_image_availa
.sync = {
.layout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR,
.write = {
.access = VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT,
.stage = VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT
.access = VK_ACCESS_2_NONE,
.stage = VK_PIPELINE_STAGE_2_NONE,
},
.read = {
.access = VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_2_MEMORY_READ_BIT,
.stage = VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT
.access = VK_ACCESS_2_NONE,
.stage = VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT,
},
},
};
Expand Down

0 comments on commit 6ac2fe3

Please sign in to comment.