We have an option for this case:
d3d9.countLosableResources = False
But maybe I need to look into how Windows behaves. I thought Windows denies Reset in this case too and IIRC some games also rely on this.
# d3d9.countLosableResources = True
I don't think it hits that situation in this particular case, it appears to be more of a backend derp. If the failures were due to losable resources, you'd get an entirely different set of errors.
Also, if I understood it correctly, there's no Reset() calls at play here.
d3d9.countLosableResources = False
No change sadly.
I guess Winter is right then and I misunderstood you.
Does the game create multiple D3D9Swapchains?
Does the game create multiple D3D9Swapchains?
No, however it does create multiple D3D9 devices on the same window: as in, creates a device for the intro FMV, then tears it down (and leaks the system memory surface in question), then creates another D3D9 device.
It's not really possible to support that. On Proton it probably works because wine will paper over us creating multiple swapchains, but on Windows that simply won't work.
Not sure what to do here, ideally games just wouldn't do that. We can't just randomly nuke D3D objecs out of existence that the app is still using either, and destroying the Vulkan presenter on Reset even if device reset fails is probably causing all sorts of other issues. No chance at all if the game keeps using that device afterwards anyway.
Not sure what to do here, ideally games just wouldn't do that. We can't just randomly nuke D3D objecs out of existence that the app is still using either, and destroying the Vulkan presenter on Reset even if device reset fails is probably causing all sorts of other issues. No chance at all if the game keeps using that device afterwards anyway.
It's worth noting that the game does attempt to release the D3D9 device and even the entire D3D9, but I guess in practice the leaked surface keeps a reference to the device and thus won't let it destruct even in native D3D9?
Nothing extracted yet.
Negligent D3D9 games may release their D3D9 device while also failing to properly release all their resources/surfaces/textures. This happens to Hard Truck 2 failing to release some of its system memory surfaces, before tearing down the D3D9 device and re-creating it shortly after on the same window.
With native D3D9, this works without observable issues. With DXVK, the second D3D9 device creation succeeds, but
Presentfails quietly (i.e. still returnsS_OKto the game, but fails in practice) with a log spam ofVK_ERROR_NATIVE_WINDOW_IN_USE_KHRswapchain creation failures.Software information
Hard Truck 2: King of the Road, using a development version of D2GI that wraps the game from D3D7 to D3D9, with additional fixes.
System information
Apitrace file(s)
N/A
Log files
When the issue happens, a spam of swapchain creation calls is logged: