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

Unable to render sprites #8395

Closed
HaNaK0 opened this issue Apr 16, 2023 · 15 comments · Fixed by gfx-rs/wgpu#4602
Closed

Unable to render sprites #8395

HaNaK0 opened this issue Apr 16, 2023 · 15 comments · Fixed by gfx-rs/wgpu#4602
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior P-Regression Functionality that used to work but no longer does. Add a test for this!

Comments

@HaNaK0
Copy link
Contributor

HaNaK0 commented Apr 16, 2023

Bevy version

v0.10.1

Relevant system information

SystemInfo { os: "Windows 11 Home", kernel: "22621", cpu: "Intel(R) Core(TM) i5-1035G4 CPU @ 1.10GHz", core_count: "4", memory: "7.6 GiB" }

AdapterInfo { name: "Intel(R) Iris(R) Plus Graphics", vendor: 32902, device: 35418, device_type: IntegratedGpu, driver: "Intel Corporation", driver_info: "Intel driver", backend: Vulkan }

What you did

I have cloned the bevy repo and try to run some of the examples after realising my game doesn't render after updating version

What went wrong

If I run the sprite example i get nothing but a gray background
If I run the contributor example i get the names of the contriutors but not the sprites just a gray backgound

I have tried to run both examples with version 0.9.0 and there they work as expeted so it seems that the issue got introduced in version 0.10.0 because it persists on the main branch

I have also tried the Boids example in the wgpu repo and it seems to work as intended

@HaNaK0 HaNaK0 added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Apr 16, 2023
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen P-Regression Functionality that used to work but no longer does. Add a test for this! and removed S-Needs-Triage This issue needs to be labelled labels Apr 16, 2023
@rparrett
Copy link
Contributor

This sounds like #8037. Have you tried updating your graphics drivers?

@HaNaK0
Copy link
Contributor Author

HaNaK0 commented Apr 16, 2023

Seem like it could be related. I'm trying to update my drivers now.

@HaNaK0
Copy link
Contributor Author

HaNaK0 commented Apr 16, 2023

Updating drivers did not seem to help

@ickk
Copy link
Member

ickk commented Apr 16, 2023

I haven't been able to replicate this with the vulkan backend on any of these intel devices:

  • Intel HD Graphics 530
  • Intel UHD Graphics 630
  • Intel Arc A750

Can you do a bisect to help identify the commit that introduced the problem?

Another thing you could try is the wgpu examples to see if you have any issues with upstream (bevy currently uses wgpu v0.15).

@DGriffin91
Copy link
Contributor

@HaNaK0 Try setting wgpu to use dx12
set WGPU_BACKEND=dx12

@Elabajaba
Copy link
Contributor

Elabajaba commented Apr 16, 2023

Do you have the BEVY_ASSET_ROOT environment variable set to something? (I think there's a similar environment variable, but I don't remember) Having that set could just mean it isn't loading the sprites because it's looking in the wrong directory.

Could you run the sprites example again and copy all the text it outputs to the terminal here?

@DGriffin91
Copy link
Contributor

I've been testing this on a Intel UHD 630 IGP

0.11.0-dev shows just clear color, no error
0.10.1 shows just clear color, no error
0.9.1 works as expected
All 3 work when manually setting dx12

Renderdoc shows the main_pass_2d running and shows the expected draw calls. But does not show the sprite in the texture viewer. The renderdoc ui also does not show up.

git bisect shows this:
bfd1d4b is the first bad commit

Update Bevy to wgpu 0.15.

@HaNaK0
Copy link
Contributor Author

HaNaK0 commented Apr 16, 2023

Manually setting wgpu to use dx12 seems to solve the problem

@s-mayrh
Copy link

s-mayrh commented Jul 11, 2023

Works with Bevy 0.10.1 on my device, but the mentioned issue shows up on 0.11.0. In both cases it automatically used Dx12, not Vulkan.

Windows 10.0.1 21H2 9044.3086
LENOVO_MT_80SG_BU_idea_FM_MIIX 310-10ICR
Intel(R) Atom(TM) x5-Z8350 CPU @ 1.44GHz, 1441 MHz, 4 cores
Intel(R) HD Graphics PCI\VEN_8086&DEV_22B0&SUBSYS_380917AA&REV_36\3&11583659&0&10
Driver: C:\WINDOWS\SYSTEM32\DRIVERS\IGDKMD64LP.SYS (20.19.15.4501, 7,05 MB (7 391 720 Bytes), 28.07.2017 01:39)
Toolchain: stable-x86_64-pc-windows-gnu (default) rustc 1.70.0 (90c541806 2023-05-31)

v0.10.1

Sprite is shown as expected.

2023-07-11T17:32:42.431329Z INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) HD Graphics", vendor: 32902, device: 8880, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Dx12 }

v0.11.0

Sprite not displayed - just a gray area

2023-07-11T15:03:09.124037Z INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) HD Graphics", vendor: 32902, device: 8880, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Dx12 }

Side effect

CPU usage: 30%
GPU usage: 99%
both are very high (50-90%) for rendering a static 2D scene

@DGriffin91
Copy link
Contributor

Just tested bevy 0.11 on a Intel UHD 630 IGP with the sprite example. Vulkan showed nothing, DX12 showed the sprite and seemed to work. It was using around 12% CPU and 18% GPU with DX12.

@s-mayrh
Copy link

s-mayrh commented Jul 13, 2023

I figured out my GPU maxed out because Windows did DPI virtualization
#9145

@FrederoxDev
Copy link

I have the same issue on bevy 0.11 with:

    GPU 0
Intel(R) UHD Graphics

Driver version:	30.0.101.1273
Driver date:	14/01/2022
DirectX version:	12 (FL 12.1)
Physical location:	PCI bus 0, device 2, function 0

CPU

Intel(R) Core(TM) i3-1005G1 CPU @ 1.20GHz

@Elabajaba
Copy link
Contributor

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?

@HaNaK0
Copy link
Contributor Author

HaNaK0 commented Feb 20, 2024

For me it also seem to work on 0.11

@HaNaK0
Copy link
Contributor Author

HaNaK0 commented Apr 18, 2024

It seems to be fixed now

@HaNaK0 HaNaK0 closed this as completed Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior P-Regression Functionality that used to work but no longer does. Add a test for this!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants