From: Conor McCarthy cmccarthy@codeweavers.com
--- tests/shader_runner.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/tests/shader_runner.c b/tests/shader_runner.c index 4847ec75b..76a616a5e 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -1567,7 +1567,7 @@ out: } #endif
-#if defined(SONAME_LIBDXCOMPILER) && !defined(VKD3D_CROSSTEST) +#if defined(SONAME_LIBDXCOMPILER) || defined(VKD3D_CROSSTEST) static IDxcCompiler3 *dxcompiler_create(void) { DxcCreateInstanceProc create_instance; @@ -1575,8 +1575,14 @@ static IDxcCompiler3 *dxcompiler_create(void) HRESULT hr; void *dll;
+# ifdef VKD3D_CROSSTEST + dll = vkd3d_dlopen("dxcompiler.dll"); + if (!dll) + trace("Failed to load dxcompiler.dll, %s.\n", vkd3d_dlerror()); +# else dll = vkd3d_dlopen(SONAME_LIBDXCOMPILER); ok(dll, "Failed to load dxcompiler library, %s.\n", vkd3d_dlerror()); +# endif if (!dll) return NULL;
@@ -1592,7 +1598,7 @@ static IDxcCompiler3 *dxcompiler_create(void)
return compiler; } -#elif !defined(VKD3D_CROSSTEST) +#else static IDxcCompiler3 *dxcompiler_create(void) { return NULL; @@ -1601,9 +1607,7 @@ static IDxcCompiler3 *dxcompiler_create(void)
START_TEST(shader_runner) { -#ifndef VKD3D_CROSSTEST IDxcCompiler3 *dxc_compiler; -#endif
parse_args(argc, argv);
@@ -1619,6 +1623,14 @@ START_TEST(shader_runner) trace("Compiling shaders with d3dcompiler_47.dll and executing with d3d12.dll\n"); run_shader_tests_d3d12(NULL, SHADER_MODEL_4_0, SHADER_MODEL_5_1);
+ if ((dxc_compiler = dxcompiler_create())) + { + trace("Compiling shaders with dxcompiler.dll and executing with d3d12.dll\n"); + run_shader_tests_d3d12(dxc_compiler, SHADER_MODEL_6_0, SHADER_MODEL_6_0); + IDxcCompiler3_Release(dxc_compiler); + print_dll_version("dxcompiler.dll"); + } + print_dll_version("d3dcompiler_47.dll"); print_dll_version("dxgi.dll"); print_dll_version("d3d9.dll");