mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Replace default wgpu error handler with one that includes the error in the panic message
This commit is contained in:
parent
7f9ba17dee
commit
972a6f3605
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user