Suppress depth/stencil copy tests failing on ANGLE.

Also implement a way to check for ANGLE.

Bug: dawn:634, dawn:580
Change-Id: I4b361d02247f91250f1ce31cfbfdd0d74b3b3060
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38040
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
Stephen White 2021-01-18 17:47:07 +00:00 committed by Commit Bot service account
parent 4b316994ad
commit f09a67061e
3 changed files with 32 additions and 0 deletions

View File

@ -684,6 +684,10 @@ bool DawnTestBase::IsSwiftshader() const {
mParam.adapterProperties.deviceID); mParam.adapterProperties.deviceID);
} }
bool DawnTestBase::IsANGLE() const {
return !mParam.adapterProperties.adapterName.find("ANGLE");
}
bool DawnTestBase::IsWARP() const { bool DawnTestBase::IsWARP() const {
return gpu_info::IsWARP(mParam.adapterProperties.vendorID, mParam.adapterProperties.deviceID); return gpu_info::IsWARP(mParam.adapterProperties.vendorID, mParam.adapterProperties.deviceID);
} }

View File

@ -266,6 +266,7 @@ class DawnTestBase {
bool IsNvidia() const; bool IsNvidia() const;
bool IsQualcomm() const; bool IsQualcomm() const;
bool IsSwiftshader() const; bool IsSwiftshader() const;
bool IsANGLE() const;
bool IsWARP() const; bool IsWARP() const;
bool IsWindows() const; bool IsWindows() const;

View File

@ -330,6 +330,9 @@ TEST_P(DepthStencilCopyTests, FromDepthAspect) {
// Test copying the stencil-only aspect into a buffer. // Test copying the stencil-only aspect into a buffer.
TEST_P(DepthStencilCopyTests, FromStencilAspect) { TEST_P(DepthStencilCopyTests, FromStencilAspect) {
// TODO(crbug.com/dawn/634): Diagnose and fix ANGLE failure.
DAWN_SKIP_TEST_IF(IsANGLE());
constexpr uint32_t kWidth = 4; constexpr uint32_t kWidth = 4;
constexpr uint32_t kHeight = 4; constexpr uint32_t kHeight = 4;
@ -355,6 +358,9 @@ TEST_P(DepthStencilCopyTests, FromNonZeroMipStencilAspect) {
// It passes on AMD Radeon Pro and Intel HD Graphics 630. // It passes on AMD Radeon Pro and Intel HD Graphics 630.
DAWN_SKIP_TEST_IF(IsMetal() && IsIntel()); DAWN_SKIP_TEST_IF(IsMetal() && IsIntel());
// TODO(crbug.com/dawn/634): Diagnose and fix ANGLE failure.
DAWN_SKIP_TEST_IF(IsANGLE());
wgpu::Texture depthStencilTexture = CreateDepthStencilTexture( wgpu::Texture depthStencilTexture = CreateDepthStencilTexture(
9, 9, wgpu::TextureUsage::RenderAttachment | wgpu::TextureUsage::CopySrc, 2); 9, 9, wgpu::TextureUsage::RenderAttachment | wgpu::TextureUsage::CopySrc, 2);
@ -397,6 +403,9 @@ TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyStencil) {
// T2TBothAspectsThenCopyNonRenderableStencil does not use RenderAttachment and works correctly. // T2TBothAspectsThenCopyNonRenderableStencil does not use RenderAttachment and works correctly.
DAWN_SKIP_TEST_IF(IsMetal() && IsIntel()); DAWN_SKIP_TEST_IF(IsMetal() && IsIntel());
// TODO(crbug.com/dawn/634): Diagnose and fix ANGLE failure.
DAWN_SKIP_TEST_IF(IsANGLE());
constexpr uint32_t kWidth = 4; constexpr uint32_t kWidth = 4;
constexpr uint32_t kHeight = 4; constexpr uint32_t kHeight = 4;
@ -418,6 +427,9 @@ TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyStencil) {
// Test that part of a non-renderable stencil aspect can be copied. Notably, // Test that part of a non-renderable stencil aspect can be copied. Notably,
// this test has different behavior on some platforms than T2TBothAspectsThenCopyStencil. // this test has different behavior on some platforms than T2TBothAspectsThenCopyStencil.
TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyNonRenderableStencil) { TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyNonRenderableStencil) {
// TODO(crbug.com/dawn/634): Diagnose and fix ANGLE failure.
DAWN_SKIP_TEST_IF(IsANGLE());
constexpr uint32_t kWidth = 4; constexpr uint32_t kWidth = 4;
constexpr uint32_t kHeight = 4; constexpr uint32_t kHeight = 4;
@ -444,6 +456,9 @@ TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyNonRenderableNonZeroMipStenc
// T2TBothAspectsThenCopyNonRenderableStencil works correctly. // T2TBothAspectsThenCopyNonRenderableStencil works correctly.
DAWN_SKIP_TEST_IF(IsMetal() && IsIntel()); DAWN_SKIP_TEST_IF(IsMetal() && IsIntel());
// TODO(crbug.com/dawn/634): Diagnose and fix ANGLE failure.
DAWN_SKIP_TEST_IF(IsANGLE());
wgpu::Texture texture = CreateInitializeDepthStencilTextureAndCopyT2T( wgpu::Texture texture = CreateInitializeDepthStencilTextureAndCopyT2T(
0.1f, 0.3f, 1u, 3u, 9, 9, wgpu::TextureUsage::CopySrc, 1); 0.1f, 0.3f, 1u, 3u, 9, 9, wgpu::TextureUsage::CopySrc, 1);
@ -460,6 +475,9 @@ TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyNonRenderableNonZeroMipStenc
// Test copying both aspects in a T2T copy, then copying only depth. // Test copying both aspects in a T2T copy, then copying only depth.
TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyDepth) { TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyDepth) {
// TODO(crbug.com/dawn/634): Diagnose and fix ANGLE failure.
DAWN_SKIP_TEST_IF(IsANGLE());
constexpr uint32_t kWidth = 4; constexpr uint32_t kWidth = 4;
constexpr uint32_t kHeight = 4; constexpr uint32_t kHeight = 4;
@ -478,6 +496,9 @@ TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyDepth) {
// Test copying both aspects in a T2T copy, then copying only depth at a nonzero mip. // Test copying both aspects in a T2T copy, then copying only depth at a nonzero mip.
TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyNonZeroMipDepth) { TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyNonZeroMipDepth) {
// TODO(crbug.com/dawn/634): Diagnose and fix ANGLE failure.
DAWN_SKIP_TEST_IF(IsANGLE());
wgpu::Texture texture = CreateInitializeDepthStencilTextureAndCopyT2T( wgpu::Texture texture = CreateInitializeDepthStencilTextureAndCopyT2T(
0.1f, 0.3f, 1u, 3u, 8, 8, wgpu::TextureUsage::RenderAttachment, 1); 0.1f, 0.3f, 1u, 3u, 8, 8, wgpu::TextureUsage::RenderAttachment, 1);
@ -493,6 +514,9 @@ TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyNonZeroMipDepth) {
// Test copying both aspects in a T2T copy, then copying stencil, then copying depth // Test copying both aspects in a T2T copy, then copying stencil, then copying depth
TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyStencilThenDepth) { TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyStencilThenDepth) {
// TODO(crbug.com/dawn/634): Diagnose and fix ANGLE failure.
DAWN_SKIP_TEST_IF(IsANGLE());
constexpr uint32_t kWidth = 4; constexpr uint32_t kWidth = 4;
constexpr uint32_t kHeight = 4; constexpr uint32_t kHeight = 4;
@ -529,6 +553,9 @@ TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyDepthThenStencil) {
// T2TBothAspectsThenCopyStencilThenDepth which checks stencil first also passes. // T2TBothAspectsThenCopyStencilThenDepth which checks stencil first also passes.
DAWN_SKIP_TEST_IF(IsMetal() && IsIntel()); DAWN_SKIP_TEST_IF(IsMetal() && IsIntel());
// TODO(crbug.com/dawn/634): Diagnose and fix ANGLE failure.
DAWN_SKIP_TEST_IF(IsANGLE());
constexpr uint32_t kWidth = 4; constexpr uint32_t kWidth = 4;
constexpr uint32_t kHeight = 4; constexpr uint32_t kHeight = 4;