ir3: Fix compress_regs_left accounting for half-regs
authorConnor Abbott <cwabbott0@gmail.com>
Thu, 19 Aug 2021 16:50:07 +0000 (18:50 +0200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 20 Aug 2021 10:37:36 +0000 (10:37 +0000)
commit6a5312bf86e7b19fc53555d9e4597d199682d886
treee10e66093bd4e702a96d968f584f60afd04bbc8c
parentcca2e0fc1409f6040839ac588adbb5c2c9d45cdb
ir3: Fix compress_regs_left accounting for half-regs

This was just wrong - we need to check against the entire register file,
and we need to include removed full regs even if the register we're
trying to insert is a half-reg, or else we could run out of space when
reinserting full regs after it. There does need to be an additional
check so that we don't try to insert a half-reg beyond the half-reg
limit, but that has to happen in addition to the normal check.

This fixes KHR-GLES31.core.arrays_of_arrays.InteractionArgumentAliasing6
once spilling is added.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12033>
src/freedreno/ir3/ir3_ra.c