mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
expect on profiler creation error
This commit is contained in:
parent
3192ed037f
commit
1e40fa55c2
@ -8,7 +8,6 @@ pub enum RenderError {
|
||||
CouldNotFindAdapter,
|
||||
ErrorInitializingCompiler,
|
||||
ShaderError(String, shaderc::Error),
|
||||
ProfilerCreationError(wgpu_profiler::CreationError),
|
||||
}
|
||||
|
||||
use std::fmt;
|
||||
@ -31,7 +30,6 @@ impl fmt::Debug for RenderError {
|
||||
f,
|
||||
"\"{shader_name}\" shader failed to compile due to the following error: {err}",
|
||||
),
|
||||
RenderError::ProfilerCreationError(err) => write!(f, "Profiler creation error: {err}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -558,7 +558,7 @@ impl Renderer {
|
||||
enable_debug_groups: other_modes.profiler_enabled,
|
||||
max_num_pending_frames: 4,
|
||||
})
|
||||
.map_err(RenderError::ProfilerCreationError)?;
|
||||
.expect("Error creating profiler");
|
||||
|
||||
#[cfg(feature = "egui-ui")]
|
||||
let egui_renderpass = egui_wgpu_backend::RenderPass::new(&device, format, 1);
|
||||
@ -674,11 +674,7 @@ impl Renderer {
|
||||
enable_debug_groups: self.other_modes.profiler_enabled,
|
||||
max_num_pending_frames: 4,
|
||||
})
|
||||
.map_err(|err| {
|
||||
RenderError::ProfilerCreationError(
|
||||
wgpu_profiler::CreationError::InvalidSettings(err),
|
||||
)
|
||||
})?;
|
||||
.expect("Error creating profiler");
|
||||
|
||||
// Recreate render target
|
||||
self.on_resize(self.resolution);
|
||||
|
Loading…
Reference in New Issue
Block a user