mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
panfrost: fix overflow-debugging
We were using an unsigned instead of a size_t for the size calculation, which would break large allocations. So let's switch to size_t here, for good measure. Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34156>
This commit is contained in:
parent
1471279203
commit
fe680844f5
1 changed files with 2 additions and 2 deletions
|
|
@ -144,8 +144,8 @@ panfrost_pool_alloc_aligned(struct panfrost_pool *pool, size_t sz,
|
|||
!(pool->create_flags & PAN_BO_INVISIBLE)) {
|
||||
long page_size = sysconf(_SC_PAGESIZE);
|
||||
assert(page_size > 0 && util_is_power_of_two_nonzero(page_size));
|
||||
unsigned aligned = ALIGN_POT(sz, page_size);
|
||||
unsigned bo_size = aligned + PAN_GUARD_SIZE;
|
||||
size_t aligned = ALIGN_POT(sz, page_size);
|
||||
size_t bo_size = aligned + PAN_GUARD_SIZE;
|
||||
|
||||
bo = panfrost_pool_alloc_backing(pool, bo_size);
|
||||
if (!bo)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue