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.