wrap `Arc<Backtrace>` in Option, saving memory when backtraces are disabled
This PR wraps all Arc<Backtrace> in Option, as to not have to allocate an Arc of a disabled Backtrace each time GPU memory is allocated with backtraces are disabled. This is probably a premature optimization, but it was so easy to implement I couldn't resist :D
I only tested the vulkan implementation and visualizer on Linux, I hope CI catches issues for the other platforms.
I recall checking long ago that Backtrace::Captured { .. } used to be quite small back in the day, is that no longer the case?
Regardless, this saves us some bytes in the Arc too so I guess it's nice to have. There's nothing to do about the ambiguity between None and Some(Arc::new(Backtrace::Disabled)) but it is what it is :)
why the Backtrace is wrapped in an Arc
I don't have the time right now to investigate that further, feel free to do that yourself or leave the PR as is.