And fix some test failures on the way.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54289
--
v2: ntdll: Do not use extended context in RtlCopyContext() if extended state is not copied.
ntdll: Factor out context_copy_ranges() function.
ntdll/tests: Fix random test failure in test_restore_context().
ntdll/tests: Fix xstate tests failing on modern Windows and CPUs with more xstate features.
ntdll/tests: Fix the case of absent XSTATE context in test_copy_context().
https://gitlab.winehq.org/wine/wine/-/merge_requests/1939
SPIR-V doesn't support parallelisation in patch constant functions.
Merging into one phase allows generation of a single patch constant
function and normalises to the shader model 6 pattern.
--
v4: vkd3d-shader/spirv: Merge all shader IR fork and join phases into a single phase.
vkd3d-shader/spirv: Pass a parser pointer to spirv_compiler_generate_spirv().
vkd3d-shader/sm4: Use the instruction array interface in compile_dxbc_tpf().
vkd3d-shader/glsl: Use the instruction array interface in vkd3d_glsl_generator_generate().
vkd3d-shader: Use the instruction array interface in scan_with_parser().
vkd3d-shader/trace: Use the instruction array interface in vkd3d_dxbc_binary_to_text().
vkd3d-shader: Initialise the instruction array in vkd3d_shader_parser_init().
vkd3d-shader/sm4: Store parsed instructions in an array.
vkd3d-shader/sm1: Store parsed instructions in an array.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/60
We are currently not initializing static values to zero by default.
Consider the following shader:
```hlsl
static float4 va;
float4 main() : sv_target
{
return va;
}
```
we get the following output:
```
ps_5_0
dcl_output o0.xyzw
dcl_temps 2
mov r0.xyzw, r1.xyzw
mov o0.xyzw, r0.xyzw
ret
```
where r1.xyzw is not initialized.
This patch solves this by assigning the static variable the value of an
uint 0, and thus, relying on complex broadcasts.
This seems to be the behaviour of the the native compiler, since it retrieves
the following error on a shader that lacks an initializer on a data type with
object components:
```
error X3017: cannot convert from 'uint' to 'struct <unnamed>'
```
--
v8: vkd3d-shader/hlsl: Allow uninitialized static objects.
vkd3d-shader/hlsl: Validate that non-uniform objects are not referenced.
tests: Add additional object references tests.
tests: Test proper initialization of static structs to zero.
vkd3d-shader/hlsl: Initialize static variables to 0 by default.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/54