Module: Mesa
Branch: main
Commit: f4aa727e44799a3bba55195da8b220673416cb87
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f4aa727e44799a3bba55195da8b220673416cb87

Author: Mike Blumenkrantz <[email protected]>
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16621>

---

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

diff --git a/src/gallium/drivers/zink/zink_render_pass.c 
b/src/gallium/drivers/zink/zink_render_pass.c
index fecb93f345a..391b553d843 100644
--- a/src/gallium/drivers/zink/zink_render_pass.c
+++ b/src/gallium/drivers/zink/zink_render_pass.c
@@ -83,6 +83,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 2cf90c0de3a..7277d4f0a87 100644
--- a/src/gallium/drivers/zink/zink_render_pass.h
+++ b/src/gallium/drivers/zink/zink_render_pass.h
@@ -65,7 +65,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

Reply via email to