Skip to content

Draft: tests/shader-runner: finer control over model ranges and [shader] directive execution, ver 2, part 1.

Francisco Casas requested to merge fcasas/vkd3d:master6j_part into master

Basically, @giomasce proposal of specifying shader models for tests individually.

Supersedes !418 (closed).


To make the shader_runner expressive enough to handle SM1 and SM6 shader models on tests, we need to intercept the shader model ranges for which we want to run the tests with the ranges that each backend is capable of running, this is complicated.

So, to make it more clear, the test's shader models are specified individually, and runner->minimum_shader_model and runner->maximum_shader_model are replaced with just runner->current_shader_model.

The supported ranges are removed from the backends (except for d3d12, which handles them internally) and their check_requirements functions is always assumed to exist and return either true or false for just a single shader model.

Something that must be kept in mind with these changes is that if two tests with different shader models rely on the same resources, these resources must be either specified twice, or after a [require] directive that includes all the pertaining models. This was necessary for gather.shader_test and gather-offset.shader_test.


The following patches would change:

run_compilation_tests(SHADER_MODEL_4_0, SHADER_MODEL_5_1, NULL);

to

run_compilation_tests(SHADER_MODEL_2_0, SHADER_MODEL_5_1, NULL);

for Unix and non-cross builds, so we can test SM1 compilation even if we don't have a backend available that can actually run the tests. Some improvements to the qualifiers are required before that, to mark sm1 todos properly.

Once we have a proper SM1 runner, maybe we could get rid of run_compilation_tests().

Merge request reports

Loading