From a72f05ff9678e3807a9b61ccfcf2744f633e1cd6 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 8 Apr 2022 10:19:55 -0400 Subject: [PATCH] zink: add handling for !sync2 in renderpass dependencies src/dst stage can't be zero without sync2 Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_render_pass.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/zink/zink_render_pass.c b/src/gallium/drivers/zink/zink_render_pass.c index a8110d84505..fa0afd61b22 100644 --- a/src/gallium/drivers/zink/zink_render_pass.c +++ b/src/gallium/drivers/zink/zink_render_pass.c @@ -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} -- 2.34.1