Add toggle to warn the dst-alpha issue on Intel GPUs

Bug: dawn:1579
Change-Id: Ifdf09aefcdd62be82bd874a6e185b18ab96cb29a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/114920
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Jiawei Shao 2022-12-21 02:22:53 +00:00 committed by Dawn LUCI CQ
parent 0493c24875
commit f8277d0ae4
3 changed files with 13 additions and 1 deletions

View File

@ -343,7 +343,12 @@ static constexpr ToggleEnumAndInfoList kToggleNameAndInfoList = {{
{"no_workaround_indirect_base_vertex_not_applied",
"MacOS Intel < Gen9 has a bug where indirect base vertex is not applied for "
"drawIndexedIndirect. Draws are done as if it is always zero.",
"https://crbug.com/dawn/966"}}
"https://crbug.com/dawn/966"}},
{Toggle::NoWorkaroundDstAlphaBlendDoesNotWork,
{"no_workaround_dst_alpha_blend_does_not_work",
"Using D3D12_BLEND_DEST_ALPHA as blend factor doesn't work correctly on the D3D12 backend "
"using Intel Gen9 or Gen9.5 GPUs.",
"https://crbug.com/dawn/1579"}},
// Comment to separate the }} so it is clearer what to copy-paste to add a toggle.
}};
} // anonymous namespace

View File

@ -87,6 +87,7 @@ enum class Toggle {
// Unresolved issues.
NoWorkaroundSampleMaskBecomesZeroForAllButLastColorTarget,
NoWorkaroundIndirectBaseVertexNotApplied,
NoWorkaroundDstAlphaBlendDoesNotWork,
EnumCount,
InvalidEnum = EnumCount,

View File

@ -734,6 +734,12 @@ void Device::InitTogglesFromDriver() {
gpu_info::IsIntelGen11(vendorId, deviceId)) {
SetToggle(Toggle::D3D12Allocate2DTexturewithCopyDstAsCommittedResource, true);
}
// Currently this toggle is only needed on Intel Gen9 and Gen9.5 GPUs.
// See http://crbug.com/dawn/1579 for more information.
if (gpu_info::IsIntelGen9(vendorId, deviceId)) {
SetToggle(Toggle::NoWorkaroundDstAlphaBlendDoesNotWork, true);
}
}
MaybeError Device::WaitForIdleForDestruction() {