protonscr

[d3d9] BF2142 alt-tab alive losable resources

dxvkclosed game bugd3d9
doitsujin/dxvk#4107 · opened 2024-07-06 by Blisto91 · updated 2024-07-07 · 4 comments · github
BBlisto91 2024-07-06 github

While doing some testing of Battlefield 2142 on Windows i noticed that if you alt-tab once fully ingame you won't be able to alt-tab back in and the dxvk log grows to a GB within seconds spamming

info:  Device reset
warn:  Device reset failed because device still has alive losable resources: Device not reset. Remaining resources: 2

Note that this only happens if you first alt-tab while fully in a match. If you choose to alt-tab at least once before in the main menu of the game then you can alt-tab just fine when in a match.

Software information

Battlefield 2142
Fullscreen

System information

  • GPU: RTX 4080
  • Driver: 555.99
  • Wine version: Only tested Windows for now

Apitrace file(s)

https://drive.proton.me/urls/4PAQD9551C#wKtlMAU5XLL8
This contains traces made on Windows. One of the native game (which will also black screen on alt-tab when doing it with apitrace), one of dxvk with d3d9.countLosableResources = True and one with it set to False.

I haven't made a trace where i also alt-tab in the main menu before going in to a match. But can do if deemed interesting

Log files

BF2142_d3d9.log

KK0bin maintainer 2024-07-07 github

I need to run it with https://github.com/K0bin/dxvk/tree/count-losables and get logs.

KK0bin maintainer 2024-07-07 github

The native trace also ends up getting stuck on failed resets. According to Blisto this doesn't happen normally but only happens when you throw in the apitrace wrapper. So this does seem to me like it's another game bug that drivers work around but adding in the apitrace wrapper somehow breaks that workaround.

BBlisto91 2024-07-07 github

Not sure if i made a mistake in the past or what but now i can't get alt-tab working even with just the native game.

BBlisto91 2024-07-07 github

Upstream links