mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-10 03:28:18 +02:00
compiler/rust/nir: Add helpers for getting ALU input/output types
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41896>
This commit is contained in:
parent
52e2439973
commit
fd9c2ce73d
1 changed files with 8 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue