pub struct Instruction {Show 23 fields
pub offset: usize,
pub size: usize,
pub opcode: Opcode,
pub words: [u32; 4],
pub end: bool,
pub destination: Register,
pub write_mask: u8,
pub no_destination: bool,
pub update_condition: bool,
pub condition_destination: u8,
pub predicate: Predicate,
pub saturate: bool,
pub precision: u8,
pub expand_texture: bool,
pub texture_unit: Option<u8>,
pub sources: Vec<Source>,
pub constant: Option<[u32; 4]>,
pub source_precision: [u8; 3],
pub scale: u8,
pub indexed_input: bool,
pub input_address: u16,
pub interpolant_flag: bool,
pub control: Option<Control>,
}Expand description
A decoded instruction.
Fields§
§offset: usizeThe byte offset of the instruction’s first slot.
size: usizeIts size in bytes: 16, or 32 with an inline constant.
opcode: OpcodeThe opcode.
words: [u32; 4]Rotated words, including fields not interpreted here.
end: boolThe instruction is the last of the program.
destination: RegisterThe destination register.
write_mask: u8The components written, bit 0 x to bit 3 w.
no_destination: boolThe result goes to the condition code only.
update_condition: boolThe instruction updates a condition-code register.
condition_destination: u8Which condition-code register it updates.
predicate: PredicateThe condition under which it executes.
saturate: boolThe result is clamped to 0 to 1.
precision: u8The result precision code, as stored.
expand_texture: boolThe texture lookup expands its result (the signed-range flag), as stored.
texture_unit: Option<u8>The texture unit a sampling instruction reads.
sources: Vec<Source>The sources, as many as the opcode reads.
constant: Option<[u32; 4]>The inline constant of the slot after the instruction, as IEEE bits.
source_precision: [u8; 3]Encoded modifiers for each source, and the result scale, retained without floating-point evaluation.
scale: u8The result scale code, as stored.
indexed_input: boolThe inputs are addressed indirectly (bit 30 of the last operand word). Clear in every instruction of the fragment programs on the disc.
input_address: u16Bits 19 to 29 of the last operand word, as stored. Bits 21 to 29 are all ones on every instruction of the disc’s programs that reads an interpolant and zero on every other; bits 19 and 20 are always zero. It is not an address in any of them.
interpolant_flag: boolBit 31 of the last operand word, as stored: a flag of the interpolant the instruction reads (always clear where it reads none). Within one program every read of one interpolant has the same value in 17,689 of the disc’s 17,691 (program, interpolant) pairs; it is clear on all 10,409 texture lookups’ coordinates (texture coordinates 0 and 1) and set on most of the reads of texture coordinates 4 to 7. What it selects is not established: a program’s parameter table names no varying, so the sense (perspective-corrected or not) is not tied to any data, and it is read as the bit it is.
control: Option<Control>What a flow-control instruction does.