-
Notifications
You must be signed in to change notification settings - Fork 987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dxgi exception with Vulkan backend on Windows #4247
Comments
So this is a "bug" in AMD's vulkan swapchain (it's debatable if it's actually a bug, or just something their card doesn't care about) when based on top of a DXGI swapchain. Recently, AMD started using DXGI swapchains all the time, not just on HDR monitors. I believe there is a fix by routing error messages through ID3D12InfoQueue instead of hooking the general windows error message scheme like we do now. (The error would still happen, it just wouldn't be for one of our devices).
|
Thanks for the answer! Will this affect release builds in any way or can I just set the environment variable when testing and not worry about it? |
It shouldn't actually affect anything, is just kinda loud and annoying. |
Same here |
This could be improved by using the new dx12 api: https://microsoft.github.io/DirectX-Specs/d3d/MessageCallback.html#id3d12infoqueue1 |
Is there any progess on this? Or at least the idea to suppress these wrong errors? |
Trying to wrap my head around what is going on here. It looks like when running the examples without Once the application has picked the Vulkan backend, would it be possible to drop the DX12 backend? (this would unregister the exception handler and thus ignore the DX12 errors on vulkan?) |
Alternatively #2719 might make this issue redundant. Since this issue only happens when running the vulkan backend with the dx12 backend initialized. If DX12 is the default then Vulkan will only be used when selected explicitly (in which case there will be no DX12 backend initialized). |
This isn't going to happen, if ever, for a very long time. There a mirad of issues with our interop with dx12 that make it a worse user experience.
Not... really? A user can re-request adapters at any moment and we would need to re-initalize it. This all gets very hairy quickly. My suggestion is one of two things:
|
I've raised a PR that takes the easier path, since it's likely we'd need it anyway as a fallback since the more "correct" option only works on Win11. It does seem to be fixing the issues on my machine, but I'm not really sure how to validate that the error handling behavior is correct, since I'm not sure of an easy way to deliberately induce DX12 errors to make sure we're catching them. |
Description
When running the "hello-triangle" example, I get the following error message:
It happens every time the window is resized, including maximizing it. It also appears sometimes when just starting the program, without touching the window. When running the "cube" example, it seems to print the error every frame rather than just when resizing. Setting
WGPU_BACKEND
todx12
seems to fix the issue in thecube
benchmark, althoughhello_triangle
is unaffected. EDIT:WGPU_BACKEND=vulkan
also seems to fix the issue for some reason. Also, Bevy reports the backend to be Vulkan regardless of the value, even though the behavior changes.I get the same error message in Bevy as well, which is where I noticed it. If I ignore the errors, everything still seems to work.
I've tried both with the latest commit (2f3d17c) and with the 0.17.2 release. I am using stable Rust 1.70.0, which is chosen automatically when running the examples.
Please let me know if I can do anything to help debug this!
Repro steps
Clone repository, run
cargo run --bin cube
.Expected vs observed behavior
I expected no error messages in the terminal. Instead I get tons.
Extra materials
N/A
Platform
System info from Bevy:
The text was updated successfully, but these errors were encountered: