From 0943da1a371fcbb844e19d97460d8d6d0a600c5f Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Mon, 10 Apr 2023 17:23:30 -0500 Subject: [PATCH] nak: Implement OpFSOut with an OpParCopy This prevents ordering issues among the sources. Part-of: --- src/nouveau/compiler/nak_ir.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/nouveau/compiler/nak_ir.rs b/src/nouveau/compiler/nak_ir.rs index 30623d520a4..d30f735ffd2 100644 --- a/src/nouveau/compiler/nak_ir.rs +++ b/src/nouveau/compiler/nak_ir.rs @@ -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], }