@@ -122,9 +122,9 @@ pub enum CreateShaderModuleError {
122
122
/// Describes a programmable pipeline stage.
123
123
#[ derive( Clone , Debug ) ]
124
124
#[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
125
- pub struct ProgrammableStageDescriptor < ' a > {
125
+ pub struct ProgrammableStageDescriptor < ' a , SM = ShaderModuleId > {
126
126
/// The compiled shader module for this stage.
127
- pub module : ShaderModuleId ,
127
+ pub module : SM ,
128
128
/// The name of the entry point in the compiled shader. The name is selected using the
129
129
/// following logic:
130
130
///
@@ -147,32 +147,8 @@ pub struct ProgrammableStageDescriptor<'a> {
147
147
pub zero_initialize_workgroup_memory : bool ,
148
148
}
149
149
150
- /// Describes a programmable pipeline stage.
151
- #[ derive( Clone , Debug ) ]
152
- pub struct ResolvedProgrammableStageDescriptor < ' a > {
153
- /// The compiled shader module for this stage.
154
- pub module : Arc < ShaderModule > ,
155
- /// The name of the entry point in the compiled shader. The name is selected using the
156
- /// following logic:
157
- ///
158
- /// * If `Some(name)` is specified, there must be a function with this name in the shader.
159
- /// * If a single entry point associated with this stage must be in the shader, then proceed as
160
- /// if `Some(…)` was specified with that entry point's name.
161
- pub entry_point : Option < Cow < ' a , str > > ,
162
- /// Specifies the values of pipeline-overridable constants in the shader module.
163
- ///
164
- /// If an `@id` attribute was specified on the declaration,
165
- /// the key must be the pipeline constant ID as a decimal ASCII number; if not,
166
- /// the key must be the constant's identifier name.
167
- ///
168
- /// The value may represent any of WGSL's concrete scalar types.
169
- pub constants : Cow < ' a , naga:: back:: PipelineConstants > ,
170
- /// Whether workgroup scoped memory will be initialized with zero values for this stage.
171
- ///
172
- /// This is required by the WebGPU spec, but may have overhead which can be avoided
173
- /// for cross-platform applications
174
- pub zero_initialize_workgroup_memory : bool ,
175
- }
150
+ pub type ResolvedProgrammableStageDescriptor < ' a > =
151
+ ProgrammableStageDescriptor < ' a , Arc < ShaderModule > > ;
176
152
177
153
/// Number of implicit bind groups derived at pipeline creation.
178
154
pub type ImplicitBindGroupCount = u8 ;
0 commit comments