Paul Gofman : d3dx9/tests: Fix test blob data corruption in test_preshader_op().
Alexandre Julliard
julliard at winehq.org
Fri Apr 28 12:44:30 CDT 2017
Module: wine
Branch: master
Commit: 5b38f1cf2e88a9f1af881a19b4ac2cd2dda07d64
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5b38f1cf2e88a9f1af881a19b4ac2cd2dda07d64
Author: Paul Gofman <gofmanp at gmail.com>
Date: Thu Apr 27 14:05:44 2017 +0300
d3dx9/tests: Fix test blob data corruption in test_preshader_op().
Signed-off-by: Paul Gofman <gofmanp at gmail.com>
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3dx9_36/tests/effect.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c
index f7d7ba8..997c1fc 100644
--- a/dlls/d3dx9_36/tests/effect.c
+++ b/dlls/d3dx9_36/tests/effect.c
@@ -4415,12 +4415,13 @@ static void test_preshader_op(IDirect3DDevice9 *device, const DWORD *sample_effe
{
unsigned int pos;
unsigned int result_index;
+ unsigned int ins_count;
}
blob_position[] =
{
- {0, 0},
- {5549, 0},
- {5400, 2}
+ {0, 0, 0},
+ {5549, 0, 4},
+ {5400, 2, 1}
};
DWORD *test_effect_blob;
HRESULT hr;
@@ -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);
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;
hr = D3DXCreateEffect(device, test_effect_blob, sample_effect_blob_size,
More information about the wine-cvs
mailing list