protonscr

GTA IV mirror bug

dxvkclosed d3d9not a bug
doitsujin/dxvk#2901 · opened 2022-09-09 by MiesThies · updated 2022-09-19 · 14 comments · github
1 matching comments, n / p to jump
MMiesThies 2022-09-09 github

As seen in the screenshots, the mirrors look off, when DXVK is installed.

Actually, when I wanted to create the trace file, I couldn't reproduce the problem. Before I only had d3d9.dll, dxgi.dll, and dxvk.conf in the game directory, then I put in d3d9.dll, d3d11.dll, dxgi.dll and dxgitrace.dll from the folder: apitrace-msvc/x86/lib/wrappers

This is weird. So if I just keep these files in the game directory, I guess my problem is "solved", but again, with only the aforementioned files from \dxvk-1.10.3.tar\dxvk-1.10.3\x32, the mirrors looked off. I hope you can work with what I provided.

Software information

GTA IV, downgraded to patch 1.0.8.0, Max ingame settings

System information

  • GPU: RTX 2080
  • Driver: 516.94
  • Wine version:
  • DXVK version: Version 1.10.3

Apitrace file(s)

(https://drive.google.com/file/d/1LfolKr0Izyb1WXXDF2bk7QLlMfk_9MmB/view?usp=sharing)

Log files

PlayGTAIV_d3d9.log

BBlisto91 2022-09-09 github

apitrace doesn't go through dxvk normally on windows since you replace the dxvk files with dlls of the same name so it's normal that you don't reproduce it there. So you just do the same as when it normally reproduces when making a trace and then the devs can replay the trace on linux together with dxvk to see if something looks off.
For directx 9 games you only need to use the d3d9.dll when using either dxvk or making a apitrace. dxgi was something microsft introduced for dx10 and is also used along with dx11.

Anyway the trace doesn't actually seem to contain anything. Could you try making one again? Only copy the d3d9.dll and delete any others you've put in the folder

KK0bin maintainer 2022-09-09 github

Like Blisto said, your apitrace is basically empty.

Please make another one where you actually run the game and look into the mirror. It doesn't matter that the issue isn't there when you make the apitrace, it will show up when we replay it.

Rrenatopereyra 2022-09-10 github

A while ago, I tried to trace GTA V and my traces were broken in a similar way. IIRC, I determined that the launcher is 32-bit but the game is 64-bit. I didn't spend too much time on it but I wasn't able to get my traces to work in the end, though, even after trying to account for this.

KK0bin maintainer 2022-09-10 github

GTA IV is 32bit.

I cannot fix this without an apitrace.

BBlisto91 2022-09-11 github

From what i can tell this is just how the mirrors look in the game on non native Nvidia. I'm guessing the game uses some nvapi magic which doesn't work together with dxvk even when you don't tell the game you are on a amd gpu (which is done atm for this game). This also doesn't work on Linux atm it seems and it will probably never work on Windows. If that is what the issue is ofc.

Screenshots

Native AMD
native amd

Native Nvidia
nvidia native

I have made a apitrace on both native amd and nvidia. Mirror is at the end.
AMD
https://mega.nz/file/ApZhALrC#PkW8HubveSML5k_HRhmLpJMAV9y82T79cB7TuKqDSE0

Nvidia
https://mega.nz/file/I0p0jAKR#9r6PHSx133k-JnxUjM1UfKjyqVAyENeyRLWhnA3yrwU

Ppchome 2022-09-11 github

-forcehighqualitymirrors ?

BBlisto91 2022-09-11 github

Great option lol.

Yes that did seem to make them high quality on native amd, so it's not a nvapi thing afterall. It didn't seem to help with dxvk on windows.
But it did help with dxvk on linux. Just don't change reflection quality while ingame or else they will look bad again until you restart.

Reading online it described as -forcehighqualitymirrors: Enable 64 bit mirrors. But i'm not really sure what that means in the context of a 32bit game or with dxvk on windows.

Ddoitsujin maintainer 2022-09-11 github

Probably refers to the render target being 64 bit (i.e. RGBA16).

KK0bin maintainer 2022-09-11 github

image

image

Both apitraces look just fine with DXVK.

KK0bin maintainer 2022-09-17 github

Looks like the game simply renders higher quality reflections if it detects a Nvidia GPU.
The problem is that we have to lie to the game and say it's running on an AMD GPU to avoid it calling NvAPI.

KK0bin maintainer 2022-09-17 github

We did dig a bit more and found out how to make the game use the Nvidia render path for mirrors. That PR above will make the game enable better looking mirrors with DXVK.

Ppchome 2022-09-17 github

I found this option (d3d9.supportDFFormats=False) in my old EFLC config marked as # Shadows. I don't remember details.

Game bugs/overrides should be the same as GTA IV, executables EFLC.exe and LaunchEFLC.exe btw. Currently not in default config overrides.

KK0bin maintainer 2022-09-19 github

LaunchEFLC.exe is a launcher though, isnt it?

KK0bin maintainer 2022-09-19 github

Reopening this until we merge the PR.

DLLs