mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
tests/shader-runner: Introduce a 'float64' requirement directive.
This commit is contained in:
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
@ -1,5 +1,6 @@
|
||||
[require]
|
||||
shader model >= 5.0
|
||||
float64
|
||||
|
||||
[pixel shader todo]
|
||||
uniform double2 d;
|
||||
|
@ -191,6 +191,10 @@ static void parse_require_directive(struct shader_runner *runner, const char *li
|
||||
runner->compile_options |= options[i].option;
|
||||
}
|
||||
}
|
||||
else if (match_string(line, "float64", &line))
|
||||
{
|
||||
runner->require_float64 = true;
|
||||
}
|
||||
else if (match_string(line, "int64", &line))
|
||||
{
|
||||
runner->require_int64 = true;
|
||||
@ -1315,6 +1319,7 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o
|
||||
state = STATE_REQUIRE;
|
||||
runner->minimum_shader_model = minimum_shader_model;
|
||||
runner->maximum_shader_model = maximum_shader_model;
|
||||
runner->require_float64 = false;
|
||||
runner->require_int64 = false;
|
||||
runner->compile_options = 0;
|
||||
skip_tests = false;
|
||||
|
@ -122,6 +122,7 @@ struct shader_runner
|
||||
char *fx_source;
|
||||
enum shader_model minimum_shader_model;
|
||||
enum shader_model maximum_shader_model;
|
||||
bool require_float64;
|
||||
bool require_int64;
|
||||
|
||||
bool last_render_failed;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user