Skip to content

Commit

Permalink
Applied auto formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
svermeulen committed Nov 12, 2023
1 parent 6a2b7e9 commit 9c86744
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
10 changes: 7 additions & 3 deletions rend3/src/graph/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
}
Expand Down
11 changes: 6 additions & 5 deletions rend3/src/renderer/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions rend3/src/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
4 changes: 2 additions & 2 deletions rend3/src/util/mipmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down

0 comments on commit 9c86744

Please sign in to comment.