Indexing with non-constants offsets requires relative addressing in SM4. In assembly, this is written like in the following example:
```
x1[r1.x + 3]
```
The first part of this patch series only includes support for indexing vectors with non-constant indexes.
Following patches in https://gitlab.winehq.org/fcasas/vkd3d/-/commits/nonconst-offsets-3.
---
Non-constant indexing of vectors cannot be implemented with relative addressing in SM4 because this
indexation cannot be performed at the level of register-components, only whole registers.
Mathematical operations must be used instead.
For floats, the native compiler seems to index an identity matrix, to
get the i-th column, and then proceedes to compute the dot product
between that column and the vector. For ints, bit operations seem to be
performed.
While probably less efficient, this implementation complies with the
type-checking at the IR level and when writing bytecode.
--
v5: vkd3d-shader/hlsl: Support non-constant vector indexing.
vkd3d-shader/hlsl: Lower dot for non-float types.
vkd3d-shader/hlsl: Introduce transform_derefs().
tests: Test indexing temps.
tests: Test non-constant vector indexing.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/207
BORING
--
v2: vkd3d-shader/hlsl: Return an hlsl_ir_node pointer from hlsl_new_constant().
vkd3d-shader/hlsl: Pass a hlsl_constant_value pointer to hlsl_new_constant().
vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_bit_or().
vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_bit_and().
vkd3d-shader/hlsl: Pass hlsl_constant_value and hlsl_type pointers to fold_bit_xor().
vkd3d-shader/hlsl: Only read used coordinates in encode_texel_offset_as_aoffimmi().
vkd3d-shader/hlsl: Use the writemask to map the coords swizzle for load instructions.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/223
This will be required for MFT decoder transforms to work. They don't usually produce an output sample on every pushed input sample, and the session may need to request more sample from upstream and push them into the transform or it will not get any output and get stuck.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3004
I don't know why the pipeline fails. The author name and email are set on all eight commits:
```
$ git clone https://gitlab.winehq.org/dropbear/wine.git && cd wine
...
$ git checkout afunix
Branch 'afunix' set up to track remote branch 'afunix' from 'origin'.
Switched to a new branch 'afunix'
$ git log --oneline --author="dropbear.sh(a)gmail.com" --pretty=format:"%h %an <%ae> %s"
c0fdbf09008 Ally Sommers <dropbear.sh(a)gmail.com> Merge branch wine:master into afunix
44e2032ce58 Ally Sommers <dropbear.sh(a)gmail.com> ws2_32/tests: Add test for AF_UNIX sockets.
668d655c7a6 Ally Sommers <dropbear.sh(a)gmail.com> server: Fix getsockname() and accept() on AF_UNIX sockets.
418bd0cb66f Ally Sommers <dropbear.sh(a)gmail.com> server: Introduce error when attempting to connect() to abstract AF_UNIX sockets.
50985b2b9bf Ally Sommers <dropbear.sh(a)gmail.com> server: Allow for deletion of socket files.
a12834a6a76 Ally Sommers <dropbear.sh(a)gmail.com> ws2_32: Add support for AF_UNIX sockets.
85b6afe3e2b Ally Sommers <dropbear.sh(a)gmail.com> ntdll/unix: Add support for AF_UNIX sockets to multiple functions.
ab6e1c5d48d Ally Sommers <dropbear.sh(a)gmail.com> ws2_32: Add afunix.h header.
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2786#note_34940