Add GPU detection for WARP
Adds WARP to known vendor/device Ids so
tests can detect when MBR is being used.
BUG=dawn:463
TEST=dawn_end2end_tests
Change-Id: I19f16dfeb4839c5a7c0a993bab94d2b6ca4ca36d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24680
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
diff --git a/src/common/GPUInfo.h b/src/common/GPUInfo.h
index d16c89b..87efbbc 100644
--- a/src/common/GPUInfo.h
+++ b/src/common/GPUInfo.h
@@ -29,8 +29,10 @@
static constexpr PCIVendorID kVendorID_Nvidia = 0x10DE;
static constexpr PCIVendorID kVendorID_Qualcomm = 0x5143;
static constexpr PCIVendorID kVendorID_Google = 0x1AE0;
+ static constexpr PCIVendorID kVendorID_Microsoft = 0x1414;
static constexpr PCIDeviceID kDeviceID_Swiftshader = 0xC0DE;
+ static constexpr PCIDeviceID kDeviceID_WARP = 0x8c;
bool IsAMD(PCIVendorID vendorId);
bool IsARM(PCIVendorID vendorId);
@@ -39,6 +41,7 @@
bool IsNvidia(PCIVendorID vendorId);
bool IsQualcomm(PCIVendorID vendorId);
bool IsSwiftshader(PCIVendorID vendorId, PCIDeviceID deviceId);
+ bool IsWARP(PCIVendorID vendorId, PCIDeviceID deviceId);
} // namespace gpu_info
#endif // COMMON_GPUINFO_H