From 1b153aec9f0c62a9b101effdf46212ff6b8fd776 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 23 Aug 2024 05:04:03 +0200 Subject: [PATCH] doc: Document the behavior when mis-configuring width/height of Surface --- wgpu-types/src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index 4f15e68a17..c9167de4e9 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -5530,8 +5530,18 @@ pub struct SurfaceConfiguration { /// `Bgra8Unorm` and `Bgra8UnormSrgb` pub format: TextureFormat, /// Width of the swap chain. Must be the same size as the surface, and nonzero. + /// + /// If this is not the same size as the underlying surface (e.g. if it is + /// set once, and the window is later resized), the behaviour is defined + /// but platform-specific, and may change in the future (currently macOS + /// scales the surface, other platforms may do something else). pub width: u32, /// Height of the swap chain. Must be the same size as the surface, and nonzero. + /// + /// If this is not the same size as the underlying surface (e.g. if it is + /// set once, and the window is later resized), the behaviour is defined + /// but platform-specific, and may change in the future (currently macOS + /// scales the surface, other platforms may do something else). pub height: u32, /// Presentation mode of the swap chain. Fifo is the only mode guaranteed to be supported. /// FifoRelaxed, Immediate, and Mailbox will crash if unsupported, while AutoVsync and