From 0161b0867f89a5474bd18a1cf7320cfbc3b22c59 Mon Sep 17 00:00:00 2001 From: Lucas Kent Date: Mon, 27 May 2019 17:36:05 +1000 Subject: [PATCH] Upgdate to latest wgpu-native --- Cargo.toml | 2 +- src/lib.rs | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6579be2b2f..c209cba9fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ vulkan = ["wgn/gfx-backend-vulkan"] [dependencies] #TODO: only depend on the published version -wgn = { package = "wgpu-native", features = ["local", "window-winit"], git = "https://github.com/gfx-rs/wgpu", rev = "5b6549febccdc93f344a2b776b9a548b17afcf2f" } +wgn = { package = "wgpu-native", features = ["local", "window-winit"], git = "https://github.com/gfx-rs/wgpu", rev = "ce4ef375c342446d3019a12c10203042d3f5ba11" } arrayvec = "0.4" [dev-dependencies] diff --git a/src/lib.rs b/src/lib.rs index e64f1d92b9..8ef3a71a16 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1063,7 +1063,7 @@ impl CommandEncoder { impl<'a> RenderPass<'a> { /// Sets the active bind group for a given bind group index. - pub fn set_bind_group(&mut self, index: u32, bind_group: &BindGroup, offsets: &[u32]) { + pub fn set_bind_group(&mut self, index: u32, bind_group: &BindGroup, offsets: &[BufferAddress]) { wgn::wgpu_render_pass_set_bind_group( self.id, index, @@ -1096,8 +1096,7 @@ impl<'a> RenderPass<'a> { /// /// Each element of `buffer_pairs` describes a vertex buffer and an offset in bytes into that /// buffer. The offset must be aligned to a multiple of 4 bytes. - // TODO: buffer_pairs should be a &[(&Buffer, BufferAddress)] - pub fn set_vertex_buffers(&mut self, buffer_pairs: &[(&Buffer, u32)]) { + pub fn set_vertex_buffers(&mut self, buffer_pairs: &[(&Buffer, BufferAddress)]) { let mut buffers = Vec::new(); let mut offsets = Vec::new(); for &(buffer, offset) in buffer_pairs { @@ -1156,7 +1155,7 @@ impl<'a> Drop for RenderPass<'a> { impl<'a> ComputePass<'a> { /// Sets the active bind group for a given bind group index. - pub fn set_bind_group(&mut self, index: u32, bind_group: &BindGroup, offsets: &[u32]) { + pub fn set_bind_group(&mut self, index: u32, bind_group: &BindGroup, offsets: &[BufferAddress]) { wgn::wgpu_compute_pass_set_bind_group( self.id, index,