diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index 86a2666663..e76bebe625 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -5274,7 +5274,7 @@ pub enum TextureDimension { /// Corresponds to [WebGPU `GPUOrigin2D`]( /// https://gpuweb.github.io/gpuweb/#dictdef-gpuorigin2ddict). #[repr(C)] -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +#[derive(Clone, Copy, PartialEq, Eq, Hash)] #[cfg_attr(feature = "trace", derive(Serialize))] #[cfg_attr(feature = "replay", derive(Deserialize))] #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] @@ -5299,12 +5299,18 @@ impl Origin2d { } } +impl std::fmt::Debug for Origin2d { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + (self.x, self.y).fmt(f) + } +} + /// Origin of a copy to/from a texture. /// /// Corresponds to [WebGPU `GPUOrigin3D`]( /// https://gpuweb.github.io/gpuweb/#dictdef-gpuorigin3ddict). #[repr(C)] -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +#[derive(Clone, Copy, PartialEq, Eq, Hash)] #[cfg_attr(feature = "trace", derive(Serialize))] #[cfg_attr(feature = "replay", derive(Deserialize))] #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] @@ -5336,12 +5342,18 @@ impl Default for Origin3d { } } +impl std::fmt::Debug for Origin3d { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + (self.x, self.y, self.z).fmt(f) + } +} + /// Extent of a texture related operation. /// /// Corresponds to [WebGPU `GPUExtent3D`]( /// https://gpuweb.github.io/gpuweb/#dictdef-gpuextent3ddict). #[repr(C)] -#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] +#[derive(Clone, Copy, PartialEq, Eq, Hash)] #[cfg_attr(feature = "trace", derive(Serialize))] #[cfg_attr(feature = "replay", derive(Deserialize))] #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] @@ -5355,6 +5367,12 @@ pub struct Extent3d { pub depth_or_array_layers: u32, } +impl std::fmt::Debug for Extent3d { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + (self.width, self.height, self.depth_or_array_layers).fmt(f) + } +} + #[cfg(feature = "serde")] fn default_depth() -> u32 { 1