Mesa (main): v3dv: don't merge subpasses with different view masks
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jul 27 07:45:58 UTC 2021
Module: Mesa
Branch: main
Commit: f46f5eac7ce95e5e59969d60df3895db76c362a0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f46f5eac7ce95e5e59969d60df3895db76c362a0
Author: Iago Toral Quiroga <itoral at igalia.com>
Date: Thu Jul 22 13:49:48 2021 +0200
v3dv: don't merge subpasses with different view masks
Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12034>
---
src/broadcom/vulkan/v3dv_cmd_buffer.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c
index 68bc7161f4f..36cf6eb54bd 100644
--- a/src/broadcom/vulkan/v3dv_cmd_buffer.c
+++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c
@@ -398,6 +398,13 @@ cmd_buffer_can_merge_subpass(struct v3dv_cmd_buffer *cmd_buffer,
struct v3dv_subpass *prev_subpass = &state->pass->subpasses[state->subpass_idx];
struct v3dv_subpass *subpass = &state->pass->subpasses[subpass_idx];
+ /* Don't merge if the subpasses have different view masks, since in that
+ * case the framebuffer setup is different and we need to emit different
+ * RCLs.
+ */
+ if (subpass->view_mask != prev_subpass->view_mask)
+ return false;
+
/* Because the list of subpass attachments can include VK_ATTACHMENT_UNUSED,
* we need to check that for each subpass all its used attachments are
* used by the other subpass.
More information about the mesa-commit
mailing list