Basically, @giomasce proposal of specifying shader models for tests individually.
Supersedes !418.
---
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().
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/434
--
v11: vkd3d-shader/spirv: Avoid invalid bool-to-bool conversion in spirv_compiler_emit_movc().
vkd3d-shader/dxil: Implement the DXIL VSELECT instruction.
tests/shader-runner: Add tests for 64-bit casts.
vkd3d-shader/spirv: Return an error if an invalid handler is encountered.
tests/shader-runner: Add a test for float comparisons.
tests/shader-runner: Run d3d11 tests with a mimimum shader model of 4.0.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/459
> I'm currently out and haven't had a chance to properly look at this, but, how does this interact with resource arrays?
Resource arrays should work as long as they're not dynamically indexed. (And the ps_5_1 test exercises that path.) Dynamic indexing of resource arrays can't work with combined samplers; there's essentially no way to create the required combined samplers in either the OpenGL or Vulkan APIs, and it's not clear what that would even look like.
There's perhaps an unresolved question of how to handle that if we do run into it in the scanner. The current behaviour is to return the base index for such accesses; an argument could be made for either not recording them at all, or e.g. setting some flag in the vkd3d_shader_combined_resource_sampler_info structure to indicate dynamic indexing is involved. Ultimately such shaders just aren't going to be usable with combined samplers though.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/466#note_52254
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v9: vkd3d-shader/tpf: Initial support for writing fx_4_0/fx_4_1 binaries.
vkd3d-shader: Add separate binary target type for effects.
vkd3d-shader/hlsl: Handle effect group statement.
vkd3d-shader/hlsl: Add variables for techniques.
vkd3d-shader/hlsl: Rename rule for top-level techniques.
vkd3d-shader/hlsl: Add 'fxgroup' token.
tests: Add some tests for effects groups syntax.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/443