summaryrefslogtreecommitdiffstats
path: root/wgpu/src/image.rs
diff options
context:
space:
mode:
authorLibravatar Dispersia <dispersias@gmail.com>2021-04-12 23:23:47 -0700
committerLibravatar Dispersia <dispersias@gmail.com>2021-04-12 23:23:47 -0700
commit983aa1b3665c6b546700767d21d73de72372ddad (patch)
tree3817ea9bcd373a099cfbfed155f8c489daf92865 /wgpu/src/image.rs
parent0722d5e3ec307fd82a1cc76593d17d83cf828943 (diff)
downloadiced-983aa1b3665c6b546700767d21d73de72372ddad.tar.gz
iced-983aa1b3665c6b546700767d21d73de72372ddad.tar.bz2
iced-983aa1b3665c6b546700767d21d73de72372ddad.zip
Run cargo fmt
Diffstat (limited to 'wgpu/src/image.rs')
-rw-r--r--wgpu/src/image.rs29
1 files changed, 15 insertions, 14 deletions
diff --git a/wgpu/src/image.rs b/wgpu/src/image.rs
index 45b63701..78f70dd8 100644
--- a/wgpu/src/image.rs
+++ b/wgpu/src/image.rs
@@ -134,11 +134,14 @@ impl Pipeline {
bind_group_layouts: &[&constant_layout, &texture_layout],
});
- let shader = device.create_shader_module(&wgpu::ShaderModuleDescriptor {
- label: Some("iced_wgpu::image::shader"),
- source: wgpu::ShaderSource::Wgsl(std::borrow::Cow::Borrowed(include_str!("shader/image.wgsl"))),
- flags: wgpu::ShaderFlags::all()
- });
+ let shader =
+ device.create_shader_module(&wgpu::ShaderModuleDescriptor {
+ label: Some("iced_wgpu::image::shader"),
+ source: wgpu::ShaderSource::Wgsl(std::borrow::Cow::Borrowed(
+ include_str!("shader/image.wgsl"),
+ )),
+ flags: wgpu::ShaderFlags::all(),
+ });
let pipeline =
device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
@@ -422,16 +425,14 @@ impl Pipeline {
let mut render_pass =
encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: Some("iced_wgpu::image render pass"),
- color_attachments: &[
- wgpu::RenderPassColorAttachment {
- view: target,
- resolve_target: None,
- ops: wgpu::Operations {
- load: wgpu::LoadOp::Load,
- store: true,
- },
+ color_attachments: &[wgpu::RenderPassColorAttachment {
+ view: target,
+ resolve_target: None,
+ ops: wgpu::Operations {
+ load: wgpu::LoadOp::Load,
+ store: true,
},
- ],
+ }],
depth_stencil_attachment: None,
});