compiler/rust/nir: Add helpers for getting ALU input/output types
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41896>
This commit is contained in:
Faith Ekstrand 2026-05-27 23:19:04 -04:00 committed by Marge Bot
parent 52e2439973
commit fd9c2ce73d

View file

@ -224,6 +224,14 @@ impl nir_alu_instr {
pub fn get_src(&self, idx: usize) -> &nir_alu_src {
&self.srcs_as_slice()[idx]
}
pub fn output_type(&self) -> ALUType {
ALUType(self.info().output_type)
}
pub fn input_type(&self, src_idx: usize) -> ALUType {
ALUType(self.info().input_types[src_idx])
}
}
impl nir_op_info {