Skip to content

Fix VRAM leak on shader reload and dimension change - #3431

Open
ASaull wants to merge 2 commits into
IrisShaders:26.3from
ASaull:26.3
Open

ASaull wants to merge 2 commits into
IrisShaders:26.3from
ASaull:26.3

Conversation

@ASaull

@ASaull ASaull commented Oct 18, 2026 •

Copy link
Copy Markdown

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 IrisPipelines so that we can clear it in PipelineManager.destroyPipeline(). Only the vertex arrays are closed since IrisRenderingPipeline.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

@ASaull ASaull mentioned this pull request Oct 18, 2026
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.

1 participant