protonscr

Kane & Lynch: Dead Men Lagging (after 2.7.1)

dxvkclosed performanced3d9
doitsujin/dxvk#5638 · opened 2026-05-18 by MrEWhite · updated 2026-07-02 · 5 comments · github
MMrEWhite 2026-05-18 github

With DXVK, starting at some point after 2.7.1's release, the game will lag to an unplayable level (super stuttery at sub 45 FPS) when loading into a mission. Simply going to the latest release (2.7.1) fixes it, and I can easily hit over 600 FPS with no stuttering.

Software information

Kane & Lynch: Dead Men on Steam

System information

Log files

kaneandlynch_d3d9.log

(I know it says I have an AMD integrated GPU, tried disabling that in the BIOS & DDUing both AMD & Nvidia drivers, then just installing the Nvidia driver and it made no difference, so it's definitely not using the AMD GPU or something along those lines).

KK0bin maintainer 2026-05-19 github

Can you make an apitrace of the game?

Here's a guide for how to do that: https://github.com/doitsujin/dxvk/wiki/Using-Apitrace

WWinterSnowfall 2026-05-19 github

Bisected down to:

3972f8831 [d3d9] Ignore buffer lock range for static D3DPOOL_DEFAULT buffers

P.S.: Here is a trace capturing the issue: https://drive.proton.me/urls/9X4CM7VFZG#ySb8owdIxbv0

MMrEWhite 2026-07-01 github

This still occurs following the release of 3.0.

Ddoitsujin maintainer 2026-07-01 github

We're well aware, but fixing this without regressing a large number of games is extremely difficult.

KK0bin maintainer 2026-07-02 github

For the record:

The game locks a ~37 MB D3DPOOL_DEFAULT buffer multiple times every frame. That buffer has D3DUSAGE_WRITEONLY but not D3DUSAGE_DYNAMIC. It does not use D3DLOCK_DYNAMIC or D3DLOCK_NOOVERWRITE but passes a range with each lock.

The commit that @WinterSnowfall bisected it down to started ignoring that lock range for D3DPOOL_DEFAULT buffers so we ended up doing a lot of both CPU and GPU copies of that ~37 MB buffer.

I'll just revert that commit, as the only purpose of it was to fix some irrelevant broken demo.

Nothing extracted yet.