Mesa (staging/22.1): zink: use a zink_render_pass_pipeline_state bit for fbfetch

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


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

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

zink: use a zink_render_pass_pipeline_state bit for fbfetch

improve compatibility detection

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 f4aa727e44799a3bba55195da8b220673416cb87)

---

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

diff --git a/.pick_status.json b/.pick_status.json
index 764045d2340..248eb55d06d 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -193,7 +193,7 @@
         "description": "zink: use a zink_render_pass_pipeline_state bit for fbfetch",
         "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 9279a46a881..ba29ec459bf 100644
--- a/src/gallium/drivers/zink/zink_render_pass.c
+++ b/src/gallium/drivers/zink/zink_render_pass.c
@@ -195,6 +195,7 @@ create_render_pass2(struct zink_screen *screen, struct zink_render_pass_state *s
          memcpy(&input_attachments[input_count++], &color_refs[i], sizeof(VkAttachmentReference2));
          dep_pipeline |= VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
          dep_access |= VK_ACCESS_INPUT_ATTACHMENT_READ_BIT;
+         pstate->fbfetch = 1;
       }
       dep_access |= VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
       if (attachments[i].loadOp == VK_ATTACHMENT_LOAD_OP_LOAD)
diff --git a/src/gallium/drivers/zink/zink_render_pass.h b/src/gallium/drivers/zink/zink_render_pass.h
index 1c8d4ff2909..e4e12ea6727 100644
--- a/src/gallium/drivers/zink/zink_render_pass.h
+++ b/src/gallium/drivers/zink/zink_render_pass.h
@@ -66,7 +66,8 @@ struct zink_pipeline_rt {
 };
 
 struct zink_render_pass_pipeline_state {
-   uint32_t num_attachments:26;
+   uint32_t num_attachments:25;
+   uint32_t fbfetch: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