nak: Add a B32 source type

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26535>
This commit is contained in:
Faith Ekstrand
2023-12-05 23:41:04 -06:00
committed by Marge Bot
parent fab508da38
commit 48917600fb
3 changed files with 16 additions and 2 deletions

View File

@@ -993,6 +993,7 @@ pub enum SrcType {
F32,
F64,
I32,
B32,
Pred,
Bar,
}
@@ -1159,6 +1160,14 @@ impl Src {
self.src_ref.is_alu()
}
SrcType::B32 => {
match self.src_mod {
SrcMod::None | SrcMod::BNot => (),
_ => return false,
}
self.src_ref.is_alu()
}
SrcType::Pred => {
match self.src_mod {
SrcMod::None | SrcMod::BNot => (),

View File

@@ -299,7 +299,8 @@ fn legalize_instr(
SrcType::ALU
| SrcType::F32
| SrcType::F64
| SrcType::I32 => {
| SrcType::I32
| SrcType::B32 => {
panic!("ALU srcs must be legalized explicitly");
}
SrcType::Pred => {

View File

@@ -294,7 +294,11 @@ impl CopyPropPass {
SrcType::GPR => {
self.prop_to_gpr_src(src);
}
SrcType::ALU | SrcType::F32 | SrcType::I32 | SrcType::Pred => {
SrcType::ALU
| SrcType::F32
| SrcType::I32
| SrcType::B32
| SrcType::Pred => {
self.prop_to_scalar_src(src_type, src);
}
SrcType::F64 => {