Mesa (main): lavapipe: add attachment index to lvp_render_pass_attachment

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 19 01:31:45 UTC 2021


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri Oct  1 15:00:36 2021 -0400

lavapipe: add attachment index to lvp_render_pass_attachment

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349>

---

 src/gallium/frontends/lavapipe/lvp_pass.c    | 1 +
 src/gallium/frontends/lavapipe/lvp_private.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/gallium/frontends/lavapipe/lvp_pass.c b/src/gallium/frontends/lavapipe/lvp_pass.c
index d58a47264f4..09a209547c6 100644
--- a/src/gallium/frontends/lavapipe/lvp_pass.c
+++ b/src/gallium/frontends/lavapipe/lvp_pass.c
@@ -170,6 +170,7 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateRenderPass2(
       att->load_op = pCreateInfo->pAttachments[i].loadOp;
       att->stencil_load_op = pCreateInfo->pAttachments[i].stencilLoadOp;
       att->first_subpass_idx = UINT32_MAX;
+      att->attachment = i;
 
       bool is_zs = util_format_is_depth_or_stencil(lvp_vk_format_to_pipe_format(att->format));
       pass->has_zs_attachment |= is_zs;
diff --git a/src/gallium/frontends/lavapipe/lvp_private.h b/src/gallium/frontends/lavapipe/lvp_private.h
index be886c7e3b3..7c77b9dfa92 100644
--- a/src/gallium/frontends/lavapipe/lvp_private.h
+++ b/src/gallium/frontends/lavapipe/lvp_private.h
@@ -289,6 +289,7 @@ struct lvp_subpass {
 };
 
 struct lvp_render_pass_attachment {
+   uint32_t                                     attachment; //index
    VkFormat                                     format;
    uint32_t                                     samples;
    VkAttachmentLoadOp                           load_op;



More information about the mesa-commit mailing list