Enable all remaining end2end tests on OpenGL ES backend.

This enables all the tests which pass on ES 3.2.

BUG=dawn:580

Change-Id: I56fde768a917d74f24e53cd2f7367aa165c4ac4f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34720
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Stephen White 2020-12-04 15:59:29 +00:00 committed by Commit Bot service account
parent 5816894706
commit f31b78e90e
22 changed files with 52 additions and 1 deletions

View File

@ -252,6 +252,7 @@ TEST_P(CopyTextureForBrowserTests, VerifyFlipY) {
// OpenGL tests fails because 'WriteTexture' is unimplemented. // OpenGL tests fails because 'WriteTexture' is unimplemented.
// Related bug : crbug.com/dawn/483 // Related bug : crbug.com/dawn/483
DAWN_SKIP_TEST_IF(IsOpenGL()); DAWN_SKIP_TEST_IF(IsOpenGL());
DAWN_SKIP_TEST_IF(IsOpenGLES());
constexpr uint32_t kWidth = 901; constexpr uint32_t kWidth = 901;
constexpr uint32_t kHeight = 1001; constexpr uint32_t kHeight = 1001;
@ -273,6 +274,7 @@ TEST_P(CopyTextureForBrowserTests, VerifyFlipYInSlimTexture) {
// OpenGL tests fails because 'WriteTexture' is unimplemented. // OpenGL tests fails because 'WriteTexture' is unimplemented.
// Related bug : crbug.com/dawn/483 // Related bug : crbug.com/dawn/483
DAWN_SKIP_TEST_IF(IsOpenGL()); DAWN_SKIP_TEST_IF(IsOpenGL());
DAWN_SKIP_TEST_IF(IsOpenGLES());
constexpr uint32_t kWidth = 1; constexpr uint32_t kWidth = 1;
constexpr uint32_t kHeight = 1001; constexpr uint32_t kHeight = 1001;

View File

@ -144,4 +144,5 @@ DAWN_INSTANTIATE_TEST(EntryPointTests,
D3D12Backend({"use_tint_generator"}), D3D12Backend({"use_tint_generator"}),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -260,4 +260,9 @@ TEST_P(FenceTests, ClientValidationErrorInErrorScope) {
WaitForCompletedValue(fence, 4); WaitForCompletedValue(fence, 4);
} }
DAWN_INSTANTIATE_TEST(FenceTests, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); DAWN_INSTANTIATE_TEST(FenceTests,
D3D12Backend(),
MetalBackend(),
OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend());

View File

@ -235,6 +235,7 @@ DAWN_INSTANTIATE_TEST(GpuMemorySyncTests,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());
class StorageToUniformSyncTests : public DawnTest { class StorageToUniformSyncTests : public DawnTest {
@ -422,6 +423,7 @@ DAWN_INSTANTIATE_TEST(StorageToUniformSyncTests,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());
constexpr int kRTSize = 8; constexpr int kRTSize = 8;
@ -696,4 +698,5 @@ DAWN_INSTANTIATE_TEST(MultipleWriteThenMultipleReadTests,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -483,6 +483,7 @@ DAWN_INSTANTIATE_TEST(IndexFormatTest,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());
DAWN_INSTANTIATE_TEST(TriangleStripPrimitiveRestartTests, DAWN_INSTANTIATE_TEST(TriangleStripPrimitiveRestartTests,
D3D12Backend(), D3D12Backend(),

View File

@ -1072,6 +1072,7 @@ DAWN_INSTANTIATE_TEST(MultisampledRenderingTest,
D3D12Backend({}, {"use_d3d12_render_pass"}), D3D12Backend({}, {"use_d3d12_render_pass"}),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend(), VulkanBackend(),
MetalBackend({"emulate_store_and_msaa_resolve"}), MetalBackend({"emulate_store_and_msaa_resolve"}),
MetalBackend({"always_resolve_into_zero_level_and_layer"}), MetalBackend({"always_resolve_into_zero_level_and_layer"}),

View File

@ -265,4 +265,5 @@ DAWN_INSTANTIATE_TEST(MultisampledSamplingTest,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -375,4 +375,5 @@ DAWN_INSTANTIATE_TEST(ObjectCachingTest,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -91,6 +91,7 @@ TEST_P(OpArrayLengthTest, Compute) {
// TODO(cwallez@chromium.org): The computations for length() of unsized buffer is broken on // TODO(cwallez@chromium.org): The computations for length() of unsized buffer is broken on
// Nvidia OpenGL. See https://bugs.chromium.org/p/dawn/issues/detail?id=197 // Nvidia OpenGL. See https://bugs.chromium.org/p/dawn/issues/detail?id=197
DAWN_SKIP_TEST_IF(IsNvidia() && IsOpenGL()); DAWN_SKIP_TEST_IF(IsNvidia() && IsOpenGL());
DAWN_SKIP_TEST_IF(IsNvidia() && IsOpenGLES());
// Create a buffer to hold the result sizes and create a bindgroup for it. // Create a buffer to hold the result sizes and create a bindgroup for it.
wgpu::BufferDescriptor bufferDesc; wgpu::BufferDescriptor bufferDesc;
@ -149,6 +150,7 @@ TEST_P(OpArrayLengthTest, Fragment) {
// TODO(cwallez@chromium.org): The computations for length() of unsized buffer is broken on // TODO(cwallez@chromium.org): The computations for length() of unsized buffer is broken on
// Nvidia OpenGL. See https://bugs.chromium.org/p/dawn/issues/detail?id=197 // Nvidia OpenGL. See https://bugs.chromium.org/p/dawn/issues/detail?id=197
DAWN_SKIP_TEST_IF(IsNvidia() && IsOpenGL()); DAWN_SKIP_TEST_IF(IsNvidia() && IsOpenGL());
DAWN_SKIP_TEST_IF(IsNvidia() && IsOpenGLES());
utils::BasicRenderPass renderPass = utils::CreateBasicRenderPass(device, 1, 1); utils::BasicRenderPass renderPass = utils::CreateBasicRenderPass(device, 1, 1);
@ -206,6 +208,7 @@ TEST_P(OpArrayLengthTest, Vertex) {
// TODO(cwallez@chromium.org): The computations for length() of unsized buffer is broken on // TODO(cwallez@chromium.org): The computations for length() of unsized buffer is broken on
// Nvidia OpenGL. See https://bugs.chromium.org/p/dawn/issues/detail?id=197 // Nvidia OpenGL. See https://bugs.chromium.org/p/dawn/issues/detail?id=197
DAWN_SKIP_TEST_IF(IsNvidia() && IsOpenGL()); DAWN_SKIP_TEST_IF(IsNvidia() && IsOpenGL());
DAWN_SKIP_TEST_IF(IsNvidia() && IsOpenGLES());
utils::BasicRenderPass renderPass = utils::CreateBasicRenderPass(device, 1, 1); utils::BasicRenderPass renderPass = utils::CreateBasicRenderPass(device, 1, 1);
@ -266,4 +269,5 @@ DAWN_INSTANTIATE_TEST(OpArrayLengthTest,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -63,4 +63,5 @@ DAWN_INSTANTIATE_TEST(PipelineLayoutTests,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -303,4 +303,5 @@ DAWN_INSTANTIATE_TEST(PrimitiveTopologyTest,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -38,6 +38,7 @@ DAWN_INSTANTIATE_TEST(QueueTests,
MetalBackend(), MetalBackend(),
NullBackend(), NullBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());
class QueueWriteBufferTests : public DawnTest {}; class QueueWriteBufferTests : public DawnTest {};
@ -179,6 +180,7 @@ TEST_P(QueueWriteBufferTests, UnalignedDynamicUploader) {
// that WriteTexture implementation uses a DynamicUploader which might be false in the // that WriteTexture implementation uses a DynamicUploader which might be false in the
// case of a future OpenGL implementation. // case of a future OpenGL implementation.
DAWN_SKIP_TEST_IF(IsOpenGL()); DAWN_SKIP_TEST_IF(IsOpenGL());
DAWN_SKIP_TEST_IF(IsOpenGLES());
utils::UnalignDynamicUploader(device); utils::UnalignDynamicUploader(device);
@ -197,6 +199,7 @@ DAWN_INSTANTIATE_TEST(QueueWriteBufferTests,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());
// For MinimumDataSpec bytesPerRow and rowsPerImage, compute a default from the copy extent. // For MinimumDataSpec bytesPerRow and rowsPerImage, compute a default from the copy extent.

View File

@ -161,4 +161,5 @@ DAWN_INSTANTIATE_TEST(QueueTimelineTests,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -199,4 +199,5 @@ DAWN_INSTANTIATE_TEST(RenderBundleTest,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -290,4 +290,5 @@ DAWN_INSTANTIATE_TEST(RenderPassLoadOpTests,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -170,4 +170,5 @@ DAWN_INSTANTIATE_TEST(RenderPassTest,
D3D12Backend({}, {"use_d3d12_render_pass"}), D3D12Backend({}, {"use_d3d12_render_pass"}),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -185,4 +185,5 @@ DAWN_INSTANTIATE_TEST(SamplerTest,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -159,4 +159,5 @@ DAWN_INSTANTIATE_TEST(ScissorTest,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -159,4 +159,5 @@ DAWN_INSTANTIATE_TEST(SubresourceRenderAttachmentTest,
D3D12Backend({}, {"use_d3d12_render_pass"}), D3D12Backend({}, {"use_d3d12_render_pass"}),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -460,6 +460,8 @@ TEST_P(TextureFormatTest, RGBA8Unorm) {
// Test the BGRA8Unorm format // Test the BGRA8Unorm format
TEST_P(TextureFormatTest, BGRA8Unorm) { TEST_P(TextureFormatTest, BGRA8Unorm) {
// TODO(crbug.com/dawn/596): BGRA is unsupported on OpenGL ES; add workaround or validation
DAWN_SKIP_TEST_IF(IsOpenGLES());
uint8_t maxValue = std::numeric_limits<uint8_t>::max(); uint8_t maxValue = std::numeric_limits<uint8_t>::max();
std::vector<uint8_t> textureData = {maxValue, 1, 0, maxValue}; std::vector<uint8_t> textureData = {maxValue, 1, 0, maxValue};
std::vector<float> uncompressedData = {0.0f, 1.0f / maxValue, 1.0f, 1.0f}; std::vector<float> uncompressedData = {0.0f, 1.0f / maxValue, 1.0f, 1.0f};
@ -645,6 +647,7 @@ TEST_P(TextureFormatTest, BGRA8UnormSrgb) {
// TODO(cwallez@chromium.org): This format doesn't exist in OpenGL, emulate it using // TODO(cwallez@chromium.org): This format doesn't exist in OpenGL, emulate it using
// RGBA8UnormSrgb and swizzling / shader twiddling // RGBA8UnormSrgb and swizzling / shader twiddling
DAWN_SKIP_TEST_IF(IsOpenGL()); DAWN_SKIP_TEST_IF(IsOpenGL());
DAWN_SKIP_TEST_IF(IsOpenGLES());
uint8_t maxValue = std::numeric_limits<uint8_t>::max(); uint8_t maxValue = std::numeric_limits<uint8_t>::max();
std::vector<uint8_t> textureData = {0, 1, maxValue, 64, 35, 68, 152, 168}; std::vector<uint8_t> textureData = {0, 1, maxValue, 64, 35, 68, 152, 168};
@ -795,4 +798,5 @@ DAWN_INSTANTIATE_TEST(TextureFormatTest,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -147,6 +147,9 @@ class TextureSubresourceTest : public DawnTest {
// Test different mipmap levels // Test different mipmap levels
TEST_P(TextureSubresourceTest, MipmapLevelsTest) { TEST_P(TextureSubresourceTest, MipmapLevelsTest) {
// TODO(crbug.com/dawn/593): This test requires glTextureView, which is unsupported on GLES.
DAWN_SKIP_TEST_IF(IsOpenGLES());
// Create a texture with 2 mipmap levels and 1 layer // Create a texture with 2 mipmap levels and 1 layer
wgpu::Texture texture = wgpu::Texture texture =
CreateTexture(2, 1, CreateTexture(2, 1,
@ -173,6 +176,8 @@ TEST_P(TextureSubresourceTest, MipmapLevelsTest) {
// Test different array layers // Test different array layers
TEST_P(TextureSubresourceTest, ArrayLayersTest) { TEST_P(TextureSubresourceTest, ArrayLayersTest) {
// TODO(crbug.com/dawn/593): This test requires glTextureView, which is unsupported on GLES.
DAWN_SKIP_TEST_IF(IsOpenGLES());
// Create a texture with 1 mipmap level and 2 layers // Create a texture with 1 mipmap level and 2 layers
wgpu::Texture texture = wgpu::Texture texture =
CreateTexture(1, 2, CreateTexture(1, 2,
@ -209,4 +214,5 @@ DAWN_INSTANTIATE_TEST(TextureSubresourceTest,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());

View File

@ -182,6 +182,8 @@ class TextureViewSamplingTest : public DawnTest {
uint32_t textureMipLevels, uint32_t textureMipLevels,
uint32_t textureViewBaseLayer, uint32_t textureViewBaseLayer,
uint32_t textureViewBaseMipLevel) { uint32_t textureViewBaseMipLevel) {
// TODO(crbug.com/dawn/593): This test requires glTextureView, which is unsupported on GLES.
DAWN_SKIP_TEST_IF(IsOpenGLES());
ASSERT(textureViewBaseLayer < textureArrayLayers); ASSERT(textureViewBaseLayer < textureArrayLayers);
ASSERT(textureViewBaseMipLevel < textureMipLevels); ASSERT(textureViewBaseMipLevel < textureMipLevels);
@ -216,6 +218,8 @@ class TextureViewSamplingTest : public DawnTest {
uint32_t textureMipLevels, uint32_t textureMipLevels,
uint32_t textureViewBaseLayer, uint32_t textureViewBaseLayer,
uint32_t textureViewBaseMipLevel) { uint32_t textureViewBaseMipLevel) {
// TODO(crbug.com/dawn/593): This test requires glTextureView, which is unsupported on GLES.
DAWN_SKIP_TEST_IF(IsOpenGLES());
ASSERT(textureViewBaseLayer < textureArrayLayers); ASSERT(textureViewBaseLayer < textureArrayLayers);
ASSERT(textureViewBaseMipLevel < textureMipLevels); ASSERT(textureViewBaseMipLevel < textureMipLevels);
@ -302,6 +306,9 @@ class TextureViewSamplingTest : public DawnTest {
uint32_t textureViewBaseLayer, uint32_t textureViewBaseLayer,
uint32_t textureViewLayerCount, uint32_t textureViewLayerCount,
bool isCubeMapArray) { bool isCubeMapArray) {
// TODO(crbug.com/dawn/600): In OpenGL ES, cube map textures cannot be treated as arrays
// of 2D textures. Find a workaround.
DAWN_SKIP_TEST_IF(IsOpenGLES());
constexpr uint32_t kMipLevels = 1u; constexpr uint32_t kMipLevels = 1u;
initTexture(textureArrayLayers, kMipLevels); initTexture(textureArrayLayers, kMipLevels);
@ -641,12 +648,14 @@ DAWN_INSTANTIATE_TEST(TextureViewSamplingTest,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());
DAWN_INSTANTIATE_TEST(TextureViewRenderingTest, DAWN_INSTANTIATE_TEST(TextureViewRenderingTest,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());
class TextureViewTest : public DawnTest {}; class TextureViewTest : public DawnTest {};
@ -667,4 +676,5 @@ DAWN_INSTANTIATE_TEST(TextureViewTest,
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
OpenGLESBackend(),
VulkanBackend()); VulkanBackend());