nak: Implement OpFSOut with an OpParCopy

This prevents ordering issues among the sources.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
This commit is contained in:
Faith Ekstrand 2023-04-10 17:23:30 -05:00 committed by Marge Bot
parent d6912622f5
commit 0943da1a37

View file

@ -2491,13 +2491,14 @@ impl Shader {
}))]
}
Op::FSOut(out) => {
let mut instrs = Vec::new();
let mut pcopy = OpParCopy::new();
for (i, src) in out.srcs.iter().enumerate() {
let dst =
RegRef::new(RegFile::GPR, i.try_into().unwrap(), 1);
instrs.push(Instr::new_mov(dst.into(), *src));
pcopy.srcs.push(*src);
pcopy.dsts.push(dst.into());
}
instrs
vec![Instr::new(Op::ParCopy(pcopy))]
}
_ => vec![instr],
}