From: Nikolay Sivov nsivov@codeweavers.com
--- dlls/d3d10/tests/Makefile.in | 2 +- dlls/d3d10/tests/effect.c | 29 +++++++++++++---------------- 2 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/dlls/d3d10/tests/Makefile.in b/dlls/d3d10/tests/Makefile.in index ba2e27097f7..4150c27973c 100644 --- a/dlls/d3d10/tests/Makefile.in +++ b/dlls/d3d10/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = d3d10.dll -IMPORTS = d3d10 +IMPORTS = d3d10 d3dcompiler EXTRADEFS = -DD3D_COMPILER_VERSION=0 PARENTSRC = ../../d3dcompiler_43/tests
diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index 12d54b8f053..774aa641ff3 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c @@ -19,6 +19,7 @@
#define COBJMACROS #include "d3d10.h" +#include "d3dcompiler.h" #include "wine/test.h"
#include <float.h> @@ -9794,25 +9795,16 @@ static void test_effect_value_expression(void) ok(!refcount, "Device has %lu references left.\n", refcount); }
-#if 0 -technique10 tech0 -{ - pass pass0 {} -}; -#endif -static DWORD fx_test_fx_4_1[] = -{ - 0x43425844, 0x228fcf4d, 0x9396b2f5, 0xd817b31f, 0xab6dd460, 0x00000001, 0x000000a0, 0x00000001, - 0x00000024, 0x30315846, 0x00000074, 0xfeff1011, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000001, 0x00000010, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x68636574, - 0x61700030, 0x00307373, 0x00000004, 0x00000001, 0x00000000, 0x0000000a, 0x00000000, 0x00000000, -}; - static void test_effect_fx_4_1(void) { + static const char source[] = + "technique10 tech0\n" + "{\n" + " pass pass0 {}\n" + "};"; ID3D10Effect *effect; ID3D10Device *device; + ID3D10Blob *blob; ULONG refcount; HRESULT hr;
@@ -9822,11 +9814,16 @@ static void test_effect_fx_4_1(void) return; }
- hr = create_effect(fx_test_fx_4_1, 0, device, NULL, &effect); + hr = D3DCompile(source, sizeof(source), NULL, NULL, NULL, "main", "fx_4_1", 0, 0, &blob, NULL); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + hr = create_effect(ID3D10Blob_GetBufferPointer(blob), 0, device, NULL, &effect); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
effect->lpVtbl->Release(effect);
+ ID3D10Blob_Release(blob); + refcount = ID3D10Device_Release(device); ok(!refcount, "Device has %lu references left.\n", refcount); }