From 91e737b8f16a69600f6a391fff127facbdf9e7e0 Mon Sep 17 00:00:00 2001 From: Stephen White Date: Mon, 1 Feb 2021 20:00:28 +0000 Subject: [PATCH] Moar testing on OpenGL ES backend. This CL enables the GLES backend on most the remaining tests for which the desktop OpenGL backend is enabled. Skip tests which require glTextureView(). Don't enable NonzeroTextureCreationTests; all are failing. Skip ANGLE failures on NonRenderableTextureClear*. Bug: dawn:580, dawn:447 Change-Id: Iac24a3ff89712c0d3bb2ae41455a6e55a6c3a2c8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39921 Reviewed-by: Austin Eng Reviewed-by: Corentin Wallez Commit-Queue: Stephen White --- src/tests/end2end/BufferTests.cpp | 2 ++ src/tests/end2end/BufferZeroInitTests.cpp | 4 ++++ src/tests/end2end/IndexFormatTests.cpp | 2 ++ src/tests/end2end/NonzeroBufferCreationTests.cpp | 2 ++ src/tests/end2end/StorageTextureTests.cpp | 1 + src/tests/end2end/TextureZeroInitTests.cpp | 16 ++++++++++++++++ src/tests/end2end/VertexFormatTests.cpp | 1 + src/tests/end2end/VertexStateTests.cpp | 2 ++ 8 files changed, 30 insertions(+) diff --git a/src/tests/end2end/BufferTests.cpp b/src/tests/end2end/BufferTests.cpp index 82b26ba745..50225c4130 100644 --- a/src/tests/end2end/BufferTests.cpp +++ b/src/tests/end2end/BufferTests.cpp @@ -437,6 +437,7 @@ DAWN_INSTANTIATE_TEST(BufferMappingTests, D3D12Backend(), MetalBackend(), OpenGLBackend(), + OpenGLESBackend(), VulkanBackend()); class BufferMappedAtCreationTests : public DawnTest { @@ -691,6 +692,7 @@ DAWN_INSTANTIATE_TEST(BufferMappedAtCreationTests, D3D12Backend({}, {"use_d3d12_resource_heap_tier2"}), MetalBackend(), OpenGLBackend(), + OpenGLESBackend(), VulkanBackend()); class BufferTests : public DawnTest {}; diff --git a/src/tests/end2end/BufferZeroInitTests.cpp b/src/tests/end2end/BufferZeroInitTests.cpp index 258d75d47e..25078f7204 100644 --- a/src/tests/end2end/BufferZeroInitTests.cpp +++ b/src/tests/end2end/BufferZeroInitTests.cpp @@ -949,6 +949,9 @@ TEST_P(BufferZeroInitTest, Copy2DTextureToBuffer) { // Test that the code path of CopyTextureToBuffer clears the destination buffer correctly when it is // the first use of the buffer and the texture is a 2D array texture. TEST_P(BufferZeroInitTest, Copy2DArrayTextureToBuffer) { + // TODO(crbug.com/dawn/593): This test uses glTextureView() which is not supported on OpenGL ES. + DAWN_SKIP_TEST_IF(IsOpenGLES()); + constexpr wgpu::Extent3D kTextureSize = {64u, 4u, 3u}; // bytesPerRow == texelBlockSizeInBytes * copySize.width && rowsPerImage == copySize.height && @@ -1248,4 +1251,5 @@ DAWN_INSTANTIATE_TEST(BufferZeroInitTest, D3D12Backend({"nonzero_clear_resources_on_creation_for_testing"}), MetalBackend({"nonzero_clear_resources_on_creation_for_testing"}), OpenGLBackend({"nonzero_clear_resources_on_creation_for_testing"}), + OpenGLESBackend({"nonzero_clear_resources_on_creation_for_testing"}), VulkanBackend({"nonzero_clear_resources_on_creation_for_testing"})); diff --git a/src/tests/end2end/IndexFormatTests.cpp b/src/tests/end2end/IndexFormatTests.cpp index 252ad636dc..711a314965 100644 --- a/src/tests/end2end/IndexFormatTests.cpp +++ b/src/tests/end2end/IndexFormatTests.cpp @@ -481,9 +481,11 @@ DAWN_INSTANTIATE_TEST(TriangleStripPrimitiveRestartTests, D3D12Backend(), MetalBackend(), OpenGLBackend(), + OpenGLESBackend(), VulkanBackend()); DAWN_INSTANTIATE_TEST(LineStripPrimitiveRestartTests, D3D12Backend(), MetalBackend(), OpenGLBackend(), + OpenGLESBackend(), VulkanBackend()); diff --git a/src/tests/end2end/NonzeroBufferCreationTests.cpp b/src/tests/end2end/NonzeroBufferCreationTests.cpp index 25e84b6367..f60bcfe700 100644 --- a/src/tests/end2end/NonzeroBufferCreationTests.cpp +++ b/src/tests/end2end/NonzeroBufferCreationTests.cpp @@ -135,5 +135,7 @@ DAWN_INSTANTIATE_TEST(NonzeroBufferCreationTests, {"lazy_clear_resource_on_first_use"}), OpenGLBackend({"nonzero_clear_resources_on_creation_for_testing"}, {"lazy_clear_resource_on_first_use"}), + OpenGLESBackend({"nonzero_clear_resources_on_creation_for_testing"}, + {"lazy_clear_resource_on_first_use"}), VulkanBackend({"nonzero_clear_resources_on_creation_for_testing"}, {"lazy_clear_resource_on_first_use"})); diff --git a/src/tests/end2end/StorageTextureTests.cpp b/src/tests/end2end/StorageTextureTests.cpp index 04c2da4c26..19ad706729 100644 --- a/src/tests/end2end/StorageTextureTests.cpp +++ b/src/tests/end2end/StorageTextureTests.cpp @@ -1243,5 +1243,6 @@ TEST_P(StorageTextureZeroInitTests, WriteonlyStorageTextureClearsToZeroInCompute DAWN_INSTANTIATE_TEST(StorageTextureZeroInitTests, D3D12Backend({"nonzero_clear_resources_on_creation_for_testing"}), OpenGLBackend({"nonzero_clear_resources_on_creation_for_testing"}), + OpenGLESBackend({"nonzero_clear_resources_on_creation_for_testing"}), MetalBackend({"nonzero_clear_resources_on_creation_for_testing"}), VulkanBackend({"nonzero_clear_resources_on_creation_for_testing"})); diff --git a/src/tests/end2end/TextureZeroInitTests.cpp b/src/tests/end2end/TextureZeroInitTests.cpp index 3cce07c91e..590d4956e1 100644 --- a/src/tests/end2end/TextureZeroInitTests.cpp +++ b/src/tests/end2end/TextureZeroInitTests.cpp @@ -894,6 +894,9 @@ TEST_P(TextureZeroInitTest, RenderPassSampledTextureClear) { // sampled and attachment (with LoadOp::Clear so the lazy clear can be skipped) then the sampled // subresource is correctly cleared. TEST_P(TextureZeroInitTest, TextureBothSampledAndAttachmentClear) { + // TODO(crbug.com/dawn/593): This test uses glTextureView() which is not supported on OpenGL ES. + DAWN_SKIP_TEST_IF(IsOpenGLES()); + // Create a 2D array texture, layer 0 will be used as attachment, layer 1 as sampled. wgpu::TextureDescriptor texDesc; texDesc.usage = wgpu::TextureUsage::Sampled | wgpu::TextureUsage::RenderAttachment | @@ -1017,6 +1020,9 @@ TEST_P(TextureZeroInitTest, ComputePassSampledTextureClear) { // This tests that the code path of CopyTextureToBuffer clears correctly for non-renderable textures TEST_P(TextureZeroInitTest, NonRenderableTextureClear) { + // TODO(crbug.com/dawn/660): Diagnose and fix this failure on SwANGLE. + DAWN_SKIP_TEST_IF(IsANGLE()); + wgpu::TextureDescriptor descriptor = CreateTextureDescriptor(1, 1, wgpu::TextureUsage::CopySrc, kNonrenderableColorFormat); wgpu::Texture texture = device.CreateTexture(&descriptor); @@ -1046,6 +1052,9 @@ TEST_P(TextureZeroInitTest, NonRenderableTextureClear) { // This tests that the code path of CopyTextureToBuffer clears correctly for non-renderable textures TEST_P(TextureZeroInitTest, NonRenderableTextureClearUnalignedSize) { + // TODO(crbug.com/dawn/660): Diagnose and fix this failure on SwANGLE. + DAWN_SKIP_TEST_IF(IsANGLE()); + wgpu::TextureDescriptor descriptor = CreateTextureDescriptor(1, 1, wgpu::TextureUsage::CopySrc, kNonrenderableColorFormat); descriptor.size.width = kUnalignedSize; @@ -1078,6 +1087,9 @@ TEST_P(TextureZeroInitTest, NonRenderableTextureClearUnalignedSize) { // This tests that the code path of CopyTextureToBuffer clears correctly for non-renderable textures // with more than 1 array layers TEST_P(TextureZeroInitTest, NonRenderableTextureClearWithMultiArrayLayers) { + // TODO(crbug.com/dawn/660): Diagnose and fix this failure on SwANGLE. + DAWN_SKIP_TEST_IF(IsANGLE()); + wgpu::TextureDescriptor descriptor = CreateTextureDescriptor(1, 2, wgpu::TextureUsage::CopySrc, kNonrenderableColorFormat); wgpu::Texture texture = device.CreateTexture(&descriptor); @@ -1335,6 +1347,9 @@ TEST_P(TextureZeroInitTest, PreservesInitializedMip) { // Test that if one layer of a texture is initialized and another is uninitialized, lazy clearing // the uninitialized layer does not clear the initialized layer. TEST_P(TextureZeroInitTest, PreservesInitializedArrayLayer) { + // TODO(crbug.com/dawn/593): This test uses glTextureView() which is not supported on OpenGL ES. + DAWN_SKIP_TEST_IF(IsOpenGLES()); + wgpu::TextureDescriptor sampleTextureDescriptor = CreateTextureDescriptor( 1, 2, wgpu::TextureUsage::CopySrc | wgpu::TextureUsage::CopyDst | wgpu::TextureUsage::Sampled, @@ -1687,6 +1702,7 @@ DAWN_INSTANTIATE_TEST(TextureZeroInitTest, D3D12Backend({"nonzero_clear_resources_on_creation_for_testing"}, {"use_d3d12_render_pass"}), OpenGLBackend({"nonzero_clear_resources_on_creation_for_testing"}), + OpenGLESBackend({"nonzero_clear_resources_on_creation_for_testing"}), MetalBackend({"nonzero_clear_resources_on_creation_for_testing"}), VulkanBackend({"nonzero_clear_resources_on_creation_for_testing"})); diff --git a/src/tests/end2end/VertexFormatTests.cpp b/src/tests/end2end/VertexFormatTests.cpp index d3731ebea2..750f0e333c 100644 --- a/src/tests/end2end/VertexFormatTests.cpp +++ b/src/tests/end2end/VertexFormatTests.cpp @@ -924,4 +924,5 @@ DAWN_INSTANTIATE_TEST(VertexFormatTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), + OpenGLESBackend(), VulkanBackend()); diff --git a/src/tests/end2end/VertexStateTests.cpp b/src/tests/end2end/VertexStateTests.cpp index 72d18bafe8..7cef42d7ee 100644 --- a/src/tests/end2end/VertexStateTests.cpp +++ b/src/tests/end2end/VertexStateTests.cpp @@ -617,6 +617,7 @@ DAWN_INSTANTIATE_TEST(VertexStateTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), + OpenGLESBackend(), VulkanBackend()); // TODO for the input state: @@ -675,4 +676,5 @@ DAWN_INSTANTIATE_TEST(OptionalVertexStateTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), + OpenGLESBackend(), VulkanBackend());