From cf6af4c2560f5996bc533402ac3e4289c0c94702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n?= Date: Wed, 19 May 2021 17:11:51 +0700 Subject: [PATCH] Use latest `wgpu` releases instead of patched sources --- Cargo.toml | 12 ------------ wgpu/Cargo.toml | 4 ++-- wgpu/src/image.rs | 12 +++++++----- wgpu/src/quad.rs | 4 ++-- wgpu/src/triangle.rs | 36 ++++++++++++++++++++---------------- 5 files changed, 31 insertions(+), 37 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 19f25d9d..6d894eba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,18 +11,6 @@ readme = "README.md" keywords = ["gui", "ui", "graphics", "interface", "widgets"] categories = ["gui"] -[patch."https://github.com/gfx-rs/wgpu"] -wgpu-types = { git = "https://github.com/Dispersia/wgpu" } -wgpu-core = { git = "https://github.com/Dispersia/wgpu" } - -[patch."https://github.com/gfx-rs/wgpu-rs"] -wgpu = { git = "https://github.com/Dispersia/wgpu-rs" } - -[patch.crates-io] -wgpu-types = { git = "https://github.com/Dispersia/wgpu" } -wgpu-core = { git = "https://github.com/Dispersia/wgpu" } -wgpu = { git = "https://github.com/Dispersia/wgpu-rs" } - [features] default = ["wgpu", "default_system_font"] # Enables the `iced_wgpu` renderer diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index f44b3874..3eacdd0f 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -26,8 +26,8 @@ qr_code = ["iced_graphics/qr_code"] default_system_font = ["iced_graphics/font-source"] [dependencies] -wgpu = {git="https://github.com/Dispersia/wgpu-rs"} -wgpu_glyph = {git="https://github.com/Dispersia/wgpu_glyph", branch = "update-wgpu"} +wgpu = "0.8" +wgpu_glyph = "0.12" glyph_brush = "0.7" raw-window-handle = "0.3" log = "0.4" diff --git a/wgpu/src/image.rs b/wgpu/src/image.rs index 78f70dd8..cd7b3d23 100644 --- a/wgpu/src/image.rs +++ b/wgpu/src/image.rs @@ -97,11 +97,13 @@ impl Pipeline { entries: &[ wgpu::BindGroupEntry { binding: 0, - resource: wgpu::BindingResource::Buffer { - buffer: &uniforms_buffer, - offset: 0, - size: None, - }, + resource: wgpu::BindingResource::Buffer( + wgpu::BufferBinding { + buffer: &uniforms_buffer, + offset: 0, + size: None, + }, + ), }, wgpu::BindGroupEntry { binding: 1, diff --git a/wgpu/src/quad.rs b/wgpu/src/quad.rs index 458679e4..0f9d7b99 100644 --- a/wgpu/src/quad.rs +++ b/wgpu/src/quad.rs @@ -47,11 +47,11 @@ impl Pipeline { layout: &constant_layout, entries: &[wgpu::BindGroupEntry { binding: 0, - resource: wgpu::BindingResource::Buffer { + resource: wgpu::BindingResource::Buffer(wgpu::BufferBinding { buffer: &constants_buffer, offset: 0, size: None, - }, + }), }], }); diff --git a/wgpu/src/triangle.rs b/wgpu/src/triangle.rs index 21d0e0ab..8636b331 100644 --- a/wgpu/src/triangle.rs +++ b/wgpu/src/triangle.rs @@ -110,13 +110,17 @@ impl Pipeline { layout: &constants_layout, entries: &[wgpu::BindGroupEntry { binding: 0, - resource: wgpu::BindingResource::Buffer { - buffer: &constants_buffer.raw, - offset: 0, - size: wgpu::BufferSize::new( - std::mem::size_of::() as u64, - ), - }, + resource: wgpu::BindingResource::Buffer( + wgpu::BufferBinding { + buffer: &constants_buffer.raw, + offset: 0, + size: wgpu::BufferSize::new(std::mem::size_of::< + Uniforms, + >( + ) + as u64), + }, + ), }], }); @@ -256,15 +260,15 @@ impl Pipeline { layout: &self.constants_layout, entries: &[wgpu::BindGroupEntry { binding: 0, - resource: wgpu::BindingResource::Buffer { - buffer: &self.uniforms_buffer.raw, - offset: 0, - size: wgpu::BufferSize::new(std::mem::size_of::< - Uniforms, - >( - ) - as u64), - }, + resource: wgpu::BindingResource::Buffer( + wgpu::BufferBinding { + buffer: &self.uniforms_buffer.raw, + offset: 0, + size: wgpu::BufferSize::new( + std::mem::size_of::() as u64, + ), + }, + ), }], }); }