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: boolIndicates 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: ImmediateUsageSize of the immediate data, and which slots this entry point uses.
Trait Implementations§
Source§impl Debug for EntryPoint
impl Debug for EntryPoint
Source§impl Default for EntryPoint
impl Default for EntryPoint
Source§fn default() -> EntryPoint
fn default() -> EntryPoint
Auto Trait Implementations§
impl Freeze for EntryPoint
impl RefUnwindSafe for EntryPoint
impl Send for EntryPoint
impl Sync for EntryPoint
impl Unpin for EntryPoint
impl UnwindSafe for EntryPoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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