tests/shader-runner: Introduce a 'float64' requirement directive.

This commit is contained in:
Conor McCarthy
2023-12-13 00:27:41 +10:00
committed by Alexandre Julliard
parent 95c48eb98e
commit 8a1eb306e8
Notes: Alexandre Julliard 2023-12-12 23:15:46 +01: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/489
4 changed files with 16 additions and 0 deletions

View File

@@ -53,6 +53,7 @@ struct d3d12_shader_runner
IDxcCompiler3 *dxc_compiler;
D3D12_FEATURE_DATA_D3D12_OPTIONS options;
D3D12_FEATURE_DATA_D3D12_OPTIONS1 options1;
};
@@ -102,6 +103,9 @@ static bool d3d12_runner_check_requirements(struct shader_runner *r)
{
struct d3d12_shader_runner *runner = d3d12_shader_runner(r);
if (runner->r.require_float64 && !runner->options.DoublePrecisionFloatShaderOps)
return false;
if (runner->r.require_int64 && !runner->options1.Int64ShaderOps)
return false;
@@ -615,6 +619,11 @@ void run_shader_tests_d3d12(void *dxc_compiler, enum shader_model minimum_shader
runner.compute_allocator, NULL, &IID_ID3D12GraphicsCommandList, (void **)&runner.compute_list);
ok(hr == S_OK, "Failed to create command list, hr %#x.\n", hr);
hr = ID3D12Device_CheckFeatureSupport(device, D3D12_FEATURE_D3D12_OPTIONS,
&runner.options, sizeof(runner.options));
ok(hr == S_OK, "Failed to check feature options support, hr %#x.\n", hr);
trace("DoublePrecisionFloatShaderOps: %u.\n", runner.options.DoublePrecisionFloatShaderOps);
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);