diff --git a/wgpu/src/api/compute_pipeline.rs b/wgpu/src/api/compute_pipeline.rs index 18d4e904e4..16885ac96b 100644 --- a/wgpu/src/api/compute_pipeline.rs +++ b/wgpu/src/api/compute_pipeline.rs @@ -24,6 +24,8 @@ impl ComputePipeline { /// If this pipeline was created with a [default layout][ComputePipelineDescriptor::layout], /// then bind groups created with the returned `BindGroupLayout` can only be used with this /// pipeline. + /// + /// This method will raise a validation error if there is no bind group layout at `index`. pub fn get_bind_group_layout(&self, index: u32) -> BindGroupLayout { let context = Arc::clone(&self.context); let data = self diff --git a/wgpu/src/api/render_pipeline.rs b/wgpu/src/api/render_pipeline.rs index 3009cde1da..dd1c1cefe8 100644 --- a/wgpu/src/api/render_pipeline.rs +++ b/wgpu/src/api/render_pipeline.rs @@ -31,6 +31,8 @@ impl RenderPipeline { /// /// If this pipeline was created with a [default layout][RenderPipelineDescriptor::layout], then /// bind groups created with the returned `BindGroupLayout` can only be used with this pipeline. + /// + /// This method will raise a validation error if there is no bind group layout at `index`. pub fn get_bind_group_layout(&self, index: u32) -> BindGroupLayout { let context = Arc::clone(&self.context); let data = self