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: 8a6160a354 ("lavapipe: VK_KHR_dynamic_rendering")

fixes:
dEQP-VK.draw.dynamic_rendering.multiple_interpolation.structured.with_sample_decoration.4_samples

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15330>
This commit is contained in:
Mike Blumenkrantz 2022-03-10 14:05:32 -05:00 committed by Marge Bot
parent 938488f439
commit c40dc39b5a
1 changed files with 2 additions and 2 deletions

View File

@ -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;