From d5030542a58841e5f1b79c381608b8bbc988648a Mon Sep 17 00:00:00 2001 From: Ben Reeves Date: Wed, 18 Sep 2024 16:00:35 -0500 Subject: [PATCH] Update doc comments on `{Render,Compute}Pipeline::get_bind_group_layout` --- wgpu/src/api/compute_pipeline.rs | 2 ++ wgpu/src/api/render_pipeline.rs | 2 ++ 2 files changed, 4 insertions(+) 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