Skip to content
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

Unexpected DX12 Device Removal on Fence Creation #1382

Closed
rnd-ash opened this issue May 10, 2021 · 2 comments
Closed

Unexpected DX12 Device Removal on Fence Creation #1382

rnd-ash opened this issue May 10, 2021 · 2 comments
Labels
type: bug Something isn't working

Comments

@rnd-ash
Copy link

rnd-ash commented May 10, 2021

Raising this as part of this issue, for OpenVehicleDiag

Description
Using the Iced GUI Library, it appears WGPU panics with the DX12 backend with the following stack trace:

thread 'main' panicked at 'assertion failed: (left == right)
left: 0,
right: -2005270523', C:\Users\Ashcon.cargo\registry\src\github.com-1ecc6299db9ec823\gfx-backend-dx12-0.7.0\src\device.rs:1032:9
stack backtrace:
0: 0xc986c8 -

Expected vs observed behavior
Program does not crash

@cwfitzgerald cwfitzgerald transferred this issue from gfx-rs/wgpu-rs May 10, 2021
@cwfitzgerald cwfitzgerald added the type: bug Something isn't working label May 10, 2021
@cwfitzgerald
Copy link
Member

cwfitzgerald commented May 10, 2021

Alright, we appear to be hitting a device removal (error code is 0x887A0005 DXGI_ERROR_DEVICE_REMOVED) some time before we call CreateFence, then the fence creation is exposing this removal. In order to diagnose this, we need to find the reason for device removal, which will involve running the program in the MSVC debugger to get the error message from the debug layers.

This is for an old version of wgpu/gfx-backend-dx12 (current is 0.8) because iced hasn't updated yet, but there is a patch update available in the 0.7 train for gfx-backend-dx12, so you should try cargo update gfx-backend-dx12 to get the latest patch and try with that.


I should note that we should also hook into this debug information like we do the vulkan validation layers. (Filed #1383 for this problem)

@cwfitzgerald cwfitzgerald changed the title DX12 backend "thread 'main' panicked at 'assertion failed: (left == right) left: 0, right: -2005270523" Unexpected DX12 Device Removal on Fence Creation May 18, 2021
@cwfitzgerald
Copy link
Member

Closing as stale due to hal rewrite, please refile if it's still an issue.

@cwfitzgerald cwfitzgerald closed this as not planned Won't fix, can't repro, duplicate, stale Jun 2, 2022
Patryk27 pushed a commit to Patryk27/wgpu that referenced this issue Nov 23, 2022
Treat expressions in `Function::named_expressions` like WGSL `let` declarations,
assuming that the Load Rule was applied to the rhs of the declaration, meaning
that their values are always `Indirection::Ordinary`.

Split `write_expr_plain_form` out from `write_expr_with_indirection`, to clean
up the parenthesis generation: no more `opened_paren` variable, just function
calls. This makes the early return for named expressions neater.

Fixes gfx-rs#1382.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants