pub struct Parameter<'a> {
pub ty: u32,
pub resource: u32,
pub variability: u32,
pub resource_index: i32,
pub name: Option<&'a [u8]>,
pub semantic: Option<&'a [u8]>,
pub direction: u32,
pub parameter_number: i32,
pub referenced: bool,
pub shared: bool,
pub default_value: Option<Vec<u32>>,
pub embedded_constants: Vec<u32>,
}Expand description
One parameter record of the container.
Fields§
§ty: u32Original CGtype, CGresource and CGenum values, including unknown values.
resource: u32The CGresource (a texture unit, an attribute, …).
variability: u32The CGenum variability (varying, uniform, …).
resource_index: i32The index within the resource, as a signed value.
name: Option<&'a [u8]>NUL-terminated source strings, excluding their terminator; no encoding conversion.
semantic: Option<&'a [u8]>The semantic string, where the parameter has one.
direction: u32The CGenum direction (in, out, …).
parameter_number: i32-1 denotes a global parameter.
referenced: boolWhether the program references the parameter.
Whether the parameter is shared between programs.
default_value: Option<Vec<u32>>The default value’s words as stored (big-endian, NaNs and signed zeros
kept): one per component of the parameter’s numeric type (half, float,
fixed, int and bool scalars, vectors and matrices; components). The
container types the field CgBinaryFloatOffset, so the words are float
bits whatever the type. A default on another type is refused.
embedded_constants: Vec<u32>Byte offsets of 16-byte constants in this program’s microcode.