From 24ad4af92cc3572f16efecb54e87b5edeb238cbb Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Sun, 13 Sep 2020 00:09:55 -0400 Subject: [PATCH 1/2] [rs] Update wgpu with Naga changes --- wgpu/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index 74b249ca32..e9a6a1e606 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -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" From c269703bcf08a5096ee3f05d065822656232469a Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Sun, 13 Sep 2020 00:10:06 -0400 Subject: [PATCH 2/2] [rs] Document the bind buffer alignment --- wgpu/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 2a4ad8114b..599a7022dc 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -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, @@ -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,