This would arguably improve the situation for weak CPUs but would also make the game completely unresponsive for everyone else where shaders can otherwise be compiled in the background in a couple of minutes while clicking through menus etc. Using all available threads for compiling is just a bad idea especially on systems with >8 logical cores and CFS kernels. It just cucks a different set of users, and I can already see someone with a 5950X complain about it and ask for a revert.
There's no way to make everyone and every game happy on every system in every situation, I guess defaulting to 3 threads on 4-thread CPUs might be an option but I cannot really test how well that works in practice.
This would arguably improve the situation for weak CPUs but would also make the game completely unresponsive for everyone else where shaders can otherwise be compiled in the background in a couple of minutes while clicking through menus etc. Using all available threads for compiling is just a bad idea especially on systems with >8 logical cores and CFS kernels. It just cucks a different set of users, and I can already see someone with a 5950X complain about it and ask for a revert.
There's no way to make everyone and every game happy on every system in every situation, I guess defaulting to 3 threads on 4-thread CPUs might be an option but I cannot really test how well that works in practice.
Sure, I agree, but I am not asking for it to be the default behavior, just for the option to do so so that I could create a profile with this behavior for Overwatch in the Lutris installer. The consequences and the burden of testing would be entirely on the user / script creator.
Can't you just set the shader compiling threads to a lower priority?
DXVK already does that, but it has no effect because wine doesn't implement thread priorities.
Running wineserver with higher/lower thread priority won't achieve what you are aiming for i think.. ref to the link you posted. STAGING_RT_PRIORITY_SERVER as i understand it's usage will only make the wineserver process itself run at a different prio/nicelevel, not actually make different threads from windows apps run at different prio's THROUGH wineserver. (Horrible explanation.. i'm not good at this)
Proton got some patches involving things like https://github.com/rbernon/wine/commits/develop/server/thread.c but i am not sure if this is just somewhat of an elaboration of the aforementioned PRIORITY_SERVER mechanic...
how can i change the dxvk.numCompilerThreads = on windows?
If you have a weak CPU, for instance, a 4 Core Pentium CPU with no hyperthreading, in a game like Overwatch, it can take up to half an hour to compile all the shaders from a state cache with 42000 valid entries.
From my understanding, on such a system, DXVK will only use 2 threads out of available 4, thus unnecessarily increasing the time it takes to compile shaders. Seeing how the game is unplayable during that time anyway, it would make more sense to use all available threads to accomplish the task to get it to the playable state faster.
And unfortunately, to do so via
dxvk.numCompilerThreads =, you need to know how many threads are available on a given system, which can't be determined very easily via something like a Lutris install script.So if possible, it would be very nice if
dxvk.numCompilerThreads =could be set to a value like-1, which would make it use all available threads instead of a number determined through a special formula in DXVK.