Module: Mesa
Branch: main
Commit: 0c31ab34d2ccecbae9a6cbe01b24d646546f23da
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0c31ab34d2ccecbae9a6cbe01b24d646546f23da

Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Jan 19 21:04:15 2022 -0500

lavapipe: fix ptralloc typo

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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14631>

---

 src/gallium/frontends/lavapipe/lvp_execute.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c 
b/src/gallium/frontends/lavapipe/lvp_execute.c
index 5ba42f7244d..b078b0e1c89 100644
--- a/src/gallium/frontends/lavapipe/lvp_execute.c
+++ b/src/gallium/frontends/lavapipe/lvp_execute.c
@@ -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) {

Reply via email to