mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-25 00:41:07 +01:00
Document the bind buffer alignment
This commit is contained in:
1 parent
467b2ba8e9
commit
40fa5e4d71
1 file changed
+4
@@ -860,6 +860,8 @@ pub enum BindingResource<'a> {
|
||||
buffer: &'a Buffer,
|
||||
/// Base offset of the buffer. For bindings with `dynamic == true`, this offset
|
||||
/// will be added to the dynamic offset provided in [`RenderPass::set_bind_group`].
|
||||
///
|
||||
/// The offset has to be aligned to [`BIND_BUFFER_ALIGNMENT`].
|
||||
offset: BufferAddress,
|
||||
/// Size of the binding, or `None` for using the rest of the buffer.
|
||||
size: Option<BufferSize>,
|
||||
@@ -1948,6 +1950,7 @@ impl<'a> RenderPass<'a> {
|
||||
/// in the active pipeline when any `draw()` function is called must match the layout of this bind group.
|
||||
///
|
||||
/// If the bind group have dynamic offsets, provide them in order of their declaration.
|
||||
/// These offsets have to be aligned to [`BIND_BUFFER_ALIGNMENT`].
|
||||
pub fn set_bind_group(
|
||||
&mut self,
|
||||
index: u32,
|
||||
@@ -2319,6 +2322,7 @@ impl<'a> ComputePass<'a> {
|
||||
/// in the active pipeline when the `dispatch()` function is called must match the layout of this bind group.
|
||||
///
|
||||
/// If the bind group have dynamic offsets, provide them in order of their declaration.
|
||||
/// These offsets have to be aligned to [`BIND_BUFFER_ALIGNMENT`].
|
||||
pub fn set_bind_group(
|
||||
&mut self,
|
||||
index: u32,
|
||||
|
||||
Reference in new issue
Block a user