From 9cb688af88a72aef8b40937899736561da44427c Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 1 May 2026 15:54:01 +1000 Subject: [PATCH] lavapipe: treat NULL pColorAttachmentLocations as no handles this fixes a crash seen in: dEQP-VK.renderpasses.dynamic_rendering.partial_secondary_cmd_buff.local_read.interaction_with_color_write_enable Cc: mesa-stable Part-of: --- src/gallium/frontends/lavapipe/lvp_execute.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c index 53351ef058b..94ca05bf438 100644 --- a/src/gallium/frontends/lavapipe/lvp_execute.c +++ b/src/gallium/frontends/lavapipe/lvp_execute.c @@ -2062,10 +2062,12 @@ handle_rendering_attachment_locations(struct vk_cmd_queue_entry *cmd, struct ren state->fb_remapped = true; memset(state->fb_map, PIPE_MAX_COLOR_BUFS, sizeof(state->fb_map)); assert(state->color_att_count == set->colorAttachmentCount); - for (unsigned i = 0; i < state->color_att_count; i++) { - if (set->pColorAttachmentLocations[i] == VK_ATTACHMENT_UNUSED) - continue; - state->fb_map[i] = set->pColorAttachmentLocations[i]; + if (set->pColorAttachmentLocations) { + for (unsigned i = 0; i < state->color_att_count; i++) { + if (set->pColorAttachmentLocations[i] == VK_ATTACHMENT_UNUSED) + continue; + state->fb_map[i] = set->pColorAttachmentLocations[i]; + } } emit_fb_state(state); }