[GH-ISSUE #1360] Why is shader compiled every time? #447

Closed
opened 2026-02-27 21:06:20 +03:00 by kerem · 7 comments
Owner

Originally created by @par274 on GitHub (Oct 12, 2024).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/1360

I don't know how the emulator works, but why does the shader have to be compiled from scratch for each entry?

In all other emulators, the shader is saved to disk after being compiled, and nothing seen in the second entry will cause a freeze.

For example, as I showed in the video, normally you should experience momentary freezes only once, but doesn't compiling shaders every time you enter put more load on RAM than necessary?

https://www.youtube.com/watch?v=u_O1QONN3Lc

Originally created by @par274 on GitHub (Oct 12, 2024). Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/1360 I don't know how the emulator works, but why does the shader have to be compiled from scratch for each entry? In all other emulators, the shader is saved to disk after being compiled, and nothing seen in the second entry will cause a freeze. For example, as I showed in the video, normally you should experience momentary freezes only once, but doesn't compiling shaders every time you enter put more load on RAM than necessary? https://www.youtube.com/watch?v=u_O1QONN3Lc
kerem closed this issue 2026-02-27 21:06:20 +03:00
Author
Owner

@birthtothunder commented on GitHub (Oct 13, 2024):

There's no shader cache.

<!-- gh-comment-id:2408754420 --> @birthtothunder commented on GitHub (Oct 13, 2024): There's no shader cache.
Author
Owner

@par274 commented on GitHub (Oct 13, 2024):

There's no shader cache.

Yes, I noticed that. I think it's a most important thing.

<!-- gh-comment-id:2408761409 --> @par274 commented on GitHub (Oct 13, 2024): > There's no shader cache. Yes, I noticed that. I think it's a most important thing.
Author
Owner

@cuesta4 commented on GitHub (Oct 13, 2024):

Sometimes shader cache will mask problems and make it difficult to see if they've been solved. It's something usually reserved for when emulators are at a more mature state, and the highest priority becomes quality of life features.

Right now it's better to compile the shaders everytime, so we can quickly identify fixes and regressions.

<!-- gh-comment-id:2408796243 --> @cuesta4 commented on GitHub (Oct 13, 2024): Sometimes shader cache will mask problems and make it difficult to see if they've been solved. It's something usually reserved for when emulators are at a more mature state, and the highest priority becomes quality of life features. Right now it's better to compile the shaders everytime, so we can quickly identify fixes and regressions.
Author
Owner

@wojek07 commented on GitHub (Oct 13, 2024):

However, will such feature be actually needed at some point in future? If so then, it makes sense to implement this and just disable it by default.

<!-- gh-comment-id:2408884494 --> @wojek07 commented on GitHub (Oct 13, 2024): However, will such feature be actually needed at some point in future? If so then, it makes sense to implement this and just disable it by default.
Author
Owner

@par274 commented on GitHub (Oct 13, 2024):

Sometimes shader cache will mask problems and make it difficult to see if they've been solved. It's something usually reserved for when emulators are at a more mature state, and the highest priority becomes quality of life features.

Right now it's better to compile the shaders everytime, so we can quickly identify fixes and regressions.

There are still memory leak problems at the moment, can we say that this is the cause? If so, there may be an option to disable cache, but this feature needs to be there.

However, will such feature be actually needed at some point in future? If so then, it makes sense to implement this and just disable it by default.

Yeah, I'm on the same point as you.

<!-- gh-comment-id:2408926972 --> @par274 commented on GitHub (Oct 13, 2024): > Sometimes shader cache will mask problems and make it difficult to see if they've been solved. It's something usually reserved for when emulators are at a more mature state, and the highest priority becomes quality of life features. > > Right now it's better to compile the shaders everytime, so we can quickly identify fixes and regressions. There are still memory leak problems at the moment, can we say that this is the cause? If so, there may be an option to disable cache, but this feature needs to be there. > However, will such feature be actually needed at some point in future? If so then, it makes sense to implement this and just disable it by default. Yeah, I'm on the same point as you.
Author
Owner

@rafael-57 commented on GitHub (Oct 13, 2024):

The emulator is very early in progress, the way shaders are handled changes very frequently with nightly builds. There are other things to do before implementing a shader cache

<!-- gh-comment-id:2408940298 --> @rafael-57 commented on GitHub (Oct 13, 2024): The emulator is very early in progress, the way shaders are handled changes very frequently with nightly builds. There are other things to do before implementing a shader cache
Author
Owner

@Beworgen commented on GitHub (Nov 16, 2025):

Can you make the shader compiler a option so that only people that update the games compatibility need to disable it and it will show if it is disabled or not in the log?

<!-- gh-comment-id:3537266771 --> @Beworgen commented on GitHub (Nov 16, 2025): Can you make the shader compiler a option so that only people that update the games compatibility need to disable it and it will show if it is disabled or not in the log?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#447
No description provided.