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

Always seemed fairly apparent to me that most developers only put real effort into the console version. Only a handful care about the PC release.
Well, I understand the PC is far more complex... but we're at the point where it's like... did you guys even run the game and play it after you went gold?....

Why would you release it in that state? The only answer could be that you don't give a damn.

And that pisses me off... as we're paying the same damn price as console gamers. And then developers wonder why PC gamers use key reselling sites.
 
Well, I understand the PC is far more complex... but we're at the point where it's like... did you guys even run the game and play it after you went gold?....

Why would you release it in that state? The only answer could be that you don't give a damn.

And that pisses me off... as we're paying the same damn price as console gamers. And then developers wonder why PC gamers use key reselling sites.
If there werent developers who consistently deliver PC ports without this issue I’d be more understanding.
 
So a while back I got into a bit of a twitter argument with some people. The topic was of course about stuttering in a PC game, and someone made a comment to the effect of "How on earth does QA not manage to catch this stuff?".. and this person responded something like "You're asking the wrong question. Instead of asking why QA didn't catch it, you should be asking why management didn't act on it! Place the blame at the right people." ..and I saw that and responded that to most people they are one in the same thing. It kinda irked me the wrong way how he came across. We all know QA's job is to ensure that the games are as high quality as possible.. hence we blame QA when issues are present. We got into a little back and forth, and after a bit another person chimed in. They basically said "You're either naive or clueless as to how QA really works" and they mentioned that they worked in QA for multiple AAA studios, and gave me the gist of how it was for them. They sounded truthful, and even if they were full of it, I'm in no position to call anyone out about it since I've never worked in the games industry. So we started arguing a bit because in my head I'm not saying anything unreasonable.. and I told him "When people blame QA for issues they mean the entire department and process. And he was like "No... they don't.. maybe YOU do but most people don't. When people bitch about QA not catching things they specifically mean QA TESTERS not finding things.

He told me a story about how he was QA testing for this one game and how there was an issue with the release and one individual got the names of all the QA testers for the game and started harassing them and threatening their families. He said they reported that very issue multiple times and management waived it off and never acted on it. He said that QA catches so many things which management decides to act on or not... and sadly a lot of the performance stuff isn't usually considered unless it's completely game breaking.

Now on one hand I understand that. We all know management makes the final decisions and deep down that they have budgets and schedules and will cut corners when it suits them.. but I told him that where I work, we have a QA department with QA managers and testers and all the same stuff... but from day 1 the first thing we learned is that QA is EVERYONE's responsibility. It's up to every single person to ensure that issues get fixed and that the products that leave the building are of high quality. That goes all the way up to the company management. If they see something wrong, it simply can't leave the building, and they wont allow it to. I said, I expect the same thing from programmers and management of video game companies.. In my mind they are ALL responsible for QA, and ensuring games don't release with these types of issues.

So I guess the point is that a lot of this stuff comes down to a pervasive culture of shipping things that are essentially "good enough" and not "good/great". PC gamers themselves aren't helping their cause either. Most of them bend over and accept this stuff and live blissfully ignorant of the reality of it. "Oh you only have a 3070 and a 5900x... maybe you should upgrade your crappy rig" and "did you update your drivers? It works perfectly on my machine!" ... *sigh* we still have a ways to go.

But, I've been seeing an awful lot of chatter on twitter about all of this stuff.. and seeing developers go back and forth on it is interesting to say the least... but they're definitely talking about it and discussions are happening. That's a great thing. With every new release that this issue persists, the voices grow louder. This is how stuff gets done.
 
I don't think that this person knows what he is talking about. There are multiple things he got completely wrong in his tweets, and the blanket statements like "I prefer to play on consoles" are essentially an agenda - consoles aren't free from stuttering issues either and there are many titles which still run considerably better on PC than on consoles even with compilation stutters. The recent example of Stray is a DX11 game with similar issues so it's not exactly a solution either.
 
I don't think that this person knows what he is talking about. There are multiple things he got completely wrong in his tweets, and the blanket statements like "I prefer to play on consoles" are essentially an agenda - consoles aren't free from stuttering issues either and there are many titles which still run considerably better on PC than on consoles even with compilation stutters. The recent example of Stray is a DX11 game with similar issues so it's not exactly a solution either.
The truth always usually lies somewhere in the middle. All developers have completely different perspectives on this stuff, and that's why it's hard to nail something down that works for everyone and they can agree upon to move forward with. It can completely depend on what type of engine those programmers work with, what type of rendering they're doing, what type of games they're making, how they author shaders in the first place.. ect ect

