d3d11: add d3d11 backend in end2end tests
Right now, many tests are not passed becasue unimplemented features in d3d11 backend. HoweverD3D11 backend is disabled on bots by default, so this CL will not break out bots. Bug: dawn:1705 Change-Id: I57321b86a404bc245b71c467479fdee0464dee9b Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/126260 Commit-Queue: Peng Huang <penghuang@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
d2263328b2
commit
3fcf96dd8c
|
@ -29,6 +29,12 @@ BackendTestConfig::BackendTestConfig(wgpu::BackendType backendType,
|
|||
forceEnabledWorkarounds(forceEnabledWorkarounds),
|
||||
forceDisabledWorkarounds(forceDisabledWorkarounds) {}
|
||||
|
||||
BackendTestConfig D3D11Backend(std::initializer_list<const char*> forceEnabledWorkarounds,
|
||||
std::initializer_list<const char*> forceDisabledWorkarounds) {
|
||||
return BackendTestConfig(wgpu::BackendType::D3D11, forceEnabledWorkarounds,
|
||||
forceDisabledWorkarounds);
|
||||
}
|
||||
|
||||
BackendTestConfig D3D12Backend(std::initializer_list<const char*> forceEnabledWorkarounds,
|
||||
std::initializer_list<const char*> forceDisabledWorkarounds) {
|
||||
return BackendTestConfig(wgpu::BackendType::D3D12, forceEnabledWorkarounds,
|
||||
|
@ -71,6 +77,8 @@ TestAdapterProperties::TestAdapterProperties(const wgpu::AdapterProperties& prop
|
|||
|
||||
std::string TestAdapterProperties::ParamName() const {
|
||||
switch (backendType) {
|
||||
case wgpu::BackendType::D3D11:
|
||||
return "D3D11";
|
||||
case wgpu::BackendType::D3D12:
|
||||
return "D3D12";
|
||||
case wgpu::BackendType::Metal:
|
||||
|
|
|
@ -59,6 +59,9 @@ struct AdapterTestParam {
|
|||
|
||||
std::ostream& operator<<(std::ostream& os, const AdapterTestParam& param);
|
||||
|
||||
BackendTestConfig D3D11Backend(std::initializer_list<const char*> forceEnabledWorkarounds = {},
|
||||
std::initializer_list<const char*> forceDisabledWorkarounds = {});
|
||||
|
||||
BackendTestConfig D3D12Backend(std::initializer_list<const char*> forceEnabledWorkarounds = {},
|
||||
std::initializer_list<const char*> forceDisabledWorkarounds = {});
|
||||
|
||||
|
|
|
@ -294,7 +294,9 @@ void DawnTestEnvironment::ParseArgs(int argc, char** argv) {
|
|||
argLen = sizeof(kBackendArg) - 1;
|
||||
if (strncmp(argv[i], kBackendArg, argLen) == 0) {
|
||||
const char* param = argv[i] + argLen;
|
||||
if (strcmp("d3d12", param) == 0) {
|
||||
if (strcmp("d3d11", param) == 0) {
|
||||
mBackendTypeFilter = wgpu::BackendType::D3D11;
|
||||
} else if (strcmp("d3d12", param) == 0) {
|
||||
mBackendTypeFilter = wgpu::BackendType::D3D12;
|
||||
} else if (strcmp("metal", param) == 0) {
|
||||
mBackendTypeFilter = wgpu::BackendType::Metal;
|
||||
|
@ -699,9 +701,9 @@ DawnTestBase::~DawnTestBase() {
|
|||
mAdapter = nullptr;
|
||||
mInstance = nullptr;
|
||||
|
||||
// D3D12's GPU-based validation will accumulate objects over time if the backend device is not
|
||||
// destroyed and recreated, so we reset it here.
|
||||
if (IsD3D12() && IsBackendValidationEnabled()) {
|
||||
// D3D11 and D3D12's GPU-based validation will accumulate objects over time if the backend
|
||||
// device is not destroyed and recreated, so we reset it here.
|
||||
if ((IsD3D11() || IsD3D12()) && IsBackendValidationEnabled()) {
|
||||
mBackendAdapter.ResetInternalDeviceForTesting();
|
||||
}
|
||||
mWireHelper.reset();
|
||||
|
@ -712,6 +714,10 @@ DawnTestBase::~DawnTestBase() {
|
|||
gCurrentTest = nullptr;
|
||||
}
|
||||
|
||||
bool DawnTestBase::IsD3D11() const {
|
||||
return mParam.adapterProperties.backendType == wgpu::BackendType::D3D11;
|
||||
}
|
||||
|
||||
bool DawnTestBase::IsD3D12() const {
|
||||
return mParam.adapterProperties.backendType == wgpu::BackendType::D3D12;
|
||||
}
|
||||
|
@ -1532,7 +1538,7 @@ void DawnTestBase::SlotMapCallback(WGPUBufferMapAsyncStatus status, void* userda
|
|||
|
||||
void DawnTestBase::ResolveExpectations() {
|
||||
for (const auto& expectation : mDeferredExpectations) {
|
||||
DAWN_ASSERT(mReadbackSlots[expectation.readbackSlot].mappedData != nullptr);
|
||||
EXPECT_TRUE(mReadbackSlots[expectation.readbackSlot].mappedData != nullptr);
|
||||
|
||||
// Get a pointer to the mapped copy of the data for the expectation.
|
||||
const char* data =
|
||||
|
|
|
@ -222,6 +222,7 @@ class DawnTestBase {
|
|||
void SetUp();
|
||||
void TearDown();
|
||||
|
||||
bool IsD3D11() const;
|
||||
bool IsD3D12() const;
|
||||
bool IsMetal() const;
|
||||
bool IsNull() const;
|
||||
|
|
|
@ -59,6 +59,7 @@ TEST_P(BasicTests, QueueWriteBufferError) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(BasicTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -170,7 +170,6 @@ TEST_P(BindGroupTests, ReusedUBO) {
|
|||
struct VertexUniformBuffer {
|
||||
transform : vec4f
|
||||
}
|
||||
|
||||
@group(0) @binding(0) var <uniform> vertexUbo : VertexUniformBuffer;
|
||||
|
||||
@vertex
|
||||
|
@ -190,7 +189,8 @@ TEST_P(BindGroupTests, ReusedUBO) {
|
|||
}
|
||||
@group(0) @binding(1) var <uniform> fragmentUbo : FragmentUniformBuffer;
|
||||
|
||||
@fragment fn main() -> @location(0) vec4f {
|
||||
@fragment
|
||||
fn main() -> @location(0) vec4f {
|
||||
return fragmentUbo.color;
|
||||
})");
|
||||
|
||||
|
@ -203,20 +203,17 @@ TEST_P(BindGroupTests, ReusedUBO) {
|
|||
|
||||
struct Data {
|
||||
float transform[8];
|
||||
char padding[256 - 8 * sizeof(float)];
|
||||
char padding[256 - sizeof(transform)];
|
||||
float color[4];
|
||||
};
|
||||
ASSERT(offsetof(Data, color) == 256);
|
||||
Data data{
|
||||
{1.f, 0.f, 0.f, 1.0f},
|
||||
{0},
|
||||
{0.f, 1.f, 0.f, 1.f},
|
||||
};
|
||||
Data data{{1.f, 0.f, 0.f, 1.0f}, {0}, {0.f, 1.f, 0.f, 1.f}};
|
||||
wgpu::Buffer buffer =
|
||||
utils::CreateBufferFromData(device, &data, sizeof(data), wgpu::BufferUsage::Uniform);
|
||||
wgpu::BindGroup bindGroup = utils::MakeBindGroup(
|
||||
device, pipeline.GetBindGroupLayout(0),
|
||||
{{0, buffer, 0, sizeof(Data::transform)}, {1, buffer, 256, sizeof(Data::color)}});
|
||||
|
||||
wgpu::BindGroup bindGroup =
|
||||
utils::MakeBindGroup(device, pipeline.GetBindGroupLayout(0),
|
||||
{{0, buffer, offsetof(Data, transform), sizeof(Data::transform)},
|
||||
{1, buffer, offsetof(Data, color), sizeof(Data::color)}});
|
||||
|
||||
wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
|
||||
wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&renderPass.renderPassInfo);
|
||||
|
@ -992,6 +989,9 @@ TEST_P(BindGroupTests, DrawThenChangePipelineTwiceAndBindGroup) {
|
|||
// Regression test for crbug.com/dawn/408 where dynamic offsets were applied in the wrong order.
|
||||
// Dynamic offsets should be applied in increasing order of binding number.
|
||||
TEST_P(BindGroupTests, DynamicOffsetOrder) {
|
||||
// D3D11 doesn't support partial updates of dynamic uniform buffers.
|
||||
DAWN_SUPPRESS_TEST_IF(IsD3D11());
|
||||
|
||||
// We will put the following values and the respective offsets into a buffer.
|
||||
// The test will ensure that the correct dynamic offset is applied to each buffer by reading the
|
||||
// value from an offset binding.
|
||||
|
@ -1507,6 +1507,7 @@ TEST_P(BindGroupTests, CreateWithDestroyedResource) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(BindGroupTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -553,6 +553,7 @@ TEST_P(BufferMappingTests, RegressChromium1421170) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(BufferMappingTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -713,7 +714,11 @@ TEST_P(BufferMappingCallbackTests, EmptySubmissionWriteAndThenMap) {
|
|||
buffer.Unmap();
|
||||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(BufferMappingCallbackTests, D3D12Backend(), MetalBackend(), VulkanBackend());
|
||||
DAWN_INSTANTIATE_TEST(BufferMappingCallbackTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
VulkanBackend());
|
||||
|
||||
class BufferMappedAtCreationTests : public DawnTest {
|
||||
protected:
|
||||
|
@ -961,6 +966,7 @@ TEST_P(BufferMappedAtCreationTests, GetMappedRangeZeroSized) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(BufferMappedAtCreationTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
D3D12Backend({}, {"use_d3d12_resource_heap_tier2"}),
|
||||
MetalBackend(),
|
||||
|
@ -1108,6 +1114,7 @@ TEST_P(BufferTests, CreateBufferOOMMapAsync) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(BufferTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -1140,6 +1147,7 @@ TEST_P(BufferNoSuballocationTests, WriteBufferThenDestroy) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(BufferNoSuballocationTests,
|
||||
D3D11Backend({"disable_resource_suballocation"}),
|
||||
D3D12Backend({"disable_resource_suballocation"}),
|
||||
MetalBackend({"disable_resource_suballocation"}),
|
||||
OpenGLBackend({"disable_resource_suballocation"}),
|
||||
|
|
|
@ -93,6 +93,7 @@ TEST_P(ClipSpaceTest, ClipSpace) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(ClipSpaceTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -1189,6 +1189,7 @@ TEST_P(ColorStateTest, SrcBlendFactorDstAlphaDstBlendFactorZero) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(ColorStateTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -46,6 +46,7 @@ TEST_P(CommandEncoderTests, WriteBuffer) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(CommandEncoderTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -1121,8 +1121,8 @@ TEST_P(CompressedTextureFormatTest, CopyMultiple2DArrayLayers) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(CompressedTextureFormatTest,
|
||||
{D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(),
|
||||
VulkanBackend(),
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(),
|
||||
OpenGLESBackend(), VulkanBackend(),
|
||||
VulkanBackend({"use_temporary_buffer_in_texture_to_texture_copy"})},
|
||||
std::vector<wgpu::TextureFormat>(utils::kCompressedFormats.begin(),
|
||||
utils::kCompressedFormats.end()));
|
||||
|
@ -1177,6 +1177,7 @@ TEST_P(CompressedTextureFormatSpecificTest, BC1RGBAUnorm_UnalignedDynamicUploade
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(CompressedTextureFormatSpecificTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -1304,7 +1305,7 @@ TEST_P(CompressedTextureWriteTextureTest,
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(CompressedTextureWriteTextureTest,
|
||||
{D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(),
|
||||
VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(),
|
||||
OpenGLESBackend(), VulkanBackend()},
|
||||
std::vector<wgpu::TextureFormat>(utils::kCompressedFormats.begin(),
|
||||
utils::kCompressedFormats.end()));
|
||||
|
|
|
@ -145,6 +145,7 @@ TEST_P(ComputeCopyStorageBufferTests, UnsizedArrayOfBasic) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(ComputeCopyStorageBufferTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -311,6 +311,7 @@ TEST_P(ComputeDispatchTests, ExceedsMaxWorkgroupsWithOffsetNoop) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(ComputeDispatchTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -500,6 +500,7 @@ fn main() {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(ComputeFlowControlTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -778,6 +778,7 @@ fn main() {
|
|||
auto GenerateParams() {
|
||||
auto params = MakeParamGenerator<ComputeLayoutMemoryBufferTestParams>(
|
||||
{
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
D3D12Backend({"use_dxc"}),
|
||||
MetalBackend(),
|
||||
|
|
|
@ -197,6 +197,7 @@ TEST_P(ComputeSharedMemoryTests, AssortedTypes) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(ComputeSharedMemoryTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -409,6 +409,7 @@ TEST_P(ComputeStorageBufferBarrierTests, IndirectBufferCorrectBarrier) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(ComputeStorageBufferBarrierTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -378,7 +378,8 @@ TEST_P(CopyExternalTextureForBrowserTests_Basic, Copy) {
|
|||
|
||||
DAWN_INSTANTIATE_TEST_P(
|
||||
CopyExternalTextureForBrowserTests_Basic,
|
||||
{D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(),
|
||||
VulkanBackend()},
|
||||
std::vector<CopyRect>({CopyRect::TopLeft, CopyRect::TopRight, CopyRect::BottomLeft,
|
||||
CopyRect::BottomRight, CopyRect::FullSize}),
|
||||
std::vector<CopyRect>({CopyRect::TopLeft, CopyRect::TopRight, CopyRect::BottomLeft,
|
||||
|
|
|
@ -1353,6 +1353,7 @@ TEST_P(CopyTests_T2B, Texture3DMipUnaligned) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(CopyTests_T2B,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -1946,6 +1947,7 @@ TEST_P(CopyTests_B2T, Texture3DMipUnaligned) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(CopyTests_B2T,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -2446,7 +2448,7 @@ TEST_P(CopyTests_T2T, Texture3DMipUnaligned) {
|
|||
|
||||
DAWN_INSTANTIATE_TEST_P(
|
||||
CopyTests_T2T,
|
||||
{D3D12Backend(),
|
||||
{D3D11Backend(), D3D12Backend(),
|
||||
D3D12Backend({"use_temp_buffer_in_small_format_texture_to_texture_copy_from_greater_to_less_"
|
||||
"mip_level"}),
|
||||
D3D12Backend(
|
||||
|
@ -2470,8 +2472,8 @@ TEST_P(CopyTests_Formats, SrgbCompatibility) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(CopyTests_Formats,
|
||||
{D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(),
|
||||
VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(),
|
||||
OpenGLESBackend(), VulkanBackend()},
|
||||
{wgpu::TextureFormat::RGBA8Unorm, wgpu::TextureFormat::RGBA8UnormSrgb,
|
||||
wgpu::TextureFormat::BGRA8Unorm, wgpu::TextureFormat::BGRA8UnormSrgb});
|
||||
|
||||
|
@ -2502,6 +2504,7 @@ TEST_P(CopyTests_B2B, ZeroSizedCopy) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(CopyTests_B2B,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -2530,6 +2533,7 @@ TEST_P(ClearBufferTests, ZeroSizedClear) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(ClearBufferTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -2712,8 +2716,9 @@ TEST_P(CopyToDepthStencilTextureAfterDestroyingBigBufferTests, DoTest) {
|
|||
|
||||
DAWN_INSTANTIATE_TEST_P(
|
||||
CopyToDepthStencilTextureAfterDestroyingBigBufferTests,
|
||||
{D3D12Backend(), D3D12Backend({"d3d12_force_clear_copyable_depth_stencil_texture_on_creation"}),
|
||||
MetalBackend(), OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(),
|
||||
D3D12Backend({"d3d12_force_clear_copyable_depth_stencil_texture_on_creation"}), MetalBackend(),
|
||||
OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
|
||||
{wgpu::TextureFormat::Depth16Unorm, wgpu::TextureFormat::Stencil8},
|
||||
{InitializationMethod::CopyBufferToTexture, InitializationMethod::WriteTexture,
|
||||
InitializationMethod::CopyTextureToTexture},
|
||||
|
@ -2911,6 +2916,7 @@ TEST_P(T2TCopyFromDirtyHeapTests, From2DMultiMipmapLevelTexture) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(T2TCopyFromDirtyHeapTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -1116,6 +1116,7 @@ TEST_P(CopyTextureForBrowser_Basic, VerifyFlipYInSlimTexture) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(CopyTextureForBrowser_Basic,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -1137,19 +1138,20 @@ TEST_P(CopyTextureForBrowser_Formats, ColorConversion) {
|
|||
DoColorConversionTest();
|
||||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(
|
||||
CopyTextureForBrowser_Formats,
|
||||
{D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
|
||||
std::vector<wgpu::TextureFormat>({wgpu::TextureFormat::RGBA8Unorm,
|
||||
wgpu::TextureFormat::BGRA8Unorm,
|
||||
wgpu::TextureFormat::RGBA16Float}),
|
||||
std::vector<wgpu::TextureFormat>(
|
||||
{wgpu::TextureFormat::R8Unorm, wgpu::TextureFormat::R16Float, wgpu::TextureFormat::R32Float,
|
||||
wgpu::TextureFormat::RG8Unorm, wgpu::TextureFormat::RG16Float,
|
||||
wgpu::TextureFormat::RG32Float, wgpu::TextureFormat::RGBA8Unorm,
|
||||
wgpu::TextureFormat::RGBA8UnormSrgb, wgpu::TextureFormat::BGRA8Unorm,
|
||||
wgpu::TextureFormat::BGRA8UnormSrgb, wgpu::TextureFormat::RGB10A2Unorm,
|
||||
wgpu::TextureFormat::RGBA16Float, wgpu::TextureFormat::RGBA32Float}));
|
||||
DAWN_INSTANTIATE_TEST_P(CopyTextureForBrowser_Formats,
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(),
|
||||
OpenGLESBackend(), VulkanBackend()},
|
||||
std::vector<wgpu::TextureFormat>({wgpu::TextureFormat::RGBA8Unorm,
|
||||
wgpu::TextureFormat::BGRA8Unorm,
|
||||
wgpu::TextureFormat::RGBA16Float}),
|
||||
std::vector<wgpu::TextureFormat>(
|
||||
{wgpu::TextureFormat::R8Unorm, wgpu::TextureFormat::R16Float,
|
||||
wgpu::TextureFormat::R32Float, wgpu::TextureFormat::RG8Unorm,
|
||||
wgpu::TextureFormat::RG16Float, wgpu::TextureFormat::RG32Float,
|
||||
wgpu::TextureFormat::RGBA8Unorm, wgpu::TextureFormat::RGBA8UnormSrgb,
|
||||
wgpu::TextureFormat::BGRA8Unorm, wgpu::TextureFormat::BGRA8UnormSrgb,
|
||||
wgpu::TextureFormat::RGB10A2Unorm, wgpu::TextureFormat::RGBA16Float,
|
||||
wgpu::TextureFormat::RGBA32Float}));
|
||||
|
||||
// Verify |CopyTextureForBrowser| doing subrect copy.
|
||||
// Source texture is a full red texture and dst texture is a full
|
||||
|
@ -1170,8 +1172,8 @@ TEST_P(CopyTextureForBrowser_SubRects, CopySubRect) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(CopyTextureForBrowser_SubRects,
|
||||
{D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(),
|
||||
VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(),
|
||||
OpenGLESBackend(), VulkanBackend()},
|
||||
std::vector<wgpu::Origin3D>({{1, 1}, {1, 2}, {2, 1}}),
|
||||
std::vector<wgpu::Origin3D>({{1, 1}, {1, 2}, {2, 1}}),
|
||||
std::vector<wgpu::Extent3D>({{1, 1}, {2, 1}, {1, 2}, {2, 2}}),
|
||||
|
@ -1194,7 +1196,8 @@ TEST_P(CopyTextureForBrowser_AlphaMode, alphaMode) {
|
|||
|
||||
DAWN_INSTANTIATE_TEST_P(
|
||||
CopyTextureForBrowser_AlphaMode,
|
||||
{D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(),
|
||||
VulkanBackend()},
|
||||
std::vector<wgpu::AlphaMode>({wgpu::AlphaMode::Premultiplied, wgpu::AlphaMode::Unpremultiplied,
|
||||
wgpu::AlphaMode::Opaque}),
|
||||
std::vector<wgpu::AlphaMode>({wgpu::AlphaMode::Premultiplied, wgpu::AlphaMode::Unpremultiplied,
|
||||
|
@ -1213,8 +1216,8 @@ TEST_P(CopyTextureForBrowser_ColorSpace, colorSpaceConversion) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(CopyTextureForBrowser_ColorSpace,
|
||||
{D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(),
|
||||
VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(),
|
||||
OpenGLESBackend(), VulkanBackend()},
|
||||
std::vector<wgpu::TextureFormat>({wgpu::TextureFormat::RGBA16Float,
|
||||
wgpu::TextureFormat::RGBA32Float}),
|
||||
std::vector<ColorSpace>({ColorSpace::SRGB, ColorSpace::DisplayP3}),
|
||||
|
|
|
@ -955,6 +955,7 @@ TEST_P(CreatePipelineAsyncTest, CreateRenderPipelineAsyncWithBlendState) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(CreatePipelineAsyncTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -127,6 +127,7 @@ TEST_P(CullingTest, CullBackFaceWhenCWIsFrontFace) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(CullingTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -390,6 +390,7 @@ TEST_P(DepthBiasTests, PositiveSlopeBiasOn24bit) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(DepthBiasTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -1040,7 +1040,7 @@ TEST_P(DepthStencilCopyTests_RegressionDawn1083, Run) {
|
|||
|
||||
DAWN_INSTANTIATE_TEST_P(
|
||||
DepthStencilCopyTests,
|
||||
{D3D12Backend(), MetalBackend(),
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(),
|
||||
MetalBackend({"use_blit_for_depth_texture_to_texture_copy_to_nonzero_subresource"}),
|
||||
MetalBackend({"use_blit_for_buffer_to_depth_texture_copy",
|
||||
"use_blit_for_buffer_to_stencil_texture_copy"}),
|
||||
|
@ -1052,7 +1052,7 @@ DAWN_INSTANTIATE_TEST_P(
|
|||
|
||||
DAWN_INSTANTIATE_TEST_P(
|
||||
DepthCopyTests,
|
||||
{D3D12Backend(),
|
||||
{D3D11Backend(), D3D12Backend(),
|
||||
D3D12Backend({"d3d12_use_temp_buffer_in_depth_stencil_texture_and_buffer_"
|
||||
"copy_with_non_zero_buffer_offset"}),
|
||||
MetalBackend(),
|
||||
|
@ -1062,7 +1062,7 @@ DAWN_INSTANTIATE_TEST_P(
|
|||
kValidDepthCopyTextureFormats.end()));
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(DepthCopyFromBufferTests,
|
||||
{D3D12Backend(),
|
||||
{D3D11Backend(), D3D12Backend(),
|
||||
D3D12Backend({"d3d12_use_temp_buffer_in_depth_stencil_texture_and_buffer_"
|
||||
"copy_with_non_zero_buffer_offset"}),
|
||||
MetalBackend(),
|
||||
|
@ -1073,7 +1073,7 @@ DAWN_INSTANTIATE_TEST_P(DepthCopyFromBufferTests,
|
|||
|
||||
DAWN_INSTANTIATE_TEST_P(
|
||||
StencilCopyTests,
|
||||
{D3D12Backend(),
|
||||
{D3D11Backend(), D3D12Backend(),
|
||||
D3D12Backend({"d3d12_use_temp_buffer_in_depth_stencil_texture_and_buffer_"
|
||||
"copy_with_non_zero_buffer_offset"}),
|
||||
MetalBackend(), MetalBackend({"metal_use_combined_depth_stencil_format_for_stencil8"}),
|
||||
|
@ -1087,7 +1087,7 @@ DAWN_INSTANTIATE_TEST_P(
|
|||
|
||||
DAWN_INSTANTIATE_TEST_P(
|
||||
DepthStencilCopyTests_RegressionDawn1083,
|
||||
{D3D12Backend(), MetalBackend(),
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(),
|
||||
MetalBackend({"use_blit_for_depth_texture_to_texture_copy_to_nonzero_subresource"}),
|
||||
OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
|
||||
std::vector<wgpu::TextureFormat>{wgpu::TextureFormat::Depth16Unorm,
|
||||
|
|
|
@ -231,14 +231,14 @@ namespace {
|
|||
|
||||
auto GenerateParam() {
|
||||
auto params1 = MakeParamGenerator<DepthStencilLoadOpTestParams>(
|
||||
{D3D12Backend(), D3D12Backend({}, {"use_d3d12_render_pass"}), MetalBackend(),
|
||||
OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(), D3D12Backend({}, {"use_d3d12_render_pass"}),
|
||||
MetalBackend(), OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
|
||||
{wgpu::TextureFormat::Depth32Float, wgpu::TextureFormat::Depth16Unorm},
|
||||
{Check::CopyDepth, Check::DepthTest, Check::SampleDepth});
|
||||
|
||||
auto params2 = MakeParamGenerator<DepthStencilLoadOpTestParams>(
|
||||
{D3D12Backend(), D3D12Backend({}, {"use_d3d12_render_pass"}), MetalBackend(),
|
||||
MetalBackend({"metal_use_combined_depth_stencil_format_for_stencil8"}),
|
||||
{D3D11Backend(), D3D12Backend(), D3D12Backend({}, {"use_d3d12_render_pass"}),
|
||||
MetalBackend(), MetalBackend({"metal_use_combined_depth_stencil_format_for_stencil8"}),
|
||||
MetalBackend(
|
||||
{"metal_use_both_depth_and_stencil_attachments_for_combined_depth_stencil_formats"}),
|
||||
OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
|
||||
|
@ -294,8 +294,9 @@ TEST_P(StencilClearValueOverflowTest, StencilClearValueOverFlowUint16) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(StencilClearValueOverflowTest,
|
||||
{D3D12Backend(), D3D12Backend({}, {"use_d3d12_render_pass"}),
|
||||
MetalBackend(), OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(),
|
||||
D3D12Backend({}, {"use_d3d12_render_pass"}), MetalBackend(),
|
||||
OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
|
||||
{wgpu::TextureFormat::Depth24PlusStencil8,
|
||||
wgpu::TextureFormat::Depth32FloatStencil8, wgpu::TextureFormat::Stencil8},
|
||||
{Check::CopyStencil, Check::StencilTest});
|
||||
|
@ -412,8 +413,8 @@ TEST_P(DepthTextureClearTwiceTest, ClearDepthAspectTwice) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(DepthTextureClearTwiceTest,
|
||||
{D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(),
|
||||
VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(),
|
||||
OpenGLESBackend(), VulkanBackend()},
|
||||
{wgpu::TextureFormat::Depth16Unorm, wgpu::TextureFormat::Depth24Plus,
|
||||
wgpu::TextureFormat::Depth32Float,
|
||||
wgpu::TextureFormat::Depth32FloatStencil8,
|
||||
|
|
|
@ -921,19 +921,19 @@ TEST_P(StencilSamplingTest, SampleStencilOnly) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(DepthStencilSamplingTest,
|
||||
{D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(),
|
||||
VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(),
|
||||
OpenGLESBackend(), VulkanBackend()},
|
||||
std::vector<wgpu::TextureFormat>(utils::kDepthAndStencilFormats.begin(),
|
||||
utils::kDepthAndStencilFormats.end()));
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(DepthSamplingTest,
|
||||
{D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(),
|
||||
VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(),
|
||||
OpenGLESBackend(), VulkanBackend()},
|
||||
std::vector<wgpu::TextureFormat>(utils::kDepthFormats.begin(),
|
||||
utils::kDepthFormats.end()));
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(StencilSamplingTest,
|
||||
{D3D12Backend(), MetalBackend(),
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(),
|
||||
MetalBackend({"metal_use_combined_depth_stencil_format_for_stencil8"}),
|
||||
OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
|
||||
std::vector<wgpu::TextureFormat>(utils::kStencilFormats.begin(),
|
||||
|
|
|
@ -840,6 +840,7 @@ TEST_P(DepthStencilStateTest, StencilReferenceInitialized) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(DepthStencilStateTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -213,6 +213,7 @@ TEST_P(DestroyTest, GetQueueAfterDeviceDestroy) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(DestroyTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -509,6 +509,7 @@ TEST_P(DeviceLifetimeTests, DropDevice2InProcessEvents) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(DeviceLifetimeTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
NullBackend(),
|
||||
|
|
|
@ -537,6 +537,7 @@ TEST_P(DeviceLostTest, SetLabelAfterDeviceLoss) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(DeviceLostTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
NullBackend(),
|
||||
|
|
|
@ -710,6 +710,7 @@ TEST_P(DrawIndexedIndirectTest, ValidateReusedBundleWithChangingParams) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(DrawIndexedIndirectTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -156,6 +156,7 @@ TEST_P(DrawIndexedTest, BaseVertex) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(DrawIndexedTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -129,6 +129,7 @@ TEST_P(DrawIndirectTest, IndirectOffset) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(DrawIndirectTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -101,6 +101,7 @@ TEST_P(DrawTest, Uint32) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(DrawTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -573,6 +573,7 @@ TEST_P(ClampedOOBDynamicBufferOffsetTests, CheckOOBAccess) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(DynamicBufferOffsetTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -143,6 +143,7 @@ TEST_P(EntryPointTests, TwoComputeInModule) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(EntryPointTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -322,6 +322,7 @@ TEST_P(FirstIndexOffsetTests, IndexedIndirectBothOffset) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(FirstIndexOffsetTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -224,6 +224,7 @@ TEST_P(FragDepthTests, RasterizationClipBeforeFS) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(FragDepthTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -214,6 +214,7 @@ TEST_P(GpuMemorySyncTests, ComputePassToRenderPass) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(GpuMemorySyncTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -385,6 +386,7 @@ TEST_P(StorageToUniformSyncTests, ReadAfterWriteWithDifferentQueueSubmits) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(StorageToUniformSyncTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -646,6 +648,7 @@ TEST_P(MultipleWriteThenMultipleReadTests, OneBuffer) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(MultipleWriteThenMultipleReadTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -473,18 +473,21 @@ TEST_P(LineStripPrimitiveRestartTests, Uint16PrimitiveRestart) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(IndexFormatTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
OpenGLESBackend(),
|
||||
VulkanBackend());
|
||||
DAWN_INSTANTIATE_TEST(TriangleStripPrimitiveRestartTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
OpenGLESBackend(),
|
||||
VulkanBackend());
|
||||
DAWN_INSTANTIATE_TEST(LineStripPrimitiveRestartTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -728,6 +728,7 @@ TEST_P(MaxLimitTests, MaxFragmentCombinedOutputResources) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(MaxLimitTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -38,6 +38,7 @@ TEST_P(MemoryAllocationStressTests, LargeBuffer) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(MemoryAllocationStressTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -1130,6 +1130,7 @@ TEST_P(MultisampledRenderingTest, ResolveInto2DTextureWithAlphaToCoverageAndRast
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(MultisampledRenderingTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
D3D12Backend({}, {"use_d3d12_resource_heap_tier2"}),
|
||||
D3D12Backend({}, {"use_d3d12_render_pass"}),
|
||||
|
|
|
@ -259,6 +259,7 @@ TEST_P(MultisampledSamplingTest, SamplePositions) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(MultisampledSamplingTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -445,6 +445,7 @@ TEST_P(ObjectCachingTest, SamplerDeduplication) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(ObjectCachingTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -275,6 +275,7 @@ TEST_P(OpArrayLengthTest, Vertex) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(OpArrayLengthTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -639,6 +639,7 @@ TEST_P(SinglePipelineCachingTests, RenderPipelineBlobCacheIsolationKey) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(SinglePipelineCachingTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
D3D12Backend({"use_dxc"}),
|
||||
MetalBackend(),
|
||||
|
|
|
@ -144,6 +144,7 @@ TEST_P(PipelineLayoutTests, ComputeAndRenderSamePipelineLayout) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(PipelineLayoutTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -357,6 +357,7 @@ TEST_P(DepthClippingTest, UnclippedNotClamped) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(DepthClippingTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -298,6 +298,7 @@ TEST_P(PrimitiveTopologyTest, TriangleStrip) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(PrimitiveTopologyTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -1284,23 +1284,27 @@ TEST_P(TimestampQueryInsidePassesTests, FromComputePass) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(OcclusionQueryTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
MetalBackend({"metal_fill_empty_occlusion_queries_with_zero"}),
|
||||
VulkanBackend());
|
||||
DAWN_INSTANTIATE_TEST(PipelineStatisticsQueryTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
OpenGLESBackend(),
|
||||
VulkanBackend());
|
||||
DAWN_INSTANTIATE_TEST(TimestampQueryTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
OpenGLESBackend(),
|
||||
VulkanBackend());
|
||||
DAWN_INSTANTIATE_TEST(TimestampQueryInsidePassesTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -30,6 +30,7 @@ TEST_P(QueueTests, GetQueueSameObject) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(QueueTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
NullBackend(),
|
||||
|
@ -187,6 +188,7 @@ TEST_P(QueueWriteBufferTests, UnalignedDynamicUploader) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(QueueWriteBufferTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -771,6 +773,7 @@ TEST_P(QueueWriteTextureTests, WriteStencilAspectAfterOtherQueueWriteTextureCall
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(QueueWriteTextureTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
D3D12Backend({"d3d12_use_temp_buffer_in_depth_stencil_texture_and_buffer_"
|
||||
"copy_with_non_zero_buffer_offset"}),
|
||||
|
|
|
@ -96,6 +96,7 @@ TEST_P(QueueTimelineTests, OnWorkDone_MapRead) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(QueueTimelineTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -344,12 +344,14 @@ TEST_P(ReadOnlyStencilAttachmentTests, NotSampleFromAttachment) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(ReadOnlyDepthAttachmentTests,
|
||||
{D3D12Backend(), D3D12Backend({}, {"use_d3d12_render_pass"}),
|
||||
MetalBackend(), VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(),
|
||||
D3D12Backend({}, {"use_d3d12_render_pass"}), MetalBackend(),
|
||||
VulkanBackend()},
|
||||
std::vector<wgpu::TextureFormat>(utils::kDepthFormats.begin(),
|
||||
utils::kDepthFormats.end()));
|
||||
DAWN_INSTANTIATE_TEST_P(ReadOnlyStencilAttachmentTests,
|
||||
{D3D12Backend(), D3D12Backend({}, {"use_d3d12_render_pass"}),
|
||||
MetalBackend(), VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(),
|
||||
D3D12Backend({}, {"use_d3d12_render_pass"}), MetalBackend(),
|
||||
VulkanBackend()},
|
||||
std::vector<wgpu::TextureFormat>(utils::kStencilFormats.begin(),
|
||||
utils::kStencilFormats.end()));
|
||||
|
|
|
@ -76,6 +76,7 @@ TEST_P(RenderAttachmentTest, MoreFragmentOutputsThanAttachments) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(RenderAttachmentTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
D3D12Backend({}, {"use_d3d12_render_pass"}),
|
||||
MetalBackend(),
|
||||
|
|
|
@ -194,6 +194,7 @@ TEST_P(RenderBundleTest, BundleAndRenderPassCommands) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(RenderBundleTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -714,6 +714,7 @@ TEST_P(RenderPassLoadOpTests, MixedUseOfLoadOpLoadAndLoadOpClearWithBigIntegerVa
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(RenderPassLoadOpTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -166,6 +166,7 @@ TEST_P(RenderPassTest, NoCorrespondingFragmentShaderOutputs) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(RenderPassTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
D3D12Backend({}, {"use_d3d12_render_pass"}),
|
||||
MetalBackend(),
|
||||
|
@ -225,6 +226,7 @@ TEST_P(RenderPassTest_RegressionDawn1071, ClearLowestMipOfR8Unorm) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(RenderPassTest_RegressionDawn1071,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
MetalBackend({"metal_render_r8_rg8_unorm_small_mip_to_temp_texture"}),
|
||||
|
@ -359,6 +361,7 @@ TEST_P(RenderPassTest_RegressionDawn1389, ClearMultisubresourceAfterWriteDepth16
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(RenderPassTest_RegressionDawn1389,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
MetalBackend({"use_blit_for_buffer_to_depth_texture_copy"}),
|
||||
|
|
|
@ -199,8 +199,9 @@ TEST_P(RequiredBufferSizeInCopyTests, MinimumBufferSize) {
|
|||
|
||||
DAWN_INSTANTIATE_TEST_P(
|
||||
RequiredBufferSizeInCopyTests,
|
||||
{D3D12Backend(), D3D12Backend({"d3d12_split_buffer_texture_copy_for_rows_per_image_paddings"}),
|
||||
MetalBackend(), OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(),
|
||||
D3D12Backend({"d3d12_split_buffer_texture_copy_for_rows_per_image_paddings"}), MetalBackend(),
|
||||
OpenGLBackend(), OpenGLESBackend(), VulkanBackend()},
|
||||
{Type::T2BCopy, Type::B2TCopy},
|
||||
{wgpu::TextureDimension::e3D, wgpu::TextureDimension::e2D},
|
||||
{2u, 1u},
|
||||
|
|
|
@ -288,6 +288,7 @@ TEST_P(SamplerFilterAnisotropicTest, SlantedPlaneMipmap) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(SamplerFilterAnisotropicTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -205,6 +205,7 @@ TEST_P(SamplerTest, PassThroughUserFunctionParameters) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(SamplerTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -152,6 +152,7 @@ TEST_P(ScissorTest, NoInheritanceBetweenRenderPass) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(ScissorTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -443,6 +443,7 @@ fn FSMain(@location(0) color : vec4f) -> @location(0) vec4f {
|
|||
// DawnTestBase::CreateDeviceImpl always disable disallow_unsafe_apis toggle.
|
||||
DAWN_INSTANTIATE_TEST_P(ShaderF16Tests,
|
||||
{
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
D3D12Backend({"use_dxc"}),
|
||||
VulkanBackend(),
|
||||
|
|
|
@ -1424,6 +1424,7 @@ fn main(@location(0) value : f32) -> @location(0) vec4f {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(ShaderTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
D3D12Backend({"use_dxc"}),
|
||||
MetalBackend(),
|
||||
|
|
|
@ -375,6 +375,7 @@ TEST_P(WorkgroupSizeValidationTest, ValidationAfterOverrideStorageSize) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(WorkgroupSizeValidationTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
NullBackend(),
|
||||
|
|
|
@ -867,6 +867,7 @@ TEST_P(StorageTextureTests, SampledAndWriteonlyStorageTexturePingPong) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(StorageTextureTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -931,6 +932,7 @@ TEST_P(BGRA8UnormStorageTextureTests, WriteonlyStorageTextureInFragmentShader) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(BGRA8UnormStorageTextureTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -172,6 +172,7 @@ TEST_P(SubresourceRenderAttachmentTest, StencilTexture) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(SubresourceRenderAttachmentTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
D3D12Backend({}, {"use_d3d12_render_pass"}),
|
||||
MetalBackend(),
|
||||
|
|
|
@ -118,6 +118,7 @@ TEST_P(Texture3DTests, Sampling) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(Texture3DTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -897,6 +897,7 @@ TEST_P(TextureFormatTest, RGB9E5Ufloat) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(TextureFormatTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -189,6 +189,7 @@ TEST_P(TextureSubresourceTest, ArrayLayersTest) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(TextureSubresourceTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -977,6 +977,7 @@ TEST_P(TextureViewRenderingTest, SRGBReinterpretionResolveAttachment) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(TextureViewSamplingTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -984,6 +985,7 @@ DAWN_INSTANTIATE_TEST(TextureViewSamplingTest,
|
|||
VulkanBackend());
|
||||
|
||||
DAWN_INSTANTIATE_TEST(TextureViewRenderingTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
D3D12Backend({}, {"use_d3d12_render_pass"}),
|
||||
MetalBackend(),
|
||||
|
@ -1024,6 +1026,7 @@ TEST_P(TextureViewTest, DestroyedTexture) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(TextureViewTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -1040,6 +1043,7 @@ TEST_P(TextureView3DTest, BasicTest) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(TextureView3DTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -1114,6 +1118,7 @@ TEST_P(TextureView1DTest, Sampling) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(TextureView1DTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
VulkanBackend(),
|
||||
|
|
|
@ -829,6 +829,7 @@ TEST_P(VertexFormatTest, Sint32x4) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(VertexFormatTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -307,6 +307,8 @@ TEST_P(VertexOnlyRenderPipelineTest, MultiplePass) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(VertexOnlyRenderPipelineTest,
|
||||
D3D11Backend(),
|
||||
D3D11Backend({"use_placeholder_fragment_in_vertex_only_pipeline"}),
|
||||
D3D12Backend(),
|
||||
D3D12Backend({"use_placeholder_fragment_in_vertex_only_pipeline"}),
|
||||
MetalBackend(),
|
||||
|
|
|
@ -645,6 +645,7 @@ TEST_P(VertexStateTest, OverlappingVertexAttributes) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(VertexStateTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
@ -691,6 +692,7 @@ TEST_P(OptionalVertexStateTest, Basic) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(OptionalVertexStateTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -59,6 +59,7 @@ TEST_P(ViewportOrientationTests, OriginAt0x0) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(ViewportOrientationTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -220,6 +220,7 @@ TEST_P(ViewportTest, EmptyViewport) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(ViewportTest,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -147,7 +147,8 @@ TEST_P(BufferUploadPerf, Run) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(BufferUploadPerf,
|
||||
{D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(),
|
||||
VulkanBackend()},
|
||||
{UploadMethod::WriteBuffer, UploadMethod::MappedAtCreation},
|
||||
{UploadSize::BufferSize_1KB, UploadSize::BufferSize_64KB,
|
||||
UploadSize::BufferSize_1MB, UploadSize::BufferSize_4MB,
|
||||
|
|
|
@ -597,7 +597,7 @@ TEST_P(DrawCallPerf, Run) {
|
|||
|
||||
DAWN_INSTANTIATE_TEST_P(
|
||||
DrawCallPerf,
|
||||
{D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend(),
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend(),
|
||||
VulkanBackend({"skip_validation"})},
|
||||
{
|
||||
// Baseline
|
||||
|
|
|
@ -497,7 +497,8 @@ TEST_P(ShaderRobustnessPerf, Run) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(ShaderRobustnessPerf,
|
||||
{D3D12Backend(), D3D12Backend({"disable_robustness"}, {}), MetalBackend(),
|
||||
{D3D11Backend(), D3D11Backend({"disable_robustness"}, {}), D3D12Backend(),
|
||||
D3D12Backend({"disable_robustness"}, {}), MetalBackend(),
|
||||
MetalBackend({"disable_robustness"}, {}), OpenGLBackend(),
|
||||
OpenGLBackend({"disable_robustness"}, {}), VulkanBackend(),
|
||||
VulkanBackend({"disable_robustness"}, {})},
|
||||
|
|
|
@ -144,6 +144,7 @@ TEST_P(SubresourceTrackingPerf, Run) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST_P(SubresourceTrackingPerf,
|
||||
{D3D12Backend(), MetalBackend(), OpenGLBackend(), VulkanBackend()},
|
||||
{D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(),
|
||||
VulkanBackend()},
|
||||
{1, 4, 16, 256},
|
||||
{2, 3, 8});
|
||||
|
|
|
@ -36,12 +36,17 @@ class BufferAllocatedSizeTests : public DawnTest {
|
|||
|
||||
// Test expected allocated size for buffers with uniform usage
|
||||
TEST_P(BufferAllocatedSizeTests, UniformUsage) {
|
||||
// D3D11 backend doesn't support buffer with both uniform and storage usage.
|
||||
DAWN_SUPPRESS_TEST_IF(IsD3D11());
|
||||
|
||||
// Some backends have a minimum buffer size, so make sure
|
||||
// we allocate above that.
|
||||
constexpr uint32_t kMinBufferSize = 4u;
|
||||
|
||||
uint32_t requiredBufferAlignment = 1u;
|
||||
if (IsD3D12()) {
|
||||
if (IsD3D11()) {
|
||||
requiredBufferAlignment = 256u;
|
||||
} else if (IsD3D12()) {
|
||||
requiredBufferAlignment = 256u;
|
||||
} else if (IsMetal()) {
|
||||
requiredBufferAlignment = 16u;
|
||||
|
@ -78,6 +83,7 @@ TEST_P(BufferAllocatedSizeTests, UniformUsage) {
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(BufferAllocatedSizeTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
OpenGLBackend(),
|
||||
|
|
|
@ -108,6 +108,7 @@ TEST_P(InternalStorageBufferBindingTests, QueryResolveBufferBoundAsInternalStora
|
|||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(InternalStorageBufferBindingTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
VulkanBackend());
|
||||
|
|
|
@ -224,4 +224,8 @@ TEST_P(QueryInternalShaderTests, TimestampComputeShader) {
|
|||
}
|
||||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(QueryInternalShaderTests, D3D12Backend(), MetalBackend(), VulkanBackend());
|
||||
DAWN_INSTANTIATE_TEST(QueryInternalShaderTests,
|
||||
D3D11Backend(),
|
||||
D3D12Backend(),
|
||||
MetalBackend(),
|
||||
VulkanBackend());
|
||||
|
|
Loading…
Reference in New Issue