On Thu, Nov 28, 2024 at 12:16 AM Francisco Casas <fcasas@codeweavers.com> wrote:
Hi,

Thanks for pointing out the errors in the page, I have to update it,
albeit seems that in this case you don't need to do crosscompilation and
you are on the right track compiling proton.

Are you saying that I don’t need cross-compilation? Are you referring to the process mentioned on this page: Building Wine with Direct3D 12 support?


```

Wine uses pkg-config to find vkd3d libraries. If vkd3d libraries are

installed system-wide, the Wine configure script should find the vkd3d

libraries automatically. You can also use PKG_CONFIG_PATH,

VKD3D_CFLAGS or VKD3D_LIBS to override pkg-config search

path, C compiler flags for libvkd3d, or linker flags for

libvkd3d, e.g.


```


But in reality, this doesn’t seem to work because the wine configure script has long removed VKD3D_CFLAGS and VKD3D_LIBS. At least, I couldn’t find the configurations mentioned in this document. So, it seems this page is outdated.

 

On 11/27/24 9:34 AM, zhengxianwei wrote:
 > Unfortunately, when using VKD3D-Proton to run the program, new issues
 > arise. Specifically, its HLSL implementation (part of the VKD3D module)
 > seems to lack support for function overloads (source code reference
 > <https://gitlab.winehq.org/wine/vkd3d/-/blob/master/libs/vkd3d-shader/
 > hlsl.y?ref_type=heads#L3014>).

The issue here is that function overload is not implemented yet.

Initially we had the policy of always prioritizing an exact type match
overload if there is any, which made a lot of shaders compile, but we
removed this in:

fef118555cd6341eb648f482a4517d61c347a0d3

because there are some odd cases where this isn't true: e.g. functions
with "float" and "float1" arguments. And we want to avoid
misscompilations on vkd3d upstream.

The version of vkd3d in stable releases of Proton (not to be confused
with vkd3d-proton) keep this hack to avoid regressions.

You can apply the following patch to your vkd3d in proton before
compiling proton to add the hack again.

https://gitlab.winehq.org/fcasas/vkd3d/-/commit/4d2637bfc66edd449745b7410043b81b68189af7


We are working on a proper implementation of overload resolution but it
might take time.

This is truly excellent advice. In the future, when I encounter errors, I should look into the Git log history.


The changes in this commit don’t seem to be a final solution, but it’s a good starting point.

 

Best regards,
Francisco.