Repository navigation
Conversation
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.
Issue
I noticed a vram leak that was present in Iris 1.11.5 on 26.3 but not in Iris 1.11.4 on 26.2. When Iris reloads, or we change dimensions, or exit and re-open a world, VRAM usage increases by 200-700MB depending on the complexity of the shader pack.
This leak was introduced in 45a0419 when a new override cache was added. This cache is not cleared when the shader pipelines are destroyed. This is only present in this 26.3 branch (or any downstream from it I presume).
This is possibly related to #3421
Fix
The cache is moved to
IrisPipelinesso that we can clear it inPipelineManager.destroyPipeline(). Only the vertex arrays are closed sinceIrisRenderingPipeline.destroyShaders()closes the programs.Result
When reloading the shader pack, switching dimensions, or exiting and re-opening worlds the VRAM usage now remains stable.
Note
NeoForge builds do not seem to be working, so I have not tested on those