Compose: keep filtered source rectangles inside their crop #2532

Manually merged
github merged 1 commit from github-bot/gh-2532 into main 2026-11-30 14:17:21 +00:00 AGit
Owner

@⁠ghptc on GitHub · 2026-11-29 13:53 UTC · original
ghptc:fix/clamp-compositor-crop → main · +22 −1 · 1 files · 1 commits · merged 2026-11-30 14:12 UTC

When a presented plane is scaled up from an interior source rectangle, the linear sampler can reach one texel outside the crop. Pixels outside a dynamic-resolution render or cropped interface can then bleed into the visible edge. The placement mapping from 8fd66762 supplies the correct rectangle. This change keeps its sampling footprint inside that rectangle, while preserving bilinear interpolation in the interior.

The regression uses a four-texel texture containing red, green, blue and white. Enlarge just the green texel to two output pixels. On an RTX 5070 with driver 620.73.04, Arch Linux and Proton Experimental, the physical RGBA8 readbacks were:

Build Left RGB Right RGB
Upstream 829188e9 (64, 191, 0) (0, 191, 64)
With the sampling fix (0, 255, 0) (0, 255, 0)

An independent crop-then-resize reference matched both corrected pixels. The six control pixels matched in both arms for 1:1 copying, partial destination placement and filtering inside a larger crop. Both services completed cleanup and returned to the measured GPU idle envelope, with zero memory pressure, OOM, swap or task-limit events.

The regression extends compose::tests::shows_a_planes_source_rectangle_in_its_place. Both test builds included the identical diagnostics-only compile prerequisite from #2386. This PR changes only the compositor and its regression. The readback measures color correctness.

**@⁠ghptc** on GitHub · 2026-11-29 13:53 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2532) `ghptc:fix/clamp-compositor-crop` → `main` · +22 −1 · 1 files · 1 commits · merged 2026-11-30 14:12 UTC When a presented plane is scaled up from an interior source rectangle, the linear sampler can reach one texel outside the crop. Pixels outside a dynamic-resolution render or cropped interface can then bleed into the visible edge. The placement mapping from 8fd66762 supplies the correct rectangle. This change keeps its sampling footprint inside that rectangle, while preserving bilinear interpolation in the interior. The regression uses a four-texel texture containing red, green, blue and white. Enlarge just the green texel to two output pixels. On an RTX 5070 with driver 620.73.04, Arch Linux and Proton Experimental, the physical RGBA8 readbacks were: | Build | Left RGB | Right RGB | |---|---|---| | Upstream 829188e9 | (64, 191, 0) | (0, 191, 64) | | With the sampling fix | (0, 255, 0) | (0, 255, 0) | An independent crop-then-resize reference matched both corrected pixels. The six control pixels matched in both arms for 1:1 copying, partial destination placement and filtering inside a larger crop. Both services completed cleanup and returned to the measured GPU idle envelope, with zero memory pressure, OOM, swap or task-limit events. The regression extends `compose::tests::shows_a_planes_source_rectangle_in_its_place`. Both test builds included the identical diagnostics-only compile prerequisite from #2386. This PR changes only the compositor and its regression. The readback measures color correctness.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 13:55:51 +00:00
github manually merged commit b891e587b8 into main 2026-11-30 14:17:21 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!2532
No description provided.