Skip Float16 TextureFormatTests on Swiftshader
Rendering +-INIFNITY with these formats results in a NaN when using Swiftshader. Temporarily disable these tests while the Swiftshader issue if being resolved. Bug: dawn:283 Bug: swiftshader:147 Change-Id: I6e7c91ff72d0b4b6423175f5ab8586fdea42bb53 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19083 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
61e170b3c5
commit
d56b69f115
|
@ -33,4 +33,7 @@ namespace gpu_info {
|
||||||
bool IsQualcomm(PCIVendorID vendorId) {
|
bool IsQualcomm(PCIVendorID vendorId) {
|
||||||
return vendorId == kVendorID_Qualcomm;
|
return vendorId == kVendorID_Qualcomm;
|
||||||
}
|
}
|
||||||
|
bool IsSwiftshader(PCIVendorID vendorId, PCIDeviceID deviceId) {
|
||||||
|
return vendorId == kVendorID_Google && deviceId == kDeviceID_Swiftshader;
|
||||||
|
}
|
||||||
} // namespace gpu_info
|
} // namespace gpu_info
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
using PCIVendorID = uint32_t;
|
using PCIVendorID = uint32_t;
|
||||||
|
using PCIDeviceID = uint32_t;
|
||||||
|
|
||||||
namespace gpu_info {
|
namespace gpu_info {
|
||||||
|
|
||||||
|
@ -27,6 +28,9 @@ namespace gpu_info {
|
||||||
static constexpr PCIVendorID kVendorID_Intel = 0x8086;
|
static constexpr PCIVendorID kVendorID_Intel = 0x8086;
|
||||||
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 PCIDeviceID kDeviceID_Swiftshader = 0xC0DE;
|
||||||
|
|
||||||
bool IsAMD(PCIVendorID vendorId);
|
bool IsAMD(PCIVendorID vendorId);
|
||||||
bool IsARM(PCIVendorID vendorId);
|
bool IsARM(PCIVendorID vendorId);
|
||||||
|
@ -34,6 +38,7 @@ namespace gpu_info {
|
||||||
bool IsIntel(PCIVendorID vendorId);
|
bool IsIntel(PCIVendorID vendorId);
|
||||||
bool IsNvidia(PCIVendorID vendorId);
|
bool IsNvidia(PCIVendorID vendorId);
|
||||||
bool IsQualcomm(PCIVendorID vendorId);
|
bool IsQualcomm(PCIVendorID vendorId);
|
||||||
|
bool IsSwiftshader(PCIVendorID vendorId, PCIDeviceID deviceId);
|
||||||
|
|
||||||
} // namespace gpu_info
|
} // namespace gpu_info
|
||||||
#endif // COMMON_GPUINFO_H
|
#endif // COMMON_GPUINFO_H
|
|
@ -488,6 +488,10 @@ bool DawnTestBase::IsQualcomm() const {
|
||||||
return gpu_info::IsQualcomm(mAdapterProperties.vendorID);
|
return gpu_info::IsQualcomm(mAdapterProperties.vendorID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DawnTestBase::IsSwiftshader() const {
|
||||||
|
return gpu_info::IsSwiftshader(mAdapterProperties.vendorID, mAdapterProperties.deviceID);
|
||||||
|
}
|
||||||
|
|
||||||
bool DawnTestBase::IsWindows() const {
|
bool DawnTestBase::IsWindows() const {
|
||||||
#ifdef DAWN_PLATFORM_WINDOWS
|
#ifdef DAWN_PLATFORM_WINDOWS
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -190,6 +190,7 @@ class DawnTestBase {
|
||||||
bool IsIntel() const;
|
bool IsIntel() const;
|
||||||
bool IsNvidia() const;
|
bool IsNvidia() const;
|
||||||
bool IsQualcomm() const;
|
bool IsQualcomm() const;
|
||||||
|
bool IsSwiftshader() const;
|
||||||
|
|
||||||
bool IsWindows() const;
|
bool IsWindows() const;
|
||||||
bool IsLinux() const;
|
bool IsLinux() const;
|
||||||
|
|
|
@ -582,16 +582,28 @@ TEST_P(TextureFormatTest, RGBA32Float) {
|
||||||
|
|
||||||
// Test the R16Float format
|
// Test the R16Float format
|
||||||
TEST_P(TextureFormatTest, R16Float) {
|
TEST_P(TextureFormatTest, R16Float) {
|
||||||
|
// TODO(https://crbug.com/swiftshader/147) Rendering INFINITY isn't handled correctly by
|
||||||
|
// swiftshader
|
||||||
|
DAWN_SKIP_TEST_IF(IsVulkan() && IsSwiftshader());
|
||||||
|
|
||||||
DoFloat16Test({wgpu::TextureFormat::R16Float, 2, wgpu::TextureComponentType::Float, 1});
|
DoFloat16Test({wgpu::TextureFormat::R16Float, 2, wgpu::TextureComponentType::Float, 1});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test the RG16Float format
|
// Test the RG16Float format
|
||||||
TEST_P(TextureFormatTest, RG16Float) {
|
TEST_P(TextureFormatTest, RG16Float) {
|
||||||
|
// TODO(https://crbug.com/swiftshader/147) Rendering INFINITY isn't handled correctly by
|
||||||
|
// swiftshader
|
||||||
|
DAWN_SKIP_TEST_IF(IsVulkan() && IsSwiftshader());
|
||||||
|
|
||||||
DoFloat16Test({wgpu::TextureFormat::RG16Float, 4, wgpu::TextureComponentType::Float, 2});
|
DoFloat16Test({wgpu::TextureFormat::RG16Float, 4, wgpu::TextureComponentType::Float, 2});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test the RGBA16Float format
|
// Test the RGBA16Float format
|
||||||
TEST_P(TextureFormatTest, RGBA16Float) {
|
TEST_P(TextureFormatTest, RGBA16Float) {
|
||||||
|
// TODO(https://crbug.com/swiftshader/147) Rendering INFINITY isn't handled correctly by
|
||||||
|
// swiftshader
|
||||||
|
DAWN_SKIP_TEST_IF(IsVulkan() && IsSwiftshader());
|
||||||
|
|
||||||
DoFloat16Test({wgpu::TextureFormat::RGBA16Float, 8, wgpu::TextureComponentType::Float, 4});
|
DoFloat16Test({wgpu::TextureFormat::RGBA16Float, 8, wgpu::TextureComponentType::Float, 4});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue