Commit 5b38f1cf authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

d3dx9/tests: Fix test blob data corruption in test_preshader_op().

parent 90542135
...@@ -4415,12 +4415,13 @@ static void test_preshader_op(IDirect3DDevice9 *device, const DWORD *sample_effe ...@@ -4415,12 +4415,13 @@ static void test_preshader_op(IDirect3DDevice9 *device, const DWORD *sample_effe
{ {
unsigned int pos; unsigned int pos;
unsigned int result_index; unsigned int result_index;
unsigned int ins_count;
} }
blob_position[] = blob_position[] =
{ {
{0, 0}, {0, 0, 0},
{5549, 0}, {5549, 0, 4},
{5400, 2} {5400, 2, 1}
}; };
DWORD *test_effect_blob; DWORD *test_effect_blob;
HRESULT hr; HRESULT hr;
...@@ -4436,7 +4437,7 @@ static void test_preshader_op(IDirect3DDevice9 *device, const DWORD *sample_effe ...@@ -4436,7 +4437,7 @@ static void test_preshader_op(IDirect3DDevice9 *device, const DWORD *sample_effe
test_effect_blob = HeapAlloc(GetProcessHeap(), 0, sample_effect_blob_size); test_effect_blob = HeapAlloc(GetProcessHeap(), 0, sample_effect_blob_size);
memcpy(test_effect_blob, sample_effect_blob, sample_effect_blob_size); memcpy(test_effect_blob, sample_effect_blob, sample_effect_blob_size);
for (i = 0; i < 4; ++i) for (i = 0; i < blob_position[test->args_count].ins_count; ++i)
test_effect_blob[op_pos + i * op_step] = test->opcode; test_effect_blob[op_pos + i * op_step] = test->opcode;
hr = D3DXCreateEffect(device, test_effect_blob, sample_effect_blob_size, hr = D3DXCreateEffect(device, test_effect_blob, sample_effect_blob_size,
......
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