-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Gpu not working / being detected #4461
Comments
What GPU are you using? :) Do the |
Oh, I met the same bug. And this bug only occurs in debug model, the program can run successfully in release model. Besides, I tried the examples in Full Output
|
Drivers up to date :) The wgpu examples work successfully:
But I notice when using the DX12 backend the following messages
it is a similar error message to the one I get on bevy examples, but somehow it is handled differently and the program does not exit. And sure enough, all examples run smoothly on the nvidia card on release mode. I imagine this is because of some debug_assertion used to exit on those errors. I wonder if there are some options that bevy passes to wgpu that make it exit on that error in contrast with the wgpu examples,. |
Yeah, Bevy currently captures all errors from wgpu and considers them fatal. |
Update: I found the solution ! Context: This is a bug in dx12, the bug suppression was added in wgpu, that is why the wgpu examples run correctly, but it hasn't been released yet, so bevy which still uses 0.12.0 wgpu fails. Solution: Patch wgpu to use the latest branch instead of version 0.12.0 $ git clone https://github.com/gfx-rs/wgpu [patch.crates-io]
wgpu = { path = "../wgpu/wgpu" } This should be enough to fix the issue ! Hope this helps someone else (: |
Huh, I may have celebrated a little to early, while yes this solves the issue of this thread, it is unfortunately breaks some other things, such as shader compilation and some texture creations
I'm not sure how easy it would be to attempt to patch only the affected dx12 module of wgpu, but if that doesn't work I don't think there is anything else I can try. I'm gonna reopen because it's not really a solution yet. |
Do you have a link to the wgpu issue? They have been very receptive about patch releases for bugs affecting bevy in the past. |
I haven't made an issue there and am not sure if there is one already. I wanted to first find the exact commit that introduces the fix so that way is easier to create a patch. I will link once I create the issue |
wgpu issue: gfx-rs/wgpu#2592 |
So far this is what I have gotten to work:
That commit should be enough to fix the issue, at least partially. This is probably best we can do until wgpu releases a fix. |
@eduardvercaemer Could your program run with NVIDIA GeForce GTX 1650 Ti and vulkan backend? |
RUST_LOG = "error,wgpu_core::instance=info"
|
I wonder if you add the environment variable with |
Probably not worth your time; this should get fixed when wgpu and then bevy do a release. |
I'm happy enough with the patched wgpu, so yeah, at this point is just waiting for wgpu to patch, someone mentioned in the issue over there that might happen. |
So I just went ahead and found the patch for the vulkan issue as well, same procedure as solution for DX12, but patch using gfx-rs/wgpu@d45e6b4 👍🏼 |
[patch.crates-io]
wgpu = { git = "https://github.com/gfx-rs/wgpu" }
# or
wgpu = { git = "https://github.com/gfx-rs/wgpu" , rev = "3d10678a91b78557b0dea537407eb4a4ff754872" } is simpler. |
Looks like this was resolved when we updated wgpu to 0.13. Closing. |
Please re open. I have same error on Windows 10 I've tried couple games from steam. Ones that are using winowed mode crashes. Tryed building from source one small project (that runs on Mac for it's author) and it crashes on windows 10 for me:
Vulkan worked for me inside Unreal Editor from Unreal engine. I have two GPU. AMD (integrated) and nvida RTX3070 mobile. Or do I need Vulkan SDK or smth? |
Setting this environment variable resolved the issue:
But that's not good. |
@alice-i-cecile looks like there already exists issue #12739 that was already opened |
Bevy version
0.6.1
Operating system & version
Windows 11
What you did
New rust project
add example code
What you expected to happen
See game window pop up.
What actually happened
Bunch of errors show up, window appears for an instance and crashes.
Additional information
Full output:
This is after installing latest drivers.
I then also tried a suggestion from another issue #3645
which has similar effects
full output:
The text was updated successfully, but these errors were encountered: