-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Repeating rendering error in debug console but rendering works. #9975
Comments
This is caused by this wgpu bug: gfx-rs/wgpu#3959 For now, you can fix it by forcing it to use Vulkan: App::new()
.add_plugins(DefaultPlugins.set(RenderPlugin {
wgpu_settings: WgpuSettings {
backends: Some(Backends::VULKAN),
..default()
},
}))
.run(); |
It works thanks |
Updating for Bevy 0.12: App::new()
.add_plugins(DefaultPlugins.set(RenderPlugin {
wgpu_settings: WgpuSettings {
backends: Some(Backends::VULKAN),
..default()
},
}))
.run(); For me, this also worked to get rid of the noisy warnings: App::new()
.add_plugins(DefaultPlugins.set(RenderPlugin {
wgpu_settings: WgpuSettings {
backends: Some(Backends::DX12),
..default()
},
}))
.run(); Looks like explicitly setting the backend makes the warnings go away. Check this issue out for some more context. |
Hey, this problem also occurs on bevy0.12.0+Intel Arc a750. Using vulkan on other graphics cards is a temporary solution, but due to #8037, intel graphics cards cannot run properly on vulkan, which is very embarrassing. |
For me, the above workaround did not work as the wgpusettings field is no longer part of RenderPlugin. This code worked for me:
I used Some(std::borrow::Cow::Borrowed("device_gpu")) to create a Clone-on-write string with the name "device_gpu" with a lifetime for the length of the program. I don't understand Cows all that well, but this is a handy article. |
A simpler version of the above code can be:
|
For those following this issue, this is upstreamed at gfx-rs/wgpu#4247. Marking this as blocked on a wgpu release to fix. |
Updated for bevy 13.2 App::new()
.add_plugins(DefaultPlugins.set(RenderPlugin {
render_creation: RenderCreation::Automatic(WgpuSettings {
backends: Some(Backends::VULKAN),
..default()
}),
..default()
}))
.run(); |
How can this be done in bevy version 0.14.x? |
@Retrodad0001 I Tested on |
Another way to set the backend is by using an environment variable, such as WGPU_BACKEND=dx12 (For me, using dx12 fixed the issue.) |
Bevy version
0.11
[Optional] Relevant system information
If your bug is rendering-related, copy the adapter info that appears when you run Bevy.
GPU - AMD Radeon RX 5700 - Primary/Discrete
VRAM - 8176 MB - GDDR6 1750 MHz
Graphics - AMD Radeon RX 5700
Graphics Manufacturer - Powered by AMD
Usable Memory Size - 8176 MB
Core Clock - 1725 MHz
Total Memory Bandwidth - 448 GByte/s
Device ID - 731F
Revision ID - C4
Vendor ID - 1002
SubSystem ID - 04E4
SubSystem Vendor ID - 1043
Bus Type - PCI Express 4.0
Current Bus Settings - PCI Express 4.0 x16
Driver Version - 23.20.11.04-230921a-396203C-AMD-Software-Adrenalin-Edition
AMD Windows Driver Version - 31.0.22011.4008
Direct3D API Version - 12.1
Vulkan™ API Version - 1.3.262
OpenCL™ API Version - 2.0
OpenGL® API Version - 4.6
Direct3D® Driver Version - 9.14.10.01526
Vulkan™ Driver Version - 2.0.283
OpenCL® Driver Version - 31.0.22011.4008
OpenGL® Driver Version - 23.09.230729_569461f
2D Driver Version - 8.1.1.1634
UI Version - 2023.0921.2013.1996
AMD Audio Driver Version - 10.0.1.30
Driver Provider - Advanced Micro Devices, Inc.
Windows Edition - Windows 11 Professional (64 bit)
Windows Version - 22H2
What you did
1 Just run the game.
What went wrong
The debug console is repeatingly logging an error, but the application is still working.
The error text:
2023-09-30T05:55:03.499324Z ERROR wgpu_hal::auxil::dxgi::exception: ID3D12CommandQueue::ExecuteCommandLists: Using IDXGIS
wapChain::Present on Command List (0x000001E5CE313540:'Internal DXGI CommandList'): Resource state (0xD84FF0C0: D3D12_RES
OURCE_STATE_RENDER_TARGET) of resource (0x000001E5CE3703C0:'Unnamed ID3D12Resource Object') (subresource: 0) is invalid f
or use as a PRESENT_SOURCE. Expected State Bits (all): 0xD84FF0A0: D3D12_RESOURCE_STATE_[COMMON|PRESENT], Actual State:
0xD84FF080: D3D12_RESOURCE_STATE_RENDER_TARGET, Missing State: 0x0: D3D12_RESOURCE_STATE_[COMMON|PRESENT]. [ EXECUTION ERROR #538: INVALID_SUBRESOURCE_STATE]
Additional information
I have 2 pc's only on 1 with the same code I get this error only on 1 pc. The crazy thing is that I get this error most of the time, not always. The other pc has a different setup. I have this issue with many bevy versions, but I don't know if this is a bevy issue. I have this for a long time, even when and updated the AMD drivers at least 5 times.
The text was updated successfully, but these errors were encountered: