From 2d46fb247645612f5ffcaf4e6c1c2b218196e35b Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Tue, 12 Feb 2019 18:26:00 +0100 Subject: [PATCH] d3d10core/tests: Simplify test_cb_relative_addressing() a bit. Signed-off-by: Matteo Bruni Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d10core/tests/d3d10core.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index 9c322ed525f..b9b83f4060d 100644 --- a/dlls/d3d10core/tests/d3d10core.c +++ b/dlls/d3d10core/tests/d3d10core.c @@ -1389,6 +1389,9 @@ static void draw_quad_vs_(unsigned int line, struct d3d10core_test_context *cont ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); } + if (!context->vb) + context->vb = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(quad), quad); + if (context->vs_code != vs_code) { if (context->vs) @@ -1400,9 +1403,6 @@ static void draw_quad_vs_(unsigned int line, struct d3d10core_test_context *cont context->vs_code = vs_code; } - if (!context->vb) - context->vb = create_buffer(device, D3D10_BIND_VERTEX_BUFFER, sizeof(quad), quad); - ID3D10Device_IASetInputLayout(context->device, context->input_layout); ID3D10Device_IASetPrimitiveTopology(context->device, D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); stride = sizeof(*quad); @@ -10338,10 +10338,6 @@ static void test_cb_relative_addressing(void) DWORD color; HRESULT hr; - static const D3D10_INPUT_ELEMENT_DESC layout_desc[] = - { - {"POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0}, - }; static const DWORD vs_code[] = { #if 0 @@ -10451,10 +10447,6 @@ float4 main(const ps_in v) : SV_TARGET device = test_context.device; - hr = ID3D10Device_CreateInputLayout(device, layout_desc, ARRAY_SIZE(layout_desc), - vs_code, sizeof(vs_code), &test_context.input_layout); - ok(SUCCEEDED(hr), "Failed to create input layout, hr %#x.\n", hr); - colors_cb = create_buffer(device, D3D10_BIND_CONSTANT_BUFFER, sizeof(colors), &colors); index_cb = create_buffer(device, D3D10_BIND_CONSTANT_BUFFER, sizeof(index), NULL);