Skip to main content

Interface

Struct Interface 

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

A summary of the shader interfaces of the entry points in a naga::Module.

Implementations§

Source§

impl Interface

Source

pub fn new(module: &Module, info: &ModuleInfo, limits: Limits) -> Self

Construct an Interface value describing module.

The info argument must be the results from validating module, and limits must be the limits for the device that we will use to create this shader module.

Source

pub fn check_stage( &self, resources: &mut PipelineResources, entry_point_name: &str, shader_stage: ShaderStageForValidation, inputs: StageIo, primitive_topology: Option<PrimitiveTopology>, ) -> Result<StageIo, StageError>

Analyze and validate an entry point for use as a given shader stage.

Validate the entry point named entry_point_name for use in shader_stage:

  • Apply the WebGPU specification’s validating inter-stage interfaces algorithm.

  • Enforce workgroup size limits.

  • Check bind group layouts, and fill in derived bind group layouts.

  • Compute the minimum binding sizes, given the shader’s resource interface.

  • Check the compatibility between textures and samplers.

Given inputs, describing this stage’s inputs, return a StageIo describing its outputs.

Trait Implementations§

Source§

impl Debug for Interface

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Forget for Interface

§

impl Freeze for Interface
where *const u8 is !null: Freeze, PhantomData<Resource>: Freeze, PhantomData<Span>: Freeze, PhantomData<fn() -> FxHasher>: Freeze, PhantomData<(EntryPointKey, EntryPoint)>: Freeze,

§

impl Move for Interface

§

impl RefUnwindSafe for Interface

§

impl Send for Interface
where RawVecInner: Send, NonZero<u64>: Send, InternalBitFlags: Send, RawTable<(EntryPointKey, EntryPoint)>: Send,

§

impl Sync for Interface
where RawVecInner: Sync, NonZero<u64>: Sync, InternalBitFlags: Sync, RawTable<(EntryPointKey, EntryPoint)>: Sync,

§

impl Unpin for Interface
where *const u8 is !null: Unpin, NonZero<u64>: Unpin, InternalBitFlags: Unpin, NonZero<u32>: Unpin, Box<RayTracingPayloadType>: Unpin,

§

impl UnsafeUnpin for Interface
where *const u8 is !null: UnsafeUnpin, PhantomData<Resource>: UnsafeUnpin, PhantomData<Span>: UnsafeUnpin, PhantomData<fn() -> FxHasher>: UnsafeUnpin, PhantomData<(EntryPointKey, EntryPoint)>: UnsafeUnpin,

§

impl UnwindSafe for Interface

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

Source§

fn downcast(&self) -> &T

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

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,