diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cebc049c..cfeed3300 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -268,6 +268,7 @@ By @sagudev in [#10307](https://github.com/gfx-rs/wgpu/pull/10307). - Request `VK_KHR_spirv_1_4` and raise the generated SPIR-V version to 1.4 when `EXPERIMENTAL_RAY_TRACING_PIPELINES` or `EXPERIMENTAL_MESH_SHADER` is enabled on a pre-Vulkan-1.2 device. Both `SPV_KHR_ray_tracing` and `SPV_EXT_mesh_shader` require SPIR-V 1.4, but shaders were generated as 1.3 there: ray tracing pipelines requested neither the extension nor the version, and mesh shaders requested the extension without raising the version. Naga now rejects ray tracing pipeline shaders targeting below SPIR-V 1.4, as it already did for mesh shaders. By @JMS55 in [#10193](https://github.com/gfx-rs/wgpu/pull/10193). - Fix feature detection for [Robust Image Access](https://docs.vulkan.org/spec/latest/chapters/shaders.html#shaders-robust-image-access) when `VK_EXT_robustness2` is present but reports no support for [Robust Image Access 2](https://docs.vulkan.org/spec/latest/chapters/shaders.html#shaders-robust-image-access2), fixing a shader compilation crash on some Mali drivers. By @raphlinus in [#10291](https://github.com/gfx-rs/wgpu/pull/10291). - Fixed a panic on the Vulkan backend when dropping a surface whose acquired texture was still alive (e.g. after `present` failed due to a lost device). By @MarcelStruckWO in [#10230](https://github.com/gfx-rs/wgpu/pull/10230). +- Don't use timeline semaphores on VeriSilicon's proprietary driver, as on NXP's i.MX 8 SoCs, which crashes in `vkQueueSubmit` with them. wgpu falls back to binary fences there. By @tronical in [#10535](https://github.com/gfx-rs/wgpu/pull/10535). - Recover from `VK_ERROR_FRAGMENTED_POOL` and `VK_ERROR_OUT_OF_POOL_MEMORY` when allocating descriptor sets by resetting or retiring the offending pool and retrying on the next available (or a freshly created) pool instead of panicking. By @beicause in [#10264](https://github.com/gfx-rs/wgpu/pull/10264). #### Metal diff --git a/wgpu-hal/src/auxil/mod.rs b/wgpu-hal/src/auxil/mod.rs index 2767e428b..93a0b87dc 100644 --- a/wgpu-hal/src/auxil/mod.rs +++ b/wgpu-hal/src/auxil/mod.rs @@ -53,6 +53,11 @@ pub mod db { /// cbindgen:ignore pub const VENDOR: u32 = 0x5143; } + pub mod verisilicon { + // `VK_VENDOR_ID_VSI`; VeriSilicon does not use a PCI vendor id for its GPUs. + /// cbindgen:ignore + pub const VENDOR: u32 = 0x10002; + } } /// Maximum binding size for the shaders that only support `i32` indexing. diff --git a/wgpu-hal/src/vulkan/adapter.rs b/wgpu-hal/src/vulkan/adapter.rs index 1755efd51..8f7fa563a 100644 --- a/wgpu-hal/src/vulkan/adapter.rs +++ b/wgpu-hal/src/vulkan/adapter.rs @@ -2481,12 +2481,16 @@ impl super::Instance { let private_caps = super::PrivateCapabilities { image_view_usage: phd_capabilities.device_api_version >= vk::API_VERSION_1_1 || phd_capabilities.supports_extension(khr::maintenance2::NAME), - timeline_semaphores: match phd_features.timeline_semaphore { - Some(features) => features.timeline_semaphore == vk::TRUE, - None => phd_features - .timeline_semaphore - .is_some_and(|ext| ext.timeline_semaphore != 0), - }, + // VeriSilicon's proprietary driver, as on NXP's i.MX 8 SoCs, advertises timeline + // semaphores but crashes in `vkQueueSubmit` when wgpu uses them. It reports + // `VK_DRIVER_ID_MESA_RADV` as its driver ID, so only the vendor ID identifies it. + timeline_semaphores: phd_capabilities.properties.vendor_id != db::verisilicon::VENDOR + && match phd_features.timeline_semaphore { + Some(features) => features.timeline_semaphore == vk::TRUE, + None => phd_features + .timeline_semaphore + .is_some_and(|ext| ext.timeline_semaphore != 0), + }, texture_d24: supports_format( &self.shared.raw, phd,