Repository navigation
t27f token_floor: a per-frame row index so each raster row visits only the splats that touch it #10391
Description
Boundary
specs/t27f/token_floor.t27 only: its main raster, new pure helpers and tests for a per-frame row index, and its seal .trinity/seals/t27f_token_floor.json. No other spec, no generated file, no code in another language. Builds, tests and timings run on the Railway lab.
User Scenarios
- The owner edits the token_floor reel and re-renders it on one core. Today the raster checks all ~42k splats on each of 1920 rows of every frame, about 80M checks a frame once every label is up, although a dot touches at most a dozen rows. The render takes 51-54 s on the lab.
- The 48-shard render (PR t27f: token_floor renders in 48 shards; frames cached by the seal (Closes #10383) #10384) pays the same per-row scan in every shard.
Requirements
- After the splat pass of each frame, build a row index: for each row, the splats that can touch it, in splat order (a counting sort into a fixed buffer of u16 splat numbers).
- The raster visits only the splats its row lists and keeps its own check (
touches_row), so the index can only skip rows a splat cannot light. The splat order within a row is unchanged, so the alpha-over of a ball and every float sum see the same operands in the same order. - A test proves the index lists every row the raster's check accepts, for dots, halos, balls, vertical lines and mirror images at 1200 centres a third of a pixel apart, and never more than
span_maxrows. - A test proves the buffer fits the largest index any frame can build (
index_bound() <= INDEX_CAP) and that a u16 names every splat.
Success Criteria
- Frames sha256 unchanged,
7e0c6662ddbf84a0a424c0aa119420eb34f90b0decec6e0c05753b2d37391e07, for one process and for 48 shards (TF_SHARD/TF_SHARDS) concatenated. - One-process render time measured before and after on the lab, same build flags (
-O ReleaseSafe -lc). t27c test-report specs/t27f/token_floor.t27: every test passes, 0 vacuous.- The spec is resealed.
Requirements
FR-001: After the splat pass of each frame, the spec MUST build a row index mapping each row to the splats that can touch it, in splat order, using a counting sort into a fixed buffer of u16 splat numbers.
FR-002: The raster MUST visit only the splats listed for its row while retaining its own touches_row check, so the index only skips rows a splat cannot light; splat order within a row MUST remain unchanged to preserve alpha-over and float sum operand order.
FR-003: The spec MUST include a test proving the index lists every row the raster's check accepts for dots, halos, balls, vertical lines, and mirror images at 1200 centres spaced one-third pixel apart, and that no splat spans more than span_max rows.
FR-004: The spec MUST include a test proving the buffer capacity fits the largest index any frame can build (index_bound() <= INDEX_CAP) and that u16 suffices to name every splat.
Activity
github-actions commentedon Oct 18, 2026
Closed by the issue-shape gate (specs/policy/issue_shape.t27, #7498): an issue must have the template's sections. Edit the body; an edit that passes reopens it.
FR-001: ... MUST ...t27f token_floor: a per-frame row index, so each raster row visits on…