protonscr

Planetary Annihilation: TITANS in-game UI creates too many threads

dxvkopen d3d9
doitsujin/dxvk#2670 · opened 2022-06-06 by aeikum · updated 2025-05-24 · 3 comments · github
Aaeikum 2022-06-06 github

Planetary Annihilation: TITANS (steam appid 386070) spawns a separate process to manage its HTML-based UI, called CoherentUI_Host.exe. This is a 32-bit executable. In the process of launching into the game's tutorial, it creates about 37 D3D9 devices, all of which live until I quit the game. On my machine, that causes DXVK to spawn roughly 400 threads. The process eventually runs out of address space, threads fail to be created, and things fall apart. Setting dxvk.numCompilerThreads = 1 works around the problem.

It's possible there is some other bug causing it to create so many devices, but regardless, it is able to create so many devices when run with wined3d, so probably DXVK should be able to handle this.

steam-386070.log

Ddoitsujin maintainer 2022-06-07 github

Does 9e5c61bf885ae1af0c506326d2b4cb5dabd4327c fix ths?

Aaeikum 2022-06-07 github

Yep, that seems to do the trick! I got into the tutorial a few times without the threading problem. It looks like it does correctly clean up its three-dozen devices when exiting the tutorial, so there isn't a leak we have to worry about.

BBlisto91 2022-06-07 github

Nice to see progress.
Sadly the game still seem to be a bit fecked in some places. First time i loaded into the tutorial it seemed fine, if a bit slow, but attempts since most of the world is just white.
Also dxvk hud doesn't work.

But since the log speaks of shared resources i'm guessing theres no point in making a issue since shared resources is a known thing.

err:   Failed to create shared resource: VK_KHR_EXTERNAL_MEMORY_WIN32 not supported
warn:  D3D9: Failed to write shared resource info for a texture

Edit: Unless this is supposed to work with the previously merged shared PR. Tho i can't actually find the respective wine commits linked in the pr in protons wine source.

Edit 2: Nvm. Needed experimental proton for the shared resources work. Thought it was included in the new RC.
The white/black textures is still a thing tho.

Upstream links