Shader Compilation on PC: About to become a bigger bottleneck?


With the increasing emphasis in UE5 on DX12 and Vulkan, we're focusing attention on solving the problem of runtime hitches caused by Pipeline State Object creation, which is inherent to those RHIs. The previous solution required a PSO pre-caching process, which could be burdensome for large projects, and still leave gaps in the cache leading to hitches.
Automated PSO Gathering replaces the manual work required to collect all possible PSO combinations for a project, while at the same time keeping the number of PSOs as small as possible.

@Dictator @Flappy Pannus Did we do it? Can it be?

Hopes are up just a little higher than they were before. lol
 
@Dictator
@Flappy Pannus
Did we do it? Can it be?

<wipes crumbs off chest, throws crushed beer car against wall, belches> Uh yeah, I did it. You're welcome :)

Hopes are up just a little higher than they were before. lol

Definitely, but we did have some indication from the chats before they definitely were going to address this with UE5 in some fashion. Great to see official acknowledgement of course, but I still want to see some way of potentially alleviating the shader stuttering (garbage collection stutters too but I doubt it) with existing/near-release UE4 titles. I'm not expecting it to be eliminated at this stage, but maybe at least some way to make PSO gathering a little easier so a pre-caching step can be implemented via a patch or (preferable) on-release, meaning make it as blatantly obvious and simple as possible so you almost have to make extra effort during development to ignore it.

For some titles this might never get them all with every possible material permutation, but just something in either emphasizing dev best practices or just making a pre-caching stage a little more straightforward to implement while the more robust UE5 solution gest the bulk of effort. It would be disappointing to be stuck with all of these UE4 titles that don't have a precompile stage and have first-run/driver update stuttering for them that can never be eliminated.
 
So what does this mean for the end user?

Are we saying that this will make it easier for devs to implement a pre-caching step in UE5 games moving forwards?

So it's still dev choice whether to do that or not and we still have to wait for it to complete? Or is this something more radical?
 
So what does this mean for the end user?

Are we saying that this will make it easier for devs to implement a pre-caching step in UE5 games moving forwards?

So it's still dev choice whether to do that or not and we still have to wait for it to complete? Or is this something more radical?
It should make it easier for developers to be able to precompile all PSOs that the game creates.
How they will implement such precompilation is still up to them but UE provides several options one of which is a complete precompilation during loading.
A more sensible option is to precompile in the background though, at least for shaders which aren't needed in the starting area.
 
Currently on hold given all the game launches/graphics launches this october.
Figured as much. Lots of new tech releasing the last quarter of this year, as well as many games which warrant videos, and you have to give them priority. Completely understandable. Not to mention the time it will take to create/adopt new testing methodologies and figure out the best way to present that information to the viewers. Very time consuming I'm sure.
 
I came across this youtube video of someone going through the steps required in Unreal Engine 4 (4.26) to generate PSO logs and integrate them into the updated build... and it's predictably a convoluted mess. It's very little wonder why devs probably don't bother to do as good of a job with this as they should/could...


I'm just left wondering why improving this workflow was never a focus for Epic until people started bitching about PSO comp stutter...

I really hope the new automated system literally makes this convoluted process nearly transparent to the developer.
 
I'm just left wondering why improving this workflow was never a focus for Epic until people started bitching about PSO comp stutter...
I'm assuming that since it's not an issue on consoles, it wasn't a high priority, and that you get away with more janky behaviors on PC. It just wasn't worth the time (and thus a lot of money) for them until the last year or two where it was highlighted as more of an issue by more and bigger influencing sources.
 
I'm assuming that since it's not an issue on consoles, it wasn't a high priority, and that you get away with more janky behaviors on PC.

Might be that console gamers are more sensitive, however on pc there are generally more games thus ue4 issues wont be as prominent in the grand scheme.
Also i think its not an issue on consoles since its easy to avoid the problem to begin with there. Who knows if Epic themselfs wouldve cared if it wasnt.

It probably had little to do with priorities.
 
I'm assuming that since it's not an issue on consoles, it wasn't a high priority, and that you get away with more janky behaviors on PC. It just wasn't worth the time (and thus a lot of money) for them until the last year or two where it was highlighted as more of an issue by more and bigger influencing sources.

I believe you need to do this for every kind of hardware / gpu , yes ? If so, on console, you do it one time and it's done. On PC... Good luck.
 
I believe you need to do this for every kind of hardware / gpu , yes ? If so, on console, you do it one time and it's done. On PC... Good luck.
I mean, on PC they literally just have to require the user to do it upon first launch (and driver updates)..

