Conor McCarthy : vkd3d/tests: Add tests for GetCopyableFootprints() depth/stencil planes.
Alexandre Julliard
julliard at winehq.org
Thu Jan 13 16:15:24 CST 2022
Module: vkd3d
Branch: master
Commit: c6e46f84df974b5103e6771901083211d2419970
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=c6e46f84df974b5103e6771901083211d2419970
Author: Conor McCarthy <cmccarthy at codeweavers.com>
Date: Tue Jan 11 00:01:33 2022 +1000
vkd3d/tests: Add tests for GetCopyableFootprints() depth/stencil planes.
Signed-off-by: Conor McCarthy <cmccarthy at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
tests/d3d12.c | 19 +++++++++++++++++++
tests/d3d12_test_utils.h | 1 +
2 files changed, 20 insertions(+)
diff --git a/tests/d3d12.c b/tests/d3d12.c
index c1956fa..13748f1 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -19454,6 +19454,8 @@ static void test_get_copyable_footprints(void)
{DXGI_FORMAT_BC6H_UF16, true},
{DXGI_FORMAT_BC6H_SF16, true},
{DXGI_FORMAT_BC7_UNORM, true},
+ {DXGI_FORMAT_D32_FLOAT, false},
+ {DXGI_FORMAT_D24_UNORM_S8_UINT, false},
};
static const uint64_t base_offsets[] =
{
@@ -19499,6 +19501,14 @@ static void test_get_copyable_footprints(void)
{D3D12_RESOURCE_DIMENSION_TEXTURE3D, 3, 2, 2, 2, 2, DXGI_FORMAT_BC1_UNORM,
{1, 0}, D3D12_TEXTURE_LAYOUT_UNKNOWN, D3D12_RESOURCE_FLAG_NONE}, 0, 1,
},
+ {
+ {D3D12_RESOURCE_DIMENSION_TEXTURE2D, 0, 4, 4, 1, 1, DXGI_FORMAT_D32_FLOAT,
+ {1, 0}, D3D12_TEXTURE_LAYOUT_UNKNOWN, D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL}, 0, 2,
+ },
+ {
+ {D3D12_RESOURCE_DIMENSION_TEXTURE2D, 0, 4, 4, 1, 1, DXGI_FORMAT_D24_UNORM_S8_UINT,
+ {1, 0}, D3D12_TEXTURE_LAYOUT_UNKNOWN, D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL}, 0, 3,
+ },
};
if (!(device = create_device()))
@@ -19538,6 +19548,15 @@ static void test_get_copyable_footprints(void)
sub_resource_count = resource_desc.MipLevels;
if (resources[i].dimension != D3D12_RESOURCE_DIMENSION_TEXTURE3D)
sub_resource_count *= resource_desc.DepthOrArraySize;
+ if (resource_desc.Format == DXGI_FORMAT_D24_UNORM_S8_UINT)
+ {
+ if (!vkd3d_test_platform_is_windows())
+ {
+ skip("Depth/stencil planes are not supported.\n");
+ continue;
+ }
+ sub_resource_count *= 2;
+ }
assert(sub_resource_count <= ARRAY_SIZE(layouts));
for (k = 0; k < ARRAY_SIZE(base_offsets); ++k)
diff --git a/tests/d3d12_test_utils.h b/tests/d3d12_test_utils.h
index f2ce922..46dcd87 100644
--- a/tests/d3d12_test_utils.h
+++ b/tests/d3d12_test_utils.h
@@ -345,6 +345,7 @@ static unsigned int format_size(DXGI_FORMAT format)
case DXGI_FORMAT_R8G8B8A8_UNORM_SRGB:
case DXGI_FORMAT_R8G8B8A8_UINT:
case DXGI_FORMAT_B8G8R8A8_UNORM:
+ case DXGI_FORMAT_D24_UNORM_S8_UINT:
return 4;
case DXGI_FORMAT_R16_FLOAT:
case DXGI_FORMAT_R16_UNORM:
More information about the wine-cvs
mailing list