I think DX12 and Vulkan are great... and we know they CAN work extremely well without issues. There's things that can be done to pre-cache shaders within these APIs... I think the biggest thing is just getting developers to actually do them.

I know having a lengthy precompilation process isn't attractive... but we already know they can work wonders. If I was a developer making a game, I'd have this process upon boot and dress it up with aspects of the game, and integrate it as nicely as possible.

Something like Detroit for example
RmC4pjv.jpg

(grabbed pic from a search, not mine)

I think that's a nice way to integrate the process into the game. It's not some boring black screen with a bar that's not telling you anything about what it's doing. It clearly tells you that what it's doing is for the betterment of performance/visuals. It's a visually pleasing loading screen, it can give game relevant information, tips and tricks.. ect.

Games that can do it in the background during title screens and stuff like that is great as well.

Of course I'd like to see DirectX have a Fossilize equivalent and have this process happen during the Steam downloading process... but if you can't have that, make the best of it, and do a good job of making it feel part of the package.


I saw a post on Twitter from a developer from the game "A Hat in Time" which is a fun 3D platforming game. It's a great game, but unfortunately I stopped playing it part way through because the stuttering was just unacceptable. They said that they rewrote how the engine (Unreal Engine 3 I think) handles shader compilation, and that it was stutter free now. So the other day I downloaded it and tested it out. There's a new setting "Precache Shaders" and it precaches all shaders during the loading screen. Basically adds a few more seconds onto the loading screen times... but it's now completely stutter free. I'm really happy they fixed it because before it was quite terrible. I look forward to jumping back into that game and finally playing it through.

A lot of this stuff can be improved. We just need to see developers start doing it. Preferably giving us the option to choose. We also need MS to get off their butts and do something like Fossilize for DirectX. Give platform holders like Valve and Epic a way to integrate it into their clients so that the process can be done before the game is even finished downloading. Take as much of the onus off of developers as possible. Because things will only get more complex from here on out. We can't depend on every dev to give a damn.

Just like everything else in the PC space... we need to brute force a solution. I think we can do it.
 
Tying shader processing to any sort of online distribution platform is a really bad idea IMO as it will mean that the same game will still run in an inferior way without said platform.

And before someone says "whatever, I only use Steam" - this will still be an issue for you when playing offline or when a game becomes old enough for Valve to disable backend support for its shaders.

A proper solution must be fully offline, whether baked into OS or into a game itself (the latter option is here, developers just must use it without exceptions).
 
Tying shader processing to any sort of online distribution platform is a really bad idea IMO as it will mean that the same game will still run in an inferior way without said platform.

And before someone says "whatever, I only use Steam" - this will still be an issue for you when playing offline or when a game becomes old enough for Valve to disable backend support for its shaders.

A proper solution must be fully offline, whether baked into OS or into a game itself (the latter option is here, developers just must use it without exceptions).
I mean.. it's literally the distribution platform where you download your games from... If Valve suddenly disabled shader caching support for older games... then it would just perform the way it always was made to perform..

I don't disagree with your last point though. The best solution is within the app itself. Nothing substitutes developers doing the best job they can from the start.


I feel like it would be a combination of both that truly captures everything. Imagine developers creating games with these offline solutions, if you're not connected for some reason it just does it's thing. In 15 minutes your game is all ready to go and smooth as butter. BUT... if you ARE connected.. Steam also having the ability to download and precache those shaders which in turn drastically cuts down/eliminates that precompilation process when you boot it up.

The best of both worlds, and captures both use cases.
 
Imagine developers creating games with these offline solutions, if you're not connected for some reason it just does it's thing. In 15 minutes your game is all ready to go and smooth as butter. BUT... if you ARE connected.. Steam also having the ability to download and precache those shaders which in turn drastically cuts down/eliminates that precompilation process when you boot it up.
No developer will ever spend any resources to implement something which is already provided by the distribution platform.

And it's not guaranteed that the presence of other such platforms would push such developers into spending resources on an offline solution - they aren't spending any right now, when there are no such solution at all.

