EntryPoint

Struct EntryPoint 

Source
struct EntryPoint {
    inputs: Vec<Varying>,
    outputs: Vec<Varying>,
    resources: Vec<Handle<Resource>>,
    sampling_pairs: FastHashSet<(Handle<Resource>, Handle<Resource>)>,
    workgroup_size: [u32; 3],
    dual_source_blending: bool,
    task_payload_size: Option<u32>,
    mesh_info: Option<EntryPointMeshInfo>,
    immediate_usage: ImmediateUsage,
}
Expand description

The shader interface of an entry point in a [naga::Module].

Fields§

§inputs: Vec<Varying>

The builtin and user-defined values passed to the entry point.

In WGSL, these can be either passed directly as arguments or gathered up in structs that are passed; here, they are all flattened out.

§outputs: Vec<Varying>

The builtin and user-defined values returned by the entry point.

In WGSL, a function either returns a single varying directly, or returns a struct of varyings; here, they are all flattened out.

For mesh shaders, this also includes the vertex and primitive outputs.

§resources: Vec<Handle<Resource>>

This entry point’s resource interface.

This lists all the bound resources (that is, global variables with @group and @binding attributes) that this entry point statically uses.

Handles here refer to elements of Interface::resources.

§sampling_pairs: FastHashSet<(Handle<Resource>, Handle<Resource>)>

Pairs of (texture, sampler) handles that this entry point uses together.

This is the same information that Naga provides in [naga::valid::FunctionInfo::sampling_set] (used for generating GLSL), but adjusted to use handles referring to Interface::resources.

§workgroup_size: [u32; 3]

This entry point’s workgroup size, if it is a compute-like shader (compute, task, or mesh).

For non-compute-like entry points, this is [0, 0, 0].

§dual_source_blending: bool

Indicates that the entry point uses dual source blending.

§task_payload_size: Option<u32>

For task shaders and mesh shaders, the size of the task payload global they use to communicate.

§mesh_info: Option<EntryPointMeshInfo>

Additional information for mesh shader entry points.

§immediate_usage: ImmediateUsage

Size of the immediate data, and which slots this entry point uses.

Trait Implementations§

Source§

impl Debug for EntryPoint

Source§

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

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

impl Default for EntryPoint

Source§

fn default() -> EntryPoint

Returns the “default value” for a type. 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
§

impl<T> Downcast<T> for T

§

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

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<T> Upcast<T> for T

§

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

§

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

§

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

§

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

§

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

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

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