summaryrefslogtreecommitdiffstats
path: root/wgpu
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-31 17:52:21 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2021-10-31 17:52:21 +0700
commite70a6be93762af535387623a998ccc0a0aa64d5c (patch)
tree653397c8a968cb56b806003b39e960d4492cc48f /wgpu
parentc9ed15782c3a62fcbfe56a141837b384ada82aaa (diff)
parent8a2a7f7e2144542b47c1d259f296ad7dcc5f3cf9 (diff)
downloadiced-e70a6be93762af535387623a998ccc0a0aa64d5c.tar.gz
iced-e70a6be93762af535387623a998ccc0a0aa64d5c.tar.bz2
iced-e70a6be93762af535387623a998ccc0a0aa64d5c.zip
Merge branch 'master' into remove-renderer-traits
Diffstat (limited to 'wgpu')
-rw-r--r--wgpu/Cargo.toml4
-rw-r--r--wgpu/src/shader/blit.wgsl4
-rw-r--r--wgpu/src/window/compositor.rs5
3 files changed, 7 insertions, 6 deletions
diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml
index 71da889f..ed74b804 100644
--- a/wgpu/Cargo.toml
+++ b/wgpu/Cargo.toml
@@ -27,8 +27,8 @@ default_system_font = ["iced_graphics/font-source"]
spirv = ["wgpu/spirv"]
[dependencies]
-wgpu = "0.10"
-wgpu_glyph = "0.14"
+wgpu = "0.11"
+wgpu_glyph = "0.15"
glyph_brush = "0.7"
raw-window-handle = "0.3"
log = "0.4"
diff --git a/wgpu/src/shader/blit.wgsl b/wgpu/src/shader/blit.wgsl
index 694f192e..f8f6e2d4 100644
--- a/wgpu/src/shader/blit.wgsl
+++ b/wgpu/src/shader/blit.wgsl
@@ -1,4 +1,4 @@
-var positions: array<vec2<f32>, 6> = array<vec2<f32>, 6>(
+var<private> positions: array<vec2<f32>, 6> = array<vec2<f32>, 6>(
vec2<f32>(-1.0, 1.0),
vec2<f32>(-1.0, -1.0),
vec2<f32>(1.0, -1.0),
@@ -7,7 +7,7 @@ var positions: array<vec2<f32>, 6> = array<vec2<f32>, 6>(
vec2<f32>(1.0, -1.0)
);
-var uvs: array<vec2<f32>, 6> = array<vec2<f32>, 6>(
+var<private> uvs: array<vec2<f32>, 6> = array<vec2<f32>, 6>(
vec2<f32>(0.0, 0.0),
vec2<f32>(0.0, 1.0),
vec2<f32>(1.0, 1.0),
diff --git a/wgpu/src/window/compositor.rs b/wgpu/src/window/compositor.rs
index f29a50f5..7bdd4c23 100644
--- a/wgpu/src/window/compositor.rs
+++ b/wgpu/src/window/compositor.rs
@@ -40,6 +40,7 @@ impl Compositor {
wgpu::PowerPreference::HighPerformance
},
compatible_surface: compatible_surface.as_ref(),
+ force_fallback_adapter: false,
})
.await?;
@@ -140,7 +141,7 @@ impl iced_graphics::window::Compositor for Compositor {
background_color: Color,
overlay: &[T],
) -> Result<(), iced_graphics::window::SurfaceError> {
- match surface.get_current_frame() {
+ match surface.get_current_texture() {
Ok(frame) => {
let mut encoder = self.device.create_command_encoder(
&wgpu::CommandEncoderDescriptor {
@@ -149,7 +150,6 @@ impl iced_graphics::window::Compositor for Compositor {
);
let view = &frame
- .output
.texture
.create_view(&wgpu::TextureViewDescriptor::default());
@@ -194,6 +194,7 @@ impl iced_graphics::window::Compositor for Compositor {
// Submit work
self.staging_belt.finish();
self.queue.submit(Some(encoder.finish()));
+ frame.present();
// Recall staging buffers
self.local_pool