Skip to main content

Declared

Enum Declared 

Source
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

§register: u32

The register index (the <n> of x<n>).

§size: u32

The number of elements.

§components: u32

The number of components per element.

§

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: u32

The buffer slot (the <slot> of cb<slot>) in Shader Model 5.0, its id in 5.1 (its registers in range).

§rows: u32

The number of 16-byte rows; 0 where the declaration states none.

§dynamic: bool

The buffer is dynamically indexed.

§dimensions: usize

The number of index dimensions the operand had (1 or 2; 3 in Shader Model 5.1).

§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

§slot: u32

The sampler slot in Shader Model 5.0, its id in 5.1 (its registers in range).

§mode: u32

0 default, 1 comparison, 2 mono.

§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

§slot: u32

The resource slot in Shader Model 5.0, its id in 5.1 (its registers in range).

§dimension: u32

The D3D resource dimension code.

§samples: u32

The sample count of a multisampled resource.

§returns: ReturnCodes

The return type of each lane.

§token: u32

The return type token as stored.

§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

§slot: u32

The resource 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.

§

ResourceStructured

dcl_resource_structured t<slot>, stride.

Fields

§slot: u32

The resource slot in Shader Model 5.0, its id in 5.1 (its registers in range).

§stride: u32

The element stride in bytes.

§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

§slot: u32

The UAV slot in Shader Model 5.0, its id in 5.1 (its registers in range).

§dimension: u32

The D3D resource dimension code.

§returns: ReturnCodes

The return type of each lane.

§token: u32

The return type token as stored.

§control: u32

The opcode token’s control bits.

§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

§slot: u32

The UAV slot in Shader Model 5.0, its id in 5.1 (its registers in range).

§control: u32

The opcode token’s control bits.

§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

§slot: u32

The UAV slot in Shader Model 5.0, its id in 5.1 (its registers in range).

§stride: u32

The element stride in bytes.

§control: u32

The opcode token’s control bits.

§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.

§

GroupSharedRaw

dcl_tgsm_raw g<register>, bytes.

Fields

§register: u32

The shared memory register index.

§bytes: u32

Its size in bytes.

§

GroupSharedStructured

dcl_tgsm_structured g<register>, stride, count.

Fields

§register: u32

The shared memory register index.

§stride: u32

The element stride in bytes.

§count: u32

The number of elements.

§

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

§operand: Operand

The input register or special input the declaration names.

§interpolation: Option<u32>

The interpolation mode of a pixel input.

§name: Option<u32>

The system value (D3D_NAME) of a _sgv or _siv declaration.

§

Output

An output register or special output: dcl_output, _sgv, _siv.

Fields

§operand: Operand

The output register or special output the declaration names.

§name: Option<u32>

The system value (D3D_NAME) of a _siv or _sgv declaration.

§

IndexRange

dcl_indexrange: registers from the operand’s that a program indexes as one array, count of them.

Fields

§operand: Operand

The first register of the range.

§count: u32

The number of registers.

§

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.

Fields

§class: u32

The custom data 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.

Fields

§id: u32

The table’s id.

§bodies: Vec<u32>

The function bodies, by call site.

§

Interface

dcl_interface fp<id>[array][sites] = {ft..}: an interface pointer, or an array of them.

Fields

§id: u32

The interface pointer’s id, its first where it is an array.

§dynamic: bool

The pointer is indexed by a register (dcl_interface_dynamicindexed).

§sites: u32

The number of call sites, the length of each of its tables.

§length: u32

The array length, 1 for one pointer.

§tables: Vec<u32>

The function tables of the classes that can be bound to it.

§

Other

A declaration this decoder does not type: stage-specific (geometry, tessellation, compute).

Fields

§opcode: u16

The opcode.

§control: u32

The opcode token’s control bits.

§words: Vec<u32>

The declaration’s words after its operands, as stored.

Implementations§

Source§

impl Declared

Source

pub fn registers(&self) -> Option<RegisterRange>

The registers and space a resource, sampler, view or constant buffer declaration binds: its range in Shader Model 5.1, its one register in space 0 before; None for the other declarations.

Trait Implementations§

Source§

impl Clone for Declared

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Declared

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.