10:01 adavy: linkmauve: hey
10:02 adavy: Yes of course
10:03 linkmauve: For now I’ve written an apitrace-like tool to record the win32 applications, and replay them in my driver natively on Linux.
10:04 linkmauve: https://linkmauve.fr/files/frame-147.png
10:04 linkmauve: This is my state as of yesterday evening. :)
10:05 linkmauve: I haven’t been able to generate a fake dll yet, despite having wine-nine-standalone as a base.
10:07 adavy: looks promising
10:07 adavy: What's the hurdle relative th the dll ?
10:08 linkmauve: I’m not sure, perhaps the __cdecl/__stdcall difference?
10:09 linkmauve: All of my symbols must be mangled to _func@bytes instead of func.
10:10 linkmauve: Also, I guess it is expected, but d3d9-nine.dll.fake doesn’t expose its symbols in the exports section of the PE file, how else are applications supposed to obtain them?
10:14 adavy: The call convention sure complicates things
10:14 adavy: You'll notice that mesa implements all its externally visible functions using the win32 calling convention
10:14 adavy: for none
10:14 adavy: *nine
10:15 adavy: It's possible to not do that, and instead have the dll wrap all the mesa calls inside functions with the win32 calling convention
10:15 adavy: but that means you need to wrap all calls and replace the vtable at all object creation
10:16 adavy: We have done that for the 'nine for l4d2', etc but in reverse (basically the wrapper replaces with linux calls, haha)
10:16 linkmauve: Hmm, I hadn’t noticed no, in the Mesa part I used the normal Linux/C/amd64 calling convention, which… might actually be an issue if I want to run an i686 Windows game. :-°
10:23 linkmauve: Although this will make it harder for native Linux games to use it, since they’ll have to be recompiled against __stdcall which is completely foreign on Linux.
10:23 adavy: Well if that's your objective you should handle the win32 wrapping in the wine dll
10:24 adavy: https://github.com/axeldavy/Xnine/tree/wrapper
10:24 adavy: This is how it is done the reverse way (for l4d2)
10:25 linkmauve: I haven’t found a single native Linux game using this API though, aside from programs I’ve compiled myself. :-°
10:25 linkmauve: Thanks. :)