Hi all,
I have an interesting problem which so far I have been unable to solve, and I'd like to consult your expertise on this. I've looked through the winehq docs extensively and even tried to look at the source code of wine but couldn't figure it out.
Here's the problem: MotherVR - https://github.com/Nibre/MotherVR/releases - is a replacement dxgi.dll for Alien: Isolation on Windows that intercepts DirectX calls in order to show the game in Virtual Reality using SteamVR/openvr. It acts this way by being put into the executable directory and by itself it calls the functions in the original DirectX dxgi.dll.
How could I reproduce this injection in wine? I know dxvk is not supported and it not part of the wine project, but in any case regard this as a broader theoretical question. In that case, I would need MotherVR's dxgi.dll to be loaded first, then internally call the functions in dxvk's dxgi.dll for it to work, right? I've tried many combinations with WINEDLLOVERRIDES to no avail, hasn't worked so far. Would I have to change the source code of wine, dxvk, or MotherVR? MotherVR is still not open-source although it is planned to be.
Also, I wonder if this DLL injection would have memory alignment issues, requiring patches like "Map Image Top Down" - https://github.com/hdmap/wine-hackery/blob/master/f4se/mapimagetopdown.patch -- to work? (this patch is required for the Skyrim Script Extender DLL to work on Linux)
Please advise!
On 1/5/21 7:07 PM, Cláudio Sampaio wrote:
It acts this way by being put into the executable directory and by itself it calls the functions in the original DirectX dxgi.dll.
Your problem probably lies somewhere else, as this mechanism is already fully supported by wine and DXVK when setup correctly. Make sure you are installing DXVK through the setup_dxvk.sh script, and not manually copying the dlls into the game directory. This will put DXVK in your system dll directory (system32 and syswow64), which the thunk will use.
If you still can't get it to work, it may be good to move this discussion to the bug tracker, since as of now it doesn't seem to involve wine development discussion.
Thank you for the response, sorry for disturbing the list with non-wine stuff. I'll do as you suggested.
On Wed, Jan 6, 2021 at 5:14 PM Derek Lesho dlesho@codeweavers.com wrote:
On 1/5/21 7:07 PM, Cláudio Sampaio wrote:
It acts this way by being put into the executable directory and by itself it calls the functions in the original DirectX dxgi.dll.
Your problem probably lies somewhere else, as this mechanism is already fully supported by wine and DXVK when setup correctly. Make sure you are installing DXVK through the setup_dxvk.sh script, and not manually copying the dlls into the game directory. This will put DXVK in your system dll directory (system32 and syswow64), which the thunk will use.
If you still can't get it to work, it may be good to move this discussion to the bug tracker, since as of now it doesn't seem to involve wine development discussion.
@Derek, you know more than I do about dxvk, so I am just making you aware of a possible name confusion in Cláudio's mail: dxgi.dll and dxvk.
As Derek says, putting a replacement dxgi.dll in the game dir and having it call up the one from system32 should work fine. The potential problem is the dxgi interface. Wine implements the dxgi and d3d11/12 layering with COM aggregation et all, but to my knowledge dxvk does not. So try if you have luck with Wine's own d3d11 implementation
But even then, I don't know if our dxgi/d3d layering has ever been confronted with a Windows application that needs it. We have tests for it in dxgi/tests and d3d11/tests that pass on Windows and Wine, but there may be bugs.
Am 07.01.2021 um 06:40 schrieb Cláudio Sampaio patola@gmail.com:
Thank you for the response, sorry for disturbing the list with non-wine stuff. I'll do as you suggested.
On Wed, Jan 6, 2021 at 5:14 PM Derek Lesho <dlesho@codeweavers.com mailto:dlesho@codeweavers.com> wrote: On 1/5/21 7:07 PM, Cláudio Sampaio wrote:
It acts this way by being put into the executable directory and by itself it calls the functions in the original DirectX dxgi.dll.
Your problem probably lies somewhere else, as this mechanism is already fully supported by wine and DXVK when setup correctly. Make sure you are installing DXVK through the setup_dxvk.sh script, and not manually copying the dlls into the game directory. This will put DXVK in your system dll directory (system32 and syswow64), which the thunk will use.
If you still can't get it to work, it may be good to move this discussion to the bug tracker, since as of now it doesn't seem to involve wine development discussion.
-- Cláudio "Patola" Sampaio MakerLinux Labs - Campinas, SP Resume https://github.com/Patola/resume Gmail mailto:patola@gmail.com - MakerLinux mailto:patola@makerlinux.com.br - YOUTUBE https://www.youtube.com/user/makerlinux! Facebook https://www.facebook.com/patolinux - Facebook da MakerLinux https://www.facebook.com/makerlinux - Lattes http://buscatextual.cnpq.br/buscatextual/visualizacv.do?id=K4763932Z5