d3d10core/tests: Test creating 2D array textures.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9b6430927a
commit
a0d54ccf61
|
@ -562,37 +562,63 @@ static void test_create_texture2d(void)
|
|||
static const struct
|
||||
{
|
||||
DXGI_FORMAT format;
|
||||
UINT array_size;
|
||||
D3D10_BIND_FLAG bind_flags;
|
||||
UINT misc_flags;
|
||||
BOOL succeeds;
|
||||
BOOL todo;
|
||||
}
|
||||
tests[] =
|
||||
{
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, D3D10_BIND_VERTEX_BUFFER, FALSE, TRUE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, D3D10_BIND_INDEX_BUFFER, FALSE, TRUE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, D3D10_BIND_CONSTANT_BUFFER, FALSE, TRUE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, D3D10_BIND_SHADER_RESOURCE, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, D3D10_BIND_RENDER_TARGET, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, D3D10_BIND_DEPTH_STENCIL, FALSE, FALSE},
|
||||
{DXGI_FORMAT_R32G32B32_TYPELESS, D3D10_BIND_SHADER_RESOURCE, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R16G16B16A16_TYPELESS, D3D10_BIND_SHADER_RESOURCE, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R16G16B16A16_TYPELESS, D3D10_BIND_RENDER_TARGET, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32G32_TYPELESS, D3D10_BIND_SHADER_RESOURCE, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32G8X24_TYPELESS, D3D10_BIND_DEPTH_STENCIL, TRUE, TRUE},
|
||||
{DXGI_FORMAT_R10G10B10A2_TYPELESS, D3D10_BIND_SHADER_RESOURCE, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R10G10B10A2_TYPELESS, D3D10_BIND_RENDER_TARGET, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32_TYPELESS, D3D10_BIND_SHADER_RESOURCE, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R24G8_TYPELESS, D3D10_BIND_VERTEX_BUFFER, FALSE, TRUE},
|
||||
{DXGI_FORMAT_R24G8_TYPELESS, D3D10_BIND_INDEX_BUFFER, FALSE, TRUE},
|
||||
{DXGI_FORMAT_R24G8_TYPELESS, D3D10_BIND_CONSTANT_BUFFER, FALSE, TRUE},
|
||||
{DXGI_FORMAT_R24G8_TYPELESS, D3D10_BIND_SHADER_RESOURCE, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R24G8_TYPELESS, D3D10_BIND_DEPTH_STENCIL, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R8G8_TYPELESS, D3D10_BIND_SHADER_RESOURCE, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R16_TYPELESS, D3D10_BIND_SHADER_RESOURCE, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R8_TYPELESS, D3D10_BIND_SHADER_RESOURCE, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R8G8B8A8_UNORM, D3D11_BIND_DEPTH_STENCIL, FALSE, FALSE},
|
||||
{DXGI_FORMAT_D24_UNORM_S8_UINT, D3D11_BIND_RENDER_TARGET, FALSE, FALSE},
|
||||
{DXGI_FORMAT_D32_FLOAT, D3D11_BIND_RENDER_TARGET, FALSE, FALSE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 1, D3D10_BIND_VERTEX_BUFFER, 0, FALSE, TRUE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 1, D3D10_BIND_INDEX_BUFFER, 0, FALSE, TRUE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 1, D3D10_BIND_CONSTANT_BUFFER, 0, FALSE, TRUE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 0, D3D10_BIND_SHADER_RESOURCE, 0, FALSE, TRUE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 1, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 2, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 3, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 3, D3D10_BIND_SHADER_RESOURCE, D3D10_RESOURCE_MISC_TEXTURECUBE,
|
||||
FALSE, TRUE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 1, D3D10_BIND_SHADER_RESOURCE, D3D10_RESOURCE_MISC_TEXTURECUBE,
|
||||
FALSE, TRUE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 5, D3D10_BIND_SHADER_RESOURCE, D3D10_RESOURCE_MISC_TEXTURECUBE,
|
||||
FALSE, TRUE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 6, D3D10_BIND_SHADER_RESOURCE, D3D10_RESOURCE_MISC_TEXTURECUBE,
|
||||
TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 7, D3D10_BIND_SHADER_RESOURCE, D3D10_RESOURCE_MISC_TEXTURECUBE,
|
||||
FALSE, TRUE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 10, D3D10_BIND_SHADER_RESOURCE, D3D10_RESOURCE_MISC_TEXTURECUBE,
|
||||
FALSE, TRUE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 12, D3D10_BIND_SHADER_RESOURCE, D3D10_RESOURCE_MISC_TEXTURECUBE,
|
||||
FALSE, TRUE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 0, D3D10_BIND_RENDER_TARGET, 0, FALSE, TRUE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 1, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 2, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 9, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32G32B32A32_TYPELESS, 1, D3D10_BIND_DEPTH_STENCIL, 0, FALSE, FALSE},
|
||||
{DXGI_FORMAT_R32G32B32_TYPELESS, 1, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R16G16B16A16_TYPELESS, 1, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R16G16B16A16_TYPELESS, 1, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32G32_TYPELESS, 1, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32G8X24_TYPELESS, 1, D3D10_BIND_DEPTH_STENCIL, 0, TRUE, TRUE},
|
||||
{DXGI_FORMAT_R10G10B10A2_TYPELESS, 1, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R10G10B10A2_TYPELESS, 1, D3D10_BIND_RENDER_TARGET, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32_TYPELESS, 0, D3D10_BIND_SHADER_RESOURCE, 0, FALSE, TRUE},
|
||||
{DXGI_FORMAT_R32_TYPELESS, 1, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32_TYPELESS, 9, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R32_TYPELESS, 9, D3D10_BIND_SHADER_RESOURCE, D3D10_RESOURCE_MISC_TEXTURECUBE,
|
||||
FALSE, TRUE},
|
||||
{DXGI_FORMAT_R24G8_TYPELESS, 1, D3D10_BIND_VERTEX_BUFFER, 0, FALSE, TRUE},
|
||||
{DXGI_FORMAT_R24G8_TYPELESS, 1, D3D10_BIND_INDEX_BUFFER, 0, FALSE, TRUE},
|
||||
{DXGI_FORMAT_R24G8_TYPELESS, 1, D3D10_BIND_CONSTANT_BUFFER, 0, FALSE, TRUE},
|
||||
{DXGI_FORMAT_R24G8_TYPELESS, 1, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R24G8_TYPELESS, 1, D3D10_BIND_DEPTH_STENCIL, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R8G8_TYPELESS, 1, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R16_TYPELESS, 1, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R8_TYPELESS, 1, D3D10_BIND_SHADER_RESOURCE, 0, TRUE, FALSE},
|
||||
{DXGI_FORMAT_R8G8B8A8_UNORM, 1, D3D10_BIND_DEPTH_STENCIL, 0, FALSE, FALSE},
|
||||
{DXGI_FORMAT_D24_UNORM_S8_UINT, 1, D3D10_BIND_RENDER_TARGET, 0, FALSE, FALSE},
|
||||
{DXGI_FORMAT_D32_FLOAT, 1, D3D10_BIND_RENDER_TARGET, 0, FALSE, FALSE},
|
||||
};
|
||||
|
||||
if (!(device = create_device()))
|
||||
|
@ -698,8 +724,10 @@ static void test_create_texture2d(void)
|
|||
desc.SampleDesc.Count = 1;
|
||||
for (i = 0; i < sizeof(tests) / sizeof(*tests); ++i)
|
||||
{
|
||||
desc.ArraySize = tests[i].array_size;
|
||||
desc.Format = tests[i].format;
|
||||
desc.BindFlags = tests[i].bind_flags;
|
||||
desc.MiscFlags = tests[i].misc_flags;
|
||||
hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, (ID3D10Texture2D **)&texture);
|
||||
|
||||
todo_wine_if(tests[i].todo)
|
||||
|
|
Loading…
Reference in New Issue