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 <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
diff --git a/src/dawn/tests/end2end/CopyTests.cpp b/src/dawn/tests/end2end/CopyTests.cpp
index 843baec..295ad52 100644
--- a/src/dawn/tests/end2end/CopyTests.cpp
+++ b/src/dawn/tests/end2end/CopyTests.cpp
@@ -1024,6 +1024,10 @@
// 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 49ac335..5a6134b 100644
--- a/src/dawn/tests/end2end/DepthBiasTests.cpp
+++ b/src/dawn/tests/end2end/DepthBiasTests.cpp
@@ -143,6 +143,10 @@
// 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 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 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 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 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 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 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 670708c..bcb16c7 100644
--- a/src/dawn/tests/end2end/SubresourceRenderAttachmentTests.cpp
+++ b/src/dawn/tests/end2end/SubresourceRenderAttachmentTests.cpp
@@ -151,6 +151,10 @@
// 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 b585911..f27d052 100644
--- a/src/dawn/tests/end2end/ViewportTests.cpp
+++ b/src/dawn/tests/end2end/ViewportTests.cpp
@@ -172,11 +172,19 @@
// 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);
}