Repository navigation
Keep the layers most worth a plane under a blend limit (P-105) - #126
Merged
Merged
Conversation
drmkit enforced a CRTC's blend-stage limit (P-46) inside the search: tests over the limit were refused without asking the kernel, and the backtrack dropped layers until the assignment fit. The layers it kept were the ones the score-ordered greedy pass had placed, so a high-priority layer that pass left out stayed composited while low-priority ones held planes. Upstream's 58cf1a7 (drm-cxx#363) fixed that symptom by capping the placeable set before the search. cap_to_blend_limit ports it. Pinned and externally bound layers hold stages of their own, one is left for the canvas when anything composites, and the rest go by keep_priority, ties in the caller's order. The layers past the budget are composited. The in-search check stays as a backstop. no_test_arms_more_planes_than_the_crtc_can_stack now expects the reference's answer: with a limit of 3 and five layers, two placed and one stage for the canvas. Signed-off-by: Joel Winarske <joel.winarske@linux.com>
jwinarske
force-pushed
the
fix/blend-limit-keep-priority
branch
from
October 20, 2026 19:20
ec836b6 to
a4e61d3
Compare
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.
This is part of moving the parity baseline to drm-cxx
2a050f5. It ports the allocator half of upstream's58cf1a7(drm-cxx#363). The parsing half is #124.drmkit enforced a CRTC's blend-stage limit (P-46) inside the search. Tests over the limit were refused without asking the kernel, and the backtrack dropped layers until the assignment fit. Three things differed from the reference:
The new
cap_to_blend_limitruns before the full search, as the reference's does:keep_priority, ties in the caller's order;The in-search check stays as a backstop.
Tests:
the_blend_limit_keeps_the_layers_most_worth_a_plane. With a limit of 3 and the high-priority layers at both ends of a five-layer stack, it now places exactly those two. Without the cap it placed 1, 4 and 5.no_test_arms_more_planes_than_the_crtc_can_stacknow expects the reference's answer: two placed, three composited, one stage for the canvas. It expected three placed before.Docs: P-105 row and a CHANGELOG entry.
Checks: clippy over the workspace with all features, workspace tests, the scene, planes and scene-set tests on vkms, and rustdoc all pass. vkms has no blend limit, so nothing changes there.