Repository navigation
perf(render): backdrop copies hold the blurred regions, not the window - #2137
Merged
Merged
Conversation
Hona
marked this pull request as ready for review
November 25, 2026 17:35
This was referenced Nov 25, 2026
Closed
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.
Renderer::ensure_backdropmade one window-sized texture per target format whenever a frame held a backdrop blur, however small the blurred element. The blur's pyramid was already sized to the region; the copy it reads from was not.Renderer::backdrop_framegives them one place and size (in 64 px steps; a texture stays while it holds the regions and isn't four times their area),ActivePass::splitcopies into it at that offset, and the first down pass maps its taps against it.EffectSite::backdrop) still gets a copy of the whole target at the target's own size.flowchart LR subgraph before W1[window 2560x1440] --> C1[BGRA8 copy 2560x1440, 14 MB] W1 --> C2[RGBA16F copy 2560x1440, 29 MB] end subgraph after W2[window 2560x1440] --> R[blurred regions] --> C3[BGRA8 copy 128x64] R --> C4[RGBA16F copy 128x64] endMemory
A desktop app with one frosted pill on screen (a session scrolled away from its end), Intel Iris Xe, Direct3D 12. Two Windows x64 builds of the app from one tree, the after side with this change's commit as its Rune pin; private working set (Task Manager's "Memory"), one run a side, each after a throwaway launch of its own build. On this adapter the driver maps every texture into the process, so the copies count in that number.
On builds that count the renderer's textures (same scene at 2560x1440): pooled backdrop copies 2 textures, 42,992,640 B before; 2 textures, 98,304 B after.
Pixels
Headless pictures of the app, before against after, with lines of text under the frosted pill. Differing pixels:
Frames
Two pairs of app builds, each pair from one tree with only this change between its sides and the same profile counts but for the functions this change touches. Real windows and headless runs on a busy machine; a frame row's own spread among calm runs is about a quarter here.
d5c7a5ad2(four runs a side)ffea1a6ea(two runs a side)Tests
Rune's macOS tests on this branch's head
4dcc833ff(dev0b89a5cd9taken in), run 45665099792: all 47 test binaries passed;rune's unit tests 3670 passed, 0 failed.render::backdrop_tests::a_blur_alone_pools_a_copy_of_its_region_not_of_the_window: a red / blue seam under a 64x32 pill in a 1024x768 target blends and stays sharp away from the pill; the copy is region-sized; a moved pill makes no texture; an effect slot still gets a copy of the whole target.