Replace default wgpu error handler with one that includes the error in the panic message

This commit is contained in:
Imbris 2021-04-25 22:03:59 -04:00 committed by Avi Weinstock
parent 5b3dbca297
commit e4fc93035b

View File

@ -210,6 +210,16 @@ impl Renderer {
),
)?;
// Set error handler for wgpu errors
// This is better for use than their default because it includes the error in
// the panic message
device.on_uncaptured_error(|error| {
panic!(
"wgpu error (handling all wgpu errors as fatal): {:?}",
error
)
});
let profiler_features_enabled = device
.features()
.contains(wgpu_profiler::GpuProfiler::REQUIRED_WGPU_FEATURES);