From 6c1d646ee9d4120dcdf344b3fee01f3fdf79390c Mon Sep 17 00:00:00 2001 From: Austin Eng Date: Tue, 25 Feb 2020 16:23:17 +0000 Subject: [PATCH] Change extern const DawnTestParam helpers to functions If these extern variables are initialized after DAWN_INSTANTIATE_TEST, they will be zero. Change them to be function calls instead. Since they're function calls, fold in arguments from ForceToggles to enable/disable toggles. Bug: dawn:341 Change-Id: I1aeaa1e535a0a003977e8ce7ab3d5278c5d81281 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/16162 Reviewed-by: Mark Henderson Reviewed-by: Corentin Wallez Commit-Queue: Austin Eng --- src/tests/DawnTest.cpp | 38 ++++++++++++++----- src/tests/DawnTest.h | 23 ++++++----- src/tests/end2end/BasicTests.cpp | 2 +- src/tests/end2end/BindGroupTests.cpp | 2 +- src/tests/end2end/BufferTests.cpp | 22 +++++------ src/tests/end2end/ClipSpaceTests.cpp | 2 +- src/tests/end2end/ColorStateTests.cpp | 2 +- .../end2end/CompressedTextureFormatTests.cpp | 11 +++--- .../end2end/ComputeCopyStorageBufferTests.cpp | 8 ++-- src/tests/end2end/ComputeIndirectTests.cpp | 8 ++-- .../end2end/ComputeSharedMemoryTests.cpp | 8 ++-- .../ComputeStorageBufferBarrierTests.cpp | 8 ++-- src/tests/end2end/CopyTests.cpp | 6 +-- src/tests/end2end/CullingTests.cpp | 2 +- .../end2end/D3D12ResourceWrappingTests.cpp | 4 +- src/tests/end2end/DebugMarkerTests.cpp | 2 +- src/tests/end2end/DepthStencilStateTests.cpp | 10 ++--- src/tests/end2end/DestroyTests.cpp | 2 +- src/tests/end2end/DeviceLostTests.cpp | 2 +- .../end2end/DrawIndexedIndirectTests.cpp | 8 ++-- src/tests/end2end/DrawIndexedTests.cpp | 2 +- src/tests/end2end/DrawIndirectTests.cpp | 2 +- src/tests/end2end/DrawTests.cpp | 2 +- .../end2end/DynamicBufferOffsetTests.cpp | 8 ++-- src/tests/end2end/FenceTests.cpp | 2 +- .../end2end/GpuMemorySynchronizationTests.cpp | 18 ++++----- src/tests/end2end/IOSurfaceWrappingTests.cpp | 4 +- src/tests/end2end/IndexFormatTests.cpp | 2 +- .../end2end/MultisampledRenderingTests.cpp | 19 +++++----- .../end2end/NonzeroTextureCreationTests.cpp | 12 ++---- src/tests/end2end/ObjectCachingTests.cpp | 2 +- src/tests/end2end/OpArrayLengthTests.cpp | 2 +- src/tests/end2end/PrimitiveTopologyTests.cpp | 2 +- src/tests/end2end/RenderBundleTests.cpp | 2 +- src/tests/end2end/RenderPassLoadOpTests.cpp | 2 +- src/tests/end2end/RenderPassTests.cpp | 10 ++--- src/tests/end2end/SamplerTests.cpp | 2 +- src/tests/end2end/ScissorTests.cpp | 2 +- src/tests/end2end/TextureFormatTests.cpp | 2 +- src/tests/end2end/TextureViewTests.cpp | 4 +- src/tests/end2end/TextureZeroInitTests.cpp | 11 +++--- src/tests/end2end/VertexFormatTests.cpp | 2 +- src/tests/end2end/VertexStateTests.cpp | 10 ++--- .../end2end/ViewportOrientationTests.cpp | 2 +- src/tests/end2end/ViewportTests.cpp | 2 +- src/tests/perf_tests/BufferUploadPerf.cpp | 3 +- src/tests/perf_tests/DrawCallPerf.cpp | 4 +- .../white_box/D3D12SmallTextureTests.cpp | 2 +- .../white_box/MetalAutoreleasePoolTests.mm | 2 +- .../white_box/VulkanErrorInjectorTests.cpp | 2 +- .../VulkanImageWrappingTestsDmaBuf.cpp | 4 +- .../VulkanImageWrappingTestsOpaqueFD.cpp | 4 +- 52 files changed, 167 insertions(+), 152 deletions(-) diff --git a/src/tests/DawnTest.cpp b/src/tests/DawnTest.cpp index db727b41c6..dcedccbcf5 100644 --- a/src/tests/DawnTest.cpp +++ b/src/tests/DawnTest.cpp @@ -90,18 +90,36 @@ const RGBA8 RGBA8::kBlue = RGBA8(0, 0, 255, 255); const RGBA8 RGBA8::kYellow = RGBA8(255, 255, 0, 255); const RGBA8 RGBA8::kWhite = RGBA8(255, 255, 255, 255); -const DawnTestParam D3D12Backend(wgpu::BackendType::D3D12); -const DawnTestParam MetalBackend(wgpu::BackendType::Metal); -const DawnTestParam OpenGLBackend(wgpu::BackendType::OpenGL); -const DawnTestParam VulkanBackend(wgpu::BackendType::Vulkan); +DawnTestParam::DawnTestParam(wgpu::BackendType backendType, + std::initializer_list forceEnabledWorkarounds, + std::initializer_list forceDisabledWorkarounds) + : backendType(backendType), + forceEnabledWorkarounds(forceEnabledWorkarounds), + forceDisabledWorkarounds(forceDisabledWorkarounds) { +} -DawnTestParam ForceToggles(const DawnTestParam& originParam, - std::initializer_list forceEnabledWorkarounds, +DawnTestParam D3D12Backend(std::initializer_list forceEnabledWorkarounds, std::initializer_list forceDisabledWorkarounds) { - DawnTestParam newTestParam = originParam; - newTestParam.forceEnabledWorkarounds = forceEnabledWorkarounds; - newTestParam.forceDisabledWorkarounds = forceDisabledWorkarounds; - return newTestParam; + return DawnTestParam(wgpu::BackendType::D3D12, forceEnabledWorkarounds, + forceDisabledWorkarounds); +} + +DawnTestParam MetalBackend(std::initializer_list forceEnabledWorkarounds, + std::initializer_list forceDisabledWorkarounds) { + return DawnTestParam(wgpu::BackendType::Metal, forceEnabledWorkarounds, + forceDisabledWorkarounds); +} + +DawnTestParam OpenGLBackend(std::initializer_list forceEnabledWorkarounds, + std::initializer_list forceDisabledWorkarounds) { + return DawnTestParam(wgpu::BackendType::OpenGL, forceEnabledWorkarounds, + forceDisabledWorkarounds); +} + +DawnTestParam VulkanBackend(std::initializer_list forceEnabledWorkarounds, + std::initializer_list forceDisabledWorkarounds) { + return DawnTestParam(wgpu::BackendType::Vulkan, forceEnabledWorkarounds, + forceDisabledWorkarounds); } std::ostream& operator<<(std::ostream& os, const DawnTestParam& param) { diff --git a/src/tests/DawnTest.h b/src/tests/DawnTest.h index 1250554805..a4dee9c3ff 100644 --- a/src/tests/DawnTest.h +++ b/src/tests/DawnTest.h @@ -86,8 +86,9 @@ struct RGBA8 { std::ostream& operator<<(std::ostream& stream, const RGBA8& color); struct DawnTestParam { - explicit DawnTestParam(wgpu::BackendType backendType) : backendType(backendType) { - } + DawnTestParam(wgpu::BackendType backendType, + std::initializer_list forceEnabledWorkarounds = {}, + std::initializer_list forceDisabledWorkarounds = {}); wgpu::BackendType backendType; @@ -97,16 +98,18 @@ struct DawnTestParam { std::ostream& operator<<(std::ostream& os, const DawnTestParam& param); -// Shorthands for backend types used in the DAWN_INSTANTIATE_TEST -extern const DawnTestParam D3D12Backend; -extern const DawnTestParam MetalBackend; -extern const DawnTestParam OpenGLBackend; -extern const DawnTestParam VulkanBackend; - -DawnTestParam ForceToggles(const DawnTestParam& originParam, - std::initializer_list forceEnabledWorkarounds, +DawnTestParam D3D12Backend(std::initializer_list forceEnabledWorkarounds = {}, std::initializer_list forceDisabledWorkarounds = {}); +DawnTestParam MetalBackend(std::initializer_list forceEnabledWorkarounds = {}, + std::initializer_list forceDisabledWorkarounds = {}); + +DawnTestParam OpenGLBackend(std::initializer_list forceEnabledWorkarounds = {}, + std::initializer_list forceDisabledWorkarounds = {}); + +DawnTestParam VulkanBackend(std::initializer_list forceEnabledWorkarounds = {}, + std::initializer_list forceDisabledWorkarounds = {}); + namespace utils { class TerribleCommandBuffer; } // namespace utils diff --git a/src/tests/end2end/BasicTests.cpp b/src/tests/end2end/BasicTests.cpp index ec223ea23b..1b594bd77d 100644 --- a/src/tests/end2end/BasicTests.cpp +++ b/src/tests/end2end/BasicTests.cpp @@ -52,4 +52,4 @@ TEST_P(BasicTests, BufferSetSubDataError) { ASSERT_DEVICE_ERROR(buffer.SetSubData(1000, sizeof(value), &value)); } -DAWN_INSTANTIATE_TEST(BasicTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(BasicTests, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/BindGroupTests.cpp b/src/tests/end2end/BindGroupTests.cpp index fd3ad56b15..687645a950 100644 --- a/src/tests/end2end/BindGroupTests.cpp +++ b/src/tests/end2end/BindGroupTests.cpp @@ -780,4 +780,4 @@ TEST_P(BindGroupTests, BindGroupLayoutVisibilityCanBeNone) { queue.Submit(1, &commands); } -DAWN_INSTANTIATE_TEST(BindGroupTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(BindGroupTests, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/BufferTests.cpp b/src/tests/end2end/BufferTests.cpp index 93fe804ddf..427216b290 100644 --- a/src/tests/end2end/BufferTests.cpp +++ b/src/tests/end2end/BufferTests.cpp @@ -108,7 +108,7 @@ TEST_P(BufferMapReadTests, LargeRead) { UnmapBuffer(buffer); } -DAWN_INSTANTIATE_TEST(BufferMapReadTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(BufferMapReadTests, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); class BufferMapWriteTests : public DawnTest { protected: @@ -231,7 +231,7 @@ TEST_P(BufferMapWriteTests, ManyWrites) { } } -DAWN_INSTANTIATE_TEST(BufferMapWriteTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(BufferMapWriteTests, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); class BufferSetSubDataTests : public DawnTest { }; @@ -350,10 +350,10 @@ TEST_P(BufferSetSubDataTests, SuperLargeSetSubData) { } DAWN_INSTANTIATE_TEST(BufferSetSubDataTests, - D3D12Backend, - MetalBackend, - OpenGLBackend, - VulkanBackend); + D3D12Backend(), + MetalBackend(), + OpenGLBackend(), + VulkanBackend()); // TODO(enga): These tests should use the testing toggle to initialize resources to 1. class CreateBufferMappedTests : public DawnTest { @@ -740,8 +740,8 @@ TEST_P(CreateBufferMappedTests, LargeBufferFails) { } DAWN_INSTANTIATE_TEST(CreateBufferMappedTests, - D3D12Backend, - ForceToggles(D3D12Backend, {}, {"use_d3d12_resource_heap_tier2"}), - MetalBackend, - OpenGLBackend, - VulkanBackend); + D3D12Backend(), + D3D12Backend({}, {"use_d3d12_resource_heap_tier2"}), + MetalBackend(), + OpenGLBackend(), + VulkanBackend()); diff --git a/src/tests/end2end/ClipSpaceTests.cpp b/src/tests/end2end/ClipSpaceTests.cpp index 39460ddf02..856a5aeb86 100644 --- a/src/tests/end2end/ClipSpaceTests.cpp +++ b/src/tests/end2end/ClipSpaceTests.cpp @@ -99,4 +99,4 @@ TEST_P(ClipSpaceTest, ClipSpace) { EXPECT_PIXEL_RGBA8_EQ(RGBA8::kGreen, colorTexture, 0, 0); } -DAWN_INSTANTIATE_TEST(ClipSpaceTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(ClipSpaceTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/ColorStateTests.cpp b/src/tests/end2end/ColorStateTests.cpp index ff1c851a36..ac6c802397 100644 --- a/src/tests/end2end/ColorStateTests.cpp +++ b/src/tests/end2end/ColorStateTests.cpp @@ -1048,4 +1048,4 @@ TEST_P(ColorStateTest, ColorWriteMaskDoesNotAffectRenderPassLoadOpClear) { EXPECT_PIXEL_RGBA8_EQ(expected, renderPass.color, kRTSize / 2, kRTSize / 2); } -DAWN_INSTANTIATE_TEST(ColorStateTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(ColorStateTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/CompressedTextureFormatTests.cpp b/src/tests/end2end/CompressedTextureFormatTests.cpp index c7204628b1..41c492ae7a 100644 --- a/src/tests/end2end/CompressedTextureFormatTests.cpp +++ b/src/tests/end2end/CompressedTextureFormatTests.cpp @@ -1050,9 +1050,8 @@ TEST_P(CompressedTextureBCFormatTest, LargeImageHeightAndClampedCopyExtent) { // TODO(jiawei.shao@intel.com): support BC formats on OpenGL backend DAWN_INSTANTIATE_TEST(CompressedTextureBCFormatTest, - D3D12Backend, - MetalBackend, - OpenGLBackend, - VulkanBackend, - ForceToggles(VulkanBackend, - {"use_temporary_buffer_in_texture_to_texture_copy"})); + D3D12Backend(), + MetalBackend(), + OpenGLBackend(), + VulkanBackend(), + VulkanBackend({"use_temporary_buffer_in_texture_to_texture_copy"})); diff --git a/src/tests/end2end/ComputeCopyStorageBufferTests.cpp b/src/tests/end2end/ComputeCopyStorageBufferTests.cpp index ad3769250d..4d5e953d0a 100644 --- a/src/tests/end2end/ComputeCopyStorageBufferTests.cpp +++ b/src/tests/end2end/ComputeCopyStorageBufferTests.cpp @@ -173,7 +173,7 @@ TEST_P(ComputeCopyStorageBufferTests, DISABLED_UnsizedDescriptorArray) { } DAWN_INSTANTIATE_TEST(ComputeCopyStorageBufferTests, - D3D12Backend, - MetalBackend, - OpenGLBackend, - VulkanBackend); + D3D12Backend(), + MetalBackend(), + OpenGLBackend(), + VulkanBackend()); diff --git a/src/tests/end2end/ComputeIndirectTests.cpp b/src/tests/end2end/ComputeIndirectTests.cpp index dc39028124..28647940fb 100644 --- a/src/tests/end2end/ComputeIndirectTests.cpp +++ b/src/tests/end2end/ComputeIndirectTests.cpp @@ -105,7 +105,7 @@ TEST_P(ComputeIndirectTests, IndirectOffset) { } DAWN_INSTANTIATE_TEST(ComputeIndirectTests, - D3D12Backend, - MetalBackend, - OpenGLBackend, - VulkanBackend); + D3D12Backend(), + MetalBackend(), + OpenGLBackend(), + VulkanBackend()); diff --git a/src/tests/end2end/ComputeSharedMemoryTests.cpp b/src/tests/end2end/ComputeSharedMemoryTests.cpp index 8c5f756451..446a5e9c64 100644 --- a/src/tests/end2end/ComputeSharedMemoryTests.cpp +++ b/src/tests/end2end/ComputeSharedMemoryTests.cpp @@ -98,7 +98,7 @@ TEST_P(ComputeSharedMemoryTests, Basic) { } DAWN_INSTANTIATE_TEST(ComputeSharedMemoryTests, - D3D12Backend, - MetalBackend, - OpenGLBackend, - VulkanBackend); + D3D12Backend(), + MetalBackend(), + OpenGLBackend(), + VulkanBackend()); diff --git a/src/tests/end2end/ComputeStorageBufferBarrierTests.cpp b/src/tests/end2end/ComputeStorageBufferBarrierTests.cpp index 63c523de64..22fa4a3179 100644 --- a/src/tests/end2end/ComputeStorageBufferBarrierTests.cpp +++ b/src/tests/end2end/ComputeStorageBufferBarrierTests.cpp @@ -193,7 +193,7 @@ TEST_P(ComputeStorageBufferBarrierTests, UniformToStorageAddPingPong) { } DAWN_INSTANTIATE_TEST(ComputeStorageBufferBarrierTests, - D3D12Backend, - MetalBackend, - OpenGLBackend, - VulkanBackend); + D3D12Backend(), + MetalBackend(), + OpenGLBackend(), + VulkanBackend()); diff --git a/src/tests/end2end/CopyTests.cpp b/src/tests/end2end/CopyTests.cpp index ab6f642687..b3c15b0265 100644 --- a/src/tests/end2end/CopyTests.cpp +++ b/src/tests/end2end/CopyTests.cpp @@ -540,7 +540,7 @@ TEST_P(CopyTests_T2B, Texture2DArrayMip) { } } -DAWN_INSTANTIATE_TEST(CopyTests_T2B, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(CopyTests_T2B, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); // Test that copying an entire texture with 256-byte aligned dimensions works TEST_P(CopyTests_B2T, FullTextureAligned) { @@ -683,7 +683,7 @@ TEST_P(CopyTests_B2T, RowPitchUnaligned) { } } -DAWN_INSTANTIATE_TEST(CopyTests_B2T, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(CopyTests_B2T, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); TEST_P(CopyTests_T2T, Texture) { constexpr uint32_t kWidth = 256; @@ -731,4 +731,4 @@ TEST_P(CopyTests_T2T, TextureMip) { // TODO(brandon1.jones@intel.com) Add test for ensuring blitCommandEncoder on Metal. -DAWN_INSTANTIATE_TEST(CopyTests_T2T, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(CopyTests_T2T, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/CullingTests.cpp b/src/tests/end2end/CullingTests.cpp index 2220140cfc..6d2cfabde1 100644 --- a/src/tests/end2end/CullingTests.cpp +++ b/src/tests/end2end/CullingTests.cpp @@ -129,4 +129,4 @@ TEST_P(CullingTest, CullBackFaceWhenCWIsFrontFace) { DoTest(wgpu::FrontFace::CW, wgpu::CullMode::Back, true, false); } -DAWN_INSTANTIATE_TEST(CullingTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(CullingTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/D3D12ResourceWrappingTests.cpp b/src/tests/end2end/D3D12ResourceWrappingTests.cpp index 1c6a2b50da..cbc74136b9 100644 --- a/src/tests/end2end/D3D12ResourceWrappingTests.cpp +++ b/src/tests/end2end/D3D12ResourceWrappingTests.cpp @@ -492,5 +492,5 @@ TEST_P(D3D12SharedHandleUsageTests, ClearTwiceInD3D12ReadbackInD3D11) { ExpectPixelRGBA8EQ(2, d3d11Texture.Get(), dxgiKeyedMutex.Get(), d3d12ClearColor2); } -DAWN_INSTANTIATE_TEST(D3D12SharedHandleValidation, D3D12Backend); -DAWN_INSTANTIATE_TEST(D3D12SharedHandleUsageTests, D3D12Backend); +DAWN_INSTANTIATE_TEST(D3D12SharedHandleValidation, D3D12Backend()); +DAWN_INSTANTIATE_TEST(D3D12SharedHandleUsageTests, D3D12Backend()); diff --git a/src/tests/end2end/DebugMarkerTests.cpp b/src/tests/end2end/DebugMarkerTests.cpp index 27b75133be..f9fab77202 100644 --- a/src/tests/end2end/DebugMarkerTests.cpp +++ b/src/tests/end2end/DebugMarkerTests.cpp @@ -42,4 +42,4 @@ TEST_P(DebugMarkerTests, NoFailureWithoutDebugToolAttached) { queue.Submit(1, &commands); } -DAWN_INSTANTIATE_TEST(DebugMarkerTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(DebugMarkerTests, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/DepthStencilStateTests.cpp b/src/tests/end2end/DepthStencilStateTests.cpp index d48500427b..3385db6adb 100644 --- a/src/tests/end2end/DepthStencilStateTests.cpp +++ b/src/tests/end2end/DepthStencilStateTests.cpp @@ -682,8 +682,8 @@ TEST_P(DepthStencilStateTest, StencilDepthPass) { } DAWN_INSTANTIATE_TEST(DepthStencilStateTest, - D3D12Backend, - MetalBackend, - OpenGLBackend, - ForceToggles(VulkanBackend, {"vulkan_use_d32s8"}, {}), - ForceToggles(VulkanBackend, {}, {"vulkan_use_d32s8"})); + D3D12Backend(), + MetalBackend(), + OpenGLBackend(), + VulkanBackend({"vulkan_use_d32s8"}, {}), + VulkanBackend({}, {"vulkan_use_d32s8"})); diff --git a/src/tests/end2end/DestroyTests.cpp b/src/tests/end2end/DestroyTests.cpp index 50f36fec37..27bbd17395 100644 --- a/src/tests/end2end/DestroyTests.cpp +++ b/src/tests/end2end/DestroyTests.cpp @@ -157,4 +157,4 @@ TEST_P(DestroyTest, TextureSubmitDestroySubmit) { ASSERT_DEVICE_ERROR(queue.Submit(1, &commands)); } -DAWN_INSTANTIATE_TEST(DestroyTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(DestroyTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/DeviceLostTests.cpp b/src/tests/end2end/DeviceLostTests.cpp index f62c7ad16c..c450274ad1 100644 --- a/src/tests/end2end/DeviceLostTests.cpp +++ b/src/tests/end2end/DeviceLostTests.cpp @@ -461,4 +461,4 @@ TEST_P(DeviceLostTest, FenceSignalTickOnCompletion) { EXPECT_EQ(fence.GetCompletedValue(), 2u); } -DAWN_INSTANTIATE_TEST(DeviceLostTest, D3D12Backend, VulkanBackend); +DAWN_INSTANTIATE_TEST(DeviceLostTest, D3D12Backend(), VulkanBackend()); diff --git a/src/tests/end2end/DrawIndexedIndirectTests.cpp b/src/tests/end2end/DrawIndexedIndirectTests.cpp index 7fd841e356..1b721cad2e 100644 --- a/src/tests/end2end/DrawIndexedIndirectTests.cpp +++ b/src/tests/end2end/DrawIndexedIndirectTests.cpp @@ -162,7 +162,7 @@ TEST_P(DrawIndexedIndirectTest, IndirectOffset) { } DAWN_INSTANTIATE_TEST(DrawIndexedIndirectTest, - D3D12Backend, - MetalBackend, - OpenGLBackend, - VulkanBackend); + D3D12Backend(), + MetalBackend(), + OpenGLBackend(), + VulkanBackend()); diff --git a/src/tests/end2end/DrawIndexedTests.cpp b/src/tests/end2end/DrawIndexedTests.cpp index f6f07aec92..e15ed527bb 100644 --- a/src/tests/end2end/DrawIndexedTests.cpp +++ b/src/tests/end2end/DrawIndexedTests.cpp @@ -134,4 +134,4 @@ TEST_P(DrawIndexedTest, BaseVertex) { Test(3, 1, 3, -4, 0, 6 * sizeof(uint32_t), notFilled, filled); } -DAWN_INSTANTIATE_TEST(DrawIndexedTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(DrawIndexedTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/DrawIndirectTests.cpp b/src/tests/end2end/DrawIndirectTests.cpp index 2b39f5da49..c127b54882 100644 --- a/src/tests/end2end/DrawIndirectTests.cpp +++ b/src/tests/end2end/DrawIndirectTests.cpp @@ -124,4 +124,4 @@ TEST_P(DrawIndirectTest, IndirectOffset) { Test({3, 1, 0, 0, 3, 1, 3, 0}, 4 * sizeof(uint32_t), notFilled, filled); } -DAWN_INSTANTIATE_TEST(DrawIndirectTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(DrawIndirectTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/DrawTests.cpp b/src/tests/end2end/DrawTests.cpp index 1bc0734ca7..d028912ada 100644 --- a/src/tests/end2end/DrawTests.cpp +++ b/src/tests/end2end/DrawTests.cpp @@ -105,4 +105,4 @@ TEST_P(DrawTest, Uint32) { Test(6, 1, 0, 0, filled, filled); } -DAWN_INSTANTIATE_TEST(DrawTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(DrawTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/DynamicBufferOffsetTests.cpp b/src/tests/end2end/DynamicBufferOffsetTests.cpp index 7030f0aab9..8478456242 100644 --- a/src/tests/end2end/DynamicBufferOffsetTests.cpp +++ b/src/tests/end2end/DynamicBufferOffsetTests.cpp @@ -404,7 +404,7 @@ TEST_P(DynamicBufferOffsetTests, UpdateDynamicOffsetsMultipleTimesComputePipelin } DAWN_INSTANTIATE_TEST(DynamicBufferOffsetTests, - D3D12Backend, - MetalBackend, - OpenGLBackend, - VulkanBackend); + D3D12Backend(), + MetalBackend(), + OpenGLBackend(), + VulkanBackend()); diff --git a/src/tests/end2end/FenceTests.cpp b/src/tests/end2end/FenceTests.cpp index 3b4486a8d4..8c9a3c67f9 100644 --- a/src/tests/end2end/FenceTests.cpp +++ b/src/tests/end2end/FenceTests.cpp @@ -235,4 +235,4 @@ TEST_P(FenceTests, ClientValidationErrorInErrorScope) { WaitForCompletedValue(fence, 4); } -DAWN_INSTANTIATE_TEST(FenceTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(FenceTests, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/GpuMemorySynchronizationTests.cpp b/src/tests/end2end/GpuMemorySynchronizationTests.cpp index 995d272ab5..edc599442d 100644 --- a/src/tests/end2end/GpuMemorySynchronizationTests.cpp +++ b/src/tests/end2end/GpuMemorySynchronizationTests.cpp @@ -231,7 +231,7 @@ TEST_P(GpuMemorySyncTests, ComputePassToRenderPass) { EXPECT_PIXEL_RGBA8_EQ(RGBA8(2, 0, 0, 255), renderPass.color, 0, 0); } -DAWN_INSTANTIATE_TEST(GpuMemorySyncTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(GpuMemorySyncTests, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); class StorageToUniformSyncTests : public DawnTest { protected: @@ -415,10 +415,10 @@ TEST_P(StorageToUniformSyncTests, ReadAfterWriteWithDifferentQueueSubmits) { } DAWN_INSTANTIATE_TEST(StorageToUniformSyncTests, - D3D12Backend, - MetalBackend, - OpenGLBackend, - VulkanBackend); + D3D12Backend(), + MetalBackend(), + OpenGLBackend(), + VulkanBackend()); constexpr int kRTSize = 8; constexpr int kVertexBufferStride = 4 * sizeof(float); @@ -689,7 +689,7 @@ TEST_P(MultipleWriteThenMultipleReadTests, OneBuffer) { } DAWN_INSTANTIATE_TEST(MultipleWriteThenMultipleReadTests, - D3D12Backend, - MetalBackend, - OpenGLBackend, - VulkanBackend); + D3D12Backend(), + MetalBackend(), + OpenGLBackend(), + VulkanBackend()); diff --git a/src/tests/end2end/IOSurfaceWrappingTests.cpp b/src/tests/end2end/IOSurfaceWrappingTests.cpp index 908b108555..cc0b2036c3 100644 --- a/src/tests/end2end/IOSurfaceWrappingTests.cpp +++ b/src/tests/end2end/IOSurfaceWrappingTests.cpp @@ -439,5 +439,5 @@ TEST_P(IOSurfaceUsageTests, ClearRGBA8IOSurface) { DoClearTest(ioSurface.get(), wgpu::TextureFormat::RGBA8Unorm, &data, sizeof(data)); } -DAWN_INSTANTIATE_TEST(IOSurfaceValidationTests, MetalBackend); -DAWN_INSTANTIATE_TEST(IOSurfaceUsageTests, MetalBackend); +DAWN_INSTANTIATE_TEST(IOSurfaceValidationTests, MetalBackend()); +DAWN_INSTANTIATE_TEST(IOSurfaceUsageTests, MetalBackend()); diff --git a/src/tests/end2end/IndexFormatTests.cpp b/src/tests/end2end/IndexFormatTests.cpp index 2268deb175..5b93aadb0e 100644 --- a/src/tests/end2end/IndexFormatTests.cpp +++ b/src/tests/end2end/IndexFormatTests.cpp @@ -275,4 +275,4 @@ TEST_P(IndexFormatTest, DISABLED_SetIndexBufferBeforeSetPipeline) { EXPECT_PIXEL_RGBA8_EQ(RGBA8(0, 255, 0, 255), renderPass.color, 100, 300); } -DAWN_INSTANTIATE_TEST(IndexFormatTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(IndexFormatTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/MultisampledRenderingTests.cpp b/src/tests/end2end/MultisampledRenderingTests.cpp index 80db4642f2..cce14cb473 100644 --- a/src/tests/end2end/MultisampledRenderingTests.cpp +++ b/src/tests/end2end/MultisampledRenderingTests.cpp @@ -496,14 +496,13 @@ TEST_P(MultisampledRenderingTest, ResolveInto2DArrayTexture) { } DAWN_INSTANTIATE_TEST(MultisampledRenderingTest, - D3D12Backend, - ForceToggles(D3D12Backend, {}, {"use_d3d12_resource_heap_tier2"}), - ForceToggles(D3D12Backend, {}, {"use_d3d12_render_pass"}), - MetalBackend, - OpenGLBackend, - VulkanBackend, - ForceToggles(MetalBackend, {"emulate_store_and_msaa_resolve"}), - ForceToggles(MetalBackend, {"always_resolve_into_zero_level_and_layer"}), - ForceToggles(MetalBackend, - {"always_resolve_into_zero_level_and_layer", + D3D12Backend(), + D3D12Backend({}, {"use_d3d12_resource_heap_tier2"}), + D3D12Backend({}, {"use_d3d12_render_pass"}), + MetalBackend(), + OpenGLBackend(), + VulkanBackend(), + MetalBackend({"emulate_store_and_msaa_resolve"}), + MetalBackend({"always_resolve_into_zero_level_and_layer"}), + MetalBackend({"always_resolve_into_zero_level_and_layer", "emulate_store_and_msaa_resolve"})); diff --git a/src/tests/end2end/NonzeroTextureCreationTests.cpp b/src/tests/end2end/NonzeroTextureCreationTests.cpp index d7092158c6..59c01b92ae 100644 --- a/src/tests/end2end/NonzeroTextureCreationTests.cpp +++ b/src/tests/end2end/NonzeroTextureCreationTests.cpp @@ -305,15 +305,11 @@ TEST_P(NonzeroTextureCreationTests, NonRenderableAllSubresourcesFilled) { } DAWN_INSTANTIATE_TEST(NonzeroTextureCreationTests, - ForceToggles(D3D12Backend, - {"nonzero_clear_resources_on_creation_for_testing"}, + D3D12Backend({"nonzero_clear_resources_on_creation_for_testing"}, {"lazy_clear_resource_on_first_use"}), - ForceToggles(MetalBackend, - {"nonzero_clear_resources_on_creation_for_testing"}, + MetalBackend({"nonzero_clear_resources_on_creation_for_testing"}, {"lazy_clear_resource_on_first_use"}), - ForceToggles(OpenGLBackend, - {"nonzero_clear_resources_on_creation_for_testing"}, + OpenGLBackend({"nonzero_clear_resources_on_creation_for_testing"}, {"lazy_clear_resource_on_first_use"}), - ForceToggles(VulkanBackend, - {"nonzero_clear_resources_on_creation_for_testing"}, + VulkanBackend({"nonzero_clear_resources_on_creation_for_testing"}, {"lazy_clear_resource_on_first_use"})); diff --git a/src/tests/end2end/ObjectCachingTests.cpp b/src/tests/end2end/ObjectCachingTests.cpp index 2739902891..94cd373a13 100644 --- a/src/tests/end2end/ObjectCachingTests.cpp +++ b/src/tests/end2end/ObjectCachingTests.cpp @@ -400,4 +400,4 @@ TEST_P(ObjectCachingTest, SamplerDeduplication) { EXPECT_EQ(sampler.Get() == sameSampler.Get(), !UsesWire()); } -DAWN_INSTANTIATE_TEST(ObjectCachingTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(ObjectCachingTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/OpArrayLengthTests.cpp b/src/tests/end2end/OpArrayLengthTests.cpp index a20f9e217e..b3cf19df0c 100644 --- a/src/tests/end2end/OpArrayLengthTests.cpp +++ b/src/tests/end2end/OpArrayLengthTests.cpp @@ -262,4 +262,4 @@ TEST_P(OpArrayLengthTest, Vertex) { EXPECT_PIXEL_RGBA8_EQ(expectedColor, renderPass.color, 0, 0); } -DAWN_INSTANTIATE_TEST(OpArrayLengthTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(OpArrayLengthTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/PrimitiveTopologyTests.cpp b/src/tests/end2end/PrimitiveTopologyTests.cpp index 0dde8e5f35..add9d2979c 100644 --- a/src/tests/end2end/PrimitiveTopologyTests.cpp +++ b/src/tests/end2end/PrimitiveTopologyTests.cpp @@ -286,4 +286,4 @@ TEST_P(PrimitiveTopologyTest, TriangleStrip) { }); } -DAWN_INSTANTIATE_TEST(PrimitiveTopologyTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(PrimitiveTopologyTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/RenderBundleTests.cpp b/src/tests/end2end/RenderBundleTests.cpp index 9e5d1397b2..e603044455 100644 --- a/src/tests/end2end/RenderBundleTests.cpp +++ b/src/tests/end2end/RenderBundleTests.cpp @@ -196,4 +196,4 @@ TEST_P(RenderBundleTest, BundleAndRenderPassCommands) { EXPECT_PIXEL_RGBA8_EQ(kColors[1], renderPass.color, 3, 1); } -DAWN_INSTANTIATE_TEST(RenderBundleTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(RenderBundleTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/RenderPassLoadOpTests.cpp b/src/tests/end2end/RenderPassLoadOpTests.cpp index 945ef9ec80..943b86f2f3 100644 --- a/src/tests/end2end/RenderPassLoadOpTests.cpp +++ b/src/tests/end2end/RenderPassLoadOpTests.cpp @@ -148,4 +148,4 @@ TEST_P(RenderPassLoadOpTests, ColorClearThenLoadAndDraw) { EXPECT_TEXTURE_RGBA8_EQ(expectBlue.data(), renderTarget, kRTSize / 2, 0, kRTSize / 2, kRTSize, 0, 0); } -DAWN_INSTANTIATE_TEST(RenderPassLoadOpTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(RenderPassLoadOpTests, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/RenderPassTests.cpp b/src/tests/end2end/RenderPassTests.cpp index 6d8aa31886..87ac6c2371 100644 --- a/src/tests/end2end/RenderPassTests.cpp +++ b/src/tests/end2end/RenderPassTests.cpp @@ -166,8 +166,8 @@ TEST_P(RenderPassTest, NoCorrespondingFragmentShaderOutputs) { } DAWN_INSTANTIATE_TEST(RenderPassTest, - D3D12Backend, - ForceToggles(D3D12Backend, {}, {"use_d3d12_render_pass"}), - MetalBackend, - OpenGLBackend, - VulkanBackend); + D3D12Backend(), + D3D12Backend({}, {"use_d3d12_render_pass"}), + MetalBackend(), + OpenGLBackend(), + VulkanBackend()); diff --git a/src/tests/end2end/SamplerTests.cpp b/src/tests/end2end/SamplerTests.cpp index e058fb064f..de6f1e08f2 100644 --- a/src/tests/end2end/SamplerTests.cpp +++ b/src/tests/end2end/SamplerTests.cpp @@ -182,4 +182,4 @@ TEST_P(SamplerTest, AddressMode) { } } -DAWN_INSTANTIATE_TEST(SamplerTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(SamplerTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/ScissorTests.cpp b/src/tests/end2end/ScissorTests.cpp index 21c1f591f0..c4f30d37ad 100644 --- a/src/tests/end2end/ScissorTests.cpp +++ b/src/tests/end2end/ScissorTests.cpp @@ -152,4 +152,4 @@ TEST_P(ScissorTest, NoInheritanceBetweenRenderPass) { EXPECT_PIXEL_RGBA8_EQ(RGBA8::kGreen, renderPass.color, 99, 99); } -DAWN_INSTANTIATE_TEST(ScissorTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(ScissorTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/TextureFormatTests.cpp b/src/tests/end2end/TextureFormatTests.cpp index 4c6189cddf..a31d38fe9e 100644 --- a/src/tests/end2end/TextureFormatTests.cpp +++ b/src/tests/end2end/TextureFormatTests.cpp @@ -734,4 +734,4 @@ TEST_P(TextureFormatTest, RG11B10Float) { // TODO(cwallez@chromium.org): Add tests for depth-stencil formats when we know if they are copyable // in WebGPU. -DAWN_INSTANTIATE_TEST(TextureFormatTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(TextureFormatTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/TextureViewTests.cpp b/src/tests/end2end/TextureViewTests.cpp index 7d59b6148b..4e934875d3 100644 --- a/src/tests/end2end/TextureViewTests.cpp +++ b/src/tests/end2end/TextureViewTests.cpp @@ -613,6 +613,6 @@ TEST_P(TextureViewRenderingTest, Texture2DArrayViewOnALayerOf2DArrayTextureAsCol } } -DAWN_INSTANTIATE_TEST(TextureViewSamplingTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(TextureViewSamplingTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); -DAWN_INSTANTIATE_TEST(TextureViewRenderingTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(TextureViewRenderingTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/TextureZeroInitTests.cpp b/src/tests/end2end/TextureZeroInitTests.cpp index 7ceb8072b6..b791bacb55 100644 --- a/src/tests/end2end/TextureZeroInitTests.cpp +++ b/src/tests/end2end/TextureZeroInitTests.cpp @@ -946,10 +946,9 @@ TEST_P(TextureZeroInitTest, PreservesInitializedArrayLayer) { DAWN_INSTANTIATE_TEST( TextureZeroInitTest, - ForceToggles(D3D12Backend, {"nonzero_clear_resources_on_creation_for_testing"}), - ForceToggles(D3D12Backend, - {"nonzero_clear_resources_on_creation_for_testing"}, + D3D12Backend({"nonzero_clear_resources_on_creation_for_testing"}), + D3D12Backend({"nonzero_clear_resources_on_creation_for_testing"}, {"use_d3d12_render_pass"}), - ForceToggles(OpenGLBackend, {"nonzero_clear_resources_on_creation_for_testing"}), - ForceToggles(MetalBackend, {"nonzero_clear_resources_on_creation_for_testing"}), - ForceToggles(VulkanBackend, {"nonzero_clear_resources_on_creation_for_testing"})); + OpenGLBackend({"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 53710cc70a..c805b3af75 100644 --- a/src/tests/end2end/VertexFormatTests.cpp +++ b/src/tests/end2end/VertexFormatTests.cpp @@ -915,4 +915,4 @@ TEST_P(VertexFormatTest, Int4) { DoVertexFormatTest(wgpu::VertexFormat::Int4, vertexData, vertexData); } -DAWN_INSTANTIATE_TEST(VertexFormatTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(VertexFormatTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/VertexStateTests.cpp b/src/tests/end2end/VertexStateTests.cpp index 048bd7a8f7..052824270d 100644 --- a/src/tests/end2end/VertexStateTests.cpp +++ b/src/tests/end2end/VertexStateTests.cpp @@ -521,7 +521,7 @@ TEST_P(VertexStateTest, LastAllowedVertexBuffer) { DoTestDraw(pipeline, 1, 1, {DrawVertexBuffer{kMaxVertexBuffers - 1, &buffer0}}); } -DAWN_INSTANTIATE_TEST(VertexStateTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(VertexStateTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); // TODO for the input state: // - Add more vertex formats @@ -576,7 +576,7 @@ TEST_P(OptionalVertexStateTest, Basic) { } DAWN_INSTANTIATE_TEST(OptionalVertexStateTest, - D3D12Backend, - MetalBackend, - OpenGLBackend, - VulkanBackend); + D3D12Backend(), + MetalBackend(), + OpenGLBackend(), + VulkanBackend()); diff --git a/src/tests/end2end/ViewportOrientationTests.cpp b/src/tests/end2end/ViewportOrientationTests.cpp index 43fa889e3e..75651a6b7c 100644 --- a/src/tests/end2end/ViewportOrientationTests.cpp +++ b/src/tests/end2end/ViewportOrientationTests.cpp @@ -64,4 +64,4 @@ TEST_P(ViewportOrientationTests, OriginAt0x0) { EXPECT_PIXEL_RGBA8_EQ(RGBA8::kZero, renderPass.color, 1, 1); } -DAWN_INSTANTIATE_TEST(ViewportOrientationTests, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(ViewportOrientationTests, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/end2end/ViewportTests.cpp b/src/tests/end2end/ViewportTests.cpp index 307dcc1fdd..b03f57db7d 100644 --- a/src/tests/end2end/ViewportTests.cpp +++ b/src/tests/end2end/ViewportTests.cpp @@ -401,4 +401,4 @@ TEST_P(ViewportTest, DoNotTruncateWidthAndHeight2) { DoTest(info); } -DAWN_INSTANTIATE_TEST(ViewportTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend); +DAWN_INSTANTIATE_TEST(ViewportTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()); diff --git a/src/tests/perf_tests/BufferUploadPerf.cpp b/src/tests/perf_tests/BufferUploadPerf.cpp index 181547d28d..72e753910d 100644 --- a/src/tests/perf_tests/BufferUploadPerf.cpp +++ b/src/tests/perf_tests/BufferUploadPerf.cpp @@ -146,7 +146,8 @@ TEST_P(BufferUploadPerf, Run) { } DAWN_INSTANTIATE_PERF_TEST_SUITE_P(BufferUploadPerf, - {D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend}, + {D3D12Backend(), MetalBackend(), OpenGLBackend(), + VulkanBackend()}, {UploadMethod::SetSubData, UploadMethod::CreateBufferMapped}, {UploadSize::BufferSize_1KB, UploadSize::BufferSize_64KB, UploadSize::BufferSize_1MB, UploadSize::BufferSize_4MB, diff --git a/src/tests/perf_tests/DrawCallPerf.cpp b/src/tests/perf_tests/DrawCallPerf.cpp index 2a1eba7769..d8eede92f6 100644 --- a/src/tests/perf_tests/DrawCallPerf.cpp +++ b/src/tests/perf_tests/DrawCallPerf.cpp @@ -606,8 +606,8 @@ TEST_P(DrawCallPerf, Run) { DAWN_INSTANTIATE_PERF_TEST_SUITE_P( DrawCallPerf, - {D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend, - ForceToggles(VulkanBackend, {"skip_validation"})}, + {D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend(), + VulkanBackend({"skip_validation"})}, { // Baseline MakeParam(), diff --git a/src/tests/white_box/D3D12SmallTextureTests.cpp b/src/tests/white_box/D3D12SmallTextureTests.cpp index 847a0fcf3a..e3ab8cdad5 100644 --- a/src/tests/white_box/D3D12SmallTextureTests.cpp +++ b/src/tests/white_box/D3D12SmallTextureTests.cpp @@ -74,4 +74,4 @@ TEST_P(D3D12SmallTextureTests, AlignSmallCompressedTexture) { static_cast(D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT)); } -DAWN_INSTANTIATE_TEST(D3D12SmallTextureTests, D3D12Backend); \ No newline at end of file +DAWN_INSTANTIATE_TEST(D3D12SmallTextureTests, D3D12Backend()); diff --git a/src/tests/white_box/MetalAutoreleasePoolTests.mm b/src/tests/white_box/MetalAutoreleasePoolTests.mm index a5c49d676f..377c08d63e 100644 --- a/src/tests/white_box/MetalAutoreleasePoolTests.mm +++ b/src/tests/white_box/MetalAutoreleasePoolTests.mm @@ -58,4 +58,4 @@ TEST_P(MetalAutoreleasePoolTests, EncoderOutlivesAutorelease) { mMtlDevice->SubmitPendingCommandBuffer(); } -DAWN_INSTANTIATE_TEST(MetalAutoreleasePoolTests, MetalBackend); +DAWN_INSTANTIATE_TEST(MetalAutoreleasePoolTests, MetalBackend()); diff --git a/src/tests/white_box/VulkanErrorInjectorTests.cpp b/src/tests/white_box/VulkanErrorInjectorTests.cpp index bd4a49e1ae..23872ec1ab 100644 --- a/src/tests/white_box/VulkanErrorInjectorTests.cpp +++ b/src/tests/white_box/VulkanErrorInjectorTests.cpp @@ -120,4 +120,4 @@ TEST_P(VulkanErrorInjectorTests, InjectErrorOnCreateBuffer) { } } -DAWN_INSTANTIATE_TEST(VulkanErrorInjectorTests, VulkanBackend); +DAWN_INSTANTIATE_TEST(VulkanErrorInjectorTests, VulkanBackend()); diff --git a/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp b/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp index 4600424924..78f22cc136 100644 --- a/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp +++ b/src/tests/white_box/VulkanImageWrappingTestsDmaBuf.cpp @@ -850,7 +850,7 @@ namespace dawn_native { namespace vulkan { IgnoreSignalSemaphore(device, nextWrappedTexture); } - DAWN_INSTANTIATE_TEST(VulkanImageWrappingValidationTests, VulkanBackend); - DAWN_INSTANTIATE_TEST(VulkanImageWrappingUsageTests, VulkanBackend); + DAWN_INSTANTIATE_TEST(VulkanImageWrappingValidationTests, VulkanBackend()); + DAWN_INSTANTIATE_TEST(VulkanImageWrappingUsageTests, VulkanBackend()); }} // namespace dawn_native::vulkan diff --git a/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp b/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp index 1db9643967..b376366bf6 100644 --- a/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp +++ b/src/tests/white_box/VulkanImageWrappingTestsOpaqueFD.cpp @@ -1026,7 +1026,7 @@ namespace dawn_native { namespace vulkan { secondDeviceVk->GetFencedDeleter()->DeleteWhenUnused(allocationA); } - DAWN_INSTANTIATE_TEST(VulkanImageWrappingValidationTests, VulkanBackend); - DAWN_INSTANTIATE_TEST(VulkanImageWrappingUsageTests, VulkanBackend); + DAWN_INSTANTIATE_TEST(VulkanImageWrappingValidationTests, VulkanBackend()); + DAWN_INSTANTIATE_TEST(VulkanImageWrappingUsageTests, VulkanBackend()); }} // namespace dawn_native::vulkan