nak/ra: Move an assert

We're allocating one register file at a time and our invariants are
per-file so we don't want to check the components assumption until we've
checked that it uses the active file.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29591>
This commit is contained in:
Faith Ekstrand 2024-05-29 11:23:48 -05:00 committed by Marge Bot
parent e0b051da39
commit d3e9373a90

View file

@ -629,8 +629,8 @@ fn instr_alloc_scalar_dsts_file(
) {
for dst in instr.dsts_mut() {
if let Dst::SSA(ssa) = dst {
assert!(ssa.comps() == 1);
if ssa.file() == ra.file() {
assert!(ssa.comps() == 1);
let reg = ra.alloc_scalar(ip, sum, ssa[0]);
*dst = RegRef::new(ra.file(), reg, 1).into();
}