563: Document bind buffer alignment r=kvark a=kvark

Fixes  #561
Also updates wgpu dependency to latest, and our exampels are now fully validated for the shader interface 🎉 .

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This commit is contained in:
bors[bot]
2020-09-13 04:11:39 +00:00
committed by GitHub
2 changed files with 6 additions and 2 deletions

View File

@@ -26,14 +26,14 @@ vulkan-portability = ["wgc/gfx-backend-vulkan"]
package = "wgpu-core"
#version = "0.6"
git = "https://github.com/gfx-rs/wgpu"
rev = "f6f7210b6323e643ff0000f3a4b25b2bb911e848"
rev = "43adcbcf683bf1f581b89dabf653827337478c9a"
features = ["raw-window-handle"]
[dependencies.wgt]
package = "wgpu-types"
#version = "0.6"
git = "https://github.com/gfx-rs/wgpu"
rev = "f6f7210b6323e643ff0000f3a4b25b2bb911e848"
rev = "43adcbcf683bf1f581b89dabf653827337478c9a"
[dependencies]
arrayvec = "0.5"

View File

@@ -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,