d3d11/tests: Add test for DXGI_FORMAT_R10G10B10A2_UINT vertex format.
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
8b493d769e
commit
c3cee86d75
|
@ -8725,6 +8725,7 @@ static void test_input_assembler(void)
|
||||||
LAYOUT_UNORM8,
|
LAYOUT_UNORM8,
|
||||||
LAYOUT_SNORM8,
|
LAYOUT_SNORM8,
|
||||||
LAYOUT_UNORM10_2,
|
LAYOUT_UNORM10_2,
|
||||||
|
LAYOUT_UINT10_2,
|
||||||
|
|
||||||
LAYOUT_COUNT,
|
LAYOUT_COUNT,
|
||||||
};
|
};
|
||||||
|
@ -8759,6 +8760,7 @@ static void test_input_assembler(void)
|
||||||
DXGI_FORMAT_R8G8B8A8_UNORM,
|
DXGI_FORMAT_R8G8B8A8_UNORM,
|
||||||
DXGI_FORMAT_R8G8B8A8_SNORM,
|
DXGI_FORMAT_R8G8B8A8_SNORM,
|
||||||
DXGI_FORMAT_R10G10B10A2_UNORM,
|
DXGI_FORMAT_R10G10B10A2_UNORM,
|
||||||
|
DXGI_FORMAT_R10G10B10A2_UINT,
|
||||||
};
|
};
|
||||||
static const struct
|
static const struct
|
||||||
{
|
{
|
||||||
|
@ -8933,6 +8935,16 @@ static void test_input_assembler(void)
|
||||||
{0.0f, 0.0f, 0.0f, 1.0f}},
|
{0.0f, 0.0f, 0.0f, 1.0f}},
|
||||||
{LAYOUT_UNORM10_2, sizeof(unorm10_2_data), &unorm10_2_data,
|
{LAYOUT_UNORM10_2, sizeof(unorm10_2_data), &unorm10_2_data,
|
||||||
{1.0f, 0.0f, 512.0f / 1023.0f, 2.0f / 3.0f}},
|
{1.0f, 0.0f, 512.0f / 1023.0f, 2.0f / 3.0f}},
|
||||||
|
{LAYOUT_UINT10_2, sizeof(uint32_zero), &uint32_zero,
|
||||||
|
{0.0f, 0.0f, 0.0f, 0.0f}},
|
||||||
|
{LAYOUT_UINT10_2, sizeof(uint32_max), &uint32_max,
|
||||||
|
{1023.0f, 1023.0f, 1023.0f, 3.0f}},
|
||||||
|
{LAYOUT_UINT10_2, sizeof(g10_data), &g10_data,
|
||||||
|
{0.0f, 1023.0f, 0.0f, 0.0f}},
|
||||||
|
{LAYOUT_UINT10_2, sizeof(a2_data), &a2_data,
|
||||||
|
{0.0f, 0.0f, 0.0f, 3.0f}},
|
||||||
|
{LAYOUT_UINT10_2, sizeof(unorm10_2_data), &unorm10_2_data,
|
||||||
|
{1023.0f, 0.0f, 512.0f, 2.0f}},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!init_test_context(&test_context, NULL))
|
if (!init_test_context(&test_context, NULL))
|
||||||
|
@ -8954,9 +8966,11 @@ static void test_input_assembler(void)
|
||||||
for (i = 0; i < LAYOUT_COUNT; ++i)
|
for (i = 0; i < LAYOUT_COUNT; ++i)
|
||||||
{
|
{
|
||||||
input_layout_desc[1].Format = layout_formats[i];
|
input_layout_desc[1].Format = layout_formats[i];
|
||||||
|
input_layout[i] = NULL;
|
||||||
hr = ID3D11Device_CreateInputLayout(device, input_layout_desc,
|
hr = ID3D11Device_CreateInputLayout(device, input_layout_desc,
|
||||||
sizeof(input_layout_desc) / sizeof(*input_layout_desc),
|
sizeof(input_layout_desc) / sizeof(*input_layout_desc),
|
||||||
vs_float_code, sizeof(vs_float_code), &input_layout[i]);
|
vs_float_code, sizeof(vs_float_code), &input_layout[i]);
|
||||||
|
todo_wine_if(input_layout_desc[1].Format == DXGI_FORMAT_R10G10B10A2_UINT)
|
||||||
ok(SUCCEEDED(hr), "Failed to create input layout for format %#x, hr %#x.\n", layout_formats[i], hr);
|
ok(SUCCEEDED(hr), "Failed to create input layout for format %#x, hr %#x.\n", layout_formats[i], hr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8992,6 +9006,9 @@ static void test_input_assembler(void)
|
||||||
{
|
{
|
||||||
D3D11_BOX box = {0, 0, 0, 1, 1, 1};
|
D3D11_BOX box = {0, 0, 0, 1, 1, 1};
|
||||||
|
|
||||||
|
if (tests[i].layout_id == LAYOUT_UINT10_2)
|
||||||
|
continue;
|
||||||
|
|
||||||
assert(tests[i].layout_id < LAYOUT_COUNT);
|
assert(tests[i].layout_id < LAYOUT_COUNT);
|
||||||
ID3D11DeviceContext_IASetInputLayout(context, input_layout[tests[i].layout_id]);
|
ID3D11DeviceContext_IASetInputLayout(context, input_layout[tests[i].layout_id]);
|
||||||
|
|
||||||
|
@ -9011,6 +9028,7 @@ static void test_input_assembler(void)
|
||||||
switch (layout_formats[tests[i].layout_id])
|
switch (layout_formats[tests[i].layout_id])
|
||||||
{
|
{
|
||||||
case DXGI_FORMAT_R16G16B16A16_UINT:
|
case DXGI_FORMAT_R16G16B16A16_UINT:
|
||||||
|
case DXGI_FORMAT_R10G10B10A2_UINT:
|
||||||
case DXGI_FORMAT_R8G8B8A8_UINT:
|
case DXGI_FORMAT_R8G8B8A8_UINT:
|
||||||
ID3D11DeviceContext_VSSetShader(context, vs_uint, NULL, 0);
|
ID3D11DeviceContext_VSSetShader(context, vs_uint, NULL, 0);
|
||||||
break;
|
break;
|
||||||
|
@ -9041,7 +9059,10 @@ static void test_input_assembler(void)
|
||||||
ID3D11Buffer_Release(vb_attribute);
|
ID3D11Buffer_Release(vb_attribute);
|
||||||
ID3D11Buffer_Release(vb_position);
|
ID3D11Buffer_Release(vb_position);
|
||||||
for (i = 0; i < LAYOUT_COUNT; ++i)
|
for (i = 0; i < LAYOUT_COUNT; ++i)
|
||||||
ID3D11InputLayout_Release(input_layout[i]);
|
{
|
||||||
|
if (input_layout[i])
|
||||||
|
ID3D11InputLayout_Release(input_layout[i]);
|
||||||
|
}
|
||||||
ID3D11PixelShader_Release(ps);
|
ID3D11PixelShader_Release(ps);
|
||||||
ID3D11VertexShader_Release(vs_float);
|
ID3D11VertexShader_Release(vs_float);
|
||||||
ID3D11VertexShader_Release(vs_uint);
|
ID3D11VertexShader_Release(vs_uint);
|
||||||
|
|
Loading…
Reference in New Issue