| commit | e12a3a70bd6c6bef168247eaad7b33eef03366cc | [log] [tgz] |
|---|---|---|
| author | Peter McNeeley <petermcneeley@google.com> | Mon Apr 28 13:55:46 2025 -0700 |
| committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Apr 28 13:55:46 2025 -0700 |
| tree | 009477fb9d59fe962733fb4f2ec9223f3af8c859 | |
| parent | b465e23d19a5e27402d80191c0f8de1fb3b385b5 [diff] |
[dawn] Range check subgroup sizes This probably isnt possible since we require https://registry.khronos.org/vulkan/specs/latest/man/html/VK_EXT_subgroup_size_control.html and this device does not seem to support it. https://vulkan.gpuinfo.org/displayreport.php?id=36632 Change-Id: I516903155e2a22af1c5034115a1d076accd263fa Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/239234 Reviewed-by: Alan Baker <alanbaker@google.com> Reviewed-by: James Price <jrprice@google.com> Commit-Queue: Peter McNeeley <petermcneeley@google.com>
diff --git a/src/dawn/native/vulkan/PhysicalDeviceVk.cpp b/src/dawn/native/vulkan/PhysicalDeviceVk.cpp index 7605817..28bd11b 100644 --- a/src/dawn/native/vulkan/PhysicalDeviceVk.cpp +++ b/src/dawn/native/vulkan/PhysicalDeviceVk.cpp
@@ -473,7 +473,10 @@ !shaderF16Enabled || (mDeviceInfo.shaderSubgroupExtendedTypes.shaderSubgroupExtendedTypes == VK_TRUE); - if (!kForceDisableSubgroups && hasBaseSubgroupSupport && hasRequiredF16Support) { + // Some devices (PowerVR GE8320) can apparently report subgroup size of 1. + const bool allowSubgroupSizeRanges = mSubgroupMinSize >= 4u && mSubgroupMaxSize <= 128u; + if (!kForceDisableSubgroups && hasBaseSubgroupSupport && hasRequiredF16Support && + allowSubgroupSizeRanges) { EnableFeature(Feature::Subgroups); }