PC gamers don't like waiting? ....too god damn bad. You wait for a game to come out... you wait for a game to download, you wait for prerequisites to install, you wait for drivers to install and update.... you can wait 5-10 minutes for a shader/PSO complilation process to happen to ensure that the game performs as it should...

We need to get over this BS... Games back in the day required long installations It's time the developers start putting the ACTUAL game experience first... Faster CPUs and other methods can and will decrease the amount of time these processes take as they get faster. They can be hidden behind smarter design... like compiling as soon as the game starts and while in the menus while you're setting up your configurations.

Hell... THEY COULD JUST MAKE IT AN OPTION... that way BOTH sides are happy....

My dream... is that EVERY DEVELOPER implements a "Pre-compile shaders" button in their settings menu... and for those of us who have no issue waiting.. we can simply do it. Meanwhile the others who don't and NEED to play the game the second it's opened... can just start the game and be oblivious and happy.

We simply need developers to start thinking in this way and making it standard. That... and for the love of god do a better job of capturing your PSO data so it actually can be done.... Do right by your players for crying out loud. The PC platform deserves better.
 
We simply need developers to start thinking in this way and making it standard. That... and for the love of god do a better job of capturing your PSO data so it actually can be done.... Do right by your players for crying out loud. The PC platform deserves better.

To be fair, things seem to latch on to Epic at the least, their mentioning the problem and a possible solution. Their aware. Nixxes is aware and has a workaround (litterally). It will probably be a while, however things are starting to move, albeit seemingly slowly. Thing is, if one studio is solving the issue then the other (big ones in special) look abit dumb so they have to act at the very least.
The main issue is that no one really cares as someone else stated in another topic. Had these things gotten more attention this shader compilation issue wouldnt have lasted this long. its good that DF is willing to take on the subject in a dedicated video. However even there other things are prioritized.
 
To be fair, things seem to latch on to Epic at the least, their mentioning the problem and a possible solution. Their aware. Nixxes is aware and has a workaround (litterally). It will probably be a while, however things are starting to move, albeit seemingly slowly. Thing is, if one studio is solving the issue then the other (big ones in special) look abit dumb so they have to act at the very least.
The main issue is that no one really cares as someone else stated in another topic. Had these things gotten more attention this shader compilation issue wouldnt have lasted this long. its good that DF is willing to take on the subject in a dedicated video. However even there other things are prioritized.
Yea, Epic getting UE shader compilation in order will help a large swath of games right there. But there's plenty of work to be done yet.

And yes, the other content creators need to step up. They make large amounts of money off the back of hardware used for PC gaming... They should actively be trying to improve the medium with their influence. However, regarding Digital Foundry.. while I agree with you, the reality is that they have finite time and resources.. and they need to release videos regarding specific hardware and topics when it can maximize their engagement. Totally understandable. Despite the pressing issue.... there will be plenty of time when things are a bit slower, for them to properly give it the spotlight it deserves. The last thing I'd want is for Alex to make a massive video bringing attention to this issue... only for it to be lost behind the hype of some GPU/CPU launches.. or some other thing.

As for the time being... they continually keep this topic in people minds by bringing it up or referencing it during their DF Directs... which is great.
 
I mean, on PC they literally just have to require the user to do it upon first launch (and driver updates)..

PC gamers don't like waiting? ....too god damn bad. You wait for a game to come out... you wait for a game to download, you wait for prerequisites to install, you wait for drivers to install and update.... you can wait 5-10 minutes for a shader/PSO complilation process to happen to ensure that the game performs as it should...

We need to get over this BS... Games back in the day required long installations It's time the developers start putting the ACTUAL game experience first... Faster CPUs and other methods can and will decrease the amount of time these processes take as they get faster. They can be hidden behind smarter design... like compiling as soon as the game starts and while in the menus while you're setting up your configurations.

Hell... THEY COULD JUST MAKE IT AN OPTION... that way BOTH sides are happy....

My dream... is that EVERY DEVELOPER implements a "Pre-compile shaders" button in their settings menu... and for those of us who have no issue waiting.. we can simply do it. Meanwhile the others who don't and NEED to play the game the second it's opened... can just start the game and be oblivious and happy.

We simply need developers to start thinking in this way and making it standard. That... and for the love of god do a better job of capturing your PSO data so it actually can be done.... Do right by your players for crying out loud. The PC platform deserves better.

I definitely think it should be optional as not everyone is that sensitive to it. Basically it should kick off automatically at load time when needed, but here should be a 'skip' option that gives a warning it might negatively impact the gameplay experience.
 
Back
Top