mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d/tests: Add and modify tests for GetResourceAllocationInfo().
Test large DepthOrArraySize for small resources, and test compressed textures at the 64KB limit. Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
7b88754ff2
commit
a303482acc
@@ -29437,7 +29437,6 @@ static void test_resource_allocation_info(void)
|
|||||||
ID3D12Device *device;
|
ID3D12Device *device;
|
||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
ULONG refcount;
|
ULONG refcount;
|
||||||
uint64_t size;
|
|
||||||
|
|
||||||
static const unsigned int alignments[] =
|
static const unsigned int alignments[] =
|
||||||
{
|
{
|
||||||
@@ -29472,12 +29471,15 @@ static void test_resource_allocation_info(void)
|
|||||||
{ 4, 4, 1, 1, DXGI_FORMAT_R8_UINT},
|
{ 4, 4, 1, 1, DXGI_FORMAT_R8_UINT},
|
||||||
{ 8, 8, 1, 1, DXGI_FORMAT_R8G8B8A8_UNORM},
|
{ 8, 8, 1, 1, DXGI_FORMAT_R8G8B8A8_UNORM},
|
||||||
{16, 16, 1, 1, DXGI_FORMAT_R8G8B8A8_UNORM},
|
{16, 16, 1, 1, DXGI_FORMAT_R8G8B8A8_UNORM},
|
||||||
{16, 16, 6, 1, DXGI_FORMAT_R8G8B8A8_UNORM},
|
{16, 16, 1024, 1, DXGI_FORMAT_R8G8B8A8_UNORM},
|
||||||
|
{256, 512, 1, 10, DXGI_FORMAT_BC1_UNORM},
|
||||||
|
{256, 512, 64, 1, DXGI_FORMAT_BC1_UNORM},
|
||||||
|
|
||||||
{1024, 1024, 1, 1, DXGI_FORMAT_R8G8B8A8_UNORM},
|
{1024, 1024, 1, 1, DXGI_FORMAT_R8G8B8A8_UNORM},
|
||||||
{1024, 1024, 1, 2, DXGI_FORMAT_R8G8B8A8_UNORM},
|
{1024, 1024, 1, 2, DXGI_FORMAT_R8G8B8A8_UNORM},
|
||||||
{1024, 1024, 1, 3, DXGI_FORMAT_R8G8B8A8_UNORM},
|
{1024, 1024, 1, 3, DXGI_FORMAT_R8G8B8A8_UNORM},
|
||||||
{1024, 1024, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM},
|
{1024, 1024, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM},
|
||||||
|
{260, 512, 1, 1, DXGI_FORMAT_BC1_UNORM},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!(device = create_device()))
|
if (!(device = create_device()))
|
||||||
@@ -29549,8 +29551,7 @@ static void test_resource_allocation_info(void)
|
|||||||
info = ID3D12Device_GetResourceAllocationInfo(device, 0, 1, &desc);
|
info = ID3D12Device_GetResourceAllocationInfo(device, 0, 1, &desc);
|
||||||
ok(info.Alignment >= D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT,
|
ok(info.Alignment >= D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT,
|
||||||
"Got unexpected alignment %"PRIu64".\n", info.Alignment);
|
"Got unexpected alignment %"PRIu64".\n", info.Alignment);
|
||||||
size = desc.Width * desc.Height * desc.DepthOrArraySize * format_size(desc.Format);
|
if (i < 6)
|
||||||
if (size <= D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT)
|
|
||||||
{
|
{
|
||||||
check_alignment(info.SizeInBytes, info.Alignment);
|
check_alignment(info.SizeInBytes, info.Alignment);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user