mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
panfrost: Correctly calculate prefetch suppresion varying index
The xfb_base is a base index, it makes no sense to multiply that with
the number of streamout targets. Use addition instead to fix a buffer
overflow.
Fixes: 557633b142 ("panfrost: Suppress Bifrost prefetching")
Reported-by: Luc Ma <onion0709@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17447>
This commit is contained in:
parent
37ab45079d
commit
537f67f053
1 changed files with 1 additions and 1 deletions
|
|
@ -2667,7 +2667,7 @@ panfrost_emit_varying_descriptor(struct panfrost_batch *batch,
|
|||
|
||||
#if PAN_ARCH >= 6
|
||||
/* Suppress prefetch on Bifrost */
|
||||
memset(varyings + (xfb_base * ctx->streamout.num_targets), 0, sizeof(*varyings));
|
||||
memset(varyings + xfb_base + ctx->streamout.num_targets, 0, sizeof(*varyings));
|
||||
#else
|
||||
/* Emit the stream out buffers. We need enough room for all the
|
||||
* vertices we emit across all instances */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue