From: Mike Blumenkrantz Date: Thu, 10 Mar 2022 19:05:32 +0000 (-0500) Subject: lavapipe: use the correct value for dynamic render resolve attachment indexing X-Git-Tag: upstream/22.3.5~11830 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c40dc39b5a87911cd6467b3ec647f382653a9b97;p=platform%2Fupstream%2Fmesa.git lavapipe: use the correct value for dynamic render resolve attachment indexing subpass->color_count is (obviously) not set yet, so this would just clobber the color attachments any time resolves were used Fixes: 8a6160a3542 ("lavapipe: VK_KHR_dynamic_rendering") fixes: dEQP-VK.draw.dynamic_rendering.multiple_interpolation.structured.with_sample_decoration.4_samples Reviewed-by: Dave Airlie Part-of: --- diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c index b1171af..9ebad4d 100644 --- a/src/gallium/frontends/lavapipe/lvp_execute.c +++ b/src/gallium/frontends/lavapipe/lvp_execute.c @@ -1912,8 +1912,8 @@ static void handle_begin_rendering(struct vk_cmd_queue_entry *cmd, return; } bool has_ds = !!info->pDepthAttachment + !!info->pStencilAttachment; - struct lvp_render_pass_attachment *resolve_attachments = num_resolves ? &attachments[subpass->color_count + has_ds] : NULL; - struct lvp_render_pass_attachment **resolve_attachment_refs = num_resolves ? &attachment_refs[subpass->color_count + has_ds] : NULL; + struct lvp_render_pass_attachment *resolve_attachments = num_resolves ? &attachments[info->colorAttachmentCount + has_ds] : NULL; + struct lvp_render_pass_attachment **resolve_attachment_refs = num_resolves ? &attachment_refs[info->colorAttachmentCount + has_ds] : NULL; subpass->color_count = info->colorAttachmentCount; subpass->view_mask = info->viewMask;