nak: Add some #[allow(dead_code)]

All this is either enums where we want all of them for the sake of
documentation or where I'm pretty sure we want them in the future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
This commit is contained in:
Faith Ekstrand 2023-10-19 10:19:57 -05:00 committed by Marge Bot
parent eb8f907855
commit d0b724aaac
2 changed files with 10 additions and 0 deletions

View file

@ -95,6 +95,7 @@ impl ALUSrc {
ALUSrc::from_src_file(src, RegFile::GPR)
}
#[allow(dead_code)]
pub fn from_usrc(src: &Src) -> ALUSrc {
assert!(src.is_uniform());
ALUSrc::from_src_file(src, RegFile::UGPR)
@ -202,6 +203,7 @@ impl SM75Instr {
}
}
#[allow(dead_code)]
fn set_src_cx(&mut self, range: Range<usize>, cb: &CBufRef) {
let mut v = BitMutView::new_subset(self, range);
if let CBuf::BindlessGPR(reg) = cb.buf {

View file

@ -711,7 +711,11 @@ impl fmt::Display for Dst {
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
pub enum CBuf {
Binding(u8),
#[allow(dead_code)]
BindlessSSA(SSAValue),
#[allow(dead_code)]
BindlessGPR(RegRef),
}
@ -3469,6 +3473,7 @@ impl fmt::Display for OpMemBar {
}
}
#[allow(dead_code)]
pub enum BMovSrc {
Barrier(BarRef),
TreadStateEnum0,
@ -3661,6 +3666,7 @@ impl fmt::Display for OpNop {
}
}
#[allow(dead_code)]
pub enum PixVal {
MsCount,
CovMask,
@ -4694,6 +4700,7 @@ impl BasicBlock {
None
}
#[allow(dead_code)]
pub fn phi_dsts_mut(&mut self) -> Option<&mut OpPhiDsts> {
for instr in self.instrs.iter_mut() {
match &mut instr.op {
@ -4744,6 +4751,7 @@ impl BasicBlock {
}
}
#[allow(dead_code)]
pub fn branch_mut(&mut self) -> Option<&mut Instr> {
if let Some(i) = self.instrs.last_mut() {
if i.is_branch() {