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 <mehe@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Austin Eng 2020-02-25 16:23:17 +00:00 committed by Commit Bot service account
parent 5a921f8fad
commit 6c1d646ee9
52 changed files with 167 additions and 152 deletions

View File

@ -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 ForceToggles(const DawnTestParam& originParam,
DawnTestParam::DawnTestParam(wgpu::BackendType backendType,
std::initializer_list<const char*> forceEnabledWorkarounds,
std::initializer_list<const char*> forceDisabledWorkarounds)
: backendType(backendType),
forceEnabledWorkarounds(forceEnabledWorkarounds),
forceDisabledWorkarounds(forceDisabledWorkarounds) {
}
DawnTestParam D3D12Backend(std::initializer_list<const char*> forceEnabledWorkarounds,
std::initializer_list<const char*> forceDisabledWorkarounds) {
DawnTestParam newTestParam = originParam;
newTestParam.forceEnabledWorkarounds = forceEnabledWorkarounds;
newTestParam.forceDisabledWorkarounds = forceDisabledWorkarounds;
return newTestParam;
return DawnTestParam(wgpu::BackendType::D3D12, forceEnabledWorkarounds,
forceDisabledWorkarounds);
}
DawnTestParam MetalBackend(std::initializer_list<const char*> forceEnabledWorkarounds,
std::initializer_list<const char*> forceDisabledWorkarounds) {
return DawnTestParam(wgpu::BackendType::Metal, forceEnabledWorkarounds,
forceDisabledWorkarounds);
}
DawnTestParam OpenGLBackend(std::initializer_list<const char*> forceEnabledWorkarounds,
std::initializer_list<const char*> forceDisabledWorkarounds) {
return DawnTestParam(wgpu::BackendType::OpenGL, forceEnabledWorkarounds,
forceDisabledWorkarounds);
}
DawnTestParam VulkanBackend(std::initializer_list<const char*> forceEnabledWorkarounds,
std::initializer_list<const char*> forceDisabledWorkarounds) {
return DawnTestParam(wgpu::BackendType::Vulkan, forceEnabledWorkarounds,
forceDisabledWorkarounds);
}
std::ostream& operator<<(std::ostream& os, const DawnTestParam& param) {

View File

@ -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<const char*> forceEnabledWorkarounds = {},
std::initializer_list<const char*> forceDisabledWorkarounds = {});
wgpu::BackendType backendType;
@ -97,14 +98,16 @@ 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 D3D12Backend(std::initializer_list<const char*> forceEnabledWorkarounds = {},
std::initializer_list<const char*> forceDisabledWorkarounds = {});
DawnTestParam ForceToggles(const DawnTestParam& originParam,
std::initializer_list<const char*> forceEnabledWorkarounds,
DawnTestParam MetalBackend(std::initializer_list<const char*> forceEnabledWorkarounds = {},
std::initializer_list<const char*> forceDisabledWorkarounds = {});
DawnTestParam OpenGLBackend(std::initializer_list<const char*> forceEnabledWorkarounds = {},
std::initializer_list<const char*> forceDisabledWorkarounds = {});
DawnTestParam VulkanBackend(std::initializer_list<const char*> forceEnabledWorkarounds = {},
std::initializer_list<const char*> forceDisabledWorkarounds = {});
namespace utils {

View File

@ -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());

View File

@ -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());

View File

@ -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());

View File

@ -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());

View File

@ -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());

View File

@ -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"}));

View File

@ -173,7 +173,7 @@ TEST_P(ComputeCopyStorageBufferTests, DISABLED_UnsizedDescriptorArray) {
}
DAWN_INSTANTIATE_TEST(ComputeCopyStorageBufferTests,
D3D12Backend,
MetalBackend,
OpenGLBackend,
VulkanBackend);
D3D12Backend(),
MetalBackend(),
OpenGLBackend(),
VulkanBackend());

View File

@ -105,7 +105,7 @@ TEST_P(ComputeIndirectTests, IndirectOffset) {
}
DAWN_INSTANTIATE_TEST(ComputeIndirectTests,
D3D12Backend,
MetalBackend,
OpenGLBackend,
VulkanBackend);
D3D12Backend(),
MetalBackend(),
OpenGLBackend(),
VulkanBackend());

