mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 14:01:08 +01:00
Co-authored-by: Francis De Brabandere <francisdb@gmail.com>
This commit is contained in:
1 parent
866cc0d818
commit
6d387d77b9
2 files changed
+31
-3
No files matched your search
@@ -42,6 +42,12 @@ Bottom level categories:
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
#### Vulkan
|
||||
|
||||
- Fixed `VUID-RuntimeSpirv-vulkanMemoryModel-06265` validation errors by enabling `vulkanMemoryModelDeviceScope` whenever the Vulkan memory model is enabled, since the SPIR-V backend emits storage atomics with `Device` scope. By @francisdb in [#9741](https://github.com/gfx-rs/wgpu/pull/9741).
|
||||
|
||||
## v29.0.3 (2026-05-01)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -612,7 +612,13 @@ impl PhysicalDeviceFeatures {
|
||||
requested_features.contains(wgt::Features::EXPERIMENTAL_COOPERATIVE_MATRIX);
|
||||
Some(
|
||||
vk::PhysicalDeviceVulkanMemoryModelFeaturesKHR::default()
|
||||
.vulkan_memory_model(needed),
|
||||
.vulkan_memory_model(needed)
|
||||
// The SPIR-V backend emits storage atomics with `Device`
|
||||
// memory scope, so whenever the Vulkan memory model is
|
||||
// enabled we must also enable device scope, otherwise the
|
||||
// validation layers report
|
||||
// `VUID-RuntimeSpirv-vulkanMemoryModel-06265`.
|
||||
.vulkan_memory_model_device_scope(needed),
|
||||
)
|
||||
} else {
|
||||
None
|
||||
@@ -1041,10 +1047,17 @@ impl PhysicalDeviceFeatures {
|
||||
.map(|p| p.multisample_array_image == vk::TRUE)
|
||||
.unwrap_or(true),
|
||||
);
|
||||
// Enable cooperative matrix if any configuration is supported
|
||||
// Enable cooperative matrix if any configuration is supported. The SPIR-V
|
||||
// we emit for it uses `Device`-scope atomics under the Vulkan memory model,
|
||||
// so the device must also support `vulkanMemoryModelDeviceScope`, otherwise
|
||||
// those shaders trip `VUID-RuntimeSpirv-vulkanMemoryModel-06265`.
|
||||
features.set(
|
||||
F::EXPERIMENTAL_COOPERATIVE_MATRIX,
|
||||
!caps.cooperative_matrix_properties.is_empty(),
|
||||
!caps.cooperative_matrix_properties.is_empty()
|
||||
&& self.vulkan_memory_model.is_some_and(|m| {
|
||||
m.vulkan_memory_model == vk::TRUE
|
||||
&& m.vulkan_memory_model_device_scope == vk::TRUE
|
||||
}),
|
||||
);
|
||||
|
||||
features.set(
|
||||
@@ -2055,6 +2068,15 @@ impl super::InstanceShared {
|
||||
features2 = features2.push_next(next);
|
||||
}
|
||||
|
||||
if capabilities.device_api_version >= vk::API_VERSION_1_2
|
||||
|| capabilities.supports_extension(khr::vulkan_memory_model::NAME)
|
||||
{
|
||||
let next = features
|
||||
.vulkan_memory_model
|
||||
.insert(vk::PhysicalDeviceVulkanMemoryModelFeaturesKHR::default());
|
||||
features2 = features2.push_next(next);
|
||||
}
|
||||
|
||||
if capabilities.device_api_version >= vk::API_VERSION_1_1 {
|
||||
let next = features
|
||||
.shader_draw_parameters
|
||||
|
||||
Reference in new issue
Block a user