Recap:
My previous proposals to extend the shader_runner to SM1 were focusing on separating compilation tests ([shader] directives) from execution tests ([test] directives), and let the generic shader_runner.c:compile_shader() in charge of the former.
However, Henri was more inclined to aim for making the parser agnostic to the language of the tests so we can potentially extend the shader_runner tests to other languages such as d3d-asm. This means, removing the burden of compilation from the parser altogether, and moving it to the runners, probably through a runner->compile function pointer (even if most of them end up doing the same thing, compiling with vkd3d-shader or the native compiler, depending on availability).
Agreeing with going in this general direction, this MR contains patches to do SM1 compilation calling run_shader_tests() for SM1 profiles from the Vulkan runner (skipping execution for now), and some improvements to the qualifiers syntax.
Despite this, there are parallel discussions on:
- Whether to name the shader models individually in the [require] directives or expressing the range of shader models where the test should pass. In the latter case, whether to run for all shader models, only the lowest one in the SM1, SM4, and SM6 groups, or to allow the runner to select a shader model within the range (I feel strongly against this now, I think the runner should just retrieve a boolean in runner->check_requirements).
- Where to do the iteration across different shader models, if in run_shader_tests() or expect each runner to call run_shader_tests() several times as we do now.
But there is no need to settle on something for these yet.
---
Now, what may be the most noisy part of this MR is that even though we are calling run_shader_tests() through the Vulkan runner, this will result in calling shader_runner.c:compile_shader() instead of shader_runner_vulkan.c:compile_shader(), but if we follow the "making the parser agnostic" plan, we eventually should get rid of shader_runner.c:compile_shader() and introduce the runner->compile pointer instead.
--
v10: tests: Use the vulkan runner to run SM1 compilation tests.
vkd3d-shader/ir: Lower texkill instructions to discard_nz.
vkd3d-shader/d3dbc: Emit fixme for HLSL_RESOURCE_SAMPLE_LOD.
tests/shader-runner: Call each runner only once.
tests/shader-runner: Support reading multiple model range args for qualifiers.
vkd3d-shader: Make *src and *dst mutable in vkd3d_shader_instruction.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/514
--
v8: vkd3d-shader/hlsl: Allow non-numeric types in the ternary operator.
vkd3d-shader/hlsl: Separate an add_ternary() helper.
tests: Add many more tests for ternary expressions.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/463
Implements asin, acos, atan, and atan2.
Also includes some tests in a new test file.
One possible problem here is that I'm not sure how to test what Microsoft's atan and atan2 outputs are in boundary cases like atan2(1, 0). I've made the test suites adhere with the calculator program I've been using (Qalculate, which I assume is using libc's atan2).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55154
--
v6: vkd3d-shader/hlsl: Implement atan and atan2.
vkd3d-shader/hlsl: Implement acos and asin trig intrinsics.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/364
This partially reverts commit 67f2da2a8d1f219f528bf820b3d6002c5f34d5e4 which
broke ccache cache as the job configurations were overriding the default
cache configuration from .wine-build instead of extending it.
It then also updates the ccache cache config to add a key and try to avoid cache
invalidation between jobs with different compilers.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4846
Fixes the test name passed to winetest.exe which is otherwise split
into a character array when there's a single line in the winetest.args
file, and then causes it to miss the test and always return success.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4847
Other validation stuff I plan to send as soon as !450 and !550 are in.
I guess the CI is going to timeout because of too many commits, so I'll preemptively stop it.
--
v5: vkd3d-shader/ir: Validate PHI instructions.
vkd3d-shader/ir: Validate modifiers and shift for SSA destinations.
vkd3d-shader/ir: Do not allow IMMCONST and IMMCONST64 as destination registers.
vkd3d-shader/ir: Check that all instructions appear in a block.
vkd3d-shader/ir: Validate RET instructions.
vkd3d-shader/ir: Validate SWITCH_MONOLITHIC instructions.
tests: Add a couple of degenerate switch instances.
vkd3d-shader/ir: Validate BRANCH instructions.
vkd3d-shader/ir: Validate LABEL instructions.
vkd3d-shader/ir: Validate LABEL registers.
vkd3d-shader/ir: Validate that structured CF does not appear in block-based shaders.
vkd3d-shader/ir: Check that SSA registers are used validly.
vkd3d-shader/ir: Check that SSA registers have consistent dimensions.
vkd3d-shader/ir: Check that TEMP registers have consistent dimensions.
vkd3d-shader/ir: Use vkd3d_free() instead of free().
vkd3d-shader/ir: Simplify control flow in vsir_validate_register().
tests: Add a test with non-trivial control flow.
[test] Do not check DXBC checksum.
[test] tests: Dump the DXIL code.
vkd3d-shader/dxil: Handle the DXIL SWITCH instruction.
vkd3d-shader/dxil: Handle the DXIL PHI instruction.
vkd3d-shader/dxil: Handle the DXIL BR instruction conditional variant.
vkd3d-shader/dxil: Handle the DXIL BR instruction unconditional variant.
vkd3d-shader/dxil: Introduce a code block terminator struct.
vkd3d-shader/ir: Include an initial label instruction in the first control flow block.
vkd3d-shader/spirv: Do not emit function code before the main prolog.
vkd3d-shader/spirv: Declare indexable temps as Private unless function scope is specified.
vkd3d-shader/ir: Store code block names in struct vkd3d_shader_desc.
vkd3d-shader/ir: Flatten SWITCH/CASE/DEFAULT/ENDSWITCH control flow instructions.
vkd3d-shader/ir: Flatten LOOP/BREAK/CONTINUE/ENDLOOP control flow instructions.
vkd3d-shader/ir: Flatten IF/ELSE/ENDIF control flow instructions.
vkd3d-shader/spirv: Handle RETP in spirv_compiler_handle_instruction().
vkd3d-shader/spirv: Handle DISCARD and TEXKILL in spirv_compiler_handle_instruction().
vkd3d-shader/spirv: Emit descriptor offset loads in the function entry block.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/559