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>
This commit is contained in:
jchen10 2023-05-09 02:27:41 +00:00 committed by Dawn LUCI CQ
parent f083783f7e
commit 46014f69a0
2 changed files with 21 additions and 4 deletions

View File

@ -278,6 +278,7 @@ MaybeError Texture::Clear(CommandRecordingContext* commandContext,
bool isRenderable = GetInternalUsage() & wgpu::TextureUsage::RenderAttachment; bool isRenderable = GetInternalUsage() & wgpu::TextureUsage::RenderAttachment;
if (!isRenderable) { if (!isRenderable) {
// TODO(dawn:1802): Support clearing non-renderable textures.
return DAWN_UNIMPLEMENTED_ERROR("Clearing non-renderable textures"); return DAWN_UNIMPLEMENTED_ERROR("Clearing non-renderable textures");
} }

View File

@ -688,6 +688,9 @@ TEST_P(CompressedTextureFormatTest, CopyIntoSubRegion) {
DAWN_TEST_UNSUPPORTED_IF(!IsFormatSupported()); DAWN_TEST_UNSUPPORTED_IF(!IsFormatSupported());
// TODO(dawn:1802): Clear BC formats.
DAWN_SUPPRESS_TEST_IF(IsD3D11() && utils::IsBCTextureFormat(GetParam().mTextureFormat));
CopyConfig config = GetDefaultSmallConfig(); CopyConfig config = GetDefaultSmallConfig();
config.copyOrigin3D = {BlockWidthInTexels(), BlockHeightInTexels(), 0}; config.copyOrigin3D = {BlockWidthInTexels(), BlockHeightInTexels(), 0};
config.copyExtent3D = {BlockWidthInTexels(), BlockHeightInTexels(), 1}; config.copyExtent3D = {BlockWidthInTexels(), BlockHeightInTexels(), 1};
@ -1121,8 +1124,8 @@ TEST_P(CompressedTextureFormatTest, CopyMultiple2DArrayLayers) {
} }
DAWN_INSTANTIATE_TEST_P(CompressedTextureFormatTest, DAWN_INSTANTIATE_TEST_P(CompressedTextureFormatTest,
{D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(), {D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(),
VulkanBackend(), OpenGLESBackend(), VulkanBackend(),
VulkanBackend({"use_temporary_buffer_in_texture_to_texture_copy"})}, VulkanBackend({"use_temporary_buffer_in_texture_to_texture_copy"})},
std::vector<wgpu::TextureFormat>(utils::kCompressedFormats.begin(), std::vector<wgpu::TextureFormat>(utils::kCompressedFormats.begin(),
utils::kCompressedFormats.end())); utils::kCompressedFormats.end()));
@ -1153,6 +1156,9 @@ TEST_P(CompressedTextureFormatSpecificTest, BC1RGBAUnorm_UnalignedDynamicUploade
DAWN_TEST_UNSUPPORTED_IF(IsOpenGLES()); DAWN_TEST_UNSUPPORTED_IF(IsOpenGLES());
DAWN_TEST_UNSUPPORTED_IF(!IsBCFormatSupported()); DAWN_TEST_UNSUPPORTED_IF(!IsBCFormatSupported());
// TODO(dawn:1802): Clear BC formats.
DAWN_SUPPRESS_TEST_IF(IsD3D11());
utils::UnalignDynamicUploader(device); utils::UnalignDynamicUploader(device);
wgpu::TextureDescriptor textureDescriptor = {}; wgpu::TextureDescriptor textureDescriptor = {};
@ -1177,6 +1183,7 @@ TEST_P(CompressedTextureFormatSpecificTest, BC1RGBAUnorm_UnalignedDynamicUploade
} }
DAWN_INSTANTIATE_TEST(CompressedTextureFormatSpecificTest, DAWN_INSTANTIATE_TEST(CompressedTextureFormatSpecificTest,
D3D11Backend(),
D3D12Backend(), D3D12Backend(),
MetalBackend(), MetalBackend(),
OpenGLBackend(), OpenGLBackend(),
@ -1225,6 +1232,9 @@ TEST_P(CompressedTextureWriteTextureTest, Basic) {
// TODO(crbug.com/dawn/976): Failing on Linux Intel OpenGL drivers. // TODO(crbug.com/dawn/976): Failing on Linux Intel OpenGL drivers.
DAWN_SUPPRESS_TEST_IF(IsIntel() && IsOpenGL() && IsLinux()); 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 kSizeWidthMultiplier = 5;
constexpr uint32_t kSizeHeightMultiplier = 6; constexpr uint32_t kSizeHeightMultiplier = 6;
constexpr uint32_t kOriginWidthMultiplier = 1; 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. // TODO(crbug.com/dawn/1328): ES3.1 does not support subsetting of compressed textures.
DAWN_TEST_UNSUPPORTED_IF(IsOpenGLES()); 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. // TODO(b/198674734): Width multiplier set to 7 because 5 results in square size for ASTC6x5.
constexpr uint32_t kSizeWidthMultiplier = 7; constexpr uint32_t kSizeWidthMultiplier = 7;
constexpr uint32_t kSizeHeightMultiplier = 6; 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. // TODO(crbug.com/dawn/1328): ES3.1 does not support subsetting of compressed textures.
DAWN_TEST_UNSUPPORTED_IF(IsOpenGLES()); DAWN_TEST_UNSUPPORTED_IF(IsOpenGLES());
// TODO(dawn:1802): Clear BC formats.
DAWN_SUPPRESS_TEST_IF(IsD3D11() && utils::IsBCTextureFormat(GetParam().mTextureFormat));
CopyConfig config = GetDefaultFullConfig(); CopyConfig config = GetDefaultFullConfig();
// The virtual size of the texture at mipmap level == 2 is not a multiple of the texel // 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, DAWN_INSTANTIATE_TEST_P(CompressedTextureWriteTextureTest,
{D3D12Backend(), MetalBackend(), OpenGLBackend(), OpenGLESBackend(), {D3D11Backend(), D3D12Backend(), MetalBackend(), OpenGLBackend(),
VulkanBackend()}, OpenGLESBackend(), VulkanBackend()},
std::vector<wgpu::TextureFormat>(utils::kCompressedFormats.begin(), std::vector<wgpu::TextureFormat>(utils::kCompressedFormats.begin(),
utils::kCompressedFormats.end())); utils::kCompressedFormats.end()));