10:45 q4a: It's too quiet here. I've been testing one theory for the past few weeks: you can write a simple wrapper for Nine that can be very easily added to games that uses DXVK. I already added Nine support for 2 games (Sea Dogs and Perimeter), but Nine wrapper didn't look very nice.
10:48 q4a: I slightly improved Nine wrapper code, called it Nine Native and moved it to a separate repository( https://github.com/q4a/nine-native ). Now adding Nine for DXVK game will require a minimum of changes in the C/CPP code. Almost all the changes in the example are made in the make files: https://github.com/storm-devs/storm-engine/pull/473
10:55 q4a: But testing Nine Native on Sea Dogs game (for which I already added some Nine support) seemed strange and I added support for DXVK and Nine in a completely new game, that has DX9-DX11 renders for Windows and OpenGL render for Linux. This game is https://en.wikipedia.org/wiki/S.T.A.L.K.E.R.:_Call_of_Pripyat
11:00 q4a: The code is still need to refactor and it's not ready to merge, but DXVK and Nine versions are already working and adding Nine support was also not difficult: 1) Add External project Nine Native to CMake 2) Check and don't use Vulkan window 3) Make sure that you use WINAPI definition from Nine Native repo, and not just simple#define WINAPI
11:04 q4a: There is only one thing that upset me - FPS in Stalker+DXVK is higher than in Stalker+Nine. Compare:
11:04 q4a: https://user-images.githubusercontent.com/1950719/227769677-d8bd489c-0b64-4453-915c-ea9f35eb97ed.png - DXVK (55-65 FPS)
11:04 q4a: https://user-images.githubusercontent.com/1950719/227769688-e47a9e73-c7cf-40be-989d-1067ca9f4eb4.png - Nine (25-35 FPS)
11:05 q4a: (This is x86_64 native builds without Wine)
15:09 adavy: We have done that already with zmike
15:11 adavy: we have a dll wrapper that wraps all nine codes and uses the similar to integrated dxvk calling convention
15:11 adavy: also there is a workaround to fix a dxvk mistake
15:11 q4a: adavy: you are talking about this repo? https://github.com/zmike/Xnine
15:12 orbea: this is about using nine natively without wine and not about windows dlls?
15:12 adavy: maybe this one https://github.com/axeldavy/Xnine/tree/wrapper
15:12 adavy: yes
15:14 q4a: Mike's code is based on your's + added some vertex hack https://github.com/zmike/Xnine/commits/master
15:15 adavy: ok the vertex hack must be dxvk's mistake
15:16 adavy: strange for the fps in stalker
15:16 q4a: anyway, I was based on this code too, but adding`ALT_WINAPI` is strange for me:
15:16 q4a: https://github.com/axeldavy/Xnine/commit/ecadabf889ea9a0aa2278c1be21c44f673e56aaf
15:17 adavy: but I think I did look at the wine version and didn't find obvious fixes
15:18 adavy: well this is the calling convention
15:18 adavy: basically nine links with WINAPI
15:18 adavy: windows calling convention
15:18 adavy: and thus we wrap with the linux calling convention
15:19 adavy: that's what ALT_WINAPI is doing, but sure the name is bad
15:19 q4a: adavy: About stalker - I think that's it's my mistake and problem that I used `set(CMAKE_POSITION_INDEPENDENT_CODE ON)`
15:19 q4a: I need rebuild and retest it.
15:21 adavy: make sure the nine you test for performance is built for performance
15:22 adavy: that is no debug infos, etc (NINE_DEBUG doesn't do anything)
15:24 q4a: ok, I'll check.
15:27 q4a: Mesa code/d3d9 headers is quite old and have some problems.. like:... (full message at <https://matrix.org/_matrix/media/v3/download/matrix.org/JQSvroSSSBOPoloxpwOEpNtO>)
15:27 q4a: Should I make MR to fix it?
15:29 q4a: + I can see `/*** THIS FILE IS AUTOGENERATED. DO NOT MODIFY MANUALLY. ***/` in https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/include/D3D9/d3d9.h#L23
15:30 q4a: How it should be updated?
15:30 adavy: well I never touched it
15:30 adavy: if it was automaticallt generated, it was long ago
15:31 adavy: yes you can
15:31 q4a: adavy: Are you sure about that?) https://gitlab.freedesktop.org/mesa/mesa/-/commit/c4af3099731f48eb348b1b9a4919bbff14a459ca
15:34 q4a: Ok, I'll find changes, that I made for headers and will create PR in Mesa repo in next week.
15:34 orbea: i would guess if it is generated its somewhere in a python script
15:36 adavy: q4a: err that was long ago
15:36 adavy: I guess someone from wine told me
15:36 adavy: not sure
15:38 adavy: https://learn.microsoft.com/en-us/windows/win32/api/d3d9/nf-d3d9-idirect3ddevice9-getindices
15:40 q4a: adavy: Your changes is good. I mean that you did it without autogenerating, right?
15:40 adavy: yes
15:42 q4a: ok, line /*** THIS FILE IS AUTOGENERATED. DO NOT MODIFY MANUALLY. ***/ come more that 10 years ago in this commit: https://gitlab.freedesktop.org/mesa/mesa/-/commit/fdd96578ef2dfe9c4ad5aab5858036298d444a64
15:42 q4a: it don't have any python code. I'll check all readme from that commit
15:43 q4a: if I will not find any instructions how to regenerate header - I'll remove that comment in my MR
19:10 adavy: well just edit it, that's fine