protonscr

[D3D9 Regression] Test Drive Unlimited 2 broken reflections in missions on DXVK 2.0 and up

dxvkclosed d3d9amd proprietaryprobably not our bug
doitsujin/dxvk#3799 · opened 2024-01-17 by koffiato · updated 2025-05-26 · 16 comments · github
Kkoffiato 2024-01-17 github

Software information

Tested TDU2 both vanilla and modded. DXVK 2.0 and up exhibit issues with car reflections within the delivery missions (bomb icon on the map). Open world, interiors and races are fine however. 1.10.3 and lower (tried 1.5.4) appear to work fine.

DXVK 2.3
Screenshot (355)

DXVK 1.10.3
Screenshot (356)

System information

  • GPU: Radeon RX 6700 XT
  • Driver: Adrenalin 23.8.2 (anything newer crashes DXVK with error -13 on this engine, TDU1 is also affected)
  • DXVK version: 2.0 and up is buggy, 1.10.3 and below works fine.

Apitrace file(s)

Log files

BBlisto91 2024-01-17 github

This seems like a driver issue. I can reproduce with the trace using amdvlk.Q3.1 on linux, which should correspond ish to 23.8.1/23.8.2 on Windows i believe. Using amdvlk.Q3.2 it is fine again so 23.10.2 and above should probably also be fine in regards to this.

Kkoffiato 2024-01-17 github

Just tried updating to 23.10.2 per your suggestion and the game just crashes at startup with the attached log. Tried running it with 1.10.3, 2.3 and https://github.com/doitsujin/dxvk/commit/ac78048c23c946caf0c734972e880f960080dd62.
TestDrive2_d3d9.log

BBlisto91 2024-01-17 github

I am not reproducing a startup crash on Linux with amdvlk (also non newest versions) or radv at least. Testing using a RX 6800

Kkoffiato 2024-01-21 github

Sorry for the late reply here. I've now tested all available AMD drivers on Linux and couldn't recreate this problem (nor the crash on Windows). Seems like this is a driver issue.

BBlisto91 2024-01-25 github

Try again with the newly released AMD driver.

Kkoffiato 2024-01-26 github

Tried running both TDU and TDU2 with the new driver and both game still crash with err: D3D9SwapChainEx: Failed to recreate swap chain: -13

Mmirh 2024-02-05 github

Can you try with these intermediate versions (rename to d3d9.dll ofc)?

Kkoffiato 2024-02-06 github

Unfortunately issue persists, every single version in the archive returned Error -13 as usual. Tried latest master, https://github.com/doitsujin/dxvk/commit/5312ef1cf9c201d20048f9e796d21b436420fd49 as well.

Mmirh 2024-02-06 github

I meant for the glitches, not for the error which is really out of the blue.

Kkoffiato 2024-07-15 github

Update for this issue.
Cannot create the visual glitches in cubemaps on RADV. However the game itself is crashing on startup with the error mentioned above on anything above 23.8.2 drivers on Windows. Here's an apitrace with DXVK thanks to Blisto91.

Kkoffiato 2024-09-27 github

Update on this issue again. Using the 24.20.11.01 drivers and DXVK 2.4.1; DXVK is once again able to log err: D3D9SwapChainEx: Failed to recreate swap chain: -13 and then crash.

Kkoffiato 2024-10-03 github

Found the issue! DXVK fails to create swapchain ONLY if the game goes fullscreen, Since TDU2 always defaults to fullscreen when it detects hardware change; this bug is unfixable by the user. Here's an other game (Need for Speed 2015) that used to crash in same fashion running under DXVK, going fullscreen also crashes this game. Will experiment further to somehow force TDU2 to start in borderless/windowed. image

With the help of DXWrapper's "Enable Windows Mode" and "Dialog Mode" from DXVK config, game runs alter doing ALT+ENTER once.
image

EDIT: Here's the log files where you can see how the game struggles to create swapchain.
TestDrive2_d3d9.log
d3d9-testdrive2.log

EDIT 2: After setting the game to windowed mode with dxwrapper, dxwrapper itself can be removed. Unfortunately game crashes after few minutes of gameplay regardless. here is the logs on game crash with DXVK alone.
TestDrive2_d3d9.log

KK0bin maintainer 2024-10-03 github

The swapchain code is in the process of being rewritten anyway. So there's no point in looking into this before that's done.

Kkoffiato 2024-10-03 github

These are on the vulkan-swapchain-raw branch already, it's actually what prompted me to test. Thank you!

KK0bin maintainer 2024-10-03 github

Oh, okay. Yeah that's exactly what I meant.

Kkoffiato 2025-05-26 github

Forgot to update this issue. It's fixed for quite a while now. Game is extremely wonky with fullscreen now, but that's a entirely different issue.

DLLs