From: Matteo Bruni mbruni@codeweavers.com
Share the code with the existing d3dx9_36 tests. --- configure | 1 + configure.ac | 1 + dlls/d3dx9_36/tests/effect.c | 10 +++++++--- dlls/d3dx9_36/tests/shader.c | 4 ++++ dlls/d3dx9_43/tests/Makefile.in | 18 ++++++++++++++++++ 5 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 dlls/d3dx9_43/tests/Makefile.in
diff --git a/configure b/configure index fb4163f70d4..e444808110b 100755 --- a/configure +++ b/configure @@ -22165,6 +22165,7 @@ wine_fn_config_makefile dlls/d3dx9_40 enable_d3dx9_40 wine_fn_config_makefile dlls/d3dx9_41 enable_d3dx9_41 wine_fn_config_makefile dlls/d3dx9_42 enable_d3dx9_42 wine_fn_config_makefile dlls/d3dx9_43 enable_d3dx9_43 +wine_fn_config_makefile dlls/d3dx9_43/tests enable_tests wine_fn_config_makefile dlls/d3dxof enable_d3dxof wine_fn_config_makefile dlls/d3dxof/tests enable_tests wine_fn_config_makefile dlls/dataexchange enable_dataexchange diff --git a/configure.ac b/configure.ac index ac710721ae6..18b8c1018eb 100644 --- a/configure.ac +++ b/configure.ac @@ -2563,6 +2563,7 @@ WINE_CONFIG_MAKEFILE(dlls/d3dx9_40) WINE_CONFIG_MAKEFILE(dlls/d3dx9_41) WINE_CONFIG_MAKEFILE(dlls/d3dx9_42) WINE_CONFIG_MAKEFILE(dlls/d3dx9_43) +WINE_CONFIG_MAKEFILE(dlls/d3dx9_43/tests) WINE_CONFIG_MAKEFILE(dlls/d3dxof) WINE_CONFIG_MAKEFILE(dlls/d3dxof/tests) WINE_CONFIG_MAKEFILE(dlls/dataexchange) diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c index 24f306b30e8..be0a181885d 100644 --- a/dlls/d3dx9_36/tests/effect.c +++ b/dlls/d3dx9_36/tests/effect.c @@ -8065,8 +8065,11 @@ static HRESULT WINAPI d3dxinclude_open(ID3DXInclude *iface, D3DXINCLUDE_TYPE inc "}\n"; char *buffer;
- trace("filename %s.\n", filename); - trace("parent_data %p: %s.\n", parent_data, parent_data ? (char *)parent_data : "(null)"); + if (winetest_debug > 1) + { + trace("filename %s.\n", filename); + trace("parent_data %p: %s.\n", parent_data, parent_data ? (char *)parent_data : "(null)"); + }
if (!strcmp(filename, "effect2.fx")) { @@ -8087,7 +8090,8 @@ static HRESULT WINAPI d3dxinclude_open(ID3DXInclude *iface, D3DXINCLUDE_TYPE inc buffer = malloc(sizeof(include2)); memcpy(buffer, include2, sizeof(include2)); *bytes = sizeof(include2); - todo_wine ok(parent_data && !strncmp(parent_data, effect2, strlen(effect2)), + /* d3dx9_36 passes parent_data even for includes from the main file. */ + ok(!parent_data || (parent_data && !strncmp(parent_data, effect2, strlen(effect2))), "unexpected parent_data value.\n"); } else diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c index f0c03052404..bba4d60244a 100644 --- a/dlls/d3dx9_36/tests/shader.c +++ b/dlls/d3dx9_36/tests/shader.c @@ -6597,6 +6597,7 @@ static void test_shader_semantics(void) } }
+#if D3DX_SDK_VERSION <= 41 static void test_fragment_linker(void) { ID3DXFragmentLinker *linker; @@ -6644,6 +6645,7 @@ static void test_fragment_linker(void) ok(!refcount, "The D3D object has %lu references left.\n", refcount); DestroyWindow(window); } +#endif
START_TEST(shader) { @@ -6659,5 +6661,7 @@ START_TEST(shader) test_registerset(); test_registerset_defaults(); test_shader_semantics(); +#if D3DX_SDK_VERSION <= 41 test_fragment_linker(); +#endif } diff --git a/dlls/d3dx9_43/tests/Makefile.in b/dlls/d3dx9_43/tests/Makefile.in new file mode 100644 index 00000000000..5a0e4338ebe --- /dev/null +++ b/dlls/d3dx9_43/tests/Makefile.in @@ -0,0 +1,18 @@ +TESTDLL = d3dx9_43.dll +IMPORTS = d3dx9_43 d3d9 user32 gdi32 +EXTRADEFS = -DD3DX_SDK_VERSION=43 +PARENTSRC = ../../d3dx9_36/tests + +SOURCES = \ + asm.c \ + core.c \ + effect.c \ + line.c \ + math.c \ + mesh.c \ + rsrc.rc \ + shader.c \ + surface.c \ + texture.c \ + volume.c \ + xfile.c