Skip to content

Commit

Permalink
doc: Document the behavior when mis-configuring width/height of Surface
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Aug 25, 2024
1 parent 0170dfe commit 1b153ae
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions wgpu-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5530,8 +5530,18 @@ pub struct SurfaceConfiguration<V> {
/// `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
Expand Down

0 comments on commit 1b153ae

Please sign in to comment.