d3d10core/tests: Check device refcount after CreateInputLayout().

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:
Józef Kucia 2017-04-24 12:02:26 +02:00 committed by Alexandre Julliard
parent 2553ea2e3d
commit 69961bc241
1 changed files with 5 additions and 1 deletions

View File

@ -9271,9 +9271,9 @@ static void test_create_input_layout(void)
{ {
{"POSITION", 0, DXGI_FORMAT_UNKNOWN, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0}, {"POSITION", 0, DXGI_FORMAT_UNKNOWN, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0},
}; };
ULONG refcount, expected_refcount;
ID3D10InputLayout *input_layout; ID3D10InputLayout *input_layout;
ID3D10Device *device; ID3D10Device *device;
ULONG refcount;
unsigned int i; unsigned int i;
HRESULT hr; HRESULT hr;
@ -9318,11 +9318,15 @@ static void test_create_input_layout(void)
for (i = 0; i < ARRAY_SIZE(vertex_formats); ++i) for (i = 0; i < ARRAY_SIZE(vertex_formats); ++i)
{ {
expected_refcount = get_refcount(device) + 1;
layout_desc->Format = vertex_formats[i]; layout_desc->Format = vertex_formats[i];
hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc),
vs_code, sizeof(vs_code), &input_layout); vs_code, sizeof(vs_code), &input_layout);
ok(SUCCEEDED(hr), "Failed to create input layout for format %#x, hr %#x.\n", ok(SUCCEEDED(hr), "Failed to create input layout for format %#x, hr %#x.\n",
vertex_formats[i], hr); vertex_formats[i], hr);
refcount = get_refcount(device);
todo_wine ok(refcount >= expected_refcount, "Got refcount %u, expected >= %u.\n",
refcount, expected_refcount);
ID3D10InputLayout_Release(input_layout); ID3D10InputLayout_Release(input_layout);
} }