diff --git a/wgpu/src/api/texture.rs b/wgpu/src/api/texture.rs index 03044bdf15..8ac80e6505 100644 --- a/wgpu/src/api/texture.rs +++ b/wgpu/src/api/texture.rs @@ -37,7 +37,11 @@ impl Texture { } } - /// Creates a view of this texture. + /// Creates a view of this texture, specifying an interpretation of its texels and + /// possibly a subset of its layers and mip levels. + /// + /// Texture views are needed to use a texture as a binding in a [`BindGroup`] + /// or as an attachment in a [`RenderPass`]. pub fn create_view(&self, desc: &TextureViewDescriptor<'_>) -> TextureView { let view = self.inner.create_view(desc); diff --git a/wgpu/src/api/texture_view.rs b/wgpu/src/api/texture_view.rs index 9b3a7d9386..490e0e6eca 100644 --- a/wgpu/src/api/texture_view.rs +++ b/wgpu/src/api/texture_view.rs @@ -2,8 +2,11 @@ use crate::*; /// Handle to a texture view. /// -/// A `TextureView` object describes a texture and associated metadata needed by a -/// [`RenderPipeline`] or [`BindGroup`]. +/// A `TextureView` object refers to a [`Texture`], or a subset of its layers and mip levels, and +/// specifies an interpretation of the texture’s texels, which is needed to use a texture as a +/// binding in a [`BindGroup`] or as an attachment in a [`RenderPass`]. +/// It can be created using [`Texture::create_view()`], which accepts a [`TextureViewDescriptor`] +/// specifying the properties of the view. /// /// Corresponds to [WebGPU `GPUTextureView`](https://gpuweb.github.io/gpuweb/#gputextureview). #[derive(Debug, Clone)]