Rpcs3: [Feature Request] Multithreaded shader compilation ingame

Created on 23 Aug 2020  路  3Comments  路  Source: RPCS3/rpcs3

Quick summary

Allow the usage of multiple threads to compile new shaders ingame.

Details

While shaders are compiled using all threads when launching a game, this isn't the case when new ones are found ingame.
In some games this isn't a big problem since shaders are compiled fast enough, but others, with more complex or just a larger amount of shaders, can take a fair amount of time to compile. This leads the usual compilation issues to stay around for a while (missing graphics or low performance). By allowing compilation to make use of multiple threads, it could speed up the process a fair bit, improving user experience.

This could also make the shader interpreter a more viable option. Since shaders would be compiled faster the interpreter would need to do less work, which would avoid low performance for long periods of time (especially annoying with a clean cache).

Since a fair amount of users don't have a lot of threads to spare, this should probably be implemented either as a toggle in settings, or hardcoded to only be used on high thread count CPUs (like #7887).

Enhancement RSX

Most helpful comment

This is scheduled for the shader compiler upgrade coming up in the next few weeks as well as interpreter cleanup and polishing.

All 3 comments

This is scheduled for the shader compiler upgrade coming up in the next few weeks as well as interpreter cleanup and polishing.

This is being handled in 2 steps:

  • [x] Centralized shader compiler for each backend. All shaders should be generated from one "factory" and unless "legacy" mode is in use, the main renderer thread should never compile shaders itself.
  • [x] Configuration to support multithreaded compiler backend and the actual thread-scaling also implemented.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

iBlackS0ul picture iBlackS0ul  路  3Comments

kurosh10000 picture kurosh10000  路  3Comments

xiangzhai picture xiangzhai  路  3Comments

elad335 picture elad335  路  3Comments

uaqlover picture uaqlover  路  3Comments