```
Datta: what have we given?
My friend, blood shaking my heart
The awful daring of a moment's surrender
Which an age of prudence can never retract
By this, and this only, we have existed
Which is not to be found in our obituaries
Or in memories draped by the beneficient spider
Or under seals broken by the lean solicitor
In our empty rooms
```
--
v3: vkd3d-shader: Allow compiling d3d bytecode to SPIR-V.
tests: Avoid using "SV_Position" as a name for the vertex shader input.
tests: Use struct vkd3d_shader_scan_signature_info to retrieve the VS input signature.
vkd3d-shader: Do not scan DCL instructions which do not declare resources.
vkd3d-shader: Do not scan the shader in vkd3d_shader_parser_compile() for assembly targets.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/518
On Thu Dec 14 16:34:26 2023 +0000, Henri Verbeet wrote:
> > ```diff
> > -#if defined(SONAME_LIBDXCOMPILER) && !defined(VKD3D_CROSSTEST)
> > +#if defined(SONAME_LIBDXCOMPILER) || defined(VKD3D_CROSSTEST)
> > ```
> Should that just be "#if defined(SONAME_LIBDXCOMPILER)"? We could
> perhaps consider defining SONAME_LIBDXCOMPILER to "dxcompiler.dll" if it
> isn't already defined and we have VKD3D_CROSSTEST, but in principle I
> don't think VKD3D_CROSSTEST needs special handling here.
Defining `SONAME_LIBDXCOMPILER` when the dxcompiler library is not indeed available means that tests start failing. If no soname was specified or detected at configuration time, I don't think we should even try to use that library.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/519#note_55995
```
Datta: what have we given?
My friend, blood shaking my heart
The awful daring of a moment's surrender
Which an age of prudence can never retract
By this, and this only, we have existed
Which is not to be found in our obituaries
Or in memories draped by the beneficient spider
Or under seals broken by the lean solicitor
In our empty rooms
```
--
v2: vkd3d-shader: Allow compiling d3d bytecode to SPIR-V.
tests: Avoid using "SV_Position" as a name for the vertex shader input.
tests: Use struct vkd3d_shader_scan_signature_info to retrieve the VS input signature.
vkd3d-shader: Do not scan DCL instructions which do not declare resources.
vkd3d-shader: Do not scan the shader in vkd3d_shader_parser_compile() for assembly targets.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/518
Goes atop !489. The last 7 commits belong to this MR. Many of these patches are small, but the series can be split further if necessary.
--
v4: vkd3d-shader/spirv: Handle ITOI and UTOU in spirv_compiler_map_alu_instruction().
vkd3d-shader/spirv: Support UINT64 source in spirv_compiler_emit_bool_cast().
vkd3d-shader/spirv: Support 64-bit sources in spirv_compiler_emit_int_div().
vkd3d-shader/spirv: Introduce a UINT64 component type.
vkd3d-shader/spirv: Introduce a data_type_is_64_bit() helper function.
vkd3d-shader/spirv: Use data_type_is_integer() in spirv_compiler_emit_neg().
vkd3d: Pass int64 capability info to vkd3d-shader.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/490
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.
--
v2: tests: Use the vulkan runner to run SM1 compilation tests.
tests/shader-runner: Call each runner only once.
tests/shader-runner: Allow specifying multiple todo() qualifiers on test directives.
tests/shader-runner: Support reading multiple model range args for qualifiers.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/514