Skip to content

Commit 747ee6c

Browse files
cwfitzgeraldEriKWDev
authored andcommitted
Fix Subgroup Ops on VK 1.2 Device (gfx-rs#5624)
1 parent c5c5ae8 commit 747ee6c

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
@@ -1443,9 +1443,6 @@ impl super::Instance {
14431443
}),
14441444
image_format_list: phd_capabilities.device_api_version >= vk::API_VERSION_1_2
14451445
|| phd_capabilities.supports_extension(khr::image_format_list::NAME),
1446-
subgroup_size_control: phd_features
1447-
.subgroup_size_control
1448-
.map_or(false, |ext| ext.subgroup_size_control == vk::TRUE),
14491446
};
14501447
let capabilities = crate::Capabilities {
14511448
limits: phd_capabilities.to_wgpu_limits(),
@@ -1762,6 +1759,7 @@ impl super::Adapter {
17621759
vendor_id: self.phd_capabilities.properties.vendor_id,
17631760
timestamp_period: self.phd_capabilities.properties.limits.timestamp_period,
17641761
private_caps: self.private_caps.clone(),
1762+
features,
17651763
workarounds: self.workarounds,
17661764
render_passes: Mutex::new(Default::default()),
17671765
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
@@ -772,7 +772,7 @@ impl super::Device {
772772
};
773773

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

wgpu-hal/src/vulkan/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ struct PrivateCapabilities {
347347
robust_image_access2: bool,
348348
zero_initialize_workgroup_memory: bool,
349349
image_format_list: bool,
350-
subgroup_size_control: bool,
351350
}
352351

353352
bitflags::bitflags!(
@@ -453,6 +452,7 @@ struct DeviceShared {
453452
timestamp_period: f32,
454453
private_caps: PrivateCapabilities,
455454
workarounds: Workarounds,
455+
features: wgt::Features,
456456
render_passes: Mutex<rustc_hash::FxHashMap<RenderPassKey, vk::RenderPass>>,
457457
framebuffers: Mutex<rustc_hash::FxHashMap<FramebufferKey, vk::Framebuffer>>,
458458
}

0 commit comments

Comments
 (0)