lavapipe: fix ptralloc typo

these calculations are so tricky I can't even type them again

Fixes: 48fde98b79 ("lavapipe: replace hard pointer calcs in dynamic render with ptralloc")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14631>
This commit is contained in:
Mike Blumenkrantz 2022-01-19 21:04:15 -05:00
parent 9314950726
commit 0c31ab34d2

View file

@ -1859,7 +1859,7 @@ static void handle_begin_rendering(struct vk_cmd_queue_entry *cmd,
struct lvp_render_pass_attachment *attachments;
struct lvp_render_pass_attachment **attachment_refs;
/* [lvp_subpass] [attachment_count * lvp_render_pass_attachment] [attachment_count * lvp_render_pass_attachment*] */
size_t sizes[] = {attachment_count * sizeof(struct lvp_render_pass_attachment*), attachment_count * sizeof(struct lvp_render_pass_attachment)};
size_t sizes[] = {attachment_count * sizeof(struct lvp_render_pass_attachment), attachment_count * sizeof(struct lvp_render_pass_attachment*)};
void **ptrs[] = {(void**)&attachments, (void**)&attachment_refs};
struct lvp_subpass *subpass = ptrzalloc(sizeof(struct lvp_subpass), 2, sizes, ptrs);
if (!subpass) {