DXVK not used on DirectX8 game

In short… Mafia (2002) (for the record… is my #1 game experience outright) is a DirectX8 game but uses WINED3D instead of DXVK (currently v2.4.1) which gives noticeably worse performance, especially in certain areas in the game. I can get it to use DXVK but I got to set it up manually either through the usual DXVK, or through Crosire’s (d3d9.dll which converts DirectX8 to 9) or through AlpyneDreams (d3d8.dll which is apparently more proper).

more details…

even with a completely fresh Wine prefix… I am not sure if this is a bug in Lutris v0.5.17 (which is the newest currently) but I suspect it is since the game uses WINED3D instead of DVXK like it should as while I can see in the "C:\Windows\syswow64" (which is apparently for 32-bit games (which Mafia (2002) is) where as ‘system32’ folder is for 64-bit) has what I think are symlinks automatically setup by Lutris to stuff like d3d9.dll which redirects to where Lutris stores those files it downloads (i.e. “~/.local/share/lutris/runtime/dxvk/v2.4.1/”), it does NOT do that for the d3d8.dll file specifically which that’s the file I can replace and then DXVK v2.4.1 will show up as active in the game when I add the entry for ‘Libraries’ in relation to the games main exe (game.exe) etc. but I suspect while I could use that as a temporary work around I wonder if that could potentially cause issues in the future as DXVK is automatically updated in Lutris it would point to the new DXVK entries with those symlinks and I would basically be mixing d3d8.dll for DXVK v2.4.1 with a potential future version’s newer files which does not sound like a good idea (I suspect I could force a certain version in Lutris for this Mafia (2002) game as that might help prevent it, but still, what’s happening does not seem proper and I would imagine needs fixing).

so what I am doing currently, which is probably best or at least good enough for now, is to just use the ‘d3d8.dll’ file from… Releases · AlpyneDreams/d8vk · GitHub (I think this sort of stuff was added into DXVK v2.4.0 etc on change log page) ; basically I put the ‘d3d8.dll’ file from that release in the root of game directory and then I simply run the ‘Wine configuration’ stuff and add the ‘d3d8’ entry in the ‘Libraries’ tab (for the game.exe specifically) at which point the game will use DXVK as it shows up as ‘DXVK d8vk-v1.0’ (as you can see it shows this if I add environment variable ‘DXVK=version’ in Lutris options). when I am using the replacement ‘d3d8.dll’ from official DXVK v2.4.1 in the ‘C:\windows\syswow64’ it shows up as ‘DXVK 2.4.1’ in the game so I know it’s using it. note: I used the MangoHud to see it’s using ‘WINED3D’ before I setup DXVK stuff.

so while this generally won’t be a problem for many games, since I would expect a lot of what random people play will use the usual DirectX9-11 game variations, as in that regard things work as expected. but not for this Mafia (2002) game which is DirectX8 as it always defaults to WINED3D instead of DXVK which I suspect is because Lutris does not create a what I think is a symlink to ‘d3d8.dll’. even then, I would still have to add the ‘d3d8’ to Libraries for it to use it (unless there is a way for Lutris to use this stuff automatically like it does for modern games in general(?) like DirectX9 or newer), but at least one can use it once they do that.

so I suspect Lutris needs to fix this in next release unless there is some legitimate reason this is not done(?)

p.s. also, I noticed with the current newest GE 8-26 runner that it will not play the videos in game, which uses “.bik” file extensions. playing around with other things I can sometimes get to play the video but then there is always no sound (once in the actual game stuff appears to work as expected though as it’s strictly in relation to “.bik” videos on this game). but when switching back to GE 8-12 for example everything works as expected. so maybe this is a issue with GE runners somewhere after 8-12(?). so I currently have GE 8-12 setup with the game in a clean wine prefix and the videos etc work as expected.

EDIT (Oct 13th 2024): I pretty much solved the problem in regards to video playback in-game with “GE 8-26” and “UMU-Proton-9.0-3”. I noticed the game itself has two different types of videos of the same videos in root of game directory… “.avi” and “.bik” as the newer runners I am assuming cannot play the “.avi” files since I did a quick test by simply renaming the “intro.avi” to “intro_.avi” and the same with ‘logo1’ and ‘logo2’ files, which apparently disables the game from attempting to use those avi files and apparently forces it to use the “.bik” files instead and now I can use GE 8-26 or “UMU-Proton-9.0-3”.

so for whatever reason I suspect older GE runners (say ‘GE 8-12’) must have been able to play “.avi” files unlike newer ones as I am assuming the game must put priority of the “.avi” over “.bik” files and for whatever reason the newer GE etc runners do not like those “.avi” files as it cannot play them but works fine with the “.bik” ones.

also, I can use the “UMU-Proton-9.0-3” and use “PROTON_DXVK_D3D8=1 %command%” environment variable to enable it’s built-in DXVK v2.4-xxxxxx (‘xxxxxx’ is just a bunch of numbers/letters here after it). for it to use it’s own I had to temporarily rename ‘d3d8.dll’ (which is the one I was using from AlpyneDreams) in the root of the Mafia directory to “d3d8_.dll” so that UMU would use it’s own built-in DXVK. because if I don’t rename that file you can see the game uses the one in the root of the directory.

but with that said… while that stuff basically works now with GE 8-26/UMU etc, ill probably stick with GE 8-12 for now mainly because, while it’s minor enough, the game does not completely take up the whole screen when using GE 8-26 or UMU when starting it as you can still see the Taskbar at the bottom of screen. I can alt+tab out and back to the game and that works (so it takes up fullscreen and taskbar is no longer visible) but with GE 8-12 I don’t have to do that as things just work as intended right from the start. but at least I got more options now if for whatever reason I have to use newer GE or UMU etc in the future and that issue (Taskbar) still remains. but it’s pretty much just this game as other games I play I am pretty sure that issue with Taskbar does not exist. so GE 8-12 is a solid option for this game in particular.