lima: fix dynarray usage in lima_submit_add_bo
authorErico Nunes <nunes.erico@gmail.com>
Fri, 14 Jun 2019 10:28:55 +0000 (12:28 +0200)
committerErico Nunes <nunes.erico@gmail.com>
Fri, 14 Jun 2019 18:47:35 +0000 (20:47 +0200)
Commit de8a919702a refactored dynarray usage and changed the size of the
allocation in lima_submit_add_bo.
That causes a segfault in programs running with lima.
This commit restores the allocation size back to the previous size.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
src/gallium/drivers/lima/lima_submit.c

index c54289d1470d2b9c8547174fa50ecee64665d615..3b5145f3bc4874f731fbd1ad7d4e69867e33a95b 100644 (file)
@@ -110,7 +110,7 @@ bool lima_submit_add_bo(struct lima_submit *submit, struct lima_bo *bo, uint32_t
    submit_bo->handle = bo->handle;
    submit_bo->flags = flags;
 
-   struct lima_bo **jbo = util_dynarray_grow(&submit->bos, struct lima_bo, 1);
+   struct lima_bo **jbo = util_dynarray_grow(&submit->bos, struct lima_bo *, 1);
    *jbo = bo;
 
    /* prevent bo from being freed when submit start */