Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGL: fix loading cached shaders from GL cache files #1209

Merged
merged 2 commits into from
May 22, 2024

Conversation

goeiecool9999
Copy link
Contributor

@goeiecool9999 goeiecool9999 commented May 20, 2024

The code that uses glProgramBinary to load compiled shaders from shaderCache/precompiled/<TitleID>_gl.bin files is unreachable. The fileSize variable is never changed so the function always fails. This means Cemu has been relying entirely on driver cache implementations for some time. (they must be pretty effective since nobody seems to have noticed this)

@Exzap
Copy link
Contributor

Exzap commented May 22, 2024

Nice catch.

In our experience, glProgramBinary is pretty broken/useless across the board on Windows (unsure about Linux drivers). On 2 out of the 3 big vendors we had an issue where shaders would not be restored with all their state permutations. So you'd still get stutter during gameplay occasionally. The driver internal caches do not have this problem but iirc they do get invalidated on driver update. Either way thanks for the fix

@Exzap Exzap merged commit 523a165 into cemu-project:main May 22, 2024
5 checks passed
@goeiecool9999 goeiecool9999 deleted the fixloadingshadercache branch May 22, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants