Skip to content

Commit 6235ebd

Browse files
committed
doc: Document the behavior when mis-configuring width/height of Surface
1 parent 5f53a39 commit 6235ebd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

wgpu-types/src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5463,8 +5463,18 @@ pub struct SurfaceConfiguration<V> {
54635463
/// `Bgra8Unorm` and `Bgra8UnormSrgb`
54645464
pub format: TextureFormat,
54655465
/// Width of the swap chain. Must be the same size as the surface, and nonzero.
5466+
///
5467+
/// If this is not the same size as the underlying surface (e.g. if it is
5468+
/// set once, and the window is later resized), the behaviour is defined
5469+
/// but platform-specific, and may change in the future (currently macOS
5470+
/// scales the surface, other platforms may do something else).
54665471
pub width: u32,
54675472
/// Height of the swap chain. Must be the same size as the surface, and nonzero.
5473+
///
5474+
/// If this is not the same size as the underlying surface (e.g. if it is
5475+
/// set once, and the window is later resized), the behaviour is defined
5476+
/// but platform-specific, and may change in the future (currently macOS
5477+
/// scales the surface, other platforms may do something else).
54685478
pub height: u32,
54695479
/// Presentation mode of the swap chain. Fifo is the only mode guaranteed to be supported.
54705480
/// FifoRelaxed, Immediate, and Mailbox will crash if unsupported, while AutoVsync and

0 commit comments

Comments
 (0)