bevy
bevy copied to clipboard
Broken rendering in examples on intel graphics
Bevy version
v0.10.0
[Optional] Relevant system information
The system is a Dell XPS 13 7390 2-in-1 running windows.
2023-03-11T05:22:43.409198Z INFO bevy_winit::system: Creating new window "Bevy App" (0v0)
2023-03-11T05:22:44.121756Z INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) Iris(R) Plus Graphics", vendor: 32902, device: 35410, device_type: IntegratedGpu, driver: "Intel Corporation", driver_info: "Intel driver", backend: Vulkan }
2023-03-11T05:22:45.181282Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Windows 11 Home", kernel: "22621", cpu: "Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz", core_count: "4", memory: "7.8 GiB" }
What you did
Ran cargo run --example breakout
.
Also occurs with other examples, and in release builds, but the breakout one seems to be the most interesting broken output.
What went wrong
The blocks, paddle, and ball don't render, but the score does. The game plays as normal, with score going up and with correct sound.
A few other examples i've tried only render a grey screen, but some seem to work
Additional Information
Possibly related to #6746 ? Am happy to try and debug on my end by running tools etc.
Additionally, a simple game I was testing/building on my own computer seems to render correctly
The same issue presents on my machine. Running sprite and breakout on 0.9 looks normal, but on 0.10 everything I think is a sprite is just gone. Game logic still seems to be fine, sounds play and the score counter increments.
In my own game project, egui-based menus are rendering fine, but sprites aren't, regardless of if they have textures or not.
HP Elitebook 840 G8 i5-1145G7 Intel Iris Xe Graphics
Some images for comparing 0.9.1 and 0.10.0 behaviour
Bevy 0.10 breakout: https://user-images.githubusercontent.com/4976122/224508322-50e96e0b-ff4f-4cff-8787-8c734383dbcf.PNG
Bevy 0.10 sprite: https://user-images.githubusercontent.com/4976122/224508323-2ad6d212-cc2a-48e6-b936-bc9e469d2a14.PNG
Bevy 0.9 breakout: https://user-images.githubusercontent.com/4976122/224508324-49cb497a-a327-4412-a9ca-8c11280da577.PNG
Bevy 0.10 sprite: https://user-images.githubusercontent.com/4976122/224508325-92dd6d56-7b8d-4676-a226-a72ad5e4055c.PNG
Played around with it more. Changing to the Dx12 backend via $Env:WGPU_BACKEND="dx12"
fixes the breakout example, and gets visuals in all other examples I tested.
Sometimes they're a bit broken, though:
Odd shadows in shapes example
Should I report this upstream to wgpu?
Updating graphics drivers fixed the issue. Apologies.
I disagree with the closing of this issue. If something worked for a specific version of a graphics driver in 0.9, and it doesn't work in 0.10, that's a regression, and something that can bother players of our games that don't necessarily know how to update their drivers. If there was a way for bevy to work for these driver versions on 0.9, there will be a way for bevy to work for these driver versions on 0.10.
I also had this issue and I agree it shouldn't be closed for the same reasons @ZeeQyu states. I narrowed the regression down to the commit bfd1d4b0a7731cf96e430d54397e7078e06c65e9 where it updates wgpu from 0.14.0 to 0.15.0
~~But the issue isn't with wgpu, as I can run wgpu's examples with no problems in both versions (using Vulkan backend). Though I don't know why the commit breaks wgpu's rendering while using an older intel graphics driver.~~
After updating my graphics drivers, the problem was fixed.
Agree, I shouldn't have closed it
There's something very wrong with shadowing on the intel drivers, which perhaps is related. Even though the sprite base examples work, shadows don't in the vulkan backend in the 3d_shapes
and shadow_biases
examples. In the dx12 backend the shadows seem very corrupted
In 0.9.0, the shadows worked in the vulkan backend, but had the same corruption in dx12
I'm staying on old intel drivers to allow reproducing and testing fixes, I am here and ready to help if someone with a better understanding of the problem and the libraries than I have needs hardware.
(This also means I'm deferring update to bevy 0.10 to be able to keep developing my project. That project would benefit from the new scheduling structure, so I'm doing this at some degree of cost, but nothing I can't maintain for a couple of weeks.)
Unlike @TheoDulka , on my computer there's a difference between wgpu versions.
In wgpu 0.14.2, the boids example is running with frame times of about 16.6 ms. In wgpu 0.15.0, 0.15.1 and 0.15.2, the boids example is running with frame times of about 1.3 ms, 10 times faster. The boids are moving faster in a way that seems similar to the speedup.
Clearly, something that affects at least my computer changed between these releases, since the contents of the example folder is almost the same, and if I change them to be exactly the same, there is still the same difference in behaviour between versions.
Next step is probably creating a ticket at wgpu, and I will unless someone does it before me. For now I'll dump my testing results here, cause while it is still on the wrong repo, it's at least better here than locally on my computer.
wgpu 0.14.2 vs wgpu 0.15.1 examples comparison:
- boids: 16.6 ms frametimes on 14.2, 1.3 ms framtimes on 0.15.1
- bunnymark: Same frametime diff as in boids, both versions only have a blank fillcolor, and the icon in the screenshot does not appear in either version.
- capture: Behaviour seems to be the same on both, example finishes without error, but no png is created.
- conservative-raster: Same frame time diff as boids, otherwise the same.
- cube: Same frame time diff.
- hello: On 0.14.2, a bunch of adapter info is printed. On 0.15.1, there is no output.
- hello-compute: Same output on both.
- hello-triangle; Same red triangle on green background on both.
- hello-windows: Same set of windows on both.
- mipmap: 0.14.2 fails due to features "WRITE_TIMESTAMP_INSIDE_PASSES" not enabled on device. 0.15.1 works and looks like the included screenshot, although with 1.3ish ms frame times.
- msaa-line: Same output, but same frame time diff.
- shadow: 0.14.2 looks like the included screenshot. 0.15.1 is missing all the cubes and all the shadows.
- skybox: Looks the same on both. Same frame time diff.
- texture-arrays: Looks the same on both. Similar frame time diff, though 3ms instead of 1.3 ms
- water: Looks the same on both, Similar frame time diff, though 3ms instead of 1.3 ms.
Just reproduced this on current bevy main d6e95e9570ed86e248d1e5f25d4f25d97977a1ab Is probably a duplicate of https://github.com/bevyengine/bevy/issues/8395 Bisect pointed to upgrading to wgpu 0.15: https://github.com/bevyengine/bevy/issues/8395#issuecomment-1510054960
I have the same issue on bevy 0.11.3, but I didn't have it on bevy 0.9.1 SystemInfo { os: "Windows 10 Home", kernel: "19045", cpu: "11th Gen Intel(R) Core(TM) i5-11500 @ 2.70GHz", core_count: "6", memory: "31.8 GiB" } AdapterInfo { name: "Intel(R) UHD Graphics 750", vendor: 32902, device: 19594, device_type: IntegratedGpu, driver: "Intel Corporation", driver_info: "Intel driver", backend: Vulkan }
switching to to DirectX12 seems to sometimes fix the problem
I am using Intel Arc a750 gpu, driver 31.0.101.4952 (2023/10/31), and this problem still exists.
I believe this should be fixed in bevy 0.13. Could people with intel GPUs effected by this test to see if it's fixed?
Tried it on the same machine I mentioned above. 0.9.0 works, 0.10.0 is broken, 0.12.0 is broken, 0.13.0 works. Since I retested the 0.9.0 and 0.10.0 it seems unlikely I've had any driver updates that could invalidate the result.
So yes, it strongly looks like 0.12->0.13 fixed the issue, at least for my specific hardware!
(To be specific, I only tested the breakout example.)