Skip to main content

Declaration

Struct Declaration 

Source
pub struct Declaration {
    pub word: usize,
    pub opcode: u16,
    pub control: u32,
    pub kind: Declared,
}
Expand description

A declaration, typed. word is where it starts.

Fields§

§word: usize

The word of the token stream the declaration starts at.

§opcode: u16

The opcode token’s low 11 bits (see opcode_name).

§control: u32

The opcode token’s bits 11 to 23 as stored.

§kind: Declared

The declaration, typed.

Implementations§

Source§

impl Declaration

Source

pub fn global_flags(&self) -> Option<GlobalFlags>

The flags of a dcl_globalFlags declaration; None for any other declaration.

Source

pub fn geometry_input_primitive(&self) -> Option<u32>

A geometry program’s input primitive (dcl_inputprimitive; a D3D_PRIMITIVE: 1 point, 2 line, 3 triangle, 6 line and 7 triangle with adjacency).

Source

pub fn geometry_output_topology(&self) -> Option<u32>

A geometry program’s output topology (dcl_outputtopology; a D3D_PRIMITIVE_TOPOLOGY: 1 point list, 3 line strip, 5 triangle strip).

Source

pub fn max_output_vertex_count(&self) -> Option<u32>

A geometry program’s largest vertex count (dcl_maxout).

Source

pub fn input_control_point_count(&self) -> Option<u32>

A hull or domain program’s input control point count (dcl_input_control_point_count).

Source

pub fn output_control_point_count(&self) -> Option<u32>

A hull program’s output control point count (dcl_output_control_point_count).

Source

pub fn tessellator_domain(&self) -> Option<u32>

The tessellator domain (dcl_tessellator_domain; a D3D11_TESSELLATOR_DOMAIN: 1 isoline, 2 triangle, 3 quad).

Source

pub fn tessellator_partitioning(&self) -> Option<u32>

The tessellator partitioning (dcl_tessellator_partitioning; a D3D11_TESSELLATOR_PARTITIONING: 1 integer, 2 pow2, 3 fractional odd, 4 fractional even).

Source

pub fn tessellator_output_primitive(&self) -> Option<u32>

The tessellator output primitive (dcl_tessellator_output_primitive; a D3D11_TESSELLATOR_OUTPUT_PRIMITIVE: 1 point, 2 line, 3 triangle clockwise, 4 triangle counter-clockwise).

Source

pub fn hull_max_tess_factor(&self) -> Option<f32>

A hull program’s largest tessellation factor (dcl_hs_max_tessfactor).

Source

pub fn fork_phase_instance_count(&self) -> Option<u32>

The instance count of a hull program’s fork phase (dcl_hs_fork_phase_instance_count).

Source

pub fn join_phase_instance_count(&self) -> Option<u32>

The instance count of a hull program’s join phase (dcl_hs_join_phase_instance_count).

Trait Implementations§

Source§

impl Clone for Declaration

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 Declaration

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.