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>
This commit is contained in:
parent
2afea0c671
commit
8c255acbe4
|
@ -36,4 +36,7 @@ namespace gpu_info {
|
||||||
bool IsSwiftshader(PCIVendorID vendorId, PCIDeviceID deviceId) {
|
bool IsSwiftshader(PCIVendorID vendorId, PCIDeviceID deviceId) {
|
||||||
return vendorId == kVendorID_Google && deviceId == kDeviceID_Swiftshader;
|
return vendorId == kVendorID_Google && deviceId == kDeviceID_Swiftshader;
|
||||||
}
|
}
|
||||||
|
bool IsWARP(PCIVendorID vendorId, PCIDeviceID deviceId) {
|
||||||
|
return vendorId == kVendorID_Microsoft && deviceId == kDeviceID_WARP;
|
||||||
|
}
|
||||||
} // namespace gpu_info
|
} // namespace gpu_info
|
||||||
|
|
|
@ -29,8 +29,10 @@ namespace gpu_info {
|
||||||
static constexpr PCIVendorID kVendorID_Nvidia = 0x10DE;
|
static constexpr PCIVendorID kVendorID_Nvidia = 0x10DE;
|
||||||
static constexpr PCIVendorID kVendorID_Qualcomm = 0x5143;
|
static constexpr PCIVendorID kVendorID_Qualcomm = 0x5143;
|
||||||
static constexpr PCIVendorID kVendorID_Google = 0x1AE0;
|
static constexpr PCIVendorID kVendorID_Google = 0x1AE0;
|
||||||
|
static constexpr PCIVendorID kVendorID_Microsoft = 0x1414;
|
||||||
|
|
||||||
static constexpr PCIDeviceID kDeviceID_Swiftshader = 0xC0DE;
|
static constexpr PCIDeviceID kDeviceID_Swiftshader = 0xC0DE;
|
||||||
|
static constexpr PCIDeviceID kDeviceID_WARP = 0x8c;
|
||||||
|
|
||||||
bool IsAMD(PCIVendorID vendorId);
|
bool IsAMD(PCIVendorID vendorId);
|
||||||
bool IsARM(PCIVendorID vendorId);
|
bool IsARM(PCIVendorID vendorId);
|
||||||
|
@ -39,6 +41,7 @@ namespace gpu_info {
|
||||||
bool IsNvidia(PCIVendorID vendorId);
|
bool IsNvidia(PCIVendorID vendorId);
|
||||||
bool IsQualcomm(PCIVendorID vendorId);
|
bool IsQualcomm(PCIVendorID vendorId);
|
||||||
bool IsSwiftshader(PCIVendorID vendorId, PCIDeviceID deviceId);
|
bool IsSwiftshader(PCIVendorID vendorId, PCIDeviceID deviceId);
|
||||||
|
bool IsWARP(PCIVendorID vendorId, PCIDeviceID deviceId);
|
||||||
|
|
||||||
} // namespace gpu_info
|
} // namespace gpu_info
|
||||||
#endif // COMMON_GPUINFO_H
|
#endif // COMMON_GPUINFO_H
|
||||||
|
|
|
@ -647,6 +647,10 @@ bool DawnTestBase::IsSwiftshader() const {
|
||||||
mParam.adapterProperties.deviceID);
|
mParam.adapterProperties.deviceID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DawnTestBase::IsWARP() const {
|
||||||
|
return gpu_info::IsWARP(mParam.adapterProperties.vendorID, mParam.adapterProperties.deviceID);
|
||||||
|
}
|
||||||
|
|
||||||
bool DawnTestBase::IsWindows() const {
|
bool DawnTestBase::IsWindows() const {
|
||||||
#ifdef DAWN_PLATFORM_WINDOWS
|
#ifdef DAWN_PLATFORM_WINDOWS
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -239,6 +239,7 @@ class DawnTestBase {
|
||||||
bool IsNvidia() const;
|
bool IsNvidia() const;
|
||||||
bool IsQualcomm() const;
|
bool IsQualcomm() const;
|
||||||
bool IsSwiftshader() const;
|
bool IsSwiftshader() const;
|
||||||
|
bool IsWARP() const;
|
||||||
|
|
||||||
bool IsWindows() const;
|
bool IsWindows() const;
|
||||||
bool IsLinux() const;
|
bool IsLinux() const;
|
||||||
|
|
|
@ -43,7 +43,7 @@ TEST_P(D3D12SmallTextureTests, AlignSmallCompressedTexture) {
|
||||||
DAWN_SKIP_TEST_IF(!IsBCFormatSupported());
|
DAWN_SKIP_TEST_IF(!IsBCFormatSupported());
|
||||||
|
|
||||||
// TODO(http://crbug.com/dawn/282): Investigate GPU/driver rejections of small alignment.
|
// TODO(http://crbug.com/dawn/282): Investigate GPU/driver rejections of small alignment.
|
||||||
DAWN_SKIP_TEST_IF(IsIntel() || IsNvidia());
|
DAWN_SKIP_TEST_IF(IsIntel() || IsNvidia() || IsWARP());
|
||||||
|
|
||||||
wgpu::TextureDescriptor descriptor;
|
wgpu::TextureDescriptor descriptor;
|
||||||
descriptor.dimension = wgpu::TextureDimension::e2D;
|
descriptor.dimension = wgpu::TextureDimension::e2D;
|
||||||
|
|
Loading…
Reference in New Issue