pub struct Program {
pub instructions: Vec<Instruction>,
}Expand description
A decoded vertex program.
Fields§
§instructions: Vec<Instruction>The instructions in order.
Implementations§
Source§impl Program
impl Program
Sourcepub fn input_mask(&self) -> Option<u32>
pub fn input_mask(&self) -> Option<u32>
The vertex attributes the program reads, bit n for attribute n, as a program header’s attribute_input_mask
states them. An attribute read relative to the address register can be any, so None where one is.
Sourcepub fn output_mask(&self) -> u32
pub fn output_mask(&self) -> u32
The outputs the program writes (the position excepted, which every program writes), as a program header’s
attribute_output_mask states them: destinations 1 to 5 are bits 0 to 4; destination 6 is bit 13, or bit 5 where
only its x lane is written; destination n from 7 is bit n + 7. Measured on the 170 distinct vertex programs
of Tony Hawk’s SHRED, where destinations 1 and 6 to 14 occur; the others follow the nouveau driver’s output
numbering and no program of that game writes them.
Sourcepub fn register_count(&self) -> u32
pub fn register_count(&self) -> u32
The number of temporary registers the program uses: one more than the highest it reads or writes, and at least one.