Disable D3D12UseRootSignatureVersion1_1 before WWDM 2.4
Dawn uses DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS which was
not introduced until the 2018 Spring Creator's update, which
corresponds to WWDM 2.4.
Bug: chromium:1512318
Change-Id: Ic3832b787c071e7c146e356f32d202c377614c92
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/166221
Auto-Submit: Austin Eng <enga@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
diff --git a/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp b/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp
index 837bc2b..7ee952b 100644
--- a/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp
+++ b/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp
@@ -540,13 +540,18 @@
// By default use the maximum shader-visible heap size allowed.
deviceToggles->Default(Toggle::UseD3D12SmallShaderVisibleHeapForTesting, false);
- // By default use D3D12 Root Signature Version 1.1 when possible, otherwise we should never
- // enable this toggle.
- if (!GetDeviceInfo().supportsRootSignatureVersion1_1) {
+ // By default use D3D12 Root Signature Version 1.1 when possible, otherwise we should force
+ // disable this toggle.
+ // Additionally, DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS was only added in the
+ // Windows 10 2018 Spring Creator's Update. Force disable the toggle if we do not have
+ // at least WWDM 2.4.
+ // https://microsoft.github.io/DirectX-Specs/d3d/ResourceBinding.html#flags-added-in-root-signature-version-11
+ if (!GetDeviceInfo().supportsRootSignatureVersion1_1 || GetDriverVersion()[0] < 24) {
deviceToggles->ForceSet(Toggle::D3D12UseRootSignatureVersion1_1, false);
+ } else {
+ deviceToggles->Default(Toggle::D3D12UseRootSignatureVersion1_1,
+ GetDeviceInfo().supportsRootSignatureVersion1_1);
}
- deviceToggles->Default(Toggle::D3D12UseRootSignatureVersion1_1,
- GetDeviceInfo().supportsRootSignatureVersion1_1);
// By default create MSAA textures with 64KB (D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT)
// alignment when possible, otherwise we should never enable this toggle.