Use the device maximum supported shader model

Use the device maximum supported shader model for DXC compiler.

Bug: None
Change-Id: I05f66d499405a3512a43daca35bb20be84f1f6c5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51080
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn_native/d3d12/ShaderModuleD3D12.cpp b/src/dawn_native/d3d12/ShaderModuleD3D12.cpp
index c554dac..00cbc36 100644
--- a/src/dawn_native/d3d12/ShaderModuleD3D12.cpp
+++ b/src/dawn_native/d3d12/ShaderModuleD3D12.cpp
@@ -314,12 +314,15 @@
         options_glsl.force_zero_initialized_variables = true;
 
         spirv_cross::CompilerHLSL::Options options_hlsl;
-        if (GetDevice()->IsExtensionEnabled(Extension::ShaderFloat16)) {
+        if (GetDevice()->IsToggleEnabled(Toggle::UseDXC)) {
             options_hlsl.shader_model = ToBackend(GetDevice())->GetDeviceInfo().shaderModel;
-            options_hlsl.enable_16bit_types = true;
         } else {
             options_hlsl.shader_model = 51;
         }
+
+        if (GetDevice()->IsExtensionEnabled(Extension::ShaderFloat16)) {
+            options_hlsl.enable_16bit_types = true;
+        }
         // PointCoord and PointSize are not supported in HLSL
         // TODO (hao.x.li@intel.com): The point_coord_compat and point_size_compat are
         // required temporarily for https://bugs.chromium.org/p/dawn/issues/detail?id=146,