From 195fd679107b7444d0aef0b38e6975f4d2cf955b Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Fri, 4 Oct 2024 16:55:39 +0200 Subject: [PATCH] panvk/csf: Fix cmd_emit_dcd() in the FB preload logic We need to mask the bound_attachments value with MESA_VK_RP_ATTACHMENT_ANY_COLOR_BITS otherwise we're passing depth/stencil attachments masks too. Fixes: 0bc3502ca36b ("panvk: Implement a custom FB preload logic") Signed-off-by: Boris Brezillon Reviewed-by: Lars-Ivar Hesselberg Simonsen Part-of: --- src/panfrost/vulkan/panvk_vX_cmd_fb_preload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/panfrost/vulkan/panvk_vX_cmd_fb_preload.c b/src/panfrost/vulkan/panvk_vX_cmd_fb_preload.c index b9fd55017d9..0065cda517c 100644 --- a/src/panfrost/vulkan/panvk_vX_cmd_fb_preload.c +++ b/src/panfrost/vulkan/panvk_vX_cmd_fb_preload.c @@ -621,7 +621,8 @@ cmd_emit_dcd(struct panvk_cmd_buffer *cmdbuf, cfg.blend = bds.gpu; cfg.blend_count = bd_count; - cfg.render_target_mask = cmdbuf->state.gfx.render.bound_attachments; + cfg.render_target_mask = cmdbuf->state.gfx.render.bound_attachments & + MESA_VK_RP_ATTACHMENT_ANY_COLOR_BITS; } else { /* ZS_EMIT requires late update/kill */ cfg.zs_update_operation = MALI_PIXEL_KILL_FORCE_LATE;