diff --git a/rend3/src/graph/graph.rs b/rend3/src/graph/graph.rs index e4a4b835..c5d2eb6d 100644 --- a/rend3/src/graph/graph.rs +++ b/rend3/src/graph/graph.rs @@ -10,8 +10,8 @@ use std::{ use glam::UVec2; use wgpu::{ Buffer, CommandBuffer, CommandEncoder, CommandEncoderDescriptor, LoadOp, Operations, RenderPass, - RenderPassColorAttachment, RenderPassDepthStencilAttachment, RenderPassDescriptor, SurfaceTexture, Texture, - TextureView, TextureViewDescriptor, StoreOp, + RenderPassColorAttachment, RenderPassDepthStencilAttachment, RenderPassDescriptor, StoreOp, SurfaceTexture, + Texture, TextureView, TextureViewDescriptor, }; use super::ViewportRect; @@ -530,7 +530,11 @@ impl<'node> RenderGraph<'node> { data_core.profiler.try_lock().unwrap().end_frame().unwrap(); // This variable seems superfluous, but solves borrow checker issues with the borrow of data_core. - let timers = data_core.profiler.try_lock().unwrap().process_finished_frame(renderer.queue.get_timestamp_period()); + let timers = data_core + .profiler + .try_lock() + .unwrap() + .process_finished_frame(renderer.queue.get_timestamp_period()); timers } diff --git a/rend3/src/renderer/setup.rs b/rend3/src/renderer/setup.rs index 45813aa8..a5124603 100644 --- a/rend3/src/renderer/setup.rs +++ b/rend3/src/renderer/setup.rs @@ -60,13 +60,14 @@ pub fn create_renderer( ], ); - let profiler = Mutex::new(wgpu_profiler::GpuProfiler::new( - GpuProfilerSettings { + let profiler = Mutex::new( + wgpu_profiler::GpuProfiler::new(GpuProfilerSettings { enable_timer_scopes: true, enable_debug_groups: true, - max_num_pending_frames:4, - } - ).map_err(|e| RendererInitializationError::GpuProfilerCreation(e))?); + max_num_pending_frames: 4, + }) + .map_err(|e| RendererInitializationError::GpuProfilerCreation(e))?, + ); let scatter = ScatterCopy::new(&iad.device); diff --git a/rend3/src/setup.rs b/rend3/src/setup.rs index 9b905182..51fdb00b 100644 --- a/rend3/src/setup.rs +++ b/rend3/src/setup.rs @@ -2,8 +2,8 @@ use std::sync::Arc; use arrayvec::ArrayVec; use wgpu::{ - Adapter, AdapterInfo, Backend, Backends, BufferAddress, Device, DeviceDescriptor, DeviceType, Features, Instance, - Limits, Queue, Gles3MinorVersion, InstanceFlags, + Adapter, AdapterInfo, Backend, Backends, BufferAddress, Device, DeviceDescriptor, DeviceType, Features, + Gles3MinorVersion, Instance, InstanceFlags, Limits, Queue, }; #[allow(unused_imports)] diff --git a/rend3/src/util/mipmap.rs b/rend3/src/util/mipmap.rs index 4b0b7130..59175983 100644 --- a/rend3/src/util/mipmap.rs +++ b/rend3/src/util/mipmap.rs @@ -8,8 +8,8 @@ use wgpu::{ ColorTargetState, ColorWrites, CommandEncoder, Device, FilterMode, FragmentState, FrontFace, LoadOp, MultisampleState, Operations, PipelineLayout, PipelineLayoutDescriptor, PolygonMode, PrimitiveState, PrimitiveTopology, RenderPassColorAttachment, RenderPassDescriptor, RenderPipeline, RenderPipelineDescriptor, - SamplerBindingType, SamplerDescriptor, ShaderModule, ShaderStages, Texture, TextureDescriptor, TextureSampleType, - TextureViewDescriptor, TextureViewDimension, VertexState, StoreOp, + SamplerBindingType, SamplerDescriptor, ShaderModule, ShaderStages, StoreOp, Texture, TextureDescriptor, + TextureSampleType, TextureViewDescriptor, TextureViewDimension, VertexState, }; use crate::{