View File

@ -98,7 +98,7 @@ TEST_P(ComputeSharedMemoryTests, Basic) {
}
DAWN_INSTANTIATE_TEST(ComputeSharedMemoryTests,
D3D12Backend,
MetalBackend,
OpenGLBackend,
VulkanBackend);
D3D12Backend(),
MetalBackend(),
OpenGLBackend(),
VulkanBackend());

View File

@ -193,7 +193,7 @@ TEST_P(ComputeStorageBufferBarrierTests, UniformToStorageAddPingPong) {
}
DAWN_INSTANTIATE_TEST(ComputeStorageBufferBarrierTests,
D3D12Backend,
MetalBackend,
OpenGLBackend,
VulkanBackend);
D3D12Backend(),
MetalBackend(),
OpenGLBackend(),
VulkanBackend());

View File

@ -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());

View File

@ -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());

View File

@ -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());

View File

@ -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());

View File

@ -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"}));

View File

@ -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());

View File

@ -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());

View File

@ -162,7 +162,7 @@ TEST_P(DrawIndexedIndirectTest, IndirectOffset) {
}
DAWN_INSTANTIATE_TEST(DrawIndexedIndirectTest,
D3D12Backend,
MetalBackend,
OpenGLBackend,
VulkanBackend);
D3D12Backend(),
MetalBackend(),
OpenGLBackend(),
VulkanBackend());

View File

@ -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());

View File

@ -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());

View File

@ -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());

View File

@ -404,7 +404,7 @@ TEST_P(DynamicBufferOffsetTests, UpdateDynamicOffsetsMultipleTimesComputePipelin
}
DAWN_INSTANTIATE_TEST(DynamicBufferOffsetTests,
D3D12Backend,
MetalBackend,
OpenGLBackend,
VulkanBackend);
D3D12Backend(),
MetalBackend(),
OpenGLBackend(),
VulkanBackend());

View File

@ -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());

View File

@ -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());

View File

@ -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());

View File

@ -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());

View File

@ -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"}));

View File

@ -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"}));

View File

@ -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());

View File

@ -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());

View File

@ -286,4 +286,4 @@ TEST_P(PrimitiveTopologyTest, TriangleStrip) {
});
}
DAWN_INSTANTIATE_TEST(PrimitiveTopologyTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend);
DAWN_INSTANTIATE_TEST(PrimitiveTopologyTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend());

View File

@ -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());

View File

@ -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());

View File

@ -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());

View File

@ -182,4 +182,4 @@ TEST_P(SamplerTest, AddressMode) {
}
}
DAWN_INSTANTIATE_TEST(SamplerTest, D3D12Backend, MetalBackend, OpenGLBackend, VulkanBackend);
DAWN_INSTANTIATE_TEST(SamplerTest, D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend());

View File

@ -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());

View File

@ -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());

View File

@ -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());

View File

@ -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"}));

View File

@ -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());

View File

@ -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());

View File

@ -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());

View File

@ -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());

View File

@ -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,

View File

@ -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(),

View File

@ -74,4 +74,4 @@ TEST_P(D3D12SmallTextureTests, AlignSmallCompressedTexture) {
static_cast<uint64_t>(D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT));
}
DAWN_INSTANTIATE_TEST(D3D12SmallTextureTests, D3D12Backend);
DAWN_INSTANTIATE_TEST(D3D12SmallTextureTests, D3D12Backend());

View File

@ -58,4 +58,4 @@ TEST_P(MetalAutoreleasePoolTests, EncoderOutlivesAutorelease) {
mMtlDevice->SubmitPendingCommandBuffer();
}
DAWN_INSTANTIATE_TEST(MetalAutoreleasePoolTests, MetalBackend);
DAWN_INSTANTIATE_TEST(MetalAutoreleasePoolTests, MetalBackend());

View File

@ -120,4 +120,4 @@ TEST_P(VulkanErrorInjectorTests, InjectErrorOnCreateBuffer) {
}
}
DAWN_INSTANTIATE_TEST(VulkanErrorInjectorTests, VulkanBackend);
DAWN_INSTANTIATE_TEST(VulkanErrorInjectorTests, VulkanBackend());

View File

@ -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

View File

@ -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