Skip to main content

TextureRead

Struct TextureRead 

Source
pub struct TextureRead {
    pub word: usize,
    pub opcode: u16,
    pub texture: u32,
    pub texture_indexed: bool,
    pub texture_space: Option<u32>,
    pub sampler: Option<u32>,
    pub sampler_indexed: bool,
    pub sampler_space: Option<u32>,
    pub comparison: bool,
    pub sampler_mode: Option<u32>,
}
Expand description

One instruction of a program that reads a texture (a shader resource view, t<n>).

Fields§

§word: usize

The instruction’s first word in the token stream.

§opcode: u16

The instruction’s opcode (see crate::opcode_name).

§texture: u32

The number of the t register, or the constant part of its index where TextureRead::texture_indexed. In Shader Model 5.1 the register of the declared range the instruction reads, as fxc’s disassembly gives it.

§texture_indexed: bool

The texture register is indexed by a register (t[r1.x + 3]).

§texture_space: Option<u32>

The texture’s register space: 0 before Shader Model 5.1; in 5.1 its declaration’s, None where the program declares no texture of the id the instruction names.

§sampler: Option<u32>

The number of the s register the instruction samples with; none for a load, which uses no sampler.

§sampler_indexed: bool

The sampler register is indexed by a register.

§sampler_space: Option<u32>

The sampler’s register space, as TextureRead::texture_space gives the texture’s; none without a sampler.

§comparison: bool

The instruction compares the sampled value with a reference (sample_c, sample_c_lz, gather4_c, gather4_po_c and the feedback forms of them).

§sampler_mode: Option<u32>

How the program declares the sampler (dcl_sampler): 0 default, 1 comparison, 2 mono; none where the program declares no sampler of that number (or the instruction has no sampler).

Trait Implementations§

Source§

impl Clone for TextureRead

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 Copy for TextureRead

Source§

impl Debug for TextureRead

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for TextureRead

Source§

impl PartialEq for TextureRead

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TextureRead

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.