Mesa (staging/22.1): zink: add renderpass bits for color/depth r/w

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 26 16:40:23 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: f8b312559ba39dce48f98fcb51ec256bcc94e1ea
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f8b312559ba39dce48f98fcb51ec256bcc94e1ea

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Thu May 19 19:40:07 2022 -0400

zink: add renderpass bits for color/depth r/w

these are different renderpasses according to compatibility rules

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16621>
(cherry picked from commit 8fef8ed1b06011c49cd54120011145df3c835a7e)

---

 .pick_status.json                           | 2 +-
 src/gallium/drivers/zink/zink_render_pass.c | 6 ++++++
 src/gallium/drivers/zink/zink_render_pass.h | 5 ++++-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 248eb55d06d..19f71f2e1ff 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -184,7 +184,7 @@
         "description": "zink: add renderpass bits for color/depth r/w",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/zink/zink_render_pass.c b/src/gallium/drivers/zink/zink_render_pass.c
index ba29ec459bf..f0f8ab1ba66 100644
--- a/src/gallium/drivers/zink/zink_render_pass.c
+++ b/src/gallium/drivers/zink/zink_render_pass.c
@@ -267,6 +267,12 @@ create_render_pass2(struct zink_screen *screen, struct zink_render_pass_state *s
       }
       pstate->num_attachments++;
    }
+   if (dep_access & VK_ACCESS_COLOR_ATTACHMENT_READ_BIT)
+      pstate->color_read = true;
+   if (dep_access & VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT)
+      pstate->depth_read = true;
+   if (dep_access & VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT)
+      pstate->depth_write = true;
 
    if (!screen->info.have_KHR_synchronization2)
       dep_pipeline = MAX2(dep_pipeline, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT);
diff --git a/src/gallium/drivers/zink/zink_render_pass.h b/src/gallium/drivers/zink/zink_render_pass.h
index e4e12ea6727..d14da310d54 100644
--- a/src/gallium/drivers/zink/zink_render_pass.h
+++ b/src/gallium/drivers/zink/zink_render_pass.h
@@ -66,8 +66,11 @@ struct zink_pipeline_rt {
 };
 
 struct zink_render_pass_pipeline_state {
-   uint32_t num_attachments:25;
+   uint32_t num_attachments:22;
    uint32_t fbfetch:1;
+   uint32_t color_read:1;
+   uint32_t depth_read:1;
+   uint32_t depth_write:1;
    uint32_t num_cresolves:4;
    uint32_t num_zsresolves:1;
    bool samples:1; //for fs samplemask



More information about the mesa-commit mailing list