Struct wgpu_hal::BufferBinding
source · pub struct BufferBinding<'a, A: Api> {
pub buffer: &'a A::Buffer,
pub offset: BufferAddress,
pub size: Option<BufferSize>,
}
Fields§
§buffer: &'a A::Buffer
The buffer being bound.
offset: BufferAddress
The offset at which the bound region starts.
This must be less than the size of the buffer. Some back ends cannot tolerate zero-length regions; for example, see VUID-VkDescriptorBufferInfo-offset-00340 and VUID-VkDescriptorBufferInfo-range-00341, or the documentation for GLES’s glBindBufferRange.
size: Option<BufferSize>
The size of the region bound, in bytes.
If None
, the region extends from offset
to the end of the
buffer. Given the restrictions on offset
, this means that
the size is always greater than zero.