diff --git a/CHANGELOG.md b/CHANGELOG.md index 86e67c46d4..500ad8fc6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,9 +37,7 @@ Bottom level categories: - Hal --> -## Unreleased - -## v0.20.1 (2024-04-??) +## Unreleased -- v0.20.1 (2024-04-??) ### Bug Fixes @@ -47,6 +45,10 @@ Bottom level categories: - Clean up weak references to texture views and bind groups. By @xiaopengli89 [#5595](https://github.com/gfx-rs/wgpu/pull/5595). +#### Vulkan + +- Fix enablement of subgroup ops extension on Vulkan devices that don't support Vulkan 1.3. By @cwfitzgerald in [#5624](https://github.com/gfx-rs/wgpu/pull/5624). + ## v0.20.0 (2024-04-28) diff --git a/wgpu-hal/src/vulkan/adapter.rs b/wgpu-hal/src/vulkan/adapter.rs index 21219361f4..bbf44feace 100644 --- a/wgpu-hal/src/vulkan/adapter.rs +++ b/wgpu-hal/src/vulkan/adapter.rs @@ -1485,9 +1485,6 @@ impl super::Instance { }), image_format_list: phd_capabilities.device_api_version >= vk::API_VERSION_1_2 || phd_capabilities.supports_extension(vk::KhrImageFormatListFn::name()), - subgroup_size_control: phd_features - .subgroup_size_control - .map_or(false, |ext| ext.subgroup_size_control == vk::TRUE), }; let capabilities = crate::Capabilities { limits: phd_capabilities.to_wgpu_limits(), @@ -1792,6 +1789,7 @@ impl super::Adapter { vendor_id: self.phd_capabilities.properties.vendor_id, timestamp_period: self.phd_capabilities.properties.limits.timestamp_period, private_caps: self.private_caps.clone(), + features, workarounds: self.workarounds, render_passes: Mutex::new(Default::default()), framebuffers: Mutex::new(Default::default()), diff --git a/wgpu-hal/src/vulkan/device.rs b/wgpu-hal/src/vulkan/device.rs index ec392533a0..aba36311de 100644 --- a/wgpu-hal/src/vulkan/device.rs +++ b/wgpu-hal/src/vulkan/device.rs @@ -789,7 +789,7 @@ impl super::Device { }; let mut flags = vk::PipelineShaderStageCreateFlags::empty(); - if self.shared.private_caps.subgroup_size_control { + if self.shared.features.contains(wgt::Features::SUBGROUP) { flags |= vk::PipelineShaderStageCreateFlags::ALLOW_VARYING_SUBGROUP_SIZE } diff --git a/wgpu-hal/src/vulkan/mod.rs b/wgpu-hal/src/vulkan/mod.rs index d1ea82772e..0dd361e0b6 100644 --- a/wgpu-hal/src/vulkan/mod.rs +++ b/wgpu-hal/src/vulkan/mod.rs @@ -238,7 +238,6 @@ struct PrivateCapabilities { robust_image_access2: bool, zero_initialize_workgroup_memory: bool, image_format_list: bool, - subgroup_size_control: bool, } bitflags::bitflags!( @@ -344,6 +343,7 @@ struct DeviceShared { timestamp_period: f32, private_caps: PrivateCapabilities, workarounds: Workarounds, + features: wgt::Features, render_passes: Mutex>, framebuffers: Mutex>, }