Skip to main content

MeshShader

Struct MeshShader 

Source
pub struct MeshShader { /* private fields */ }
Expand description

A mesh program ready to run.

Implementations§

Source§

impl MeshShader

Source

pub fn new(program: Program) -> Result<Self, Error>

Prepare program, a mesh program, to run.

Source

pub fn program(&self) -> &Program

The mesh program the shader runs.

Source

pub fn facts(&self) -> MeshFacts

What the program states: the kind of primitive it writes and the most vertices and primitives a group writes.

Source

pub fn group_size(&self) -> [u32; 3]

The thread group’s invocations along each axis.

Source

pub fn outputs(&self) -> impl Iterator<Item = &str>

The names of the output varyings: the registers of the vertices of a Meshlet, in order.

Source

pub fn draw( &self, constants: &Constants, sampler: &mut dyn Sampler, groups: [u32; 3], wave: u32, ) -> Result<Vec<Meshlet>, Error>

Run groups thread groups (wave the wave width the wave operations report) and return the meshlet each wrote, in the order of the dispatch (x, then y, then z). constants holds the rows of the constant buffers by (register, space); image and buffer access go to sampler by bind slot.

Trait Implementations§

Source§

impl Debug for MeshShader

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> 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> Same for T

Source§

type Output = T

Should always be Self
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.