pub struct Instruction {
pub op: Op,
pub result: Option<(ValueId, TypeId)>,
pub block: usize,
pub at: usize,
pub precise: bool,
}Expand description
An instruction of a function body.
Fields§
§op: OpWhat it does.
result: Option<(ValueId, TypeId)>The result’s value id and type, when the instruction produces one.
block: usizeThe basic block it belongs to.
at: usizeBit offset of its record.
precise: boolThe instruction carries the dx.precise attachment, which the compiler writes for HLSL’s precise: the value
is not to be fused or reassociated. In skate.’s stock programs it is on calls only: 88,541 tertiary (mad),
13,005 loadInput, 3,546 unary, 1,421 dot3, 331 legacyF16ToF32, 307 binary, 213 dot4 and 105 dot2,
in vertex programs (107,109 instructions in 3,185 of 3,341) and compute programs (360 in 12), in no pixel
program; none of Elden Ring’s has it.
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§impl Debug for Instruction
impl Debug for Instruction
Source§impl PartialEq for Instruction
impl PartialEq for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnsafeUnpin for Instruction
impl UnwindSafe for Instruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more