tests/shader-runner: Call each runner only once.

If the runners require multiple calls to run_shader_tests() for
different shader model ranges, these are moved inside the sole runner
call.

For the same reason, the trace() messages are also moved inside the
runner calls.
This commit is contained in:
Francisco Casas
2023-12-14 03:08:41 -03:00
committed by Alexandre Julliard
parent 79de3ec766
commit 671f4ec2b2
Notes: Alexandre Julliard 2024-01-24 22:53:52 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/514
7 changed files with 48 additions and 27 deletions

View File

@@ -32,6 +32,12 @@
#include "shader_runner.h"
#include "vkd3d_test.h"
#ifdef VKD3D_CROSSTEST
static const char HLSL_COMPILER[] = "d3dcompiler47.dll";
#else
static const char HLSL_COMPILER[] = "vkd3d-shader";
#endif
static HRESULT (WINAPI *pCreateDXGIFactory1)(REFIID iid, void **factory);
static HRESULT (WINAPI *pD3D11CreateDevice)(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_type,
@@ -757,6 +763,8 @@ void run_shader_tests_d3d11(void)
struct d3d11_shader_runner runner;
HMODULE dxgi_module, d3d11_module;
trace("Compiling SM4-SM5 shaders with %s and executing with d3d11.dll\n", HLSL_COMPILER);
d3d11_module = LoadLibraryA("d3d11.dll");
dxgi_module = LoadLibraryA("dxgi.dll");
if (d3d11_module && dxgi_module)