mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 15:20:17 +01:00
compiler/rust: Add more NIR intrinsic getters
Reviewed-by: Mel Henning <mhenning@darkrefraction.com> Reviewed-by: Benjamin Lee <benjamin.lee@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34126>
This commit is contained in:
parent
1355c71943
commit
c05565ce7b
1 changed files with 16 additions and 0 deletions
|
|
@ -365,6 +365,22 @@ impl nir_intrinsic_instr {
|
|||
pub fn atomic_op(&self) -> nir_atomic_op {
|
||||
self.get_const_index(NIR_INTRINSIC_ATOMIC_OP) as nir_atomic_op
|
||||
}
|
||||
|
||||
pub fn src_type(&self) -> ALUType {
|
||||
ALUType(self.get_const_index(NIR_INTRINSIC_SRC_TYPE) as nir_alu_type)
|
||||
}
|
||||
|
||||
pub fn dest_type(&self) -> ALUType {
|
||||
ALUType(self.get_const_index(NIR_INTRINSIC_DEST_TYPE) as nir_alu_type)
|
||||
}
|
||||
|
||||
pub fn rounding_mode(&self) -> nir_rounding_mode {
|
||||
self.get_const_index(NIR_INTRINSIC_ROUNDING_MODE) as nir_rounding_mode
|
||||
}
|
||||
|
||||
pub fn saturate(&self) -> bool {
|
||||
self.get_const_index(NIR_INTRINSIC_SATURATE) != 0
|
||||
}
|
||||
}
|
||||
|
||||
impl nir_intrinsic_info {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue