mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
nak/nvdisasm_tests: test .SCR flag in TEX, TLD and TLD4
Reviewed-by: Mel Henning <mhenning@darkrefraction.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40900>
This commit is contained in:
parent
f76e7d8e62
commit
b6fb51caf5
1 changed files with 62 additions and 59 deletions
|
|
@ -485,38 +485,14 @@ pub fn test_texture() {
|
|||
|
||||
for &sm in sm_list() {
|
||||
let mut c = DisasmCheck::new();
|
||||
for lod_mode in lod_modes {
|
||||
if lod_mode == TexLodMode::BiasClamp && sm >= 100 {
|
||||
continue;
|
||||
}
|
||||
for scalar in [false, true] {
|
||||
let scr = if scalar { ".scr" } else { "" };
|
||||
for lod_mode in lod_modes {
|
||||
if lod_mode == TexLodMode::BiasClamp && sm >= 100 {
|
||||
continue;
|
||||
}
|
||||
|
||||
let instr = OpTex {
|
||||
dsts: [Dst::Reg(r0), Dst::Reg(r2)],
|
||||
fault: Dst::Reg(p0),
|
||||
|
||||
tex: TexRef::Bindless,
|
||||
|
||||
srcs: [SrcRef::Reg(r1).into(), SrcRef::Reg(r3).into()],
|
||||
|
||||
dim: TexDim::_2D,
|
||||
lod_mode,
|
||||
deriv_mode: TexDerivMode::Auto,
|
||||
z_cmpr: false,
|
||||
offset_mode: TexOffsetMode::None,
|
||||
mem_eviction_priority: MemEvictionPriority::First,
|
||||
nodep: true,
|
||||
channel_mask: ChannelMask::for_comps(3),
|
||||
scalar: false,
|
||||
};
|
||||
c.push(
|
||||
instr,
|
||||
format!(
|
||||
"tex.b{lod_mode}.ef.nodep p0, r2, r0, r1, r3, 2d, 0x7;"
|
||||
),
|
||||
);
|
||||
|
||||
if lod_mode.is_explicit_lod() {
|
||||
let instr = OpTld {
|
||||
let instr = OpTex {
|
||||
dsts: [Dst::Reg(r0), Dst::Reg(r2)],
|
||||
fault: Dst::Reg(p0),
|
||||
|
||||
|
|
@ -525,51 +501,78 @@ pub fn test_texture() {
|
|||
srcs: [SrcRef::Reg(r1).into(), SrcRef::Reg(r3).into()],
|
||||
|
||||
dim: TexDim::_2D,
|
||||
is_ms: false,
|
||||
lod_mode,
|
||||
deriv_mode: TexDerivMode::Auto,
|
||||
z_cmpr: false,
|
||||
offset_mode: TexOffsetMode::None,
|
||||
mem_eviction_priority: MemEvictionPriority::First,
|
||||
nodep: true,
|
||||
channel_mask: ChannelMask::for_comps(3),
|
||||
scalar: false,
|
||||
scalar: scalar,
|
||||
};
|
||||
c.push(
|
||||
instr,
|
||||
format!(
|
||||
"tld.b{lod_mode}.ef.nodep p0, r2, r0, r1, r3, 2d, 0x7;"
|
||||
"tex{scr}.b{lod_mode}.ef.nodep p0, r2, r0, r1, r3, 2d, 0x7;"
|
||||
),
|
||||
);
|
||||
|
||||
if lod_mode.is_explicit_lod() {
|
||||
let instr = OpTld {
|
||||
dsts: [Dst::Reg(r0), Dst::Reg(r2)],
|
||||
fault: Dst::Reg(p0),
|
||||
|
||||
tex: TexRef::Bindless,
|
||||
|
||||
srcs: [SrcRef::Reg(r1).into(), SrcRef::Reg(r3).into()],
|
||||
|
||||
dim: TexDim::_2D,
|
||||
is_ms: false,
|
||||
lod_mode,
|
||||
offset_mode: TexOffsetMode::None,
|
||||
mem_eviction_priority: MemEvictionPriority::First,
|
||||
nodep: true,
|
||||
channel_mask: ChannelMask::for_comps(3),
|
||||
scalar: scalar,
|
||||
};
|
||||
c.push(
|
||||
instr,
|
||||
format!(
|
||||
"tld{scr}.b{lod_mode}.ef.nodep p0, r2, r0, r1, r3, 2d, 0x7;"
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for offset_mode in tld4_offset_modes {
|
||||
let offset_mode_str = if offset_mode == TexOffsetMode::None {
|
||||
String::new()
|
||||
} else {
|
||||
format!("{offset_mode}")
|
||||
};
|
||||
for offset_mode in tld4_offset_modes {
|
||||
let offset_mode_str = if offset_mode == TexOffsetMode::None {
|
||||
String::new()
|
||||
} else {
|
||||
format!("{offset_mode}")
|
||||
};
|
||||
|
||||
let instr = OpTld4 {
|
||||
dsts: [Dst::Reg(r0), Dst::Reg(r2)],
|
||||
fault: Dst::Reg(p0),
|
||||
let instr = OpTld4 {
|
||||
dsts: [Dst::Reg(r0), Dst::Reg(r2)],
|
||||
fault: Dst::Reg(p0),
|
||||
|
||||
tex: TexRef::Bindless,
|
||||
tex: TexRef::Bindless,
|
||||
|
||||
srcs: [SrcRef::Reg(r1).into(), SrcRef::Reg(r3).into()],
|
||||
srcs: [SrcRef::Reg(r1).into(), SrcRef::Reg(r3).into()],
|
||||
|
||||
dim: TexDim::_2D,
|
||||
comp: 1,
|
||||
offset_mode,
|
||||
z_cmpr: false,
|
||||
mem_eviction_priority: MemEvictionPriority::First,
|
||||
nodep: true,
|
||||
channel_mask: ChannelMask::for_comps(3),
|
||||
scalar: false,
|
||||
};
|
||||
c.push(
|
||||
instr,
|
||||
format!("tld4.g.b{offset_mode_str}.ef.nodep p0, r2, r0, r1, r3, 2d, 0x7;"),
|
||||
);
|
||||
dim: TexDim::_2D,
|
||||
comp: 1,
|
||||
offset_mode,
|
||||
z_cmpr: false,
|
||||
mem_eviction_priority: MemEvictionPriority::First,
|
||||
nodep: true,
|
||||
channel_mask: ChannelMask::for_comps(3),
|
||||
scalar: scalar,
|
||||
};
|
||||
c.push(
|
||||
instr,
|
||||
format!("tld4{scr}.g.b{offset_mode_str}.ef.nodep p0, r2, r0, r1, r3, 2d, 0x7;"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
let instr = OpTmml {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue