@@ -171,27 +171,23 @@ pub enum ImplicitLayoutError {
171
171
/// Describes a compute pipeline.
172
172
#[ derive( Clone , Debug ) ]
173
173
#[ cfg_attr( feature = "serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
174
- pub struct ComputePipelineDescriptor < ' a > {
174
+ pub struct ComputePipelineDescriptor <
175
+ ' a ,
176
+ PLL = PipelineLayoutId ,
177
+ SM = ShaderModuleId ,
178
+ PLC = PipelineCacheId ,
179
+ > {
175
180
pub label : Label < ' a > ,
176
181
/// The layout of bind groups for this pipeline.
177
- pub layout : Option < PipelineLayoutId > ,
182
+ pub layout : Option < PLL > ,
178
183
/// The compiled compute stage and its entry point.
179
- pub stage : ProgrammableStageDescriptor < ' a > ,
184
+ pub stage : ProgrammableStageDescriptor < ' a , SM > ,
180
185
/// The pipeline cache to use when creating this pipeline.
181
- pub cache : Option < PipelineCacheId > ,
186
+ pub cache : Option < PLC > ,
182
187
}
183
188
184
- /// Describes a compute pipeline.
185
- #[ derive( Clone , Debug ) ]
186
- pub struct ResolvedComputePipelineDescriptor < ' a > {
187
- pub label : Label < ' a > ,
188
- /// The layout of bind groups for this pipeline.
189
- pub layout : Option < Arc < PipelineLayout > > ,
190
- /// The compiled compute stage and its entry point.
191
- pub stage : ResolvedProgrammableStageDescriptor < ' a > ,
192
- /// The pipeline cache to use when creating this pipeline.
193
- pub cache : Option < Arc < PipelineCache > > ,
194
- }
189
+ pub type ResolvedComputePipelineDescriptor < ' a > =
190
+ ComputePipelineDescriptor < ' a , Arc < PipelineLayout > , Arc < ShaderModule > , Arc < PipelineCache > > ;
195
191
196
192
#[ derive( Clone , Debug , Error ) ]
197
193
#[ non_exhaustive]
0 commit comments