Draft: tests/shader-runner: finer control over model ranges and [shader] directive execution for backends, part 1.
First part of a series that allows the shader-runner to test SM1 compilation on [shader] directives even if a backend to run these tests is not available and prepare they way for SM1-only tests.
Specifically:
- Compile [shader] directives separately from backend execution (on part 1).
- Allow specifying more detailed shader ranges for todo(), fail() and notimpl() qualifiers (on part 2).
- Always test shader compilation with SM1 profiles (on part 2).
The minimum_shader_model
and maximum_shader_model
parameters for run_shader_tests() are interpreted in the following way:
Ask the pertaining backend to run the shader_test file so that each test is executed with the lowest profile it can support within the range of shader models specified, if any.
This allows us to control how many shader models we want to test for each backend, e.g.:
run_shader_tests(..., SHADER_MODEL_2_0, SHADER_MODEL_3_0)
run_shader_tests(..., SHADER_MODEL_4_0, SHADER_MODEL_5_1)
run_shader_tests(..., SHADER_MODEL_6_0, SHADER_MODEL_6_0)
versus
for (i = SHADER_MODEL_2_0, i <= SHADER_MODEL_6_0, ++i)
run_shader_tests(..., i, i);
Also, to allow to compile [shader] directives, which are not backend-specific, separately from the [test] directives, which are, the run_shader_tests() function is modified to skip backend specific directives if the shader_runner_ops is NULL.
Following patches are on my master6i branch.