summaryrefslogtreecommitdiffstats
path: root/wgpu/src/quad.rs
diff options
context:
space:
mode:
authorLibravatar Cupnfish <cupnfish@icloud.com>2022-07-02 15:39:42 +0800
committerLibravatar Cupnfish <cupnfish@icloud.com>2022-07-02 15:39:42 +0800
commitc148557cabf1fb9127b00b248479de2eb1d1d477 (patch)
tree1f3fe0a654effa351997e5462fae2536e118f517 /wgpu/src/quad.rs
parente6e3eff8762e9e8350f00b340348dc2261dd0053 (diff)
downloadiced-c148557cabf1fb9127b00b248479de2eb1d1d477.tar.gz
iced-c148557cabf1fb9127b00b248479de2eb1d1d477.tar.bz2
iced-c148557cabf1fb9127b00b248479de2eb1d1d477.zip
update `wgpu` to `0.13`
Diffstat (limited to 'wgpu/src/quad.rs')
-rw-r--r--wgpu/src/quad.rs22
1 files changed, 12 insertions, 10 deletions
diff --git a/wgpu/src/quad.rs b/wgpu/src/quad.rs
index 22f3b815..a117df64 100644
--- a/wgpu/src/quad.rs
+++ b/wgpu/src/quad.rs
@@ -59,7 +59,7 @@ impl Pipeline {
});
let shader =
- device.create_shader_module(&wgpu::ShaderModuleDescriptor {
+ device.create_shader_module(wgpu::ShaderModuleDescriptor {
label: Some("iced_wgpu::quad::shader"),
source: wgpu::ShaderSource::Wgsl(std::borrow::Cow::Borrowed(
include_str!("shader/quad.wgsl"),
@@ -100,7 +100,7 @@ impl Pipeline {
fragment: Some(wgpu::FragmentState {
module: &shader,
entry_point: "fs_main",
- targets: &[wgpu::ColorTargetState {
+ targets: &[Some(wgpu::ColorTargetState {
format,
blend: Some(wgpu::BlendState {
color: wgpu::BlendComponent {
@@ -115,7 +115,7 @@ impl Pipeline {
},
}),
write_mask: wgpu::ColorWrites::ALL,
- }],
+ })],
}),
primitive: wgpu::PrimitiveState {
topology: wgpu::PrimitiveTopology::TriangleList,
@@ -211,14 +211,16 @@ impl Pipeline {
let mut render_pass =
encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: Some("iced_wgpu::quad render pass"),
- color_attachments: &[wgpu::RenderPassColorAttachment {
- view: target,
- resolve_target: None,
- ops: wgpu::Operations {
- load: wgpu::LoadOp::Load,
- store: true,
+ color_attachments: &[Some(
+ wgpu::RenderPassColorAttachment {
+ view: target,
+ resolve_target: None,
+ ops: wgpu::Operations {
+ load: wgpu::LoadOp::Load,
+ store: true,
+ },
},
- }],
+ )],
depth_stencil_attachment: None,
});