First part of v2 of !27, which aims to:
* Allow allocation of variables of complex types that contain both numerics and objects across multiple register sets (regsets).
* Support the tex2D and tex3D intrinsics, inferring generic samplers dimension from usage, writing sampler declarations, and writing sample instructions.
* Support for arrays of resources for both SM1 and SM4 (not to be confused with the resource-arrays of SM 5.1, which can have non-constant indexes).
* Support for resources declared within structs.
* Support for synthetic combined samplers for SM1 and synthetic separated samplers for SM4, considering that they can be arrays or members of structs.
* Imitate the way the native compiler assigns the register indexes of the resources on allocation, which proved to be the most difficult thing.
* Support for object components within complex input parameters.
* Small fixes to corner cases.
This part consists on parsing the `tex2D()` and `tex3D()` intrinsics and beginning to support the allocation of variables across multiple regsets.
The whole series, is on my [master6](https://gitlab.winehq.org/fcasas/vkd3d/-/commits/master6) branch.
--
v3: vkd3d-shader/hlsl: Allocate register reservations in a separate pass.
vkd3d-shader/hlsl: Allocate objects according to register set.
vkd3d-shader/hlsl: Keep an hlsl_reg for each register set in hlsl_ir_var.
vkd3d-shader/hlsl: Store the type's register size for each register set.
vkd3d-shader/hlsl: Parse the tex3D() intrinsic.
vkd3d-shader/hlsl: Parse the tex2D() intrinsic.
vkd3d-shader/hlsl: Avoid segfault on missing sampler.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/66
Required for !1857 to not break when comctl32 version 6 isn't requested by application (in particular, found this in [qapitrace](https://github.com/apitrace/apitrace)).
Manifest resource id and assembly identity name match with Windows.
For isolation purposes, activation context is disabled while emitting events.
--
v2: comdlg32: Enable visual styles when showing IFileDialog.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2068
Today, test_RtlUniform() skips almost all of its tests on Windows Vista
or later. The skipped tests only succeed in Windows XP, and fail on
Windows Vista or later.
This is because RtlUniform()'s behavior has changed, presumably due to a
bug fix shipped in Windows Vista. It appears that RtlUniform, a linear
congruential generator, could overflow before computing the modulo in
WindoWs XP. This is no longer the case in Windows Vista or later.
Meanwhile, we no longer support Windows XP behavior and thus do not test
for it regularly; therefore, the tests are obsolete as of 2023.
Remove obsolete tests that no longer work with any of the Windows
versions actively tested by WineHQ (as of 2023), and replace them with
updated tests that works in the Windows versions from Vista up to 10.
Also, fix Wine's RtlUniform() to match the new behavior accordingly.
--
v7: ntdll: Fix integer overflow in RtlUniform.
https://gitlab.winehq.org/wine/wine/-/merge_requests/821
Today, test_RtlUniform() skips almost all of its tests on Windows Vista
or later. The skipped tests only succeed in Windows XP, and fail on
Windows Vista or later.
This is because RtlUniform()'s behavior has changed, presumably due to a
bug fix shipped in Windows Vista. It appears that RtlUniform, a linear
congruential generator, could overflow before computing the modulo in
WindoWs XP. This is no longer the case in Windows Vista or later.
Meanwhile, we no longer support Windows XP behavior and thus do not test
for it regularly; therefore, the tests are obsolete as of 2023.
Remove obsolete tests that no longer work with any of the Windows
versions actively tested by WineHQ (as of 2023), and replace them with
updated tests that works in the Windows versions from Vista up to 10.
Also, fix Wine's RtlUniform() to match the new behavior accordingly.
--
v6: ntdll: Fix integer overflow in RtlUniform.
https://gitlab.winehq.org/wine/wine/-/merge_requests/821
--
v6: tests: Test entry point semantics on function declarations.
tests: Add more tests for early return from the entry point.
tests: Add some tests for early return from user-defined functions.
vkd3d-shader/hlsl: Emit a hlsl_fixme() for HLSL_IR_CALL instructions.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/65
Fixes error connecting to servers in Life is Strange Remastered (due to timeout).
When there are multiple IP addresses for a host name Linux gethostbyname() returns those in random order upon each call (meaning to provide server load balancing). On Windows the order of IP addresses is not determined as well but it is the same on consequent calls (changes after network resets and probably DNS timeout expiration).
The game executes multiple http requests over TLS connection through its own libraries using only winsock from Wine. Upon executing each next request it calls gethostbyname() for the server DNS name and uses the first returned IP address. When that's different from the previous IP address used for established TLS connection it doesn't reuse the connection and establishes the connection from scratch which is very long process due to how the game does it (on Windows as well).
One obvious way to make gethostbyname() behave like Windows would be to cache the results we get from host. But caching gethostbyname() results is tricky, there are already host-side caches which take into account DNS timeouts and network interfaces change. It is possible in theory to cache the result and then still call native gethostbyname() and keep the order if nothing else has changed in the reply, but it seems to me that would complicate things more than this patch does. The patch sorts the output by IP address randomly hashed with a random transform hash established only once per process run. So it will still provide load balancing between the IP addresses between different clients and different process instances while will be returning the same order of IP addresses on consequent calls.
--
v3: ws2_32: Provide same address order from gethostbyname() on consequent calls.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2074
Bunch of misc fixes and preparations for further improvements. The location changes are especially important later when we'll use outer windows everywhere we pass them to external callers (such as script engines, since inner windows are an implementation detail and all operations otherwise should go through the outer window "proxy").
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2069
Fixes error connecting to servers in Life is Strange Remastered (due to timeout).
When there are multiple IP addresses for a host name Linux gethostbyname() returns those in random order upon each call (meaning to provide server load balancing). On Windows the order of IP addresses is not determined as well but it is the same on consequent calls (changes after network resets and probably DNS timeout expiration).
The game executes multiple http requests over TLS connection through its own libraries using only winsock from Wine. Upon executing each next request it calls gethostbyname() for the server DNS name and uses the first returned IP address. When that's different from the previous IP address used for established TLS connection it doesn't reuse the connection and establishes the connection from scratch which is very long process due to how the game does it (on Windows as well).
One obvious way to make gethostbyname() behave like Windows would be to cache the results we get from host. But caching gethostbyname() results is tricky, there are already host-side caches which take into account DNS timeouts and network interfaces change. It is possible in theory to cache the result and then still call native gethostbyname() and keep the order if nothing else has changed in the reply, but it seems to me that would complicate things more than this patch does. The patch sorts the output by IP address randomly hashed with a random transform hash established only once per process run. So it will still provide load balancing between the IP addresses between different clients and different process instances while will be returning the same order of IP addresses on consequent calls.
--
v2: ws2_32: Provide same address order from gethostbyname() on consequent calls.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2074