mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
nak: add is_gpr_reg and is_ugpr_reg helpers
Reviewed-by: Mel Henning <mhenning@darkrefraction.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40891>
This commit is contained in:
parent
6c5ee118cd
commit
bf6c3e9d99
1 changed files with 18 additions and 0 deletions
|
|
@ -1158,6 +1158,24 @@ impl Src {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn is_gpr_reg(&self) -> bool {
|
||||
match &self.src_ref {
|
||||
SrcRef::SSA(ssa) => ssa.file() == RegFile::GPR,
|
||||
SrcRef::Reg(reg) => reg.file() == RegFile::GPR,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn is_ugpr_reg(&self) -> bool {
|
||||
match &self.src_ref {
|
||||
SrcRef::SSA(ssa) => ssa.file() == RegFile::UGPR,
|
||||
SrcRef::Reg(reg) => reg.file() == RegFile::UGPR,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_predicate(&self) -> bool {
|
||||
self.src_ref.is_predicate()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue