From 3e6629ceca9aac5b007ef3cbad7ae510ca035ba7 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Mon, 12 Jul 2021 12:39:48 -0700 Subject: [PATCH] Document that no dimension of a texture's size may be zero. --- wgpu-types/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index 94628abf5c..e58da1fafd 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -2522,8 +2522,9 @@ impl Extent3d { pub struct TextureDescriptor { /// Debug label of the texture. This will show up in graphics debuggers for easy identification. pub label: L, - /// Size of the texture. For a regular 1D/2D texture, the unused sizes will be 1. For 2DArray textures, Z is the - /// number of 2D textures in that array. + /// Size of the texture. All components must be greater than zero. For a + /// regular 1D/2D texture, the unused sizes will be 1. For 2DArray textures, + /// Z is the number of 2D textures in that array. pub size: Extent3d, /// Mip count of texture. For a texture with no extra mips, this must be 1. pub mip_level_count: u32,