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 12, 2024
1 parent aa143d1 commit 45059ac
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions wgpu-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5463,8 +5463,16 @@ 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.
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.
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 45059ac

Please sign in to comment.