Workaround for D3D12 BeginRenderPass issue on Intel ACM/ARL
It fails to clear the stencil value of a depth-stencil texture if the
clear value is sepcified in the D3D12_RENDER_PASS_BEGINNING_ACCESS structure of BeginRenderPass on Intel ACM and ARL. Disable
use_d3d12_render_pass to work this issue around.
Bug: 430338408
Change-Id: I31e1d7410bf3d413150eb534920529cdf18f436a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/251614
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
diff --git a/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp b/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp
index 8910b14..ca5f13f 100644
--- a/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp
+++ b/src/dawn/native/d3d12/PhysicalDeviceD3D12.cpp
@@ -773,6 +773,14 @@
deviceToggles->Default(Toggle::UseBlitForBufferToStencilTextureCopy, true);
}
+ // Workaround for the depth-stencil texture fails to be cleared if the clear value is specified
+ // in the D3D12_RENDER_PASS_BEGINNING_ACCESS structure of BeginRenderPass on Intel ACM and ARL.
+ // See https://issues.chromium.org/issues/430338408.
+ if (gpu_info::IsIntelGen12HP(vendorId, deviceId) ||
+ gpu_info::IsIntelXeLPG(vendorId, deviceId)) {
+ deviceToggles->ForceSet(Toggle::UseD3D12RenderPass, false);
+ }
+
// Currently these workarounds are needed on Intel Gen9.5 and Gen11 GPUs, as well as
// AMD GPUS.
// See http://crbug.com/1237175, http://crbug.com/dawn/1628, and http://crbug.com/dawn/2032