Repository navigation
A page of many layers the size of the frame draws them all, and one of more than Vello's image atlas holds fails its render - #94
Merged
Conversation
…f more than Vello's image atlas holds fails its render An element with a perspective transform or a filter is drawn apart and placed in the page as an image the size of its box (raea-sys-filters' placeholder), new in every frame, and Vello copies each into its image atlas. The atlas stops at 8192 px a side, room for 28 images the size of a 1080p frame, and lets go only of what the last two resolves didn't use, in one sweep a resolve. So a page of ten such layers or more filled it with the last frames' images, the frame's last layers (the nearest ones) found no room, and Vello drew them at no size without an error. A film staged on about twenty frame-sized planes lost a cursor or a mark from single frames, different ones on each run, with "0 errors, 0 warns". vendor/vello_encoding, when an image finds no room at the atlas's largest size: - what the resolve hasn't used is let go, the longest unused first (ImageCache::evict_unused), so last frame's placeholders go before a picture this frame's layers drew; - if an image is still left out, the atlas is packed again with the resolve's images alone, the tallest first (repack_with, once a resolve). Images met in paint order cut a guillotine atlas up: 18 a few px apart in size didn't all find a place in room for 28; - the images left out after that are counted (take_images_left_out). An empty image is no longer looked for a place (the allocator has none for it, and the atlas grew to its largest looking), and isn't one left out. raea-sys-page reads the count after each Vello draw (skipped.rs) and refuses the frame, and the fed render now reads refusals (raea_gpu_device::check::fed_checked): it had no one to read them, so a refused page went into a video as it came. A still's render read them already. Tests: vello_encoding's resolver places all 18 frame-sized images of each of 40 frames (unpatched: 10 of 18 from the second frame) and counts the ones left out of a frame of 40; the cache's two new steps; fed_checked fails a refused frame by its number. bench/layer-atlas/check.sh, 18 layers the size of the frame, each with one white tile, on Windows 11 with an RTX 4070 Laptop (Vulkan). Before: 32 of the video's 48 frames short of 18 tiles, stills 1, 3 and 5 of six drew 10, and 40 layers rendered with every frame short. After: 18 tiles in every frame of the video and in each still, and the 40-layer render fails with "frame 0: a page (1920x1080) was drawn without N of its images". Not changed: the atlas's size. A page still can't draw more images in one frame than 8192 px a side holds (28 the size of a 1080p frame at best, 6 at 4K); it now fails instead of drawing without them. An image wider or taller than 8192 px, which Vello also left out silently, fails its render too. Co-Authored-By: Claude <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Owner
|
Merged, thanks. This explains the frames that went missing from last week's film, and failing loudly instead of drawing without them is the behaviour we want. I'll run bench/layer-atlas on macOS with the next build and report here if anything differs. |
shinyobjectz
added a commit
that referenced
this pull request
Nov 17, 2026
…rences and guide copies (the music and sound guides, craft's rubric and verbs; cli.md's raea motion, raea bug and clothes flags; feed.md's bug_report and final tag; files.md's rules and render progress), and the bug and rules tools taught
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.
A page with about ten or more elements the size of the frame, each with a perspective transform or a filter, loses some of them from some frames. Nothing is printed and the render exits 0. This is what took a cursor and a mark out of single frames of the film made with raea last week, different frames on each run.
Repro
bench/layer-atlas/fit.tsx(new): 18 divs of 1920x1080, each with its own slightly projectivematrix3dand one white tile, on black. No filter, no opacity, no images.On
main, 32 of the video's 48 frames are short of 18 tiles, and stills 1, 3 and 5 draw 10 of 18. Each of those stills is whole when asked for alone.Why
blitz-paintpush_warp_layer), and a filtered one a filter layer.raea-sys-filtersplaces each in its parent as a placeholder image the size of its box, with a new blob id on every paint.raea-sys-pagehands the layer's pixels to Vello withoverride_image, and Vello copies them into its image atlas.vendor/vello_encoding/src/image_cache.rs).resolve.rs: "If the atlas is already maximum size, there's nothing we can do").So the atlas fills with the last two frames' placeholders, and the frame's last layers in paint order, the nearest ones, are left out. Layers a few px apart in size also cut a guillotine atlas up, so even with the old images gone 18 of them didn't always fit in room for 28. The fed render never read a page's refusal either, so nothing could have stopped the video.
Change
vendor/vello_encoding, when an image finds no room at the atlas's largest size:ImageCache::evict_unused). Last frame's placeholders go before a picture this frame's layers drew.repack_with).take_images_left_out).raea-sys-pagereads the count after each Vello draw (skipped.rs) and refuses the frame, as it does for a page past the bump buffers.raea_gpu_device::check::fed_checkednow reads refusals, so a refused frame fails a video as it fails a still.Nothing changes for a page whose images fit: the new steps run only where an image was about to be left out.
Testing
Unit tests, no GPU:
vello_encodingresolve::tests::images_new_in_each_frame_all_get_a_place: 18 frame-sized images, new in each of 40 frames, a few px apart in size. Unpatched it fails at the second frame (10 of 18 placed). It also checks the count for a frame of 40, and that an empty image neither counts nor grows the atlas.image_cache::tests: the two new steps.raea-gpu-devicecheck::tests: a refused frame fails the fed render by its number. It fails without thefed_checkedchange.Renders, on Windows 11 with an RTX 4070 Laptop (Vulkan), release builds,
mainat bb0a176:bench/layer-atlas/check.sh: video of 18 layersframe 0: a page (1920x1080) was drawn without 12 of its images: ...One still that
maindrew whole is identical on this branch, pixel for pixel.The film itself (1,622 frames at 1080p, about twenty frame-sized planes, some blurred), as a video:
tools/size.sh,layers.sh,names.sh,one-version.sh,no-void.shandpublic-guard.shpass on the branch.Limits
set_bump_full), cleared before each draw and read right after it. raea has one Vello renderer, so it is left at that.maincounts what it left out, so that it ismainthat lacks them is read from the pictures (two more pane outlines on this branch), not measured.cargo dupesandcargo sheararen't installed here.Reviewed over two rounds by GPT-6.1 Sol (high effort), a different model family from the one that wrote it. It found one small thing (a measuring resolve counted too), which is fixed, and nothing more in the second round.
Created with Claude Fable 5.2 in T3 Code (Claude Code).
🤖 Generated with Claude Code