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
impl Interface
Sourcepub fn new(module: &Module, info: &ModuleInfo, limits: Limits) -> Self
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.
Sourcepub fn check_stage(
&self,
resources: &mut PipelineResources,
entry_point_name: &str,
shader_stage: ShaderStageForValidation,
inputs: StageIo,
primitive_topology: Option<PrimitiveTopology>,
) -> Result<StageIo, StageError>
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.