mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-01-09 14:48:08 -05:00
Restore unintentional support for zero-size buffers
This commit is contained in:
committed by
Jim Blandy
parent
ef428fcab8
commit
c0a580d6f0
@@ -61,6 +61,12 @@ pub type BufferAddress = u64;
|
||||
/// [`BufferSlice`]: ../wgpu/struct.BufferSlice.html
|
||||
pub type BufferSize = core::num::NonZeroU64;
|
||||
|
||||
/// Integral type used for buffer sizes that may be zero.
|
||||
///
|
||||
/// Although the wgpu Rust API disallows zero-size `BufferSlice` and wgpu-hal
|
||||
/// disallows zero-size bindings, WebGPU permits zero-size buffers and bindings.
|
||||
pub type BufferSizeOrZero = u64;
|
||||
|
||||
/// Integral type used for binding locations in shaders.
|
||||
///
|
||||
/// Used in [`VertexAttribute`]s and errors.
|
||||
|
||||
Reference in New Issue
Block a user