-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Intel iGPUs with outdated graphics drivers struggle to render with VK_EXT_robustness2 enabled #4599
Description
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
- Find an intel laptop with an integrated GPU
- Make sure the graphics driver is relatively old (one I'm using is from June 2021)
- 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:
wgpu/wgpu-hal/src/vulkan/adapter.rs
Lines 671 to 675 in 43b74f9
| // Optional `VK_EXT_robustness2` | |
| if self.supports_extension(vk::ExtRobustness2Fn::name()) { | |
| extensions.push(vk::ExtRobustness2Fn::name()); | |
| } | |
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