lavapipe: fix ptralloc typo
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 20 Jan 2022 02:04:15 +0000 (21:04 -0500)
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 20 Jan 2022 02:05:03 +0000 (21:05 -0500)
these calculations are so tricky I can't even type them again

Fixes: 48fde98b79f ("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>

src/gallium/frontends/lavapipe/lvp_execute.c

index 5ba42f7..b078b0e 100644 (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) {