tests/d3d12: Test format D32_FLOAT_S8X24_UINT in test_get_copyable_footprints().

This commit is contained in:
Conor McCarthy 2024-04-22 16:32:21 +10:00 committed by Alexandre Julliard
parent f6db3330c8
commit 0daba96025
Notes: Alexandre Julliard 2024-05-22 23:00:11 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/815
2 changed files with 3 additions and 1 deletions

View File

@ -20248,6 +20248,7 @@ static void test_get_copyable_footprints(void)
{DXGI_FORMAT_BC7_UNORM, true}, {DXGI_FORMAT_BC7_UNORM, true},
{DXGI_FORMAT_D32_FLOAT, false, true}, {DXGI_FORMAT_D32_FLOAT, false, true},
{DXGI_FORMAT_D24_UNORM_S8_UINT, false, true}, {DXGI_FORMAT_D24_UNORM_S8_UINT, false, true},
{DXGI_FORMAT_D32_FLOAT_S8X24_UINT, false, true},
}; };
static const uint64_t base_offsets[] = static const uint64_t base_offsets[] =
{ {
@ -20349,7 +20350,7 @@ static void test_get_copyable_footprints(void)
sub_resource_count = resource_desc.MipLevels; sub_resource_count = resource_desc.MipLevels;
if (resources[i].dimension != D3D12_RESOURCE_DIMENSION_TEXTURE3D) if (resources[i].dimension != D3D12_RESOURCE_DIMENSION_TEXTURE3D)
sub_resource_count *= resource_desc.DepthOrArraySize; sub_resource_count *= resource_desc.DepthOrArraySize;
if (resource_desc.Format == DXGI_FORMAT_D24_UNORM_S8_UINT) if (format_plane_count(resource_desc.Format) > 1)
{ {
/* FIXME: we require D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL here for DS formats but windows doesn't. */ /* FIXME: we require D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL here for DS formats but windows doesn't. */
if (!vkd3d_test_platform_is_windows()) if (!vkd3d_test_platform_is_windows())

View File

@ -314,6 +314,7 @@ static unsigned int format_size(DXGI_FORMAT format)
case DXGI_FORMAT_R8G8_UNORM: case DXGI_FORMAT_R8G8_UNORM:
return 16; return 16;
case DXGI_FORMAT_R16G16B16A16_TYPELESS: case DXGI_FORMAT_R16G16B16A16_TYPELESS:
case DXGI_FORMAT_D32_FLOAT_S8X24_UINT:
return 8; return 8;
case DXGI_FORMAT_R32_TYPELESS: case DXGI_FORMAT_R32_TYPELESS:
case DXGI_FORMAT_D32_FLOAT: case DXGI_FORMAT_D32_FLOAT: