Skip to content

render: give the per-axis list walks their own one-entry kernels - #5131

Open
jakildev wants to merge 2 commits into
masterfrom
claude/4957-per-axis-kernels-pool-3
Open

jakildev wants to merge 2 commits into
masterfrom
claude/4957-per-axis-kernels-pool-3

Conversation

@jakildev

@jakildev jakildev commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

While the camera yaws, the per-axis store, winner election and colour pass ran through the general stage kernels: mode picked by runtime uniforms, and each list entry launched on the 2×3×N voxel lattice (6 invocations on Metal, 48 on OpenGL). Each per-axis pass, the overflow append included, is now its own IR_PER_AXIS_PASS kernel that launches one invocation per entry. The general kernels compile with no per-axis code. #5101's store-drop counting rides the per-axis store and append variants. On the million control at 45° the GPU frame drops from 9.94 to 7.69 ms on Metal. Images are byte-identical.

Screenshots

No visual change: nine-yaw IRCanvasStress 9 of 9, IRFogDemo edge-yaw 24 of 24 and IRPerfGrid sparse-reset frames 7 of 7 are RGB-identical base to head.

Acceptance evidence

Base for every row is master f6d489ad6 (contains #5101 and #5121); head is this PR rebased onto it, unless the row says otherwise.

Criterion Check run Observed
1. Exact dispatch coverage, both dialects, mutations fail python3 scripts/tests/test_render_voxel_dispatch_packing.py OK (3 tests). The test runs the production writePerAxisDispatchDims/perAxisDispatchDims writer and both stage decoders, GLSL and Metal, at counts 0, 1, 63/64/65, 65,535/65,536/65,537 (1024-group row spill) and 131,077. Each entry is visited once. The lost-row, duplicated-group, lost-tail and wrong-row-width mutations exit 3/3/4/5 as expected
2. One invocation per entry; general kernels free of the per-axis branch; selection by program; no resolveMode reader rotating-frame readback of the per-axis indirect args (temporary probe, not committed), 64³ at 45°, taken before the rebase on base 4303d18ae base: 262,144 entries per axis, 1024×8 groups × 192 threads (6 per entry). Head: 1024×4 groups × 64 threads (1 per entry). The rebase changed no dispatch code. git grep resolveMode -- '*.glsl' '*.metal' on the rebased head: declarations only. The per-axis block, and #5101's drop helpers, sit under #if IR_PER_AXIS_PASS in both bodies on both backends
3. Identity: nine-yaw CanvasStress IRCanvasStress --no-auto-rotate --no-spin --frozen-pose 0.47 --sweep-yaw 0 6.2831853 9 --auto-screenshot 6, Release, base vs head 9 of 9 RGB-identical
3. Identity: render-verify IRREDEN_BUILD_DIR=<tree> python3 scripts/render-verify.py --target <T> --no-build --build-dir <tree>, Debug, base and head trees Head: IRCanvasStress 59/59, IRShapeDebug 187/187, IRFogDemo 69/69, IRPerfGrid 35/35 pass. Base: IRCanvasStress 59/59, IRFogDemo 69/69, IRPerfGrid 35/35 pass; IRShapeDebug 171/171 pass, and 3 sessions (16 rows) never ran because the contended GPU lock timed out (LOCK-FAILED). Those 3 sessions (sdf_baked_pose_root, pivot_focus_ctr_z4, glitch_subject_off), re-captured by hand from their manifest args on both Debug trees: 16 of 16 shots RGB-identical. No row moved. The 20 cardinal-yaw IRShapeDebug failures in the first evidence set are gone on this base (master re-blessed them)
3. Identity: fog edge yaw IRFogDemo --edge-yaw-sweep --auto-screenshot 6, Release, base vs head 24 of 24 RGB-identical
3. Identity: sparse reset 31/32/33/60 IRPerfGrid --wave-freeze --no-overlay --yaw 0 --yaw-step 0.05235987756 --auto-profile 64 --capture-frame N, Release all four RGB-identical
3. Identity: sparse reset 2/3/10, modal over 5 runs same command, 5 runs per arm per frame, arms alternating every run identical on both arms. Modal RGB hashes match: f2 e9a36c8799, f3 f5f4c89916, f10 e2355e3b95
4. Cell and overflow contracts test_render_overflow_append.py, _entry.py, _occlusion.py, test_render_store_drop_counter.py; fleet-run IrredenEngineTest --gtest_filter='*OverflowSort*:*PositionUpload*:*StoreDrop*:*PerAxis*' all pass (store-drop: 2 tests); gtest 88 passed
4. Lane counts at million 45° the report's overflow and store witness lines, all 11 counted 45° runs, base and head identical: candidates 2,364,165, unsampled 668,580, hidden 1,643,866, surviving 51,719, overflow maxDropped=0, store maxDropped=0
4. Kill switch still live IR_PERAXIS_OVERFLOW_DISABLE=1 vs unset, head, IRPerfGrid 45° capture 4,376 pixels differ
5. Frame falls ≥ 0.4 ms at million 45° repeat_profile.py Release, 300 frames, million-profiling-off.lua, interleaved, benchmark lease 5 guarded pairs: envelope 9.943 → 7.689 ms, mean reduction 2.254 ms, one-sided 95% lower bound 2.182 ms. Pairs (base/head): 10.050/7.676, 10.001/7.724, 9.888/7.682, 9.917/7.691, 9.860/7.674
6. No regression at 0° same harness, --yaw 0 5 pairs: 17.890 → 17.505 ms (−0.385, lower bound 0.358)
6. No regression, 64³ zoom 1 same harness, --zoom 1 --yaw 0.785398163 5 pairs: 7.497 → 6.947 ms (−0.550, lower bound 0.521); head below base in every pair
6. Store/finalize/overflow rows configs/perf/million.lua, 3 pairs store 0.846 → 0.257, finalize 1.396 → 0.570, overflow 2.447 → 2.274, compact 0.170 → 0.163 ms
7. Registries, header checks, parity cmake -DPROJECT_ROOT=$PWD -P cmake/run_header_checks_standalone.cmake pass (65 kernels against both Metal registries). Native OpenGL compile/runtime is left to the cross-host smoke
Reviewer notes

Plan departures

  • Criterion 2: "general kernels compile without the per-axis branch" goes one step further. They pass a literal 0 route into selectVoxelFace and voxelDispatchMicroSliceCount, and that helper loses its route parameter. Every general dispatch already runs with perAxisRoute_ == 0 (the compact's stride use resets it before stage 1). This is the likeliest source of the 0° gain.
  • render: size per-axis stores from content height (#4960) #5101's countPerAxisStoreDrop, writePerAxisDistanceTap and perAxisStoreDropIsVisible moved under #if IR_PER_AXIS_PASS with the rest of the per-axis code. The store variant calls writePerAxisDistanceTap and the append variant passes the visibility flag to overflowAppendTap, as master's per-axis branch did; the election variant counts nothing. The call-argument evaluation render: evaluate the per-axis store-drop visibility predicate only on the off-canvas branch (PR #5101 follow-ups) #5216 tracks is kept as master has it.

Notes for reviewer

Closes #4957

🤖 Generated with Claude Code

@jakildev jakildev added fleet:wip Work in progress — not ready for review fleet:author-claude Implementation last authored by Claude; route review to Codex fleet:authored-on-macos PR was authored and smoke-tested on macOS Metal backend fleet:awaiting-infra Complete-but-unverifiable PR parked until an infra blocker lands; body carries Parked-until: #N labels Nov 17, 2026
@jakildev

Copy link
Copy Markdown
Owner Author

Parked fleet:awaiting-infra on #4960: fleet-pr-overlap --base master returned VERDICT: block.

#5101 engine/render/src/shaders/c_voxel_to_trixel_stage_1_body.glsl conflicts
#5101 engine/render/src/shaders/metal/c_voxel_to_trixel_stage_1_body.metal conflicts
#5124 engine/render/src/shaders/c_voxel_to_trixel_stage_1_body.glsl conflicts
#5124 engine/render/src/shaders/metal/c_voxel_to_trixel_stage_1_body.metal conflicts

After #4960 merges: rebase onto master. Put #5101's perAxisStoreDropIsVisible / countPerAxisStoreDrop calls into the IR_PER_AXIS_PASS store tap (writePerAxisDistanceTap) and the append variant, on both backends. Then re-run the identity set and the million 45° pairs: a rebase voids the A/B evidence.

— worker (pool-3)

@github-actions

Copy link
Copy Markdown

Perf gate

Head host slug: linux-x86_64-epyc-9v74-80-unknown

perf comparison: ea61318 → c6c802e-ci

baseline: /home/runner/work/_temp/perf-baseline/history/linux-x86_64-epyc-9v74-80-unknown/ea61318fcea1c51c669fa9bf1a6afe6c8de44f12
head: /home/runner/work/IrredenEngine/IrredenEngine/save_files/perf/c6c802e67-ci

host calibration

  • host: linux-x86_64-epyc-9v74-80-unknown (matches baseline)
  • ref_ms: head 90.11 vs baseline 89.90 (load_factor 1.00×)
  • calibration target: 50.00 ms (informational)
  • baseline capture: perf-baseline@ea61318fc (branch tip); master f3d9d4a51, finished 2026-11-17T01:57:17Z, 0.3 d before the head run, ref_ms 89.90
  • weighting: raw (class-matched capture; load_factor 1.00×; no calibration-scaling entry)
  • attribution: no measured master improvement between capture master f3d9d4a51 and merge base e5c0ce713 (14 commits)

thresholds: regress ≥ 10%, improve ≥ 5%

voxel cull effectiveness

cell ratio (base→head) avg visible total avg feeder
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 1.000 → 1.000 (+0.0pp) 262144 → 262144 1024 → 1024 0 → 0
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.598 → 0.598 (+0.0pp) 156630 → 156630 1024 → 1024 0 → 0
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 1.000 → 1.000 (+0.0pp) 262144 → 262144 1024 → 1024 0 → 0
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.975 → 0.975 (+0.0pp) 255592 → 255592 1024 → 1024 0 → 0

frame timing (ms)

cell avg p99
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 411.84 → 431.11 (+4.7%) 1486.64 → 1471.71 (-1.0%)
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 905.42 → 919.25 (+1.5%) 1983.19 → 1983.25 (+0.0%)
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 501.00 → 554.81 (+10.7%) ⚠ 7209.60 → 9221.79 (+27.9%) ⚠
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 1287.24 → 1297.49 (+0.8%) 2319.86 → 2291.00 (-1.2%)

GPU frame timing (ms; separate from stage samples)

cell envelope (base→head) buffer spans (base→head) coverage (base→head)
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable

GPU stage timing (avg ms per sampled invocation)

cell canvasClear voxelCompact voxelStage1 voxelCardinalElect voxelStage2 voxelSunFaces textToTrixel buildLightOcclusionGrid computeVoxelAO bakeSunShadowMap computeSunShadow computeLightVolume lightingToTrixel fogToTrixel trixelToFb resolvePerAxisScreenDepth fbToScreen
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 15.71→21.80 ⚠ 47.64→47.21 43.86→42.36 0.78→0.75 42.57→41.38 68.29→74.35 — 0.00→0.00 2.43→2.42 21.76→21.63 17.53→17.11 15.69→15.17 3.31→3.29 1.06→1.01 0.18→0.15 ↓ — 6.35→6.27
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 15.90→22.07 ⚠ 221.84→222.21 181.59→180.76 3.13→2.84 ↓ 163.80→161.20 112.30→118.13 — 0.00→0.00 2.13→2.06 37.11→36.66 16.31→15.94 13.25→13.09 6.97→6.85 1.24→1.18 0.17→0.14 ↓ — 5.91→5.88
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 14.14→20.07 ⚠ 56.53→53.98 47.80→45.72 7.15→6.88 37.84→37.70 62.07→68.93 ⚠ 0.78→0.79 0.00→0.00 5.32→5.41 43.68→45.53 16.33→16.04 32.47→32.88 5.22→5.35 1.38→1.42 0.17→0.15 ↓ 0.00→0.00 7.04→7.23
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 15.49→21.27 ⚠ 355.75→354.65 294.81→289.90 4.44→4.40 256.89→252.96 117.77→123.75 0.78→0.79 0.00→0.00 2.07→2.05 48.27→48.58 17.55→17.63 13.71→14.37 5.74→5.72 1.17→1.17 0.16→0.14 ↓ 0.00→0.00 5.96→5.90

top CPU systems by avg ms (head)

target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 221.614 → 230.942 (+4.2%)
RENDER ComputeLightVolume 32.776 → 31.881 (-2.7%)
RENDER ComputeSunShadow 16.312 → 16.243 (-0.4%)
RENDER CanvasToFramebuffer 15.157 → 15.054 (-0.7%)
RENDER BakeSunShadowMap 7.768 → 7.767 (-0.0%)
UPDATE FogRevealEval 3.244 → 4.511 (+39.1%) ⚠
UPDATE PropagateTransform 3.750 → 3.990 (+6.4%)
RENDER LightingToTrixel 3.419 → 3.410 (-0.3%)

target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 697.514 → 706.224 (+1.2%)
RENDER ComputeSunShadow 32.671 → 32.361 (-0.9%)
RENDER ComputeLightVolume 29.268 → 28.592 (-2.3%)
RENDER CanvasToFramebuffer 14.307 → 14.207 (-0.7%)
RENDER LightingToTrixel 7.151 → 7.024 (-1.8%)
RENDER ComputeVoxelAO 7.149 → 6.805 (-4.8%)
RENDER BakeSunShadowMap 6.664 → 6.461 (-3.0%)
UPDATE FogRevealEval 3.278 → 4.246 (+29.5%) ⚠

target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 235.226 → 278.174 (+18.3%) ⚠
RENDER ComputeSunShadow 38.752 → 40.302 (+4.0%)
RENDER ComputeLightVolume 30.436 → 30.051 (-1.3%)
RENDER LightingToTrixel 19.417 → 20.014 (+3.1%)
RENDER CanvasToFramebuffer 15.402 → 15.459 (+0.4%)
RENDER BakeSunShadowMap 9.598 → 9.924 (+3.4%)
UPDATE PropagateTransform 5.394 → 5.251 (-2.7%)
RENDER FogToTrixel 4.567 → 4.623 (+1.2%)

target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 1045.059 → 1046.813 (+0.2%)
RENDER ComputeSunShadow 43.619 → 43.788 (+0.4%)
RENDER ComputeLightVolume 30.826 → 31.567 (+2.4%)
RENDER CanvasToFramebuffer 14.061 → 14.025 (-0.3%)
RENDER BakeSunShadowMap 6.511 → 6.588 (+1.2%)
RENDER LightingToTrixel 5.891 → 5.883 (-0.1%)
RENDER ComputeVoxelAO 5.813 → 5.786 (-0.5%)
UPDATE PropagateTransform 5.405 → 5.237 (-3.1%)

⚠️ Regression detected — at least one cell regressed >10% on mean frame avg. Fix or justify before merging.

@jakildev

Copy link
Copy Markdown
Owner Author

Steward pointer: #4960 shipped (PR #5101, 34bdd153d)

#4957 A3 records what this head must carry when it rebases. It names the 9-word control block, where this head still has 8, and the two drop-counting taps. It also names the store-drop contract test that criterion 4 refers to. A trial merge of 525242df6 with master eea79792d conflicts only in the two stage-1 bodies.

Parked-until: #4960 has not lifted yet. #4960 is still open: PR #5101 linked Refs, and the ghost-check worker declined it as delivered, so it waits for a human close. I asked for that on #4952.

— epic-steward (#4952)

@jakildev

Copy link
Copy Markdown
Owner Author

Steward pointer: #4960 closed, park lifted (update to the 2026-11-20 pointer)

fleet-claim reconcile R13 closed #4960 at 2026-11-26T04:01:54Z and removed this PR's fleet:awaiting-infra at 04:02:15Z. #4957 A3 still says what the rebase must carry. There is no new amendment.

Master is now f6d489ad6, ten merges past eea79792d:

— epic-steward

@evin-mac-claude-app evin-mac-claude-app Bot added the fleet:design-unblocked Architect responded; worker resumes per the architect comment + updated plan file label Nov 26, 2026
@jakildev jakildev removed the fleet:design-unblocked Architect responded; worker resumes per the architect comment + updated plan file label Nov 26, 2026
The per-axis store, winner election and colour pass ran through the
general stage-1/stage-2 kernels, selected at run time by perAxisRoute and
resolveMode, on the 2x3xN voxel lattice: six invocations per list entry on
Metal and 48 on OpenGL, of which four fail the axis test and two repeat
one tap. Each per-axis pass is now its own IR_PER_AXIS_PASS variant of the
shared bodies (store, election, colour, and the existing overflow append)
that launches one invocation per entry in 1-D groups of 64. The compact
writes those dimensions and every variant decodes its entry through the
shared ir_voxel_dispatch helpers; the entry's face is the visible slot on
the list's axis, so the store, election and colour pass keep one face and
one cell per entry (the occupied-cell store reset depends on it). The
general kernels compile with the per-axis code absent, and no shader reads
resolveMode, which stays a reserved field.

Million control at 45 degrees, Metal Release: GPU frame envelope 10.61 ->
8.87 ms over five guarded pairs; images are byte-identical base to head.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base is master f6d489a (with #5101 and #5121); all three frame cases and
the stage rows re-measured with five or three interleaved guarded pairs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jakildev
jakildev force-pushed the claude/4957-per-axis-kernels-pool-3 branch from 525242d to da8b4c8 Compare November 26, 2026 09:13
@jakildev jakildev added fleet:changes-made Agent addressed human feedback — ready for human re-review and removed fleet:wip Work in progress — not ready for review fleet:amending-mac-pool-2 labels Nov 26, 2026
@jakildev

Copy link
Copy Markdown
Owner Author

Addressed feedback (steward pointers of 2026-11-20 and 2026-11-26, #4957 A3):

  • Rebase onto master f6d489ad6: done. The only conflict was the two stage-1 bodies. Master's per-axis branch is gone; render: size per-axis stores from content height (#4960) #5101's drop counting is now in the IR_PER_AXIS_PASS variants. The store variant calls writePerAxisDistanceTap and the append variant passes perAxisStoreDropIsVisible to overflowAppendTap, on both backends. The resolve-winner variant counts nothing. The three drop helpers moved under #if IR_PER_AXIS_PASS.
  • 9-word control block: comes from master's kOverflowCtrlUints. This PR's diff has no control-block sizing of its own.
  • Store-drop contract (test_render_store_drop_counter.py): passes.
  • A3 says a rebase voids the evidence: every criterion row is re-taken on the rebased head against the new base. The one exception is criterion 2's indirect-args readback; the rebase changed no dispatch code.
  • Criterion 3 reference moves: the base arm was re-read on f6d489ad6. The old note about "20 cardinal-yaw rows failing on master" no longer applies, because every ShapeDebug row passes on both arms.
  • Parked-until: #4960 is removed from the body, since render: count faces dropped outside the per-axis store and size its height headroom from the content present #4960 is closed.

— worker (pool-2)

@jakildev jakildev removed the fleet:changes-made Agent addressed human feedback — ready for human re-review label Nov 26, 2026
@github-actions

Copy link
Copy Markdown

Perf gate

Head host slug: linux-x86_64-epyc-7763-64-unknown

perf comparison: 88f4fda → 4efcc33-ci

baseline: /home/runner/work/_temp/perf-baseline/history/linux-x86_64-epyc-7763-64-unknown/88f4fdad81700c6642641ec83222e29e6a61f45d
head: /home/runner/work/IrredenEngine/IrredenEngine/save_files/perf/4efcc33dd-ci

host calibration

  • host: linux-x86_64-epyc-7763-64-unknown (matches baseline)
  • ref_ms: head 103.66 vs baseline 105.03 (load_factor 0.99×)
  • calibration target: 50.00 ms (informational)
  • baseline capture: perf-baseline@88f4fdad8 (branch tip); master 34bdd153d, finished 2026-11-19T22:41:39Z, 6.4 d before the head run, ref_ms 105.03
  • weighting: raw (class-matched capture; load_factor 0.99×; no calibration-scaling entry)
  • attribution: no measured master improvement between capture master 34bdd153d and merge base f6d489ad6 (14 commits)

thresholds: regress ≥ 10%, improve ≥ 5%

voxel cull effectiveness

cell ratio (base→head) avg visible total avg feeder
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 1.000 → 1.000 (+0.0pp) 262144 → 262144 1024 → 1024 0 → 0
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.598 → 0.598 (+0.0pp) 156637 → 156637 1024 → 1024 0 → 0
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 1.000 → 1.000 (+0.0pp) 262144 → 262144 1024 → 1024 0 → 0
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.975 → 0.975 (+0.0pp) 255592 → 255592 1024 → 1024 0 → 0

frame timing (ms)

cell avg p99
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 541.23 → 553.52 (+2.3%) 1913.83 → 1839.01 (-3.9%)
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 1250.91 → 1258.34 (+0.6%) 2508.81 → 2551.34 (+1.7%)
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 735.85 → 754.56 (+2.5%) 14970.35 → 15497.26 (+3.5%)
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 1814.79 → 1816.87 (+0.1%) 3050.38 → 3056.95 (+0.2%)

GPU frame timing (ms; separate from stage samples)

cell envelope (base→head) buffer spans (base→head) coverage (base→head)
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 unavailable → unavailable unavailable → unavailable unavailable → unavailable

GPU stage timing (avg ms per sampled invocation)

cell canvasClear voxelCompact voxelStage1 voxelCardinalElect voxelStage2 voxelSunFaces textToTrixel buildLightOcclusionGrid computeVoxelAO bakeSunShadowMap computeSunShadow computeLightVolume lightingToTrixel fogToTrixel trixelToFb cardinalSurfaceFb resolvePerAxisScreenDepth fbToScreen
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 22.18→22.55 65.86→65.45 55.49→56.52 1.28→1.02 ↓ 50.40→51.89 95.27→91.52 — 0.00→0.00 4.16→4.46 11.82→12.66 0.40→0.36 ↓ 33.43→34.69 1.64→1.69 1.24→1.27 0.17→0.24 ⚠ 0.25→0.32 ⚠ — 8.08→8.41
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 22.63→22.40 323.79→319.48 260.00→258.43 4.09→4.07 225.58→227.33 146.94→146.86 — 0.00→0.00 10.42→10.79 10.67→10.97 0.32→0.34 29.44→30.24 1.86→2.23 ⚠ 1.39→1.65 ⚠ 0.16→0.20 ⚠ 0.40→0.44 — 7.60→7.90
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 20.56→20.48 81.07→76.79 ↓ 62.20→62.31 13.03→12.92 48.49→50.03 89.37→85.24 1.11→1.17 0.00→0.00 16.62→17.19 63.77→67.90 0.61→0.57 ↓ 67.29→70.91 7.43→7.69 1.81→1.88 0.16→0.22 ⚠ 0.62→0.90 ⚠ 0.00→0.00 9.02→9.66
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 21.90→21.80 530.39→522.56 425.15→422.28 6.40→6.38 363.80→366.43 153.61→149.49 1.12→1.14 0.00→0.00 8.54→8.69 10.87→11.26 0.31→0.33 28.98→30.15 1.89→2.08 ⚠ 1.46→1.49 0.18→0.20 ⚠ 1.06→1.11 0.00→0.00 7.67→7.99

top CPU systems by avg ms (head)

target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 295.877 → 294.684 (-0.4%)
RENDER CanvasToFramebuffer 38.061 → 40.591 (+6.6%)
RENDER ComputeLightVolume 33.464 → 34.668 (+3.6%)
RENDER BakeSunShadowMap 10.008 → 10.527 (+5.2%)
UPDATE FogRevealEval 6.533 → 6.613 (+1.2%)
UPDATE PropagateTransform 4.642 → 5.070 (+9.2%)
RENDER ComputeVoxelAO 4.341 → 4.679 (+7.8%)
RENDER UpdateVoxelSetChildren 2.881 → 3.080 (+6.9%)

target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 988.226 → 984.246 (-0.4%)
RENDER CanvasToFramebuffer 57.479 → 59.897 (+4.2%)
RENDER ComputeLightVolume 29.481 → 30.331 (+2.9%)
RENDER ComputeVoxelAO 10.735 → 11.150 (+3.9%)
RENDER BakeSunShadowMap 8.782 → 8.676 (-1.2%)
UPDATE FogRevealEval 6.420 → 6.381 (-0.6%)
UPDATE PropagateTransform 4.428 → 4.816 (+8.8%)
RENDER UpdateVoxelSetChildren 2.919 → 3.070 (+5.2%)

target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 336.427 → 334.708 (-0.5%)
RENDER CanvasToFramebuffer 59.909 → 63.928 (+6.7%)
RENDER ComputeSunShadow 54.342 → 58.185 (+7.1%)
RENDER LightingToTrixel 36.057 → 38.225 (+6.0%)
RENDER ComputeLightVolume 32.463 → 33.910 (+4.5%)
RENDER BakeSunShadowMap 22.601 → 23.222 (+2.7%)
RENDER FogToTrixel 7.153 → 7.385 (+3.2%)
RENDER ComputeVoxelAO 6.127 → 6.407 (+4.6%)

target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 1506.783 → 1494.692 (-0.8%)
RENDER CanvasToFramebuffer 84.594 → 87.346 (+3.3%)
RENDER ComputeLightVolume 29.056 → 30.146 (+3.8%)
RENDER BakeSunShadowMap 8.915 → 8.955 (+0.4%)
RENDER ComputeVoxelAO 8.777 → 8.905 (+1.5%)
UPDATE PropagateTransform 6.029 → 6.368 (+5.6%)
UPDATE FogRevealEval 5.531 → 5.622 (+1.6%)
UPDATE PeriodicIdle 2.988 → 3.189 (+6.7%)

@jakildev jakildev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — render: give the per-axis list walks their own one-entry kernels

Verdict: approve

The specialized writer/decoder contract is shared across both backends, the store/election/colour/append face-selection path remains aligned, and the revised #4957 acceptance contract is met.

Acceptance (issue #4957)

7 of 7 revised criteria met. Native OpenGL cold compile/runtime is explicitly deferred to the required cross-host smoke lane, as criterion 7 permits.

Checked

  • Reviewed the complete PR and #4957 threads, including the superseding 2026-11-16 plan and amendments A1–A3, at head da8b4c8cb7a150a5201cdd94929c09da2226d044.
  • test_render_voxel_dispatch_packing.py (3), overflow append/entry/occlusion contracts (1 each), and store-drop counter contracts (2) pass locally.
  • Standalone header checks pass: 65 Metal kernels agree with both registries, shader parity/reserved-word checks pass, and git diff --check is clean.
  • Fresh light-verify --if-changed completed with a clean macOS build/run and all 46 reference comparisons passing.
  • PR perf-gate, fleet, format, header, Python, and shader-parity checks pass. The render-harness red is inherited: the latest recorded master run fails the same nine suites for the same dependency/vector-adapter errors. Linux build remains pending and is not counted green.

🤖 Reviewed by Codex GPT-5 (review-pr skill)

Opus recheck required: core render shader specialization, indirect-dispatch packing, and cross-backend GPU invariants.

@jakildev jakildev added fleet:needs-opus-recheck Sonnet flagged this PR for Opus recheck before merge fleet:needs-windows-smoke PR needs windows-debug build + smoke-run validation and removed fleet:reviewing-mac-pool-4 labels Nov 26, 2026

@jakildev jakildev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — render: give the per-axis list walks their own one-entry kernels

Verdict: approve

The Sonnet-class first pass flagged the shader specialization, indirect-dispatch packing, and cross-backend GPU invariants; on closer read I confirm the shared writer/decoder grid, face-selection path, winner-scratch ordering, and Metal/GL registrations remain aligned without introducing a new cross-frame resource lifetime.

Acceptance (issue #4957)

7 of 7 revised criteria met. Native OpenGL cold compile/runtime remains explicitly deferred to the required cross-host smoke lane, as criterion 7 permits.

Checked

  • Read the complete PR and #4957 threads, including the superseding 2026-11-16 plan and corrections A1–A3, at head da8b4c8cb7a150a5201cdd94929c09da2226d044.
  • Traced the C++ dispatch sequence and both shader dialects: the compact writes the 64-entry X/Y-spilled grid consumed by all four per-axis variants; store, election, colour, and append select the same axis face; winner and image barriers remain within the existing per-axis lifetime.
  • test_render_voxel_dispatch_packing.py (3), overflow append/entry/occlusion contracts (1 each), store-drop counter contracts (2), and cardinal voxel receiver contracts (3) pass locally.
  • Standalone header checks pass: 65 Metal kernels agree with both registries, reserved-word checks pass, and git diff --check is clean.
  • PR perf, fleet, format, header, Python, and shader-parity checks pass. The render-harness red is inherited: its nine failed suites exactly match the latest recorded master run. Linux build is still pending and is not counted green; the Windows/OpenGL smoke label remains in place.

🤖 Reviewed by Codex GPT-5 (review-pr skill)

@jakildev jakildev added fleet:approved Fleet reviewer approved — ready for human merge and removed fleet:needs-opus-recheck Sonnet flagged this PR for Opus recheck before merge fleet:reviewing-mac-pool-1 labels Nov 26, 2026
@evin-mac-claude-app evin-mac-claude-app Bot added the fleet:checks-red Info only: approved PR whose head has a failed check of its own; reconcile R12 adds and removes it label Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fleet:approved Fleet reviewer approved — ready for human merge fleet:author-claude Implementation last authored by Claude; route review to Codex fleet:authored-on-macos PR was authored and smoke-tested on macOS Metal backend fleet:checks-red Info only: approved PR whose head has a failed check of its own; reconcile R12 adds and removes it fleet:needs-windows-smoke PR needs windows-debug build + smoke-run validation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

render: give the per-axis route its own kernels and merge its election and overflow-append sweeps

1 participant