zink: add handling for !sync2 in renderpass dependencies

src/dst stage can't be zero without sync2

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15827>
This commit is contained in:
Mike Blumenkrantz
2022-04-08 10:19:55 -04:00
committed by Marge Bot
parent b7e05c56a4
commit a72f05ff96
@@ -101,6 +101,8 @@ create_render_pass(struct zink_screen *screen, struct zink_render_pass_state *st
pstate->num_attachments++;
}
if (!screen->info.have_KHR_synchronization2)
dep_pipeline = MAX2(dep_pipeline, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT);
VkSubpassDependency deps[] = {
[0] = {VK_SUBPASS_EXTERNAL, 0, dep_pipeline, dep_pipeline, 0, dep_access, VK_DEPENDENCY_BY_REGION_BIT},
[1] = {0, VK_SUBPASS_EXTERNAL, dep_pipeline, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, dep_access, 0, VK_DEPENDENCY_BY_REGION_BIT}
@@ -250,6 +252,8 @@ create_render_pass2(struct zink_screen *screen, struct zink_render_pass_state *s
pstate->num_attachments++;
}
if (!screen->info.have_KHR_synchronization2)
dep_pipeline = MAX2(dep_pipeline, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT);
VkSubpassDependency2 deps[] = {
[0] = {VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2, NULL, VK_SUBPASS_EXTERNAL, 0, dep_pipeline, dep_pipeline, 0, dep_access, VK_DEPENDENCY_BY_REGION_BIT, 0},
[1] = {VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2, NULL, 0, VK_SUBPASS_EXTERNAL, dep_pipeline, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, dep_access, 0, VK_DEPENDENCY_BY_REGION_BIT, 0}