vello_cpu: Tweak behavior for filter layers with zero clips#1437
Merged
laurenz-canva merged 3 commits intoFeb 16, 2026
Merged
Conversation
grebmeg
reviewed
Feb 16, 2026
grebmeg
approved these changes
Feb 16, 2026
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Feb 16, 2026
) This requires #1437 to be merged first, otherwise the test doesn't pass properly. But I have verified that this fixes the issue. There were basically two problems: 1) We were erroneously exiting eagerly in `pop_clip` in case the clip path has zero strips, causing `push_clip` and `pop_clip` to not be symmetrical. This meant that if the first scene was rendered improperly, this inconsistent state could leak into future iterations. 2) We were not properly resetting `n_zero_clips` in Wide.
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.
Closes #1421. The problematic command trace looks as follows:
Using the current logic, when we hit a filter layer followed by
PushZeroClip, we simply increase the command index by one. The render range is 4..4, so afterwards we would simply skip to theFiltercommand that followsPushZeroClip. However, as you can see there still is aPopZeroClipcommand.I think the correct behavior is to completely skip all commands of the layer and jump to the very last
PopBufcommand, which is then executed to ensure the previously pushed (empty) buffer is freed again.