summaryrefslogtreecommitdiffstats
path: root/wgpu/src/window
diff options
context:
space:
mode:
authorLibravatar Poly <marynczak.bartlomiej@gmail.com>2021-02-03 19:32:30 +0100
committerLibravatar Poly <marynczak.bartlomiej@gmail.com>2021-02-03 19:32:30 +0100
commit98d108d2b73b994a63140361110dec6401a80ae4 (patch)
tree95603c44da1d79b921b63050888fb24204dcace2 /wgpu/src/window
parent2d76c7165c4a82f27090cbf69f811f8e0f2f28a4 (diff)
downloadiced-98d108d2b73b994a63140361110dec6401a80ae4.tar.gz
iced-98d108d2b73b994a63140361110dec6401a80ae4.tar.bz2
iced-98d108d2b73b994a63140361110dec6401a80ae4.zip
[wgpu 0.7] Update window/compositor.rs
Notes: - wgpu::PowerPreference::Default no longer exists, maybe there is another way to replicate its behavior.
Diffstat (limited to 'wgpu/src/window')
-rw-r--r--wgpu/src/window/compositor.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/wgpu/src/window/compositor.rs b/wgpu/src/window/compositor.rs
index 492efb42..492cb955 100644
--- a/wgpu/src/window/compositor.rs
+++ b/wgpu/src/window/compositor.rs
@@ -27,7 +27,7 @@ impl Compositor {
let adapter = instance
.request_adapter(&wgpu::RequestAdapterOptions {
power_preference: if settings.antialiasing.is_none() {
- wgpu::PowerPreference::Default
+ wgpu::PowerPreference::default()
} else {
wgpu::PowerPreference::HighPerformance
},
@@ -38,12 +38,14 @@ impl Compositor {
let (device, queue) = adapter
.request_device(
&wgpu::DeviceDescriptor {
+ label: Some(
+ "iced_wgpu::window::Compositor Device Descriptor",
+ ),
features: wgpu::Features::empty(),
limits: wgpu::Limits {
max_bind_groups: 2,
..wgpu::Limits::default()
},
- shader_validation: false,
},
None,
)
@@ -103,7 +105,7 @@ impl iced_graphics::window::Compositor for Compositor {
self.device.create_swap_chain(
surface,
&wgpu::SwapChainDescriptor {
- usage: wgpu::TextureUsage::OUTPUT_ATTACHMENT,
+ usage: wgpu::TextureUsage::RENDER_ATTACHMENT,
format: self.settings.format,
present_mode: self.settings.present_mode,
width,
@@ -130,6 +132,7 @@ impl iced_graphics::window::Compositor for Compositor {
);
let _ = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
+ label: Some("iced_wgpu::window::Compositor Render Pass"),
color_attachments: &[wgpu::RenderPassColorAttachmentDescriptor {
attachment: &frame.output.view,
resolve_target: None,