diff --git a/voxygen/src/render/error.rs b/voxygen/src/render/error.rs index 25c585a022..f8434fb66e 100644 --- a/voxygen/src/render/error.rs +++ b/voxygen/src/render/error.rs @@ -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}"), } } } diff --git a/voxygen/src/render/renderer.rs b/voxygen/src/render/renderer.rs index 13ceeafc12..d471675084 100644 --- a/voxygen/src/render/renderer.rs +++ b/voxygen/src/render/renderer.rs @@ -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);