Don't expose chromium-experimental-subgroups if DXC is not used

Currently, the feature gets exposed if DXC is available. However,
there are some cases where DXC is still not used (if the shader model
is not high enough to use it).

DXC may also be disabled manually via command line or toggles, so
subgroups should not be exposed in this case.

Bug: chromium:41494633
Change-Id: I8cca2263e4a8ae0d1e6472901efd68784ffe06b1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/179440
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp b/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp
index 66de589..05704fe 100644
--- a/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp
+++ b/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp
@@ -382,11 +382,19 @@
 FeatureValidationResult PhysicalDevice::ValidateFeatureSupportedWithTogglesImpl(
     wgpu::FeatureName feature,
     const TogglesState& toggles) const {
-    // The feature `shader-f16` requires DXC 1.4 or higher. Note that DXC version is checked in
-    // InitializeSupportedFeaturesImpl.
-    if (feature == wgpu::FeatureName::ShaderF16 && !toggles.IsEnabled(Toggle::UseDXC)) {
-        return FeatureValidationResult(absl::StrFormat(
-            "Feature %s requires DXC for D3D12.", GetInstance()->GetFeatureInfo(feature)->name));
+    if (!toggles.IsEnabled(Toggle::UseDXC)) {
+        // Disable features that require DXC.
+        switch (feature) {
+            // The feature `shader-f16` requires DXC 1.4 or higher. Note that DXC version is checked
+            // in InitializeSupportedFeaturesImpl.
+            case wgpu::FeatureName::ShaderF16:
+            case wgpu::FeatureName::ChromiumExperimentalSubgroups:
+                return FeatureValidationResult(
+                    absl::StrFormat("Feature %s requires DXC for D3D12.",
+                                    GetInstance()->GetFeatureInfo(feature)->name));
+            default:
+                break;
+        }
     }
     return {};
 }