mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 07:48:07 +02:00
panvk: ensure we don't go over the hardware FAU limit
All the Malis in existence out there support at most 64 user-supplied FAUs. Reviewed-by: Olivia Lee <olivia.lee@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35191>
This commit is contained in:
parent
c37bcd43fc
commit
c6f19e87ac
1 changed files with 4 additions and 0 deletions
|
|
@ -692,8 +692,12 @@ lower_load_push_consts(nir_shader *nir, struct panvk_shader *shader)
|
|||
* blend constants are never loaded from the fragment shader, but might be
|
||||
* needed in the blend shader. */
|
||||
shader->fau.sysval_count = BITSET_COUNT(shader->fau.used_sysvals);
|
||||
/* 32 FAUs (256 bytes) are reserved for API push constants */
|
||||
assert(shader->fau.sysval_count <= 64 - 32 && "too many sysval FAUs");
|
||||
shader->fau.total_count =
|
||||
shader->fau.sysval_count + BITSET_COUNT(shader->fau.used_push_consts);
|
||||
assert(shader->fau.total_count <= 64 &&
|
||||
"asking for more FAUs than the hardware has to offer");
|
||||
|
||||
if (!progress)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue