protonscr

[d3d9] Tomb Raider: Legend has some form of flickering with DXVK, does not occur with wined3d

dxvkclosed d3d9
doitsujin/dxvk#4319 · opened 2024-10-03 by Leopard1907 · updated 2024-11-11 · 15 comments · github
LLeopard1907 2024-10-03 github

Software information

Tomb Raider: Legend, GOG copy, all settings maxed, everything enabled

Ekran Görüntüsü_20241004_000622

System information

  • GPU: 7900 XTX
  • Driver: Mesa 24.2.3
  • Wine version: Proton Experimental
  • DXVK version: Whatever Experimental has and also tested with latest release, occurs with master too

Apitrace file(s)

  • wined3d trace:

https://drive.google.com/file/d/1l1bGAeI62rfjLC91BePooemQTipn6i0H/view?usp=sharing

  • dxvk trace:

https://drive.google.com/file/d/1_k7pPDNML1ki_AWsHQKdd7iXhv0TfFJh/view?usp=sharing

Log files

steam-heroic-Tomb Raider Legend.log

Has this in it but not sure if that is related:

warn:  Failed to create global buffer:
warn:    size:  157810696
warn:    usage: 1ff
warn:    type:  0
warn:  D3D9DeviceEx::SetRenderState: Unhandled render state 181

Video that shows the issue

https://youtu.be/PGoJLkdbvvA?si=c6WlcYPici43iT79

KK0bin maintainer 2024-10-03 github

Looks like an issue with a depth prepass. That buffer error is definitely interesting too. I'll take a look tomorrow.

Ddoitsujin maintainer 2024-10-04 github

The buffer error is already fixed on master and not related.

Mmrdeathjr28 2024-10-04 github

in my case dont appear this flickering in same scene using dxvk 2.4.1

trlc

KK0bin maintainer 2024-10-04 github

I'm not seeing any issues when replaying the apitraces on Nvidia.

EDIT: Enabling strict float emulation makes it show up on Nvidia too.

BBlisto91 2024-10-04 github

@Leopard1907 Out of curiosity could you try running it with d3d9.invariantPosition = False

LLeopard1907 2024-10-04 github

in my case dont appear this flickering in same scene using dxvk 2.4.1

In your case... you didnt have enabled everything there 🤣 But you have to enable everything to start reproducing it. So first create in a registry ExtendedDialog and enable it. After that enable everything with -setup switch, so make sure it is same settings just like on picture that he posted. There are more setting hidden there, that he didnt showed, but i assume he didnt touched that. 👯 If you do exactly that, then we can figure out if bug is RDNA specific (if it happens also for you with everything enabled) or maybe just happens on RDNA specific ASIC. like his card (if it dont happen for you with everything enabled)..

Yes, i didnt touch those "Dev" options.

Ekran Görüntüsü_20241004_135214

LLeopard1907 2024-10-04 github

@Leopard1907 Out of curiosity could you try running it with d3d9.invariantPosition = False

Yep, that fixes the issue.

Qqinlili23333 2024-10-04 github
image

Hardware related issue I think.
Cannot reproduce on Nvidia & Windows.

Edit: according to PCGW, this game has broken physics when running over 60 fps. Can you test again under 60hz?

PS: The game seems lock the usage of Windows key on keyboard in setup dialog.

BBlisto91 2024-10-20 github

We've found that the issue shows itself when d3d9.floatEmulation is set to Strict which is only default on radv, nvk and amdvlk open as of writing.

LLeopard1907 2024-11-07 github

@qinlili23333 Can you try with dxvk master?

Qqinlili23333 2024-11-08 github

@qinlili23333 Can you try with dxvk master?

Interesting. I can reproduce on master 8584fc7.

Video: https://youtu.be/LV9gVc3juSs
Device: RTX 4080 Laptop 565.90 (Windows 11 23H2)

LLeopard1907 2024-11-08 github

Yes, as expected. MR linked above enables same behaviour for NV driver too now so you have same behaviour as RADV now. So not a driver or hw specific issue.

Strict: Use a slower but more correct approach. Necessary for some games

@mrdeathjr28
https://github.com/doitsujin/dxvk/blob/master/dxvk.conf#L489

Probably should be able to repro too with his Intel if he sets this to Strict.

Qqinlili23333 2024-11-08 github

Yes, as expected. MR linked above enables same behaviour for NV driver too now so you have same behaviour as RADV now. So not a driver or hw specific issue.

Strict: Use a slower but more correct approach. Necessary for some games

@mrdeathjr28 https://github.com/doitsujin/dxvk/blob/master/dxvk.conf#L489

Probably should be able to repro too with his Intel if he sets this to Strict.

d3d9.floatEmulation=False fix for me.
Maybe we need to add a config for this game, or maybe strict emulation need to be reverted

Qqinlili23333 2024-11-08 github

Yes, as expected. MR linked above enables same behaviour for NV driver too now so you have same behaviour as RADV now. So not a driver or hw specific issue.

Strict: Use a slower but more correct approach. Necessary for some games

@mrdeathjr28 https://github.com/doitsujin/dxvk/blob/master/dxvk.conf#L489

Probably should be able to repro too with his Intel if he sets this to Strict.

Verified on Intel Xe 80eu (1135G7) 101.5768 (24H2), if set to Strict, same issue.

Qqinlili23333 2024-11-08 github

I've found something already in config

    /* Tomb Raider: Legend, Anniversary, Underworld  *
     * Read from a buffer created with:              *
     * D3DPOOL_DEFAULT,                              *
     * D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY buffer. *
     * Legend flickers with next gen content option. */
    { R"(\\(trl|tra|tru)\.exe$)", {{
      { "d3d9.cachedDynamicBuffers",        "True" },
      { "d3d9.maxFrameRate",                "60" },
    }} },

Proton versions