intel/elk: Fix typo in assertion

Just assert that the array will fit whatever the MAX is for a given
Gfx version.

Fixes: 172c1ab984 ("intel/elk: Add ELK_MAX_MRF_ALL for static allocating arrays")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32978>
This commit is contained in:
Caio Oliveira
2025-01-10 09:19:41 -08:00
committed by Marge Bot
parent 010732b8ef
commit 7fadd864dd

View File

@@ -983,7 +983,7 @@ elk_fs_reg_alloc::spill_reg(unsigned spill_reg)
*/
if (!fs->spilled_any_registers) {
bool mrf_used[ELK_MAX_MRF_ALL];
assert(ARRAY_SIZE(mrf_used) <= ELK_MAX_MRF(devinfo->ver));
assert(ARRAY_SIZE(mrf_used) >= ELK_MAX_MRF(devinfo->ver));
get_used_mrfs(fs, mrf_used);
for (int i = spill_base_mrf(fs); i < ELK_MAX_MRF(devinfo->ver); i++) {