Thank you very much for your reply. However, I have many questions about the wiki help page:
And to answer your question in another email: on the wiki[1] there is some documentation on how to build vkd3d from sources and use it in Wine, without relying on Wine's convenience copy.
[1]
https://gitlab.winehq.org/wine/vkd3d/-/wikis/Building-a-MinGW-WoW64-Wine-wit...
1. It actually mentions two ways to test vkd3d. The first one is available at: https://gitlab.winehq.org/wine/vkd3d/-/wikis/home ``` 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.
$ ../wine-git/configure PKG_CONFIG_PATH=$HOME/src/vulkan/install/lib/pkgconfig ```
However, following the steps didn’t work. It seems that VKD3D_FLAGS and VKD3D_LIBS have been deprecated?
2. The second method is the one you provided on this page:
When I tried following the instructions on this page, I encountered many issues. It seems to treat vkd3d as a .dll file instead of an .a file. Additionally, during ./configure, it seems to treat the host environment as Windows, requiring dependencies to be reinstalled even if they are already installed. It doesn’t feel like a testing environment meant for Ubuntu x64. Is that correct?
On Tue, Nov 26, 2024 at 10:01 PM Giovanni Mascellani < gmascellani@codeweavers.com> wrote:
Hi,
Il 26/11/24 14:18, zhengxianwei ha scritto:
I tried replacing Wine’s built-in DLLs with the d3d12.dll compiled from vkd3d-proton and the dxgi.dll compiled from dxvk.
However, I noticed that Wine’s built-in D3DCompile2 still calls vkd3d_shader_compiler(https://gitlab.winehq.org/wine/wine/-/blob/master/ dlls/d3dcompiler_43/compiler.c?ref_type=heads#L573 https:// gitlab.winehq.org/wine/wine/-/blob/master/dlls/d3dcompiler_43/ compiler.c?ref_type=heads#L573), which belongs to vkd3d, not
vkd3d-proton.
That's right, vkd3d-proton doesn't ship an HLSL shader compiler, so there's no way it can be used to implement D3DCompile2().
Does this mean that even in Proton, vkd3d and vkd3d-proton coexist, and it’s not possible to completely replace vkd3d?
Yes, Proton ships both vkd3d and vkd3d-proton; by default it uses vkd3d for the HLSL shader compiler and vkd3d-proton as the D3D12 implementation. By setting environment variable PROTON_USE_WINED3D=1 you can use vkd3d for D3D12, but you can't use vkd3d-proton for the HLSL shader compiler because, as I said, it's not a feature implemented in vkd3d-proton. At any rate, if you're using Proton the Proton script itself will care about copying DLLs and setting whatever has to be set so that you're using vkd3d or vkd3d-proton depending on the environment variables.
So if there’s a bug in it, I would still need to fix the issue in vkd3d rather than being able to replace it with functions from vkd3d-proton. Is that correct?
Yes, any bug in vkd3d must be fixed in vkd3d and any bug in vkd3d-proton must be fixed in vkd3d-proton.
However, the fact that vkd3d is the only possible implementation for the HLSL shader compiler shouldn't prevent you from using vkd3d-proton as a D3D12 implementation, if that's what you want to do. You just have to install it properly. I cannot help you with that because I never tried, you should look for the vkd3d-proton documentation.
And to answer your question in another email: on the wiki[1] there is some documentation on how to build vkd3d from sources and use it in Wine, without relying on Wine's convenience copy.
[1]
https://gitlab.winehq.org/wine/vkd3d/-/wikis/Building-a-MinGW-WoW64-Wine-wit...
HTH, Gio.