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

Intel iGPUs with outdated graphics drivers struggle to render with VK_EXT_robustness2 enabled #4599

Closed
TheoDulka opened this issue Oct 28, 2023 · 10 comments · Fixed by #4602
Closed
Labels
api: vulkan Issues with Vulkan external: driver-bug A driver is causing the bug, though we may still want to work around it platform: windows Issues with integration with windows

Comments

@TheoDulka
Copy link
Contributor

Description
For 0.15 and later, the shadow example doesn't render the cubes nor shadows, only the plane. The problem is expanded on in bevy bevyengine/bevy#8037, where it only shows the clear color and sometimes UI. The shadow example was just what I used to find where the problem was in the update from 0.14.0 to 0.15.0.

Repro steps

  1. Find an intel laptop with an integrated GPU
  2. Make sure the graphics driver is relatively old (one I'm using is from June 2021)
  3. Run the shadow example in a version of wgpu 0.15 and later

Extra materials
The problem comes from 39f6b03 / #3327

Removing this snippet of code fixes the bevy issue and the shadow example:

// Optional `VK_EXT_robustness2`
if self.supports_extension(vk::ExtRobustness2Fn::name()) {
extensions.push(vk::ExtRobustness2Fn::name());
}
I have no idea why, so I wanted to ask if anyone has any ideas on why VK_EXT_robustness2 causes almost everything to not be rendered in vulkan, yet be fine with a more recent driver or a different GPU. A couple thoughts I got was perhaps:

  • "could be that Intel screwed up the implementation of that extension"
  • "maybe an alignment issue? 'It is important to query the robustUniformBufferAccessSizeAlignment and robustStorageBufferAccessSizeAlignment from VkPhysicalDeviceRobustness2PropertiesEXT as the alignment of where buffers are bound-checked is different between implementations'"

I'm sure this extension is useful to have, so I don't want to add a PR removing it for all GPUs, and am currently unaware of how best to add an exception for outdated intel iGPU drivers.

Platform
Windows 10
Intel UHD Graphics, version: 27.20.100.9664
wgpu 0.15 and later
Vulkan

@cwfitzgerald
Copy link
Member

Hmm. Could you send a lot of vulkaninfo (part of the vulkan sdk) or grab the vulkan capability viewer from https://vulkan.gpuinfo.org and upload/link us a report on your code

@TheoDulka
Copy link
Contributor Author

vulkaninfo.txt

@cwfitzgerald
Copy link
Member

Alright, it's almost certainly not robustStorageBufferAccessSizeAlignment as they're both 4.

We can disable robustness based on it being Intel and a certain age of driver. Does updating your driver fix the problem?

Without a specific driver version that works (unless you'd be wiling to binary search the driver to refine it), I think "drivers before now get this workaround.

@cwfitzgerald cwfitzgerald added the external: driver-bug A driver is causing the bug, though we may still want to work around it label Oct 28, 2023
@TheoDulka
Copy link
Contributor Author

I had updated my driver before, but I wanted to figure out this issue, so I downgraded back.

Driver Version 31.0.101.2115 was the earliest one I could find and try (due to Intel's End Of Life on 6th gen proc) and it works.

I'll make a PR with that workaround.

@cwfitzgerald
Copy link
Member

Thanks for the work!

@tasogare3710
Copy link

tasogare3710 commented Oct 28, 2023

I ran cargo run --example breakout using Intel N95 and dirver version 31.0.101.4648 and bevy's main repository, no problem.

2023-10-28T12:12:24.389221Z  INFO bevy_winit::system: Creating new window "App" (0v0)
2023-10-28T12:12:24.600363Z  INFO bevy_render::renderer: AdapterInfo { name: "Intel(R) UHD Graphics", vendor: 32902, device: 18130, device_type: IntegratedGpu, driver: "Intel Corporation", driver_info: "Intel driver", backend: Vulkan }
2023-10-28T12:12:25.420770Z  INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Windows 11 Pro", kernel: "22621", cpu: "Intel(R) N95", core_count: "4", memory: "15.8 GiB" }
2023-10-28T12:12:25.435251Z  INFO bevy_input::gamepad: Gamepad { id: 0 } Connected
2023-10-28T12:13:26.733515Z  INFO bevy_window::system: No windows are open, exiting
2023-10-28T12:13:26.736252Z  INFO bevy_winit::system: Closing window 0v0

bevy_breakout

@tasogare3710
Copy link

tasogare3710 commented Oct 28, 2023

Is this issue caused by a specific version of the driver(and cpu?)?

@cwfitzgerald
Copy link
Member

Yeah somewhere between 27.20.100.9664 and 31.0.101.2115 it was fixed

@TheoDulka
Copy link
Contributor Author

TheoDulka commented Oct 28, 2023

I'm pretty sure that the issue doesn't just affect a specific driver version, but that's something that could be looked into as I'm not 100% sure. I would assume that it was fixed in one driver version though, because many intel processor gens with older drivers experience this issue, seen in the bevy issue.

Your driver version 31.0.101.4648 is a later version compared to the known working version of 31.0.101.2115, so it makes sense that it works.

If you'd be willing, you could try using this earlier version 30.0.101.1729 (assuming it's one you can use) to see if the earliest working version could be narrowed down

@tasogare3710
Copy link

tasogare3710 commented Oct 28, 2023

I have tried all the versions available for download.

driver version result
31.0.101.4648 good
31.0.101.4316 good
31.0.101.4092 good
31.0.101.3517 Exit code 8 "No driver was found that can be installed on the current device"
30.0.101.1729 Exit code 8 "No driver was found that can be installed on the current device"
  • Alder Lake-N supports 31.0.101.4092 or later.

31.0.101.2115 is the last version of the 6th-10th gen driver, 30.0.101.1729 is the driver for the current product that supports the arc and 11th gen and later, so it seems safe to assume that the last driver for the old product still has the bug...Really.

@teoxoy teoxoy added the api: vulkan Issues with Vulkan label Nov 17, 2023
@teoxoy teoxoy added the platform: windows Issues with integration with windows label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: vulkan Issues with Vulkan external: driver-bug A driver is causing the bug, though we may still want to work around it platform: windows Issues with integration with windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants