diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index ee62dfa692..3a045912aa 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -28,20 +28,20 @@ cross = ["wgc/cross"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" -rev = "27dbf076d5e257e14c816b052fcfdb25c165eda3" +rev = "c820cc8e737e3773c9c28ec49a1fecd8fa273dab" features = ["raw-window-handle"] [target.'cfg(target_arch = "wasm32")'.dependencies.wgc] package = "wgpu-core" git = "https://github.com/gfx-rs/wgpu" -rev = "27dbf076d5e257e14c816b052fcfdb25c165eda3" +rev = "c820cc8e737e3773c9c28ec49a1fecd8fa273dab" features = ["raw-window-handle"] optional = true [dependencies.wgt] package = "wgpu-types" git = "https://github.com/gfx-rs/wgpu" -rev = "27dbf076d5e257e14c816b052fcfdb25c165eda3" +rev = "c820cc8e737e3773c9c28ec49a1fecd8fa273dab" [dependencies] arrayvec = "0.5" diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs index 9533d29a4a..0750459200 100644 --- a/wgpu/src/lib.rs +++ b/wgpu/src/lib.rs @@ -37,7 +37,7 @@ pub use wgt::{ StencilState, StorageTextureAccess, SwapChainDescriptor, SwapChainStatus, TextureAspect, TextureDimension, TextureFormat, TextureFormatFeatureFlags, TextureFormatFeatures, TextureSampleType, TextureUsage, TextureViewDimension, VertexAttribute, VertexFormat, - BIND_BUFFER_ALIGNMENT, COPY_BUFFER_ALIGNMENT, COPY_BYTES_PER_ROW_ALIGNMENT, + BIND_BUFFER_ALIGNMENT, COPY_BUFFER_ALIGNMENT, COPY_BYTES_PER_ROW_ALIGNMENT, MAP_ALIGNMENT, PUSH_CONSTANT_ALIGNMENT, QUERY_SET_MAX_QUERIES, QUERY_SIZE, VERTEX_STRIDE_ALIGNMENT, }; diff --git a/wgpu/src/util/belt.rs b/wgpu/src/util/belt.rs index fbdbf06950..d94ae0a0cb 100644 --- a/wgpu/src/util/belt.rs +++ b/wgpu/src/util/belt.rs @@ -129,9 +129,9 @@ impl StagingBelt { encoder.copy_buffer_to_buffer(&chunk.buffer, chunk.offset, target, offset, size.get()); let old_offset = chunk.offset; chunk.offset += size.get(); - let remainder = chunk.offset % crate::COPY_BUFFER_ALIGNMENT; + let remainder = chunk.offset % crate::MAP_ALIGNMENT; if remainder != 0 { - chunk.offset += crate::COPY_BUFFER_ALIGNMENT - remainder; + chunk.offset += crate::MAP_ALIGNMENT - remainder; } self.active_chunks.push(chunk);