From 27b0162b96a8bb31db00d6ee5389a24f3f65b4d4 Mon Sep 17 00:00:00 2001 From: Austin Eng Date: Mon, 28 Jun 2021 21:18:40 +0000 Subject: [PATCH] Remove explicit test instantiation with use_tint_generator We're migrating to run all tests with both Tint and SPIRV-Cross. Remove explicitly instantiating only with Tint, and add skips for tests that will not work if use_tint_generator is not enabled. Bug: dawn:571 Change-Id: I8322dec688e75b6efa8c4f18c6b9439a2e325631 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56261 Auto-Submit: Austin Eng Commit-Queue: Ryan Harrison Reviewed-by: Ryan Harrison --- src/tests/end2end/ComputeLayoutMemoryBufferTests.cpp | 11 ++++++++--- src/tests/end2end/FirstIndexOffsetTests.cpp | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/tests/end2end/ComputeLayoutMemoryBufferTests.cpp b/src/tests/end2end/ComputeLayoutMemoryBufferTests.cpp index c7e854f184..b1d3c5c1ff 100644 --- a/src/tests/end2end/ComputeLayoutMemoryBufferTests.cpp +++ b/src/tests/end2end/ComputeLayoutMemoryBufferTests.cpp @@ -132,7 +132,13 @@ std::ostream& operator<<(std::ostream& o, Field field) { DAWN_TEST_PARAM_STRUCT(ComputeLayoutMemoryBufferTestParams, StorageClass, Field) class ComputeLayoutMemoryBufferTests - : public DawnTestWithParams {}; + : public DawnTestWithParams { + void SetUp() override { + DawnTestBase::SetUp(); + DAWN_TEST_UNSUPPORTED_IF((IsD3D12() || IsMetal()) && + !HasToggleEnabled("use_tint_generator")); + } +}; TEST_P(ComputeLayoutMemoryBufferTests, Fields) { // Sentinel value markers codes used to check that the start and end of @@ -342,8 +348,7 @@ namespace { auto GenerateParams() { auto params = MakeParamGenerator( { - D3D12Backend({"use_tint_generator"}), MetalBackend({"use_tint_generator"}), - VulkanBackend(), + D3D12Backend(), MetalBackend(), VulkanBackend(), // TODO(crbug.com/dawn/942) // There was a compiler error: Buffer block cannot be expressed as any of std430, // std140, scalar, even with enhanced layouts. You can try flattening this block to diff --git a/src/tests/end2end/FirstIndexOffsetTests.cpp b/src/tests/end2end/FirstIndexOffsetTests.cpp index 506c0d317d..b3c64813fb 100644 --- a/src/tests/end2end/FirstIndexOffsetTests.cpp +++ b/src/tests/end2end/FirstIndexOffsetTests.cpp @@ -48,6 +48,7 @@ class FirstIndexOffsetTests : public DawnTest { protected: void SetUp() override { DawnTest::SetUp(); + DAWN_TEST_UNSUPPORTED_IF(IsD3D12() && !HasToggleEnabled("use_tint_generator")); // WGSL doesn't have the ability to tag attributes as "flat". "flat" is required on u32 // attributes for correct runtime behavior under Vulkan and codegen under OpenGL(ES). @@ -219,7 +220,7 @@ TEST_P(FirstIndexOffsetTests, IndexedBothOffset) { } DAWN_INSTANTIATE_TEST(FirstIndexOffsetTests, - D3D12Backend({"use_tint_generator"}), + D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(),