philpax / wgpu-openxr-example

a barebones example of how to integrate OpenXR with wgpu (Vulkan-only)
MIT License
49 stars 9 forks source link

WIP debugging swapchain issue #10

Closed schell closed 2 years ago

schell commented 2 years ago

Should help with debugging #9

philpax commented 2 years ago

Thanks for the PR! I'd suggest using tracing instead of fast_log (the former is the de jure standard in the Rust ecosystem, as far as I know) and removing the vulkan_enable line - the spec says it's an alternative:

This extension is intended as an alternative to XR_KHR_vulkan_enable, and does not depend on it.

It could potentially cause conflicts with other runtimes.

schell commented 2 years ago

I've found that getting tracing, tracing-subscriber and tracing-log to work well with log to be a bit of a pain, which is why I use fast_log. fast_log gives you some nice filters that let you easily include or exclude logs produced by dependency crates without a bunch of configuration. Since wgpu uses log I've found it easier to go this route. I've been playing around with tracing-log to try to get the wgpu logs out in this branch but it just doesn't seem to be working. There's some magic invocation I'm sure, but it's not the problem I'd like to be working on.

schell commented 2 years ago

Seems I had a bug that was panicking early, preventing wgpu from getting to print any logs after all! I'll switch to tracing for this.

philpax commented 2 years ago

Thanks for the PR, by the way! I took the liberty of merging it as the changes were pretty uncontroversial, even if we're still trying to figure out the issue 🙂