Skip to content

vello_common: Compute rect edge-row tile alphas once per row - #4

Open
nicoburns wants to merge 1 commit into
mainfrom
devin/1790445884-rect-render-simd
Open

nicoburns wants to merge 1 commit into
mainfrom
devin/1790445884-rect-render-simd

Conversation

@nicoburns

Copy link
Copy Markdown
Member

Summary

vello_common::rect::render computed per-pixel float coverage separately for every tile in a rect's top and bottom strip rows. Profiling cached glyph rendering in vello_cpu (each cached glyph is drawn as a rect fill, so ~9k small rects per frame) showed rect::render at ~20% of single-threaded time.

The top and bottom rows only have three distinct tile shapes: left edge, right edge, and interior. This change computes the alpha for each of those once per row and vectorises the calculation. Output is bit-identical.

Part 1 of 3 of the CPU glyph-cache speedups. It is independent of the other two:

  • the image-resolve cache in Fine (#)
  • the alpha-mask fast path

Measurements

Throwaway probe: 1600×1200 target, ~9.3k glyphs, 14px, atlas_cache(true), mean of 60 warm frames on a noisy Linux VM. Scene encode time for the cached run, main → this branch:

threads main this branch
1 5.69 ms 3.46 ms
4 4.19 ms 3.41 ms
8 4.64 ms 3.35 ms

cargo test -p vello_cpu -p vello_common passes.

Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/55344a6e161d48b4a3a8688fabe11d4c
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/55344a6e161d48b4a3a8688fabe11d4c?variant=devin-insiders
Requested by: @nicoburns

@staging-devin-ai-integration

Copy link
Copy Markdown

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@staging-devin-ai-integration
staging-devin-ai-integration Bot force-pushed the devin/1790445884-rect-render-simd branch from cb234d4 to 41a2196 Compare September 29, 2026 15:22

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant