mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[rs] Merge #563
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:
@@ -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"
|
||||
|
||||
@@ -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