mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
panvk: widen type before multiplying
This function returns an uint64_t, but returns the result of two
uint32_t values. If we don't widen at least one of them before
returning, the multiplication wraps large results.
So let's widen the type first, so we can preserve large offsets.
Fixes: d1934e44fc ("panvk: Implement occlusion queries for JM")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
CID: 1634943
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32380>
This commit is contained in:
parent
2c6bc9615d
commit
14bca200be
1 changed files with 1 additions and 1 deletions
|
|
@ -65,7 +65,7 @@ static uint64_t
|
|||
panvk_query_offset(struct panvk_query_pool *pool, uint32_t query)
|
||||
{
|
||||
assert(query < pool->vk.query_count);
|
||||
return query * pool->query_stride;
|
||||
return query * (uint64_t)pool->query_stride;
|
||||
}
|
||||
|
||||
static uint64_t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue