Ignore released shaders when inhibiting frame elision - #109
Open
hkf57 wants to merge 1 commit into
Open
Conversation
hkf57
force-pushed
the
agent/stabilize-frame-elision-hash
branch
from
August 3, 2026 06:20
66e4af1 to
dad6573
Compare
hkf57
marked this pull request as ready for review
August 3, 2026 06:47
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.
What changed
Ignore released shader slots when checking whether an incomplete texture must inhibit frame elision.
Why
When an asynchronous texture is released before upload completes,
r_shaderHnd_caborts the load at reference count zero. Depending on its loading phase, the cancelled texture can remainINITorPENDING_UPLOAD;PurgeShaders()deliberately retains shader slots until their texture isDONE.PumpShaders()scans those released slots and currently setsinhibitElisionfor any non-DONEtexture. Since the cancelled texture will never finish,EndFrame()clearslastFrameHashevery frame and permanently defeats identical-frame elision.Released shaders cannot participate in rendering. Restricting the loading check to positive-reference slots preserves elision inhibition for every active loading texture while excluding abandoned slots.
Closes #108.
Live evidence
On the reproducing PoB build, SimpleGraphic's Layers panel reported:
122 out of 122 frames drawnElide identical framesenabledElision inhibitedcontinuously trueThe affected focused 3840x1600 window used roughly 80% of an RTX 3080 Ti. The same instance at 1296x759 used 1.26%, and another maximized build using the same executable/runtime used 2.57%. DWM, refresh rate, NVIDIA profile matching, and overlays were excluded as the primary discriminator.
Validation
git diff --check: passed2.5-dad657322 out of 1020 frames drawn, frame elision enabled,Elision inhibitedfalseThe portable process was closed after the sample and the original focus/cursor were restored. No installed PoB files or persistent settings were changed.