dxvk icon indicating copy to clipboard operation
dxvk copied to clipboard

[d3d9] Sonic And Sega All Stars Racing / Lara Croft and The Guardian Of Light: heavy stuttering

Open ranplayer opened this issue 3 years ago • 8 comments

This game suffers from heavy stuttering when racing for the first time in all tracks (also they prevail even in subsequent runs for some of them). I understand shader compiling on Linux is expected, and my experience with D3D9 games using DXVK is smooth in most cases (some titles have soft stuttering, but they fade in subsequent runs). I have only opened this issue because the stuttering seems odd for this title (it actually may be doing something wrong, but I don't understand the apitrace to confirm that unfortunately).

Software information

Name of the game: Sonic And Sega All Stars Racing Steam link: https://store.steampowered.com/app/34190/Sonic__SEGA_AllStars_Racing/ Settings: max settings

System information

  • GPU: GT 740M (2GB) and GTX 970 (4 GB)
  • Driver: Nvidia 470.74
  • Wine version: Proton 6.3-7
  • DXVK version: 1.9.2 (I have noticed the same behavior on previous versions)

Apitrace file(s)

Log files

ranplayer avatar Oct 25 '21 17:10 ranplayer

This problem is not specific to DXVK. I had the same problem years ago on Windows and if you search on Google about it you'll see many people being affected by the same problem. That's just how the game works, it compiles shaders at run-time.

raploz avatar Oct 29 '21 04:10 raploz

Well, for such cases would it be possible to enable asynchronous shader compiling to avoid these hard locks ? This game is old, has only local multiplayer and no anti-cheat software.

ranplayer avatar Oct 30 '21 11:10 ranplayer

Asynchronous shader compiling is a hack that isn't supported by DXVK because it's known to break games.

K0bin avatar Oct 30 '21 13:10 K0bin

with good reason. Just wondering how many other games use this and / or if its worth even adding it as a separate flag

hggz avatar Oct 30 '21 20:10 hggz

The game compiles shaders from hlsl at runtime, is what I believe is the problem? (In this instance)

misyltoad avatar Oct 31 '21 09:10 misyltoad

The game compiles shaders from hlsl at runtime, is what I believe is the problem? (In this instance)

If it does, then that happens on the loading screen. All graphics pipelines used in the apitrace are created on the loading screen on subsequent runs (state cache).

I can't reproduce the stuttering using the apitrace and I don't own the game itself.

K0bin avatar Nov 14 '21 18:11 K0bin

Guys, it seems the same issue affects "Lara Croft and The Guardian Of Light". The Steam client took 15-20 minutes to compile the pre-shader caching, and even so the game stutters for every step moved by the character in the primary levels. Basically every new area it stutters heavily. I'm going to let the API trace of this game attached as well.

Updated specs:

  • GPU: GTX 970 4Gb
  • Driver: 510.60.02
  • RAM: 16 Gb
  • CPU: Core i5 4690s (3.2 -> 3.9)
  • Kernel: 5.15 (futex2 patched)

ranplayer avatar Mar 29 '22 17:03 ranplayer

@ranplayer Please retest both games with dxvk 2.0 and the 520 nvidia driver if you can. Note that atleast Sonic And Sega All Stars Racing also does it's own shader compilation and it's not possible to rid the stutter fully.

Blisto91 avatar Nov 10 '22 18:11 Blisto91

@Blisto91 I'll retest them this week and let you know. I'm out of Nvidia hardware atm, so I'll be using a RX 6700 XT

ranplayer avatar Nov 13 '22 18:11 ranplayer

Oh then never mind hehe. The extension that should help with stuttering isn't available on AMD yet.

Blisto91 avatar Nov 13 '22 18:11 Blisto91

I've tested both anyway. Sonic seems to stutter less (compared to my old Nvidia GTX 970), but Lara Croft still stutters too much.

ranplayer avatar Nov 14 '22 18:11 ranplayer

I've done a bit of testing back and forth in the beginning of the Lara Croft demo between the new extension and the old shader compiler system on my R9 380X and the radv driver. At least in my short testing it seems to have improved it decently. I have an issue in the game where i get huge framespikes whenever i move my mouse around, but with a controller i didn't experience that. Not sure what is going on there.

Sonic And Sega All Stars Racing is harder to do anything about since it also compiles it's own shaders. Which is probably what hurts the most.

Blisto91 avatar Dec 28 '22 21:12 Blisto91

@Blisto91 what version of Mesa did you use ? Did you enable any specific flag ? I can give it a go here.

ranplayer avatar Jan 20 '23 12:01 ranplayer

mesa-git (mesa 23 can also be used when it arrives) and RADV_PERFTEST=gpl And then use Proton Experimental or bleeding edge.

Note that for RADV it is still a work in progress so cache isn't working at the moment.

Blisto91 avatar Jan 20 '23 12:01 Blisto91

gpl is now enabled by default in radv 23.1.0

Blisto91 avatar May 14 '23 15:05 Blisto91

Indeed... just tested here both titles using Proton 8.0 and Mesa 23.1.0 and all the stuttering has gone. Sorry for the really late reply (I've been waiting for the final 23.1.0 release for testing both games). Thank you, folks.

ranplayer avatar May 24 '23 16:05 ranplayer

Linux gaming just got even better

ranplayer avatar May 24 '23 16:05 ranplayer