pub enum Declared {
Show 24 variants
Temps(u32),
IndexableTemp {
register: u32,
size: u32,
components: u32,
},
GlobalFlags(u32),
ConstantBuffer {
slot: u32,
rows: u32,
dynamic: bool,
dimensions: usize,
range: Option<RegisterRange>,
},
Sampler {
slot: u32,
mode: u32,
range: Option<RegisterRange>,
},
Resource {
slot: u32,
dimension: u32,
samples: u32,
returns: ReturnCodes,
token: u32,
range: Option<RegisterRange>,
},
ResourceRaw {
slot: u32,
range: Option<RegisterRange>,
},
ResourceStructured {
slot: u32,
stride: u32,
range: Option<RegisterRange>,
},
UavTyped {
slot: u32,
dimension: u32,
returns: ReturnCodes,
token: u32,
control: u32,
range: Option<RegisterRange>,
},
UavRaw {
slot: u32,
control: u32,
range: Option<RegisterRange>,
},
UavStructured {
slot: u32,
stride: u32,
control: u32,
range: Option<RegisterRange>,
},
ThreadGroup([u32; 3]),
GroupSharedRaw {
register: u32,
bytes: u32,
},
GroupSharedStructured {
register: u32,
stride: u32,
count: u32,
},
Input {
operand: Operand,
interpolation: Option<u32>,
name: Option<u32>,
},
Output {
operand: Operand,
name: Option<u32>,
},
IndexRange {
operand: Operand,
count: u32,
},
Stream(Operand),
ImmediateBuffer(Vec<[u32; 4]>),
CustomData {
class: u32,
},
FunctionBody(u32),
FunctionTable {
id: u32,
bodies: Vec<u32>,
},
Interface {
id: u32,
dynamic: bool,
sites: u32,
length: u32,
tables: Vec<u32>,
},
Other {
opcode: u16,
control: u32,
words: Vec<u32>,
},
}Expand description
A declaration, typed where this reader knows its layout.
Variants§
Temps(u32)
dcl_temps.
IndexableTemp
dcl_indexable_temp x<register>[size], components.
Fields
GlobalFlags(u32)
dcl_globalFlags: the control bits as stored (bit 0 refactoring allowed, 1 double precision, 2 forced early
depth-stencil, 3 raw and structured buffers, 4 skip optimization, 5 min precision, 6 double extensions, 7
shader extensions).
ConstantBuffer
dcl_constantbuffer cb<slot>[rows]; dynamic when it is dynamically indexed.
Fields
slot: u32The buffer slot (the <slot> of cb<slot>) in Shader Model 5.0, its id in 5.1 (its registers in range).
range: Option<RegisterRange>The registers and space of a Shader Model 5.1 declaration; None before 5.1.
Sampler
dcl_sampler s<slot>, its mode: 0 default, 1 comparison, 2 mono.
Fields
range: Option<RegisterRange>The registers and space of a Shader Model 5.1 declaration; None before 5.1.
Resource
dcl_resource_<dimension> t<slot>: the D3D resource dimension code, the sample count of a multisampled one,
and the four return types.
Fields
returns: ReturnCodesThe return type of each lane.
range: Option<RegisterRange>The registers and space of a Shader Model 5.1 declaration; None before 5.1.
ResourceRaw
dcl_resource_raw t<slot>.
Fields
range: Option<RegisterRange>The registers and space of a Shader Model 5.1 declaration; None before 5.1.
ResourceStructured
dcl_resource_structured t<slot>, stride.
Fields
range: Option<RegisterRange>The registers and space of a Shader Model 5.1 declaration; None before 5.1.
UavTyped
dcl_uav_typed and its control bits (dimension in bits 0 to 4, globally coherent bit 5).
Fields
returns: ReturnCodesThe return type of each lane.
range: Option<RegisterRange>The registers and space of a Shader Model 5.1 declaration; None before 5.1.
UavRaw
dcl_uav_raw u<slot>.
Fields
range: Option<RegisterRange>The registers and space of a Shader Model 5.1 declaration; None before 5.1.
UavStructured
dcl_uav_structured u<slot>, stride.
Fields
range: Option<RegisterRange>The registers and space of a Shader Model 5.1 declaration; None before 5.1.
ThreadGroup([u32; 3])
dcl_thread_group x, y, z.
dcl_tgsm_raw g<register>, bytes.
dcl_tgsm_structured g<register>, stride, count.
Input
An input register or special input: dcl_input, _sgv, _siv, _ps, _ps_sgv, _ps_siv. interpolation is
a pixel input’s D3D_INTERPOLATION_MODE; name a system value’s D3D_NAME.
Fields
Output
An output register or special output: dcl_output, _sgv, _siv.
Fields
IndexRange
dcl_indexrange: registers from the operand’s that a program indexes as one array, count of them.
Stream(Operand)
dcl_stream m<n>: a geometry program’s output stream that the declarations after it describe.
ImmediateBuffer(Vec<[u32; 4]>)
dcl_immediateConstantBuffer.
CustomData
Custom data that is not an immediate constant buffer (a comment, debug information, …) by its class.
FunctionBody(u32)
dcl_function_body fb<id>: a function body of a program with class linkage.
FunctionTable
dcl_function_table ft<id> = {fb..}: the function bodies a class’s table holds, one per call site.
Interface
dcl_interface fp<id>[array][sites] = {ft..}: an interface pointer, or an array of them.
Fields
Other
A declaration this decoder does not type: stage-specific (geometry, tessellation, compute).