Mesa (main): zink: add handling for !sync2 in renderpass dependencies
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 8 20:16:38 UTC 2022
Module: Mesa
Branch: main
Commit: a72f05ff9678e3807a9b61ccfcf2744f633e1cd6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a72f05ff9678e3807a9b61ccfcf2744f633e1cd6
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Fri Apr 8 10:19:55 2022 -0400
zink: add handling for !sync2 in renderpass dependencies
src/dst stage can't be zero without sync2
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15827>
---
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}
More information about the mesa-commit
mailing list