mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Allow compiling shaders with DXC on crosstests.
This is currently disabled on the CI because dxcompiler.dll is not available.
This commit is contained in:
parent
53fd1a95fc
commit
09630ada90
Notes:
Alexandre Julliard
2024-04-22 23:38:29 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/810
@ -19,8 +19,10 @@ test-win-64:
|
|||||||
extends: .test-win
|
extends: .test-win
|
||||||
variables:
|
variables:
|
||||||
TEST_ARCH: "64"
|
TEST_ARCH: "64"
|
||||||
|
VKD3D_TESTS_SKIP_DXC: "1"
|
||||||
|
|
||||||
test-win-32:
|
test-win-32:
|
||||||
extends: .test-win
|
extends: .test-win
|
||||||
variables:
|
variables:
|
||||||
TEST_ARCH: "32"
|
TEST_ARCH: "32"
|
||||||
|
VKD3D_TESTS_SKIP_DXC: "1"
|
||||||
|
@ -2083,7 +2083,7 @@ out:
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SONAME_LIBDXCOMPILER) && !defined(VKD3D_CROSSTEST)
|
#if (defined(SONAME_LIBDXCOMPILER) || defined(VKD3D_CROSSTEST))
|
||||||
static IDxcCompiler3 *dxcompiler_create(void)
|
static IDxcCompiler3 *dxcompiler_create(void)
|
||||||
{
|
{
|
||||||
DxcCreateInstanceProc create_instance;
|
DxcCreateInstanceProc create_instance;
|
||||||
@ -2095,7 +2095,11 @@ static IDxcCompiler3 *dxcompiler_create(void)
|
|||||||
if ((skip_dxc = getenv("VKD3D_TESTS_SKIP_DXC")) && strcmp(skip_dxc, "") != 0)
|
if ((skip_dxc = getenv("VKD3D_TESTS_SKIP_DXC")) && strcmp(skip_dxc, "") != 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
#ifdef VKD3D_CROSSTEST
|
||||||
|
dll = vkd3d_dlopen("dxcompiler.dll");
|
||||||
|
#else
|
||||||
dll = vkd3d_dlopen(SONAME_LIBDXCOMPILER);
|
dll = vkd3d_dlopen(SONAME_LIBDXCOMPILER);
|
||||||
|
#endif
|
||||||
ok(dll, "Failed to load dxcompiler library, %s.\n", vkd3d_dlerror());
|
ok(dll, "Failed to load dxcompiler library, %s.\n", vkd3d_dlerror());
|
||||||
if (!dll)
|
if (!dll)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -2112,7 +2116,7 @@ static IDxcCompiler3 *dxcompiler_create(void)
|
|||||||
|
|
||||||
return compiler;
|
return compiler;
|
||||||
}
|
}
|
||||||
#elif !defined(VKD3D_CROSSTEST)
|
#else
|
||||||
static IDxcCompiler3 *dxcompiler_create(void)
|
static IDxcCompiler3 *dxcompiler_create(void)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -2121,9 +2125,7 @@ static IDxcCompiler3 *dxcompiler_create(void)
|
|||||||
|
|
||||||
START_TEST(shader_runner)
|
START_TEST(shader_runner)
|
||||||
{
|
{
|
||||||
#ifndef VKD3D_CROSSTEST
|
|
||||||
IDxcCompiler3 *dxc_compiler;
|
IDxcCompiler3 *dxc_compiler;
|
||||||
#endif
|
|
||||||
|
|
||||||
parse_args(argc, argv);
|
parse_args(argc, argv);
|
||||||
|
|
||||||
@ -2134,7 +2136,14 @@ START_TEST(shader_runner)
|
|||||||
|
|
||||||
run_shader_tests_d3d11();
|
run_shader_tests_d3d11();
|
||||||
|
|
||||||
run_shader_tests_d3d12(NULL);
|
dxc_compiler = dxcompiler_create();
|
||||||
|
run_shader_tests_d3d12(dxc_compiler);
|
||||||
|
|
||||||
|
if (dxc_compiler)
|
||||||
|
{
|
||||||
|
IDxcCompiler3_Release(dxc_compiler);
|
||||||
|
print_dll_version("dxcompiler.dll");
|
||||||
|
}
|
||||||
|
|
||||||
print_dll_version("d3dcompiler_47.dll");
|
print_dll_version("d3dcompiler_47.dll");
|
||||||
print_dll_version("dxgi.dll");
|
print_dll_version("dxgi.dll");
|
||||||
|
Loading…
Reference in New Issue
Block a user