D3D12: Enable SM 6.6 on Intel Gen12 GPUs
Intel Gen12 D3D driver has fixed SM 6.6 issues on 32.0.101.5762, we can
remove the workaround "d3d12_dont_use_shader_model_66_or_higher" for the
latest drivers.
Bug: 42241419, 42242280
Change-Id: I3b61bbbe2c1d274a38d24a147a5a1604656a383c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/203157
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
diff --git a/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp b/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp
index 1f9c85b..eeb5b66 100644
--- a/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp
+++ b/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp
@@ -557,12 +557,16 @@
uint32_t deviceId = GetDeviceId();
uint32_t vendorId = GetVendorId();
- // On Intel Gen12 GPU, using shader model 6.6 will cause unexpected result when
- // adding/subtracting I32/U32 vector/scalar with vector/scalar in constant initialized array.
- // See https://crbug.com/tint/2189 and https://crbug.com/dawn/2470 for more information.
+ // On Intel Gen12 D3D driver < 32.0.101.5762, using shader model 6.6 will cause unexpected
+ // result when adding/subtracting I32/U32 vector/scalar with vector/scalar in constant
+ // initialized array. See https://crbug.com/tint/2189 and https://crbug.com/dawn/2470 for more
+ // information.
if (gpu_info::IsIntelGen12HP(vendorId, deviceId) ||
gpu_info::IsIntelGen12LP(vendorId, deviceId)) {
- adapterToggles->Default(Toggle::D3D12DontUseShaderModel66OrHigher, true);
+ if (gpu_info::CompareWindowsDriverVersion(vendorId, GetDriverVersion(),
+ {32, 0, 101, 5762}) == -1) {
+ adapterToggles->Default(Toggle::D3D12DontUseShaderModel66OrHigher, true);
+ }
}
// Workaround for textureDimensions() produces incorrect results with shader model 6.6 on Intel