Metal: release held drawables when the swap chain resizes - #120
Closed
yorgunkral31 wants to merge 1 commit into
Closed
yorgunkral31 wants to merge 1 commit into
yorgunkral31 wants to merge 1 commit into
Conversation
On iOS the layer's drawables are invalidated when the app is suspended; holding or presenting them across a resume is undefined. resize() runs with the GPU idled whenever the swap chain is invalidated, so it is the natural point to release the previous generation's references (this also fixes them lingering across ordinary resizes). (cherry picked from commit a19f137)
Contributor
|
Closing, as per the contribution guidelines that state, AI-generated pull requests are not allowed. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
acquireTextureretains each drawable and only releases it when the slot is reused, so references linger across resizes. On iOS this bites hard: a suspend invalidates the layer's drawables, and holding them across a resume is undefined.resize()already runs with the GPU idled, so it now releases the previous generation's references there. No behavior change beyond dropping stale references. (Companion to the app-side suspend/resume work in Markos-Th09/UnleashedRecomp-iOS#10.)