Skip to content

Commit 7078b0a

Browse files
authored
Fix Subgroup Ops on VK 1.2 Device (#5624)
1 parent 65d8c94 commit 7078b0a

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ for message in compilation_info
6262

6363
By @stefnotch in [#5410](https://github.com/gfx-rs/wgpu/pull/5410)
6464

65-
66-
6765
### New features
6866

6967
#### General
@@ -78,6 +76,10 @@ By @stefnotch in [#5410](https://github.com/gfx-rs/wgpu/pull/5410)
7876

7977
### Bug Fixes
8078

79+
#### Vulkan
80+
81+
- 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).
82+
8183
#### GLES / OpenGL
8284

8385
- Fix regression on OpenGL (EGL) where non-sRGB still used sRGB [#5642](https://github.com/gfx-rs/wgpu/pull/5642)

wgpu-hal/src/vulkan/adapter.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,9 +1447,6 @@ impl super::Instance {
14471447
}),
14481448
image_format_list: phd_capabilities.device_api_version >= vk::API_VERSION_1_2
14491449
|| phd_capabilities.supports_extension(khr::image_format_list::NAME),
1450-
subgroup_size_control: phd_features
1451-
.subgroup_size_control
1452-
.map_or(false, |ext| ext.subgroup_size_control == vk::TRUE),
14531450
};
14541451
let capabilities = crate::Capabilities {
14551452
limits: phd_capabilities.to_wgpu_limits(),
@@ -1766,6 +1763,7 @@ impl super::Adapter {
17661763
vendor_id: self.phd_capabilities.properties.vendor_id,
17671764
timestamp_period: self.phd_capabilities.properties.limits.timestamp_period,
17681765
private_caps: self.private_caps.clone(),
1766+
features,
17691767
workarounds: self.workarounds,
17701768
render_passes: Mutex::new(Default::default()),
17711769
framebuffers: Mutex::new(Default::default()),

wgpu-hal/src/vulkan/device.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ impl super::Device {
773773
};
774774

775775
let mut flags = vk::PipelineShaderStageCreateFlags::empty();
776-
if self.shared.private_caps.subgroup_size_control {
776+
if self.shared.features.contains(wgt::Features::SUBGROUP) {
777777
flags |= vk::PipelineShaderStageCreateFlags::ALLOW_VARYING_SUBGROUP_SIZE
778778
}
779779

wgpu-hal/src/vulkan/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ struct PrivateCapabilities {
236236
robust_image_access2: bool,
237237
zero_initialize_workgroup_memory: bool,
238238
image_format_list: bool,
239-
subgroup_size_control: bool,
240239
}
241240

242241
bitflags::bitflags!(
@@ -342,6 +341,7 @@ struct DeviceShared {
342341
timestamp_period: f32,
343342
private_caps: PrivateCapabilities,
344343
workarounds: Workarounds,
344+
features: wgt::Features,
345345
render_passes: Mutex<rustc_hash::FxHashMap<RenderPassKey, vk::RenderPass>>,
346346
framebuffers: Mutex<rustc_hash::FxHashMap<FramebufferKey, vk::Framebuffer>>,
347347
}

0 commit comments

Comments
 (0)