Thus you'll get games which will still stutter when you're offline or prefer to get them DRM free from GOG for example (or are EGS exclusive, or whatever). This isn't a solution, it's a cheat.
 
No developer will ever spend any resources to implement something which is already provided by the distribution platform.

And it's not guaranteed that the presence of other such platforms would push such developers into spending resources on an offline solution - they aren't spending any right now, when there are no such solution at all.

Thus you'll get games which will still stutter when you're offline or prefer to get them DRM free from GOG for example (or are EGS exclusive, or whatever). This isn't a solution, it's a cheat.

Well then, tell me what I'm losing by the platform holder taking it into their own hands then....
 
You're losing a future where said problem would be fixed properly.
You already said they're not doing it anyway... I'm not losing anything.

I have a lot more faith in Valve not disabling a shader caching system for old games... than I do in developers all coming together and deciding to precompile shaders in all games in the future...
 
They are not doing it, yet, because the problem has become apparent not so long ago. But I fully expect Epic to fix it eventually. And others - they are less of an issue already.
Oh the problem has been apparent for years and years.

What you mean to say is that the problem has become unignorable recently. ;)

We'll see. I too think Epic will get a solution in place.


As a quick side note I'm playing Aliens Fireteam Elite with friends and it's a UE4 game... no shader compilation stutters whatsoever. Really really smooth game. We're quite enjoying it.
 
Oh the problem has been apparent for years and years.

What you mean to say is that the problem has become unignorable recently.
I dunno about years and years, me personally hasn't been running into shader compilation stutters that often until about a year or two ago - and I think that this is related to a combination of D3D12 market penetration and the launch of new GPUs (and consoles) which made more complex shaders more widespread. The issue really became a big one over these last 1-2 years IMO.
 
I dont know if they have all been shader comp stutters, but on my 1080ti stuttering has been pretty consistent ever since the arrival of DX12. Titles that dont stutter when using that API are the exception rather than the norm. Stuttering under DX11 is very rare.
 
I dont know if they have all been shader comp stutters, but on my 1080ti stuttering has been pretty consistent ever since the arrival of DX12. Titles that dont stutter when using that API are the exception rather than the norm. Stuttering under DX11 is very rare.

I'm obviously less sensitive to you guys on this as I've rarely been bothered by game stutters. I certainly notice it in emulated games on first run so I know exactly what it is, but I can hardly remember noticing it in any non emulated game except Yooka-Laylee. Perhaps I've just been lucky with my game choices.

What has historically been a far bigger issue for me with PC gaming performance is inconsistent frame times, but that hasn't been a big concern for a while now, I think largely just because I've learned to better control and adjust the games framerate for smoothness. Largely thanks to Digital Foundry.
 
Just a weird something I noticed - when talking about Unreal Engine, the stutters appear to be more severe the more materials end up being used for the first time simultaneously. Like, not in the sense that it would fully stall, but the stuttering can continue disproportionally long. Like, a single material at a time is maybe a barely notable 50-100ms hickup, but if you happen to pan rapidly into a scene with a dozen new materials, you can easily get up to 2-3 seconds of horribly low FPS. Way longer than you would suspect with a multi core system.

There isn't by chance some additional, driver side bottleneck when it comes to multithreaded pipeline creation? Something along the line of a good old spinlock or another structure which scales worse the more it's put under load? Especially when running in parallel with other regular work? Any plausible chance it might bite to attempt pipeline creation in parallel with texture uploads?

Because otherwise it appears so weird that some users do suffer from quite severe and prolonged stutters, while others don't or at least barely even notice. And even those who do suffer, usually have a lot less notable instances of especially bad stuttering, compared to the number of times they should be encountering new materials.
 
I'm obviously less sensitive to you guys on this as I've rarely been bothered by game stutters. I certainly notice it in emulated games on first run so I know exactly what it is, but I can hardly remember noticing it in any non emulated game except Yooka-Laylee. Perhaps I've just been lucky with my game choices.

What has historically been a far bigger issue for me with PC gaming performance is inconsistent frame times, but that hasn't been a big concern for a while now, I think largely just because I've learned to better control and adjust the games framerate for smoothness. Largely thanks to Digital Foundry.
Frametime issues are also rare under DX11 for me. They become much more common under DX12.
 
Back
Top