Using vkd3d-proton 2.13 on Wine 9.0. Not having issues with any specific title but debugging an issue I ran across while testing my own code against vkd3d-proton.
The problem I ran into is: this seems to cause GetProcAddress(LoadLibraryA("d3d12.dll"), "D3D12GetInterface") to evaluate to null with vkd3d-proton. On Windows with native DirectX 12 (not vkd3d-proton) this expression evaluates to non-null.
I’m just wondering if this is intentional or an oversight. AFAICT this function is dead because nothing in the DLL calls it and the DLL doesn’t export it. I don’t think a lot of games use this API because its usage was niche before the recent ID3D12SDKConfiguration1 API (which vkd3d-proton doesn’t implement, but that’s fine and off-topic) or maybe I’m misunderstanding this API and misusing it.
* Which expands to nothing because the def files are supposed to be used instead (730933dc01c2319570d482240e94875d24b56a07). † But is not missing from d3d12core.def.
Using vkd3d-proton 2.13 on Wine 9.0. Not having issues with any specific title but debugging an issue I ran across while testing my own code against vkd3d-proton.
Example program:
Expected behavior:
Program outputs non-zero address of D3D12GetInterface from d3d12.dll.
Actual behavior:
Program outputs 00000000.
AFAICT d3d12.dll is supposed to export D3D12GetInterface, but d3d12.dll from vkd3d-proton does not, because it is missing from d3d12.def.
It is marked DLLEXPORT*:
but is missing from d3d12.def† which is used when building with MinGW and as a result this symbol is not exported from d3d12.dll.
The problem I ran into is: this seems to cause
GetProcAddress(LoadLibraryA("d3d12.dll"), "D3D12GetInterface")to evaluate to null with vkd3d-proton. On Windows with native DirectX 12 (not vkd3d-proton) this expression evaluates to non-null.Adding D3D12GetInterface to d3d12.def indeed makes the expression evaluate to non-null and I can call the function: https://github.com/zopsicle/vkd3d-proton/blob/d5cecf87328569162427da7e0c4c64dfa38b872f/libs/d3d12/d3d12.def#L6
I’m just wondering if this is intentional or an oversight. AFAICT this function is dead because nothing in the DLL calls it and the DLL doesn’t export it. I don’t think a lot of games use this API because its usage was niche before the recent ID3D12SDKConfiguration1 API (which vkd3d-proton doesn’t implement, but that’s fine and off-topic) or maybe I’m misunderstanding this API and misusing it.
* Which expands to nothing because the def files are supposed to be used instead (730933dc01c2319570d482240e94875d24b56a07).
† But is not missing from d3d12core.def.