D3D12: Disable the toggles about alpha blending on latest Intel driver

This patch disables all the toggles about the alpha blending issue on
the latest Intel D3D12 driver which has the fix against all the related
driver bugs.

Bug: dawn:1579
Change-Id: Ief8b08fd00df1b2872d663245d728374fb38a5b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131440
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
Jiawei Shao 2023-05-04 08:07:28 +00:00 committed by Dawn LUCI CQ
parent b22c5a465c
commit c81bc4521f
1 changed files with 11 additions and 7 deletions

View File

@ -547,14 +547,18 @@ void PhysicalDevice::SetupBackendDeviceToggles(TogglesState* deviceToggles) cons
// Currently this toggle is only needed on Intel Gen9 and Gen9.5 GPUs. // Currently this toggle is only needed on Intel Gen9 and Gen9.5 GPUs.
// See http://crbug.com/dawn/1579 for more information. // See http://crbug.com/dawn/1579 for more information.
if (gpu_info::IsIntelGen9(vendorId, deviceId)) { if (gpu_info::IsIntelGen9(vendorId, deviceId)) {
// We can add workaround when the blending operation is "Add", DstFactor is "Zero" and const gpu_info::DriverVersion kFixedDriverVersion = {31, 0, 101, 2121};
// SrcFactor is "DstAlpha". if (gpu_info::CompareWindowsDriverVersion(vendorId, GetDriverVersion(),
deviceToggles->ForceSet( kFixedDriverVersion) < 0) {
Toggle::D3D12ReplaceAddWithMinusWhenDstFactorIsZeroAndSrcFactorIsDstAlpha, true); // We can add workaround when the blending operation is "Add", DstFactor is "Zero" and
// SrcFactor is "DstAlpha".
deviceToggles->ForceSet(
Toggle::D3D12ReplaceAddWithMinusWhenDstFactorIsZeroAndSrcFactorIsDstAlpha, true);
// Unfortunately we cannot add workaround for other cases. // Unfortunately we cannot add workaround for other cases.
deviceToggles->ForceSet( deviceToggles->ForceSet(
Toggle::NoWorkaroundDstAlphaAsSrcBlendFactorForBothColorAndAlphaDoesNotWork, true); Toggle::NoWorkaroundDstAlphaAsSrcBlendFactorForBothColorAndAlphaDoesNotWork, true);
}
} }
#if D3D12_SDK_VERSION >= 602 #if D3D12_SDK_VERSION >= 602