protonscr

Mirror's Edge performs worse after shader compilation

dxvkclosed appid 2009d3d9not our bug
doitsujin/dxvk#4019 · opened 2024-05-22 by Tobe95 · updated 2026-02-21 · 1 comments · github · game page · search this game
TTobe95 2024-05-22 github

In the original Mirror's Edge game, when using DXVK, there's a sequence in the "Jacknife" chapter where performance is significantly reduced after shaders have been compiled.

When playing the chapter for the first time, the game maxes out at 62 FPS (the default engine limit), however on subsequent runs performance is reduced by about 40%.

On first run with no shadercache:

before

On 2nd run:

after

I can reproduce this on both, my Steam Deck with Mesa drivers, as well as my laptop running Linux Mint with proprietary Nvidia drivers.

To reproduce:

  1. In the main menu select: Play chapter -> Chapter 2 - Jacknife -> Checkpoint C
  2. Once loaded, wait for shaders to compile, then either go back to the main menu or close the game
  3. Load up the level again and performance will be much worse
  4. Delete/Rename the respective mesa/nvidia shadercache folder to temporarily increase FPS again

I'd like to add that this has been happening with previous versions of DXVK as well.

I'm not sure if the API trace is of any use, I actually didn't notice a performance drop between the first run with no shadercache vs. going back to main menu and then reloading the chapter, performance was just overall reduced...

I'm also including my save file since the level is not unlocked from the start, if anyone has the game and wants to test.

System information

  • GPU: Nvidia Geforce GTX 960M / AMD Van Gogh Custom GPU 0405
  • Driver: nvidia-driver-535 / Mesa 23.3.0
  • Wine version: Proton 9.0
  • DXVK version: 2.3-51-g2e4c34f5694c9bf

Apitrace file(s)

https://drive.google.com/file/d/1FUbvZ5q_lnVezQr_oR0pINDtRg-4oF6Q/view?usp=drive_link

Save File

https://drive.google.com/file/d/1JF6lO_oJ3zM98yT6kUDs0UHb8VZ9nFmT/view?usp=drive_link

KK0bin maintainer 2024-05-24 github

I downloaded the game on GOG on Windows, installed DXVK, played the entire checkpoint C until you exit the sewers so the shader caches are populated. Then I exited the game, started it again and loaded the same checkpoint again.

62 FPS before, 62 FPS after. So whatever is going on here, it's not our fault. The game doesn't even have a lot of shaders. Just 300 shaders and pipelines.

Proton versions