Module: Mesa Branch: main Commit: a6376705e4807d6edd8329bf6d742608f03249e7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a6376705e4807d6edd8329bf6d742608f03249e7
Author: Faith Ekstrand <[email protected]> Date: Wed Nov 8 12:11:05 2023 -0600 nak: Make ALD/AST.PHYS a boolean The generic flags field was originally copied from codegen but a boolean makes way more sense. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26181> --- src/nouveau/compiler/nak_encode_sm75.rs | 4 ++-- src/nouveau/compiler/nak_from_nir.rs | 6 +++--- src/nouveau/compiler/nak_ir.rs | 8 +++++++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/nouveau/compiler/nak_encode_sm75.rs b/src/nouveau/compiler/nak_encode_sm75.rs index f8aebda7c0d..3bec7363aa6 100644 --- a/src/nouveau/compiler/nak_encode_sm75.rs +++ b/src/nouveau/compiler/nak_encode_sm75.rs @@ -1475,7 +1475,7 @@ impl SM75Instr { self.set_field(40..50, op.access.addr); self.set_field(74..76, op.access.comps - 1); self.set_field(76..77, op.access.patch); - self.set_field(77..78, op.access.flags); + self.set_field(77..78, op.access.phys); self.set_field(79..80, op.access.output); } @@ -1489,7 +1489,7 @@ impl SM75Instr { self.set_field(40..50, op.access.addr); self.set_field(74..76, op.access.comps - 1); self.set_field(76..77, op.access.patch); - self.set_field(77..78, op.access.flags); + self.set_field(77..78, op.access.phys); assert!(op.access.output); } diff --git a/src/nouveau/compiler/nak_from_nir.rs b/src/nouveau/compiler/nak_from_nir.rs index 164b10e92d8..746429a9095 100644 --- a/src/nouveau/compiler/nak_from_nir.rs +++ b/src/nouveau/compiler/nak_from_nir.rs @@ -1249,7 +1249,7 @@ impl<'a> ShaderFromNir<'a> { comps: 1, patch: flags.patch(), output: flags.output(), - flags: 0, + phys: false, }; let dst = b.alloc_ssa(RegFile::GPR, 1); @@ -1303,7 +1303,7 @@ impl<'a> ShaderFromNir<'a> { comps: intrin.num_components, patch: flags.patch(), output: flags.output(), - flags: flags.phys().into(), + phys: flags.phys(), }; if intrin.intrinsic == nir_intrinsic_ald_nv { @@ -1739,7 +1739,7 @@ impl<'a> ShaderFromNir<'a> { comps: 2, patch: false, output: true, - flags: 0, + phys: false, }; // This is recorded as a patch output in parse_shader() because diff --git a/src/nouveau/compiler/nak_ir.rs b/src/nouveau/compiler/nak_ir.rs index cf3b2f86a17..7f6fe31fc1e 100644 --- a/src/nouveau/compiler/nak_ir.rs +++ b/src/nouveau/compiler/nak_ir.rs @@ -1921,7 +1921,7 @@ pub struct AttrAccess { pub comps: u8, pub patch: bool, pub output: bool, - pub flags: u8, + pub phys: bool, } #[repr(C)] @@ -3307,6 +3307,9 @@ impl fmt::Display for OpALd { if self.access.patch { write!(f, ".P")?; } + if self.access.phys { + write!(f, ".PHYS")?; + } write!(f, " {} a", self.dst)?; if !self.vtx.is_zero() { write!(f, "[{}]", self.vtx)?; @@ -3340,6 +3343,9 @@ impl fmt::Display for OpASt { if self.access.patch { write!(f, ".P")?; } + if self.access.phys { + write!(f, ".PHYS")?; + } write!(f, " a")?; if !self.vtx.is_zero() { write!(f, "[{}]", self.vtx)?;
