On Mon Dec 5 13:15:09 2022 +0000, Giovanni Mascellani wrote:
> I just noticed that the the PE shader runner fails an assertion when
> running this test inside Wine, using `VKD3D_TEST_PLATFORM=windows` and
> native `d3dcompiler`:
> ```
> Assertion failed: root_signature_desc.NumParameters <=
> ARRAY_SIZE(root_params), file ../vkd3d/tests/shader_runner_d3d12.c, line 227
> ```
> @fcasas, could you have a look?
That assertion happens when the `root_params` array, declared at the beginning of `d3d12_runner_create_root_signature()` is not big enough to hold all the resources in the shader.
The solution is increasing the size of the array.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/42#note_18835
Fixes a regression introduced by commit d2d9f713df7932aac4b137ec3bf647d5da7faaef.
Fixes black screen in Exceed - Gun Bullet Children.
The check in d3d_device_sync_surfaces() assumes that separate draw textures may be created and successfully bound for software device only. This turns out to be not always the case.
The case which the game hits is that it creates a surface with DDSCAPS_TEXTURE | DDSCAPS_3DDEVICE, DDSCAPS2_TEXTUREMANAGE. Such surface creation is valid and the resulting surface is bindable as render target of a software device (we have a test for that). Such a texture effectively falls into the case when a separate draw texture is created and that looks correct. However this surface, while cannot be used as a render target on hardware device, can still be used as a texture.
So for a general case syncing surfaces for software devices only is wrong (it still looks right for syncing render targets). Just always traversing all the bound textures in d3d_device_sync_surfaces() looks like a waste, while accurately tracking when there are bound textures requiring sync is possible while looks like an unnecessary complication. So triggering the sync by the fact a texture requiring a sync was ever bound (which is in fact not so common case) looks like a reasonable compromise to me.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1688
LLD by default emits only a warning for unknown arguments. This makes it pass -Wl,--disable-stdcall-fixup check, which is in fact an invalid option (and disabled by default anyway), causing warnings spam during the build.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1699
This is called a huge number of time every time the module is loaded. The function does a lot of things, which I believe aren't necessary for uxtheme string comparison. The impact on process startup is noticeable, and this saves ~1min on the Gitlab CI test run.
Instead, convert strings to uppercase beforehand in a locale-independent way, and compare with wcscmp.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1681