Repository navigation
Async shader loading and caching - #178
Merged
Merged
Conversation
Vertex/pixel shaders are linked as separate programs now
I believe the previous approach would break on Wayland (have had bad juju from previous multithreaded game engine experiments)
Member
|
Check proposed changes, otherwise good |
Member
|
Confirmed the Wayland-specific (well, Linux at least, but I don't have X11 on this system) paranoia was correct, undoing that commit results in a blank screen. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because the stutters annoyed me I decided to refactor this, the changes in a nutshell:
I also did a little bit of cleaning up the code and added some enums for the flags. So overall the stutters are now gone, the downside is that it now holds very shader combination in memory which is about 10 MB so its not really much and compared to Unity this is nothing. Another thing to note, I've set the parallel worker threads for shader compilation to only 2, it does seem to allocate quite a bit of memory per worker and its done in like 4 seconds on my machine and only when the cache has not been yet built so I think this is reasonable.