mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
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:
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
@@ -25,6 +25,14 @@
|
||||
#include "shader_runner.h"
|
||||
#include "dxcompiler.h"
|
||||
|
||||
#ifdef VKD3D_CROSSTEST
|
||||
static const char HLSL_COMPILER[] = "d3dcompiler47.dll";
|
||||
static const char SHADER_RUNNER[] = "d3d12.dll";
|
||||
#else
|
||||
static const char HLSL_COMPILER[] = "vkd3d-shader";
|
||||
static const char SHADER_RUNNER[] = "vkd3d";
|
||||
#endif
|
||||
|
||||
struct d3d12_resource
|
||||
{
|
||||
struct resource r;
|
||||
@@ -586,8 +594,7 @@ static const struct shader_runner_ops d3d12_runner_ops =
|
||||
.release_readback = d3d12_runner_release_readback,
|
||||
};
|
||||
|
||||
void run_shader_tests_d3d12(void *dxc_compiler, enum shader_model minimum_shader_model,
|
||||
enum shader_model maximum_shader_model)
|
||||
void run_shader_tests_d3d12(void *dxc_compiler)
|
||||
{
|
||||
static const struct test_context_desc desc =
|
||||
{
|
||||
@@ -627,10 +634,17 @@ void run_shader_tests_d3d12(void *dxc_compiler, enum shader_model minimum_shader
|
||||
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_D3D12_OPTIONS1,
|
||||
&runner.options1, sizeof(runner.options1));
|
||||
ok(hr == S_OK, "Failed to check feature options1 support, hr %#x.\n", hr);
|
||||
if (maximum_shader_model >= SHADER_MODEL_6_0)
|
||||
|
||||
trace("Compiling SM4-SM5 shaders with %s and executing with %s\n", HLSL_COMPILER, SHADER_RUNNER);
|
||||
run_shader_tests(&runner.r, &d3d12_runner_ops, dxc_compiler, SHADER_MODEL_4_0, SHADER_MODEL_5_1);
|
||||
|
||||
if (dxc_compiler)
|
||||
{
|
||||
trace("Int64ShaderOps: %u.\n", runner.options1.Int64ShaderOps);
|
||||
|
||||
run_shader_tests(&runner.r, &d3d12_runner_ops, dxc_compiler, minimum_shader_model, maximum_shader_model);
|
||||
trace("Compiling SM6 shaders with dxcompiler and executing with %s\n", SHADER_RUNNER);
|
||||
run_shader_tests(&runner.r, &d3d12_runner_ops, dxc_compiler, SHADER_MODEL_6_0, SHADER_MODEL_6_0);
|
||||
}
|
||||
|
||||
ID3D12GraphicsCommandList_Release(runner.compute_list);
|
||||
ID3D12CommandAllocator_Release(runner.compute_allocator);
|
||||
|
Reference in New Issue
Block a user