Fix early return in image State::prepare skipping layer finalization#3292
Open
f-o-o-g-s wants to merge 1 commit intoiced-rs:masterfrom
Open
Fix early return in image State::prepare skipping layer finalization#3292f-o-o-g-s wants to merge 1 commit intoiced-rs:masterfrom
State::prepare skipping layer finalization#3292f-o-o-g-s wants to merge 1 commit intoiced-rs:masterfrom
Conversation
The sub-pixel bounds guards added in 0fe99b1 and 1463ec8 use return instead of continue, so hitting one small image bails out of the whole function and skips the layer.push, layer.prepare, and .clear calls at the end. This leaves stale instances around and causes a wgpu buffer validation error on the next frame. Fixes iced-rs#3272
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.
The sub-pixel bounds guards added in 0fe99b1 and 1463ec8 use
returninstead ofcontinueinside the image loop inState::prepare. When any image in the batch has bounds smaller than 1px,returnexits the whole function instead of just skipping that image. This meanslayer.push(),layer.prepare(), and the instance vec.clear()calls at the bottom never run, which leaves stale instances around and causes a wgpu buffer validation error on the next frame.This changes both to
continueso we just skip the sub-pixel image and let the rest of the function finish normally.Fixes #3272