From 6f0884983fc23ca561246f399704ed1d7c45ae13 Mon Sep 17 00:00:00 2001 From: Yunchao He Date: Tue, 2 Aug 2022 18:10:05 +0000 Subject: [PATCH] Revise Intel GPU generations in gpu_info.json Intel Xe is also called Intel Gen 12. Quite a few Intel architectures are classified into Gen 12. Some of these architectures are Gen 12 LP (low power), while the others are Gen 12 HP (high performance, for example, some Intel discrete GPUs). For more details, see https://en.wikipedia.org/wiki/Intel_Xe. We need to separate Intel Gen 12 LP from Intel Gen 12 HP for some toggles on D3D12 backend. Bug: dawn:949 Change-Id: Id5d10c0ecb31ca9e323ede65c3d55e6d4954370e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97901 Reviewed-by: Austin Eng Reviewed-by: Corentin Wallez Reviewed-by: Jiawei Shao Reviewed-by: yang gu Commit-Queue: Yunchao He Kokoro: Kokoro --- src/dawn/gpu_info.json | 5 +++-- src/dawn/native/d3d12/DeviceD3D12.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/dawn/gpu_info.json b/src/dawn/gpu_info.json index 6a1ddc05f5..ca02f0f015 100644 --- a/src/dawn/gpu_info.json +++ b/src/dawn/gpu_info.json @@ -82,7 +82,8 @@ "Gen 8": ["0x1600", "0x2200"], "Gen 9": ["0x1900", "0x3100", "0x3E00", "0x5A00", "0x5900", "0x9B00"], "Gen 11": ["0x8A00"], - "Xe": ["0x4600", "0x4C00", "0x4900", "0x9A00"] + "Gen 12 LP": ["0x4600", "0x4C00", "0x4900", "0x9A00"], + "Gen 12 HP": ["0x4F00", "0x5600"] } }, @@ -134,4 +135,4 @@ } -} \ No newline at end of file +} diff --git a/src/dawn/native/d3d12/DeviceD3D12.cpp b/src/dawn/native/d3d12/DeviceD3D12.cpp index 10846ba0ca..498fef2c67 100644 --- a/src/dawn/native/d3d12/DeviceD3D12.cpp +++ b/src/dawn/native/d3d12/DeviceD3D12.cpp @@ -665,7 +665,8 @@ void Device::InitTogglesFromDriver() { // Currently this workaround is only needed on Intel Gen12 GPUs. // See http://crbug.com/dawn/1487 for more information. - if (gpu_info::IsIntelXe(vendorId, deviceId)) { + if (gpu_info::IsIntelGen12LP(vendorId, deviceId) || + gpu_info::IsIntelGen12HP(vendorId, deviceId)) { SetToggle(Toggle::D3D12DontSetClearValueOnDepthTextureCreation, true); } @@ -676,7 +677,7 @@ void Device::InitTogglesFromDriver() { // This workaround is only needed on Intel Gen12LP with driver prior to 30.0.101.1960. // See http://crbug.com/dawn/949 for more information. - if (gpu_info::IsIntelXe(vendorId, deviceId)) { + if (gpu_info::IsIntelGen12LP(vendorId, deviceId)) { const gpu_info::D3DDriverVersion version = {30, 0, 101, 1960}; if (gpu_info::CompareD3DDriverVersion(vendorId, ToBackend(GetAdapter())->GetDriverVersion(), version) == -1) {