vk: Prevent WAW hazard when the window size exceeds the output draw box

This commit is contained in:
kd-11
2026-01-25 21:00:48 +03:00
committed by Ani
parent 33d79ee2cd
commit 9b09fba811

View File

@@ -612,6 +612,19 @@ void VKGSRender::flip(const rsx::display_flip_info_t& info)
vk::change_image_layout(*m_current_command_buffer, target_image, present_layout, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, subresource_range);
vkCmdClearColorImage(*m_current_command_buffer, target_image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &clear_black, 1, &subresource_range);
// Prevent WAW on transfer writes
vk::insert_image_memory_barrier(
*m_current_command_buffer,
target_image,
target_layout,
target_layout,
VK_PIPELINE_STAGE_TRANSFER_BIT,
VK_PIPELINE_STAGE_TRANSFER_BIT,
VK_ACCESS_TRANSFER_WRITE_BIT,
VK_ACCESS_TRANSFER_WRITE_BIT,
subresource_range
);
target_layout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
}