mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-24 00:11:11 +01:00
Document nonzero surface size requirement. (#4609)
This commit is contained in:
1 parent
83c3fbc55c
commit
e0341c52cf
2 files changed
+3
-2
No files matched your search
@@ -4893,9 +4893,9 @@ pub struct SurfaceConfiguration<V> {
|
||||
/// The texture format of the swap chain. The only formats that are guaranteed are
|
||||
/// `Bgra8Unorm` and `Bgra8UnormSrgb`
|
||||
pub format: TextureFormat,
|
||||
/// Width of the swap chain. Must be the same size as the surface.
|
||||
/// Width of the swap chain. Must be the same size as the surface, and nonzero.
|
||||
pub width: u32,
|
||||
/// Height of the swap chain. Must be the same size as the surface.
|
||||
/// Height of the swap chain. Must be the same size as the surface, and nonzero.
|
||||
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
|
||||
|
||||
@@ -4939,6 +4939,7 @@ impl Surface {
|
||||
///
|
||||
/// - A old [`SurfaceTexture`] is still alive referencing an old surface.
|
||||
/// - Texture format requested is unsupported on the surface.
|
||||
/// - `config.width` or `config.height` is zero.
|
||||
pub fn configure(&self, device: &Device, config: &SurfaceConfiguration) {
|
||||
DynContext::surface_configure(
|
||||
&*self.context,
|
||||
|
||||
Reference in new issue
Block a user