From 6d33b8a1c64258e0b4a9ec95939703b7175c24d7 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Wed, 4 May 2022 23:43:19 +0000 Subject: [PATCH] OpenGLES: disable some end2end tests which require reading from depth textures. Bug: dawn:667 Change-Id: I6a78c7f6f9a850ef9ba30d3bafde9b198bab2edc Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88940 Reviewed-by: Austin Eng Commit-Queue: Stephen White --- src/dawn/tests/end2end/CopyTests.cpp | 4 +++ src/dawn/tests/end2end/DepthBiasTests.cpp | 28 +++++++++++++++++++ .../SubresourceRenderAttachmentTests.cpp | 4 +++ src/dawn/tests/end2end/ViewportTests.cpp | 8 ++++++ 4 files changed, 44 insertions(+) diff --git a/src/dawn/tests/end2end/CopyTests.cpp b/src/dawn/tests/end2end/CopyTests.cpp index 843baec60b..295ad526fe 100644 --- a/src/dawn/tests/end2end/CopyTests.cpp +++ b/src/dawn/tests/end2end/CopyTests.cpp @@ -1024,6 +1024,10 @@ TEST_P(CopyTests_T2B, BytesPerRowShouldNotCauseBufferOOBIfCopyHeightIsOne) { // A regression test for a bug on D3D12 backend that causes crash when doing texture-to-texture // copy one row with the texture format Depth32Float. TEST_P(CopyTests_T2B, CopyOneRowWithDepth32Float) { + // TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading + // depth. + DAWN_TEST_UNSUPPORTED_IF(HasToggleEnabled("disable_depth_read")); + // TODO(crbug.com/dawn/727): currently this test fails on many D3D12 drivers. DAWN_SUPPRESS_TEST_IF(IsD3D12()); diff --git a/src/dawn/tests/end2end/DepthBiasTests.cpp b/src/dawn/tests/end2end/DepthBiasTests.cpp index 49ac335c1a..5a6134b0e6 100644 --- a/src/dawn/tests/end2end/DepthBiasTests.cpp +++ b/src/dawn/tests/end2end/DepthBiasTests.cpp @@ -143,6 +143,10 @@ class DepthBiasTests : public DawnTest { // Test adding positive bias to output TEST_P(DepthBiasTests, PositiveBiasOnFloat) { + // TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading + // depth. + DAWN_TEST_UNSUPPORTED_IF(HasToggleEnabled("disable_depth_read")); + // NVIDIA GPUs under Vulkan seem to be using a different scale than everyone else. DAWN_SUPPRESS_TEST_IF(IsVulkan() && IsNvidia()); @@ -186,6 +190,10 @@ TEST_P(DepthBiasTests, PositiveBiasOnFloatWithClamp) { // Test adding negative bias to output TEST_P(DepthBiasTests, NegativeBiasOnFloat) { + // TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading + // depth. + DAWN_TEST_UNSUPPORTED_IF(HasToggleEnabled("disable_depth_read")); + // NVIDIA GPUs seems to be using a different scale than everyone else DAWN_SUPPRESS_TEST_IF(IsVulkan() && IsNvidia()); @@ -228,6 +236,10 @@ TEST_P(DepthBiasTests, NegativeBiasOnFloatWithClamp) { // Test adding positive infinite slope bias to output TEST_P(DepthBiasTests, PositiveInfinitySlopeBiasOnFloat) { + // TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading + // depth. + DAWN_TEST_UNSUPPORTED_IF(HasToggleEnabled("disable_depth_read")); + // NVIDIA GPUs do not clamp values to 1 when using Inf slope bias. DAWN_SUPPRESS_TEST_IF(IsVulkan() && IsNvidia()); @@ -247,6 +259,10 @@ TEST_P(DepthBiasTests, PositiveInfinitySlopeBiasOnFloat) { // Test adding positive infinite slope bias to output TEST_P(DepthBiasTests, NegativeInfinityBiasOnFloat) { + // TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading + // depth. + DAWN_TEST_UNSUPPORTED_IF(HasToggleEnabled("disable_depth_read")); + // NVIDIA GPUs do not clamp values to 0 when using -Inf slope bias. DAWN_SUPPRESS_TEST_IF(IsVulkan() && IsNvidia()); @@ -266,6 +282,10 @@ TEST_P(DepthBiasTests, NegativeInfinityBiasOnFloat) { // Test tiledX quad with no bias TEST_P(DepthBiasTests, NoBiasTiltedXOnFloat) { + // TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading + // depth. + DAWN_TEST_UNSUPPORTED_IF(HasToggleEnabled("disable_depth_read")); + // Draw quad with z from 0 to 0.5 with no bias RunDepthBiasTest(wgpu::TextureFormat::Depth32Float, 0, QuadAngle::TiltedX, 0, 0, 0); @@ -281,6 +301,10 @@ TEST_P(DepthBiasTests, NoBiasTiltedXOnFloat) { // Test adding positive slope bias to output TEST_P(DepthBiasTests, PositiveSlopeBiasOnFloat) { + // TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading + // depth. + DAWN_TEST_UNSUPPORTED_IF(HasToggleEnabled("disable_depth_read")); + // Draw quad with z from 0 to 0.5 with a slope bias of 1 RunDepthBiasTest(wgpu::TextureFormat::Depth32Float, 0, QuadAngle::TiltedX, 0, 1, 0); @@ -296,6 +320,10 @@ TEST_P(DepthBiasTests, PositiveSlopeBiasOnFloat) { // Test adding negative half slope bias to output TEST_P(DepthBiasTests, NegativeHalfSlopeBiasOnFloat) { + // TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading + // depth. + DAWN_TEST_UNSUPPORTED_IF(HasToggleEnabled("disable_depth_read")); + // Draw quad with z from 0 to 0.5 with a slope bias of -0.5 RunDepthBiasTest(wgpu::TextureFormat::Depth32Float, 0, QuadAngle::TiltedX, 0, -0.5, 0); diff --git a/src/dawn/tests/end2end/SubresourceRenderAttachmentTests.cpp b/src/dawn/tests/end2end/SubresourceRenderAttachmentTests.cpp index 670708c7b7..bcb16c734e 100644 --- a/src/dawn/tests/end2end/SubresourceRenderAttachmentTests.cpp +++ b/src/dawn/tests/end2end/SubresourceRenderAttachmentTests.cpp @@ -151,6 +151,10 @@ TEST_P(SubresourceRenderAttachmentTest, ColorTexture) { // Test rendering into a subresource of a depth texture TEST_P(SubresourceRenderAttachmentTest, DepthTexture) { + // TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading + // depth. + DAWN_TEST_UNSUPPORTED_IF(HasToggleEnabled("disable_depth_read")); + DoTest(Type::Depth); } diff --git a/src/dawn/tests/end2end/ViewportTests.cpp b/src/dawn/tests/end2end/ViewportTests.cpp index b58591130b..f27d052e2a 100644 --- a/src/dawn/tests/end2end/ViewportTests.cpp +++ b/src/dawn/tests/end2end/ViewportTests.cpp @@ -172,11 +172,19 @@ TEST_P(ViewportTest, SubBoxes) { // Test that by default the [0, 1] depth range is used. TEST_P(ViewportTest, DefaultViewportDepth) { + // TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading + // depth. + DAWN_TEST_UNSUPPORTED_IF(HasToggleEnabled("disable_depth_read")); + TestViewportDepth(0.0, 1.0, false); } // Test various viewport depth ranges TEST_P(ViewportTest, ViewportDepth) { + // TODO(crbug.com/dawn/667): Work around the fact that some platforms do not support reading + // depth. + DAWN_TEST_UNSUPPORTED_IF(HasToggleEnabled("disable_depth_read")); + TestViewportDepth(0.0, 0.5); TestViewportDepth(0.5, 1.0); }