From f09a67061e0f1887668318490f671b41fe7a2f31 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Mon, 18 Jan 2021 17:47:07 +0000 Subject: [PATCH] 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 Reviewed-by: Austin Eng Commit-Queue: Stephen White --- src/tests/DawnTest.cpp | 4 +++ src/tests/DawnTest.h | 1 + src/tests/end2end/DepthStencilCopyTests.cpp | 27 +++++++++++++++++++++ 3 files changed, 32 insertions(+) diff --git a/src/tests/DawnTest.cpp b/src/tests/DawnTest.cpp index a44581c7da..4827d8b96f 100644 --- a/src/tests/DawnTest.cpp +++ b/src/tests/DawnTest.cpp @@ -684,6 +684,10 @@ bool DawnTestBase::IsSwiftshader() const { mParam.adapterProperties.deviceID); } +bool DawnTestBase::IsANGLE() const { + return !mParam.adapterProperties.adapterName.find("ANGLE"); +} + bool DawnTestBase::IsWARP() const { return gpu_info::IsWARP(mParam.adapterProperties.vendorID, mParam.adapterProperties.deviceID); } diff --git a/src/tests/DawnTest.h b/src/tests/DawnTest.h index 9137ec0c4c..6d90c94152 100644 --- a/src/tests/DawnTest.h +++ b/src/tests/DawnTest.h @@ -266,6 +266,7 @@ class DawnTestBase { bool IsNvidia() const; bool IsQualcomm() const; bool IsSwiftshader() const; + bool IsANGLE() const; bool IsWARP() const; bool IsWindows() const; diff --git a/src/tests/end2end/DepthStencilCopyTests.cpp b/src/tests/end2end/DepthStencilCopyTests.cpp index ce20ef1649..be8d00e203 100644 --- a/src/tests/end2end/DepthStencilCopyTests.cpp +++ b/src/tests/end2end/DepthStencilCopyTests.cpp @@ -330,6 +330,9 @@ TEST_P(DepthStencilCopyTests, FromDepthAspect) { // Test copying the stencil-only aspect into a buffer. 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 kHeight = 4; @@ -355,6 +358,9 @@ TEST_P(DepthStencilCopyTests, FromNonZeroMipStencilAspect) { // It passes on AMD Radeon Pro and Intel HD Graphics 630. 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( 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. 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 kHeight = 4; @@ -418,6 +427,9 @@ TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyStencil) { // Test that part of a non-renderable stencil aspect can be copied. Notably, // this test has different behavior on some platforms than T2TBothAspectsThenCopyStencil. 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 kHeight = 4; @@ -444,6 +456,9 @@ TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyNonRenderableNonZeroMipStenc // T2TBothAspectsThenCopyNonRenderableStencil works correctly. 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( 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_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 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_P(DepthStencilCopyTests, T2TBothAspectsThenCopyNonZeroMipDepth) { + // TODO(crbug.com/dawn/634): Diagnose and fix ANGLE failure. + DAWN_SKIP_TEST_IF(IsANGLE()); + wgpu::Texture texture = CreateInitializeDepthStencilTextureAndCopyT2T( 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_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 kHeight = 4; @@ -529,6 +553,9 @@ TEST_P(DepthStencilCopyTests, T2TBothAspectsThenCopyDepthThenStencil) { // T2TBothAspectsThenCopyStencilThenDepth which checks stencil first also passes. 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 kHeight = 4;