Commit 2d46fb24 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3d10core/tests: Simplify test_cb_relative_addressing() a bit.

parent 9844d73b
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment