d3d11: enable CompressedTextureFormatTests

Bug: dawn:1801
Bug: dawn:1705

Change-Id: I4b63d865ceb3a20a16917030b608309452aeb045
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131844
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
diff --git a/src/dawn/native/d3d11/TextureD3D11.cpp b/src/dawn/native/d3d11/TextureD3D11.cpp
index d7f84e4..2850ac0 100644
--- a/src/dawn/native/d3d11/TextureD3D11.cpp
+++ b/src/dawn/native/d3d11/TextureD3D11.cpp
@@ -278,6 +278,7 @@
     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 e0650c4..17b8bca 100644
--- a/src/dawn/tests/end2end/CompressedTextureFormatTests.cpp
+++ b/src/dawn/tests/end2end/CompressedTextureFormatTests.cpp
@@ -688,6 +688,9 @@
 
     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 @@
 }
 
 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()));
@@ -1153,6 +1156,9 @@
     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 @@
 }
 
 DAWN_INSTANTIATE_TEST(CompressedTextureFormatSpecificTest,
+                      D3D11Backend(),
                       D3D12Backend(),
                       MetalBackend(),
                       OpenGLBackend(),
@@ -1225,6 +1232,9 @@
     // 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 @@
     // 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 @@
     // 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 @@
 }
 
 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()));