Can't debug without an apitrace.
Also, it makes very little sense that 54382ae is causing the issue since it actually makes shaders compile that otherwise would just fail to compile. Did the commit right before that work?
Also, please don't use Mesa 17.3.7, use mesa-git instead.
You were right. It is caused by 19e0829 which I have accidentally skipped in initial testing and in later check.
Since mesa 18 was planned for release yesterday, I'll wait for it. I hope that mesa 18 will be fine for testing.
This might be renderer bug as well, since it is not exactly pinnacle of safe software - it does very little error checking. This might be reason why it does not work in wine, not even with native d3d11_43 and just segfaults.
I have also found, that it failed with same error even for some people on Windows.
Hm, interesting. Can you try commenting out these lines:
https://github.com/doitsujin/dxvk/blob/master/src/dxgi/dxgi_output.cpp#L193-L194
It works!
Alright, thanks for testing that.
So it's an issue with how the DXGI part enumerates resolutions. No idea how to fix that to be honest, especially without breaking other games (like Dark Souls 3), where the old code caused issues.
Maybe time will tell.
For now, I might be only person who plays G2 with GD3D11 in wine. I'll be more than happy to write my personal build script that will remove the lines. Now I can play G2 in 60 FPS instead of around 17 in city with stock DX7 renderer.
Many thaks for DXVK and for solution to my problem.
I have added game name and renderer name into title so others could find this if necessary.
One thing you could actually try is to record an apitrace with the broken version of DXVK. It won't get you any further, but getting an idea of what the game is trying to do and where it's failing would be helpful.
I have something better - native apitrace: https://drive.google.com/file/d/1vRNuUjEcUcByC_oh4Kg-hWO-HLTvpFGp/view?usp=sharing (267.7 MiB compressed; 519 MiB extracted). I had to rewrite imports in game exe file to load "ddrav.dll" instead of "ddraw.dll" (I have renamed ddraw.dll of GD3D11 to ddrav.dll) and then it worked with native d3d11_43. For some reason WINEDLLOVERRIDES="d3d11_43=n;ddraw=n" or "n,b" was not working and caused segfault (propably GD3D11 bug or weird interference with wine). Now the game works... with 2 FPS, but it does at last. There are some wirds thing, like short flashes of texts over the screen and white ground for short period of time when I loaded save game. This does not happen with DXVK - game works perfectly with it. Well, except for the settings dialog - works with native d3d11_43 but crashes with DXVK (that dialog is in the trace file too).
Quite interestingly, d3dretrace of captured trace works with clean wine and renders exaclty the same as game running with native d3d11_43. Is it normal? I'd expect that it would not work, when game itself does not work with clean wine.
Proof that game works with DXVK and that it's not just my imagination:

I run it with
WINEDLLOVERRIDES="dxgi,d3d11=n;ddraw=n,b" wine Gothic2.exe
Thanks, will take a look at it later.
Can you test this again with the latest commit?
Looking at your apitrace file, I don't really see anything that would cause such an issue. There's something else though, the game seems to be using Direct3D 10.1 on top of D3D11 - which is weird, and currently doesn't work on DXVK at all. I'm quite surprised that the game even runs.
No change, but workaround with deletion of two lines still works.
Also after around 5 minutes something broke and huge chunk of land and some walls got covered in grass. I have never seen it before, but I guess it is just some random driver or GD3D11 bug and I was lucky it never happended before (I am still on mesa 17).
Could there be some kind of dynamic selection beween 10.1 and 11 and it chose 10.1 with native d3d11_43? If you tell me, what in particular is supposed to not work, I'll look into source code of GD3D11 and check that out.
@neVERberleRfellerER How did you exactly changed the imports of the Gothic2.exe ?
Because i get this error:
0009:err:module:attach_dlls "ddrav.dll" failed to initialize, aborting
@MordragTV Just rewrite it in exe with hex editor. I think there was just one near the end. Beware that you do NOT have to do this when you plan to use DXVK. Rewriting imports was only necessary to run the game with native d3dx11_43 but that way it runs only at 4 FPS max.
Update:
@doitsujin @MordragTV Big news: I screwed here badly. Game was loading forgotten native d3dx11_43 from game directory. I didn't even know it's possible to use DXVK with native d3dx11_43 and I have not found any mentions of this combinations on the Internet. I am sorry for misleading infomation in this thread.
Summary:
(these are results of new tests)
Mhh maybe i am doing something wrong but when i comment out those two lines my build fails.
I have to comment out the lines from 210 to 212, too
210 mode.Scaling = isStretched 211 ? DXGI_MODE_SCALING_STRETCHED 212 : DXGI_MODE_SCALING_CENTERED;
But when i then try to start gothic i get access violation fail
This is my Wine Bash Output https://pastebin.com/YuhWpATj
And this is the Access Violation Error Message http://i.imgur.com/AdDw4qQ.png
I tried to install dotnet and vcruntimes but i somewhat get the feeling the error layes in the d3d11.dll and dxgi.dll. I get no output in the d3d11 and dxgi logs neither.
I start it with env DRI_PRIME=1 WINEPREFIX=/home/tom/.wineprefix/gothic-dxvk WINEARCH=win32 WINEDLLOVERRIDES=dxgi,d3d11,ddraw=n wine '/home/tom/.wineprefix/gothic-dxvk/drive_c/Program Files/JoWooD/Gothic II/System/Gothic2.exe'
@MordragTV Your WINEDLLOVERRIDES is wrong. It must be exactly
WINEDLLOVERRIDES="dxgi,d3d11=n;ddraw=n,b"
Notice the "n,b" instead of "n" and the semicolon and... well, just copy it. It works for me
You are suppoosed to comment ONLY
https://github.com/doitsujin/dxvk/blob/e06300d592f17ade25511e4f92a679192f1d8df3/src/dxgi/dxgi_output.cpp#L196-L197
original comment references master, but lines were pushed down since.
Well youre right i commented out the wrong lines . Now the build runs flawlessly.
But i get stil the Access Violation Error altough it is a different now and the d3d11 and dxgi logs got output now ,too.
Did you install any packages in wine like dotnet ?
@MordragTV Hmm. I have these native DLLs in my Gothic2/System directory:
Both D3DCompilers are from GD3D11 package (i think). If not, you can get them from http://www.dege.freeweb.hu/dgVoodoo2/dgVoodoo2.html . The d3dx11_43.dll is from DX redistributables - you can get it from Windows or from winetricks (I have NOT installed it into my main wineprefix - I have just put that one DLL in my Gothic2/System directory, but even installing it directly should work - UNTESTED!!). Then you need directmusic/dsound as stated in wine wiki - I have these in my main wineprefix installed using winetricks. Without dsound and directmusic game crashed with music enabled.
Thank you for helping me i am getting closer to get the game to work.
It seems like not every version of the Directx11 Renderer works.
I tried to use the x17 version from degenerated wich wont work.
Now i downloaded the x14 version ... The game starts but ingame are really weird glitches and as soon as i try to get in the settings with f11 the game crashes.
Maybe this has something to do with unimplemented features.
Can u maybe send me the link to youre gd3d11 version because i cant find it on google.
@MordragTV I have the one from Liker, which is used in Returning 2.0:
https://yadi.sk/d/GoU3_0_L3GMPJh
Settings don't work with DXVK. I am using default settings. It works with wind3d+d3dx11_43+imports hack, but settings decrease FPS to something between 0 and 1 and changing settings freezes the game (maybe it would work after more minutes of waiting, but I doubt).
Update: it's actually 17.5, not 14.5. Sorry. I have updated OP.
@neVERberleRfellerER Its working now!
Just had to install a 4gb patch and now everything exept the settings work.
@neVERberleRfellerER Can you test if bb3e3c9e4f15e5232d1a60ffbda00d9fd55064c4 fixes the issue?
@doitsujin It works. Thanks a lot for everything.
@neVERberleRfellerER do you happen to have a gist or some notes available on how to use gothic2 with dx11renderer on linux with wine through dxvk? that dx7 renderer is really not that geat :o
I've got my old gothic2 gold install from original cd's still in my prefix, and I've got a spine.exe with wine-5.7 (didn't work prior to that due to missing symlink support), so that should enable me to follow any instructions.
@stefson There isn't much to document. Make sure you have working DXVK. Then just download your favourite GD3D11 version (I use https://github.com/Kirides/GD3D11 - binaries are available in Releases) and extract it to your Gothic/System directory. And that's it. I don't use Spine.
@neVERberleRfellerER it never worked for me, but after some time I realized that one has to set an additional dll override for ddraw. This is discouraged, yet it doesn't work otherwise. Tested with this version of dx11 renderer: https://www.worldofgothic.de/download_590.htm
@stefson What override? I have installed DXVK with Gothic2 NoTR, SystemPack, PlayerKit and Fix. The game turns on properly but it doesn't recognize DXVK_HUD=full option so I assume it doesn't work.
@bodzioslav read this issue: https://github.com/Kirides/GD3D11/issues/14
solution 1 as a minimal setup: https://github.com/Kirides/GD3D11/issues/14#issuecomment-739528956
solution 2 with fancy lutris: https://github.com/Kirides/GD3D11/issues/14#issuecomment-827858549
DXVK_HUD=full`x1 2021-05WINEDLLOVERRIDES="dxgi,d3d11=n;ddraw=n,b"x2 2018-04WINEDLLOVERRIDESx1 2018-04WINEARCH=win32x1 2018-04WINEDLLOVERRIDES=dxgi,d3d11,ddraw=nx1 2018-04WINEPREFIX=/home/tom/.wineprefix/gothic-dxvkx1 2018-04WINEDLLOVERRIDES="d3d11_43=n;ddraw=n"x1 2018-03d3dcompiler_43.dllx1 2018-04d3dcompiler_47.dllx1 2018-04d3dx11_43.dllx1 2018-04d3d11.dllx1 2018-04dxgi.dllx1 2018-04ddrav.dllx2 2018-04ddraw.dllx1 2018-03
Since commit 54382ae, game crashes at startup with
D3DXERR_CAPSNOTSUPPORTED.Software information
Gothic 2 2.6 Night of the Raven - Russian version - with GD3D11 17.5 by Liker. Default settings, since attempt to show configuration dialog causes segfault. Worked in 0ab27aa; in 4ce64bd everything was black, but that was reverted).
System information
Apitrace file(s)
I can't create apitrace without DXVK, since game does not work without DXVK at all.
Log files
UPDATE
I have missed 87d6fde, but with that, game runs, but everything is black.