This series is basically a single patch but that requires @cmccarthy's !225 first. So, the 2 patches from !225 are included as 1/3 and 2/3.
As can be implied from !225, in SM4 bytecode, all the information regarding whether the register uses a writemask, a swizzle, a dimension index, or none of these, is encoded in the register itself, and doesn't depend on the instruction nor argument position on which the register is used.
The possible register encodings are given by the following diagram:
![diagram3.drawio](/uploads/db330c2f7cc47801e3c3672828ae23b9/diagram3.drawio.png)
Where the swizzle_type (MASK4, VEC4, or SCALAR) only matter when the dim is VEC4.
Thus, it makes sense to merge these two types of registers into a single data type as 3/3 does. This has the added benefit of removing additional writemask and swizzle_type arguments to be initialized by pointer in several helper functions.
Also, this would help me to simplify a new version of !229.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/269
On Wed Jul 19 19:09:02 2023 +0000, Huw Davies wrote:
> There are a lot of changes in this MR, in particular the second commit
> could do with splitting and then the MR itself would ideally be split
> into two.
Done.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3328#note_39522
With this pipeline vkd3d automatically gets built on Linux (in an image based on Debian unstable), both in 32 and 64 bit mode. Both builds are tested with radv and llvmpipe. A number of caveats apply, though:
* A number of tests currently fail in llvmpipe, so the llvmpipe jobs are marked as allowed to fail. Ideally we'll eventually fix our bugs and mark the llvmpipe ones in the tests, so that the CI tests completely pass and possible problems in the Vulkan driver are recorded at a better granularity (this is the reason why GitLab says that the pipeline is passed with warnings: the warnings are that there are jobs that failed, even if they were allowed to fail).
* ~~The runners provided by the GitLab instance don't have a GPU available, so I configured my own computer (equipped with an AMD Radeon RX 5700 RX) to provide a runner with access to the GPU. This setup is not currently satisfying: for me, because I use that computer for other things and I don't like having random code submitted to it (it is theoretically sandboxed, but sandboxes are not always bullet-proof, especially if they have access to a GPU); for the users, because my computer might be unavailable at any time. I'll work on a better solution. For the time being I intend the runner to only accept jobs from the master branch; once a better solution is implemented I'd like to run the pipeline for MRs too.~~ **Fixed**, now there is a shared worker with an AMD GPU available.
* While the `Dockerfile` and related assets do not necessarily need to be available in this repository, given that the CI accesses the binary image from the Docker hub anyway, I think it's still valuable to have them, so others can improve them (and for sure improvement opportunities are nowhere near missing). However, other ways to make them available can be found, if for some reason it is not liked to have them in this repository (they are not pretty!).
* ~~One of the reason they are not pretty is that I have a custom hack to compile `widl` from the Wine sources without compiling (or installing from the distribution) the whole of Wine, in the interest of keeping the Docker image small (well, small-ish: Vulkan drivers, compilers and X libraries are not small anyway).~~ **A better solution was implemented**
* ~~Again on the subject of the Docker image, I am currently putting the binary image in my own namespace on the Docker hub. Using the GitLab container registry in the namespace of the Wine project would probably be better, so that I am not a bottleneck in the future.~~ **Done**
* ~~Even if we discount all the points above, this MR cannot be merged yet, because my runner is currently configured for my namespace only. I guess I need the intervention of a GitLab admin to fix that. However, I think there's already material enough for valuable feedback.~~ **Fixed too**
--
v5: ci: Introduce a CI pipeline for GitLab.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/271