mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 22:20:09 +01:00
nak: Rework OpALd and OpASt a bit
Replace the out_load flag with an output flag which we now require to be set for OpASt. Also, improve printing so we add .O and .P qualifiers as needed. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
This commit is contained in:
parent
f5805dadab
commit
f097303a99
3 changed files with 18 additions and 7 deletions
|
|
@ -1489,7 +1489,7 @@ impl SM75Instr {
|
|||
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(79..80, op.access.out_load);
|
||||
self.set_field(79..80, op.access.output);
|
||||
}
|
||||
|
||||
fn encode_ast(&mut self, op: &OpASt) {
|
||||
|
|
@ -1503,7 +1503,7 @@ impl SM75Instr {
|
|||
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);
|
||||
assert!(!op.access.out_load);
|
||||
assert!(op.access.output);
|
||||
}
|
||||
|
||||
fn encode_ipa(&mut self, op: &OpIpa) {
|
||||
|
|
|
|||
|
|
@ -1421,7 +1421,7 @@ impl<'a> ShaderFromNir<'a> {
|
|||
addr: addr,
|
||||
comps: comps,
|
||||
patch: false,
|
||||
out_load: false,
|
||||
output: false,
|
||||
flags: 0,
|
||||
};
|
||||
|
||||
|
|
@ -1758,7 +1758,7 @@ impl<'a> ShaderFromNir<'a> {
|
|||
addr: addr,
|
||||
comps: comps,
|
||||
patch: false,
|
||||
out_load: false,
|
||||
output: true,
|
||||
flags: 0,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1919,7 +1919,7 @@ pub struct AttrAccess {
|
|||
pub addr: u16,
|
||||
pub comps: u8,
|
||||
pub patch: bool,
|
||||
pub out_load: bool,
|
||||
pub output: bool,
|
||||
pub flags: u8,
|
||||
}
|
||||
|
||||
|
|
@ -3328,7 +3328,14 @@ pub struct OpALd {
|
|||
|
||||
impl fmt::Display for OpALd {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "ALD {} a", self.dst)?;
|
||||
write!(f, "ALD")?;
|
||||
if self.access.output {
|
||||
write!(f, ".O")?;
|
||||
}
|
||||
if self.access.patch {
|
||||
write!(f, ".P")?;
|
||||
}
|
||||
write!(f, " {} a", self.dst)?;
|
||||
if !self.vtx.is_zero() {
|
||||
write!(f, "[{}]", self.vtx)?;
|
||||
}
|
||||
|
|
@ -3357,7 +3364,11 @@ pub struct OpASt {
|
|||
|
||||
impl fmt::Display for OpASt {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "AST a")?;
|
||||
write!(f, "AST")?;
|
||||
if self.access.patch {
|
||||
write!(f, ".P")?;
|
||||
}
|
||||
write!(f, " a")?;
|
||||
if !self.vtx.is_zero() {
|
||||
write!(f, "[{}]", self.vtx)?;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue