From 46014f69a0c02571ed385d56fa7b99c3729aaf5e Mon Sep 17 00:00:00 2001 From: jchen10 Date: Tue, 9 May 2023 02:27:41 +0000 Subject: [PATCH] d3d11: enable CompressedTextureFormatTests Bug: dawn:1801 Bug: dawn:1705 Change-Id: I4b63d865ceb3a20a16917030b608309452aeb045 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131844 Kokoro: Kokoro Reviewed-by: Austin Eng Commit-Queue: Jie A Chen --- src/dawn/native/d3d11/TextureD3D11.cpp | 1 + .../end2end/CompressedTextureFormatTests.cpp | 24 +++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/dawn/native/d3d11/TextureD3D11.cpp b/src/dawn/native/d3d11/TextureD3D11.cpp index d7f84e41a6..2850ac08f1 100644 --- a/src/dawn/native/d3d11/TextureD3D11.cpp +++ b/src/dawn/native/d3d11/TextureD3D11.cpp @@ -278,6 +278,7 @@ MaybeError Texture::Clear(CommandRecordingContext* commandContext, bool isRenderable = GetInternalUsage() & wgpu::TextureUsage::RenderAttachment; if (!isRenderable) { + // TODO(dawn:1802): Support clearing non-renderable textures. return DAWN_UNIMPLEMENTED_ERROR("Clearing non-renderable textures"); } diff --git a/src/dawn/tests/end2end/CompressedTextureFormatTests.cpp b/src/dawn/tests/end2end/CompressedTextureFormatTests.cpp index e0650c4f3e..17b8bca721 100644 --- a/src/dawn/tests/end2end/CompressedTextureFormatTests.cpp +++ b/src/dawn/tests/end2end/CompressedTextureFormatTests.cpp @@ -688,6 +688,9 @@ TEST_P(CompressedTextureFormatTest, CopyIntoSubRegion) { DAWN_TEST_UNSUPPORTED_IF(!IsFormatSupported()); + // TODO(dawn:1802): Clear BC formats. + DAWN_SUPPRESS_TEST_IF(IsD3D11() && utils::IsBCTextureFormat(GetParam().mTextureFormat)); + CopyConfig config = GetDefaultSmallConfig(); config.copyOrigin3D = {BlockWidthInTexels(), BlockHeightInTexels(), 0}; config.copyExtent3D = {BlockWidthInTexels(), BlockHeightInTexels(), 1}; @@ -1121,8 +1124,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(utils::kCompressedFormats.begin(), utils::kCompressedFormats.end())); @@ -1153,6 +1156,9 @@ TEST_P(CompressedTextureFormatSpecificTest, BC1RGBAUnorm_UnalignedDynamicUploade DAWN_TEST_UNSUPPORTED_IF(IsOpenGLES()); DAWN_TEST_UNSUPPORTED_IF(!IsBCFormatSupported()); + // TODO(dawn:1802): Clear BC formats. + DAWN_SUPPRESS_TEST_IF(IsD3D11()); + utils::UnalignDynamicUploader(device); wgpu::TextureDescriptor textureDescriptor = {}; @@ -1177,6 +1183,7 @@ TEST_P(CompressedTextureFormatSpecificTest, BC1RGBAUnorm_UnalignedDynamicUploade } DAWN_INSTANTIATE_TEST(CompressedTextureFormatSpecificTest, + D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(), @@ -1225,6 +1232,9 @@ TEST_P(CompressedTextureWriteTextureTest, Basic) { // TODO(crbug.com/dawn/976): Failing on Linux Intel OpenGL drivers. DAWN_SUPPRESS_TEST_IF(IsIntel() && IsOpenGL() && IsLinux()); + // TODO(dawn:1802): Clear BC formats. + DAWN_SUPPRESS_TEST_IF(IsD3D11() && utils::IsBCTextureFormat(GetParam().mTextureFormat)); + constexpr uint32_t kSizeWidthMultiplier = 5; constexpr uint32_t kSizeHeightMultiplier = 6; constexpr uint32_t kOriginWidthMultiplier = 1; @@ -1255,6 +1265,9 @@ TEST_P(CompressedTextureWriteTextureTest, WriteMultiple2DArrayLayers) { // TODO(crbug.com/dawn/1328): ES3.1 does not support subsetting of compressed textures. DAWN_TEST_UNSUPPORTED_IF(IsOpenGLES()); + // TODO(dawn:1802): Clear BC formats. + DAWN_SUPPRESS_TEST_IF(IsD3D11() && utils::IsBCTextureFormat(GetParam().mTextureFormat)); + // TODO(b/198674734): Width multiplier set to 7 because 5 results in square size for ASTC6x5. constexpr uint32_t kSizeWidthMultiplier = 7; constexpr uint32_t kSizeHeightMultiplier = 6; @@ -1288,6 +1301,9 @@ TEST_P(CompressedTextureWriteTextureTest, // TODO(crbug.com/dawn/1328): ES3.1 does not support subsetting of compressed textures. DAWN_TEST_UNSUPPORTED_IF(IsOpenGLES()); + // TODO(dawn:1802): Clear BC formats. + DAWN_SUPPRESS_TEST_IF(IsD3D11() && utils::IsBCTextureFormat(GetParam().mTextureFormat)); + CopyConfig config = GetDefaultFullConfig(); // The virtual size of the texture at mipmap level == 2 is not a multiple of the texel @@ -1304,7 +1320,7 @@ TEST_P(CompressedTextureWriteTextureTest, } DAWN_INSTANTIATE_TEST_P(CompressedTextureWriteTextureTest, - {D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(), - VulkanBackend()}, + {D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(), + OpenGLESBackend(), VulkanBackend()}, std::vector(utils::kCompressedFormats.begin(), utils::kCompressedFormats.end()));