Skip to content

render: configure LOD zoom thresholds and hysteresis per camera - #4921

Open
jakildev wants to merge 1 commit into
masterfrom
claude/4891-lod-zoom-profile
Open

jakildev wants to merge 1 commit into
masterfrom
claude/4891-lod-zoom-profile

Conversation

@jakildev

@jakildev jakildev commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • IRRender::LodZoomProfile + LodTierHistory (render/lod_zoom_profile.hpp): four ascending display-zoom thresholds and a hysteresis half-width in octaves. make / whyInvalid reject nonfinite, nonpositive, unordered thresholds, a negative or nonfinite width, and overlapping transition bands [t / 2^h, t * 2^h] (touching allowed), so an invalid profile cannot exist. tierAt is the history-free answer (finer tier owns the exact threshold); advance moves finer at t * 2^h, coarser strictly below t / 2^h, and resolves a multi-tier jump in one update. computeLodLevel is now the default profile's tierAt, which gives the same answers as before.
  • C_LodZoomProfile on the main camera (entity "camera") drives LOD_UPDATE; a secondary viewport inherits it unless it carries its own. Each consumer owns its own history: the main camera's lives in the C_ActiveLodLevel singleton, each viewport's in C_ViewportCamera::lodHistory_. A history seeds from tierAt(zoom) on first use, after reset*ZoomHistory, and whenever the profile it resolves under changes (replacement, in-place set, removal, a viewport switching between its own profile and the inherited one).
  • Configuration surface: IRPrefab::Lod:: in render/lod_zoom_policy.hpp (set / clear / reset / read for the main camera and per viewport, plus viewportTier); the Lua binding component_lod_zoom_profile_lua.hpp (addLuaComponent / prefab components = {} / threshold(i) / hysteresis / set{}), which raises with the same whyInvalid reason and keeps the previous profile. A hand-written save serializer persists only the authored profile (version 1) and rejects an invalid record. Histories are derived state and are never saved.
  • Native fixture IRShapeDebug --lod-zoom-profile (lod_zoom_profile_scene.hpp): GRID, DETACHED and DETACHED_REVOXELIZE DENSE pairs, an SDF pair, a pair pinned to LOD_0, and two portraits (one inherits, one owns a 0.45-octave profile), all under fractional main zoom. Every capture asserts tiers, gate state, the drawn portrait subject and the unchanged authored records, then logs screen boxes. scripts/render-lod-zoom-profile-metric.py reads each box's variant colour from the screenshot. The flag also registers PROPAGATE_CANVAS_ROTATION / REBUILD_DETACHED_VOXELS / ENTITY_CANVAS_TO_FRAMEBUFFER so the detached pairs draw.
  • docs/design/lod-strategy.md §"Phase 1d" documents the units, the crossing rule, how creation / reset / replacement / jumps seed a tier, inheritance, and how this deadband relates to the existing structural settle window and canvas-residency margin.

Test plan

  • fleet-build --target IrredenEngineTest + fleet-run IrredenEngineTest --gtest_filter='*Lod*:*LOD*' on head d10e572d5 (rebased onto master f6d489ad6): 48 tests from 14 test suites ran / [ PASSED ] 48 tests. The filter now also matches LOD suites that master added since the previous head.
  • Full suite fleet-run IrredenEngineTest on d10e572d5: 4253 tests from 670 test suites ran, [ PASSED ] 4250 tests, 3 skipped (BinaryIO.CloseReportsBufferedOutputFailure, RigFormat.SaveReportsBufferedWriteFailureBeforeEmittingSummary, and FogCrossSectionTest.SkippedOnNonOpenGLBackend, which skips itself off OpenGL).
  • fleet-run IRShapeDebug --lod-zoom-profile --auto-screenshot 20 exits 0 with every in-capture IR_ASSERT holding; render-lod-zoom-profile-metric.py → 105/105 regions pass on d10e572d5, with the same tier trace as before the rebase. The negative control (every expected label flipped → 0/105 regions pass) ran on the previous head 5cf85ee42. The rebase did not touch the fixture or the metric.
  • python3 scripts/render-verify.py --all (macOS / Metal, Debug) on d10e572d5: 371 of 376 checks pass. The 5 failing rows are the ones render: five macOS reference rows fail on master across three demos (attribute, then re-bless or fix) #5240 lists for master f6d489ad6 (this PR's base), and match %, max delta and PSNR agree to the last digit: voxel_editor mode_preview_grid 73.7596 / 255 / 16.11 and mode_preview_revox 73.7836 / 255 / 16.10, lua_perf_grid fit_grid and zoom1_origin 99.960 / 57, lighting zoom1_origin 99.9783 / 66 / 56.19. Every other demo passes every row: shape_debug 187/187 (every lod_*, portrait_lod_swap_z1 and zoom16_lod_fine_sphere row included), fog_demo 69/69, canvas_stress 59/59, perf_grid 35/35, ui_widgets 7/7, font_maker 4/4, lighting 4/5, metal_clear_test 3/3, analytic_oracle, lua_pipeline_demo and launcher 1/1. The --all run hit the 90-minute background limit during font_maker. fog_demo, font_maker, voxel_editor and launcher were run again with --target; fog_demo needed IR_QUEUE_TIMEOUT=2400 because GPU-lock contention made passes LOCK-FAILED.
  • cmake -P cmake/run_header_checks_standalone.cmake (header conventions + save-inventory population 216/216), ruff check scripts/, lint_comment_refs.py: clean.

Acceptance evidence

Criterion Check run Observed
1. *Lod*:*LOD* covers exact boundaries on both sides of every default threshold, custom forward/reverse sweeps, a multi-tier jump, profile replacement, reset, validation and serialization; a Lua test sets and reads the component and rejects the same invalid inputs fleet-run IrredenEngineTest --gtest_filter='*Lod*:*LOD*' LodZoomProfile.DefaultKeepsTheFixedBoundariesOnBothSides (nextafter below / at / above 2, 4, 8, 16 from every previous tier), ZeroWidthAnswersTheSameFromEitherDirection, LodZoomHysteresis.{Forward,Backward}Sweep…, AJumpResolvesEveryCrossedThresholdInOneUpdate, CreationResetAndReplacementSeedFromTheCurrentZoom, InvalidValuesAreRejected, AnInvalidSetKeepsThePreviousProfile, SavedFormRoundTripsTheAuthoredProfileOnly, LodZoomMainCamera.*, LodZoomProfileLua.{AttachSetsAndReadsTheProfile,InvalidInputsRaiseAndKeepThePreviousProfile,APrefabDeclarationAttachesTheProfile}: all OK (48 tests from 14 test suites ran / [ PASSED ] 48 tests. on d10e572d5)
2. A native fixture with two disjoint variants: oscillating around a boundary swaps every time at width zero and holds one variant with hysteresis; leaving either edge produces exactly one swap with the expected colours; pixel masks and resolved tier state read for both directions fleet-run IRShapeDebug --lod-zoom-profile --auto-screenshot 20; python3 scripts/render-lod-zoom-profile-metric.py --log … --screenshots build/creations/demos/shape_debug Tier trace (tier-trace.txt): main tier 3,2,3,2 for 4.9/5.1/4.9/5.1 at width 0; with h = 0.25: 2,2,2,2 (held fine), 3 at 4.1 (one swap below 4.20), 3,3,3 at 5.1/4.9/5.9 (held coarse), 2 at 6.0 (one swap above 5.95), 2,2. Pixel gate 105/105 regions pass, with no pixels of the other colour in any box
3. GRID, DETACHED, DETACHED_REVOXELIZE and SDF parts, a pinned world entity, and a secondary portrait following its own zoom; independent history and inherited/custom profile cases; authored records survive every gate transition same run; ViewportTest.*Lod* All five world pairs pass every shot. pinned_lod0 reads fine in all 15 shots. The inherit portrait reads LOD_3 (coarse) at 4× in every shot, where the default profile would give LOD_2. The own portrait holds at 4× from either side (3,3 then 2,2 then 3,3) while the main camera is in a different state. Every capture asserts drawnSubject and the unchanged voxel and SDF records. TheMainCameraAndEachViewportKeepTheirOwnLodHistory and AViewportInheritsTheMainLodProfileUnlessItCarriesItsOwn pass
4. render-verify --all passes existing default references; threshold trace and before/after captures in the PR python3 scripts/render-verify.py --all on d10e572d5, compared with #5240's master f6d489ad6 run Fails as written: master is red on macOS/Metal. 371 of 376 checks pass. The 5 failing rows are #5240's master rows exactly: voxel_editor 2/2, lua_perf_grid 2/2, lighting zoom1_origin, with match %, max delta and PSNR equal to master's. Every other row passes, as #5240 reports for master: shape_debug 187/187, every LOD reference row included. The earlier blockers (#4904, #4913, #4920, #4892) have all closed. The PR is parked on #5240, which owns all 5 red rows. Threshold trace and captures are published on media under docs/pr-screenshots/claude/4891-lod-zoom-profile/ (below); this rebase changes no render code they depend on

Captures (macOS / Metal)

Each pair is a red coarse member and a blue fine member. World row, left to right: pinned LOD_0, SDF, DETACHED_REVOXELIZE, DETACHED, GRID. The top-right portrait inherits the main profile; the bottom-right portrait has its own.

width 0, 4.9× (coarse) width 0, 5.1× (fine)
h = 0.25, 4.9× held fine 4.1×, one swap below the band
5.9× held coarse 6.0×, one swap above the band

Plan departures

  • The plan's first native control is "alternating 3.99 and 4.01 reverses the decision each time" under the fixed thresholds. The fixture puts the boundary at 5× (main profile 2, 5, 10, 20) so the inherit portrait, whose zoom snaps to powers of two, reads differently from the default profile. Shots 0–3 at width 0 (4.9 / 5.1) are that control: they swap on every crossing.
  • "Discrete selection and fractional raster sampling remain independently configurable": the profile changes only tier selection. Continuous zoom (IRPrefab::Camera::setZoomContinuous) is untouched; the fixture turns it on.
  • Viewport zoom still snaps to a power of two (Viewport::setCamera). The portraits use 2/4/8 sequences against profiles whose bands contain or exclude those values. The headless viewport tests write a fractional C_ZoomLevel directly.

Notes for reviewer

  • fleet-pr-overlap --base master on the pushed head: VERDICT: overlap. The competitor rows (render: prototype event-cursor picks from completed images #5135 on creations/demos/shape_debug/main.cpp, render: bound Metal frame overlap and pace input [WIP] #5161 on test/CMakeLists.txt) are clean.
  • The rebase onto f6d489ad6 had one conflict, in creations/demos/shape_debug/main.cpp, against the --gather-filter-fixture flag that render: measure ownership-restricted gather filtering at fractional zoom #4919 merged. Both fixtures insert ENTITY_CANVAS_TO_FRAMEBUFFER after the composite, so that insertion now runs for g_gatherFilterFixture || g_lodZoomProfile. Master's canvas- and framebuffer-image-sample insertions are kept, and the viewport-subject sync still runs for g_viewportPortrait || g_lodZoomProfile. --lod-zoom-profile now also refuses to combine with --zoom-calibration (which --gather-filter-fixture requires), --canvas-image-sample and --framebuffer-image-sample. Those flags add their own pipeline stages and scenes, and their scenes come before this fixture in the initEntities chain.
  • LodTierHistory stores the profile it was seeded under and re-seeds when the live profile differs. This is the replacement rule: a history's previous tier only means something under the deadbands that produced it. It never skips work; the tier is recomputed every frame either way. It also covers profile changes that reach a consumer indirectly, such as a viewport inheriting a replaced main profile, so no setter has to reset other entities' histories.
  • The DETACHED (source-face) pair draws fragmented faces in every shot. A one-off run with a lone DETACHED set and its twin left in GRID showed the same fragments, so this is how shape_debug's DETACHED presentation renders, not the LOD gate. The gate's colour is still the only one in its box. This is not addressed here.

Parked-until: #5240

Closes #4891

🤖 Generated with Claude Code

@jakildev jakildev added fleet:wip Work in progress — not ready for review fleet:awaiting-infra Complete-but-unverifiable PR parked until an infra blocker lands; body carries Parked-until: #N 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 labels Nov 5, 2026
@jakildev

jakildev commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Parked fleet:awaiting-infra (keeps fleet:wip) on two independent grounds.

1. Criterion 4 cannot pass as written because master is red on macOS/Metal. render-verify --all fails 57 of 298 rows on both this head and master f77113d. A row-by-row comparison of verdict, match % and max_delta finds 277 rows identical. The other 21 have the same verdict on both sides: the canvas_stress match % wobbles while every one of those rows still fails, and lua_perf_grid has a flaky pair. Owners:

2. fleet-pr-overlap --base master returns VERDICT: block. The conflict was confirmed with git merge-tree:

#4919 creations/demos/shape_debug/main.cpp conflicts

Both PRs add a shape_debug fixture flag next to each other. The remaining rows are clean, or base-conflict rows that the editor-stack PRs already have with master.

Resume once #4904, #4913, #4920 and #4892 close: rebase onto master, rebuild, rerun render-verify --all and fleet-pr-overlap, then drop fleet:wip and fleet:awaiting-infra. — worker

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Perf gate

Head host slug: linux-x86_64-xeon-platinum-8370c-unknown

perf comparison: 596ab14 → b5f9a1f-ci

baseline: /home/runner/work/_temp/perf-baseline/history/linux-x86_64-xeon-platinum-8370c-unknown/596ab146de8fb9cf27aeeed3e9055f741960195c
head: /home/runner/work/IrredenEngine/IrredenEngine/save_files/perf/b5f9a1f76-ci

host calibration

  • host: linux-x86_64-xeon-platinum-8370c-unknown (matches baseline)
  • ref_ms: head 118.23 vs baseline 115.28 (load_factor 1.03×)
  • calibration target: 50.00 ms (informational)
  • baseline capture: perf-baseline@596ab146d (branch tip); master 34ed50e69, finished 2026-11-05T03:04:58Z, 0.2 d before the head run, ref_ms 115.28
  • weighting: raw (class-matched capture; load_factor 1.03×; no calibration-scaling entry)
  • attribution: no measured master improvement between capture master 34ed50e69 and merge base f77113dc0 (10 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 262144 → 262144 0 → 0
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.788 → 0.788 (+0.0pp) 156630 → 156630 262144 → 262144 50080 → 50080 (1.000×)
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 1.000 → 1.000 (+0.0pp) 262144 → 262144 262144 → 262144 0 → 0
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 0.990 → 0.990 (+0.0pp) 255592 → 255592 262144 → 262144 3862 → 3862 (1.000×)

frame timing (ms)

cell avg p99
target=IRLuaPerfGrid,zoom=1,sub_mode=full,sub_base=1 519.35 → 535.01 (+3.0%) 1599.75 → 1595.51 (-0.3%)
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 1296.96 → 1354.98 (+4.5%) 2394.55 → 2481.51 (+3.6%)
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 616.52 → 647.30 (+5.0%) 8701.06 → 9337.31 (+7.3%)
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 1739.45 → 1799.46 (+3.4%) 2838.08 → 2889.16 (+1.8%)

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 70.74→71.01 61.47→61.99 52.28→54.49 0.97→1.03 55.69→57.68 6.13→6.38 — 0.00→0.00 2.35→2.39 15.75→16.44 20.12→20.42 22.07→22.98 3.48→3.93 ⚠ 1.22→1.27 0.23→0.24 — 8.71→9.58 ⚠
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 126.45→131.07 399.67→420.64 239.30→251.31 4.21→4.40 241.63→253.29 5.43→5.49 — 0.00→0.00 2.01→2.13 29.08→30.75 17.53→18.02 19.86→20.38 8.31→8.73 1.20→1.29 0.18→0.23 ⚠ — 8.18→8.79
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 62.74→64.28 73.12→75.56 57.00→59.36 8.87→9.07 48.87→51.28 8.04→8.70 1.37→1.56 ⚠ 0.00→0.00 1.00→1.03 45.34→51.47 ⚠ 17.59→18.27 42.20→45.10 6.31→6.77 1.64→1.74 0.18→0.24 ⚠ 0.00→0.00 9.50→10.55 ⚠
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 142.41→145.66 515.84→528.13 389.90→408.42 6.61→7.03 379.75→395.74 6.27→6.04 1.41→1.44 0.00→0.00 0.84→0.90 26.80→27.38 17.52→17.91 19.63→19.84 6.56→6.90 1.35→1.41 0.17→0.22 ⚠ 0.00→0.00 8.27→8.74

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 249.493 → 254.799 (+2.1%)
RENDER ComputeLightVolume 41.777 → 42.864 (+2.6%)
RENDER CanvasToFramebuffer 19.842 → 21.137 (+6.5%)
RENDER BakeSunShadowMap 9.784 → 9.981 (+2.0%)
RENDER ComputeSunShadow 8.200 → 8.703 (+6.1%)
UPDATE PropagateTransform 5.263 → 5.195 (-1.3%)
UPDATE FogRevealEval 4.684 → 4.865 (+3.9%)
RENDER LightingToTrixel 3.604 → 4.059 (+12.6%) ⚠

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

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 1015.702 → 1065.383 (+4.9%)
RENDER ComputeLightVolume 37.047 → 37.858 (+2.2%)
RENDER ComputeSunShadow 22.718 → 24.176 (+6.4%)
RENDER CanvasToFramebuffer 18.391 → 19.680 (+7.0%)
RENDER LightingToTrixel 8.531 → 8.929 (+4.7%)
RENDER BakeSunShadowMap 8.330 → 8.674 (+4.1%)
RENDER ComputeVoxelAO 8.200 → 8.254 (+0.7%)
UPDATE FogRevealEval 4.673 → 4.789 (+2.5%)

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

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 272.459 → 281.418 (+3.3%)
RENDER ComputeSunShadow 38.223 → 44.183 (+15.6%) ⚠
RENDER ComputeLightVolume 38.583 → 39.254 (+1.7%)
RENDER LightingToTrixel 22.570 → 25.486 (+12.9%) ⚠
RENDER CanvasToFramebuffer 19.636 → 21.088 (+7.4%)
RENDER BakeSunShadowMap 12.392 → 12.615 (+1.8%)
UPDATE PropagateTransform 6.225 → 6.108 (-1.9%)
RENDER FogToTrixel 5.466 → 5.778 (+5.7%)

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

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 1440.951 → 1491.597 (+3.5%)
RENDER ComputeLightVolume 36.749 → 37.252 (+1.4%)
RENDER ComputeSunShadow 20.302 → 20.852 (+2.7%)
RENDER CanvasToFramebuffer 18.709 → 19.542 (+4.5%)
RENDER BakeSunShadowMap 8.460 → 8.484 (+0.3%)
RENDER LightingToTrixel 6.734 → 7.072 (+5.0%)
RENDER ComputeVoxelAO 6.807 → 6.914 (+1.6%)
UPDATE PropagateTransform 6.286 → 6.386 (+1.6%)

@evin-mac-claude-app evin-mac-claude-app Bot removed the fleet:awaiting-infra Complete-but-unverifiable PR parked until an infra blocker lands; body carries Parked-until: #N label Nov 26, 2026
@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
A camera at fractional zoom swapped disjoint LOD variants on every
crossing of the fixed 2/4/8/16 thresholds. C_LodZoomProfile carries four
ascending display-zoom thresholds and a hysteresis half-width in octaves;
LodZoomProfile only exists valid, and every write path (C++ setters, Lua,
save reader) keeps the previous profile on an invalid value.

The main camera owns its optional profile and a secondary viewport
inherits it unless it carries its own. Each consumer keeps its own
previous tier (C_ActiveLodLevel::history_, C_ViewportCamera::lodHistory_),
seeded from the zero-width answer at creation, after a reset, and when
the profile it resolves under changes. The default profile reproduces
computeLodLevel exactly.

shape_debug --lod-zoom-profile drives GRID, DETACHED,
DETACHED_REVOXELIZE and SDF variant pairs, a pinned control and two
portraits through a width-zero and a hysteresis zoom sequence; each
capture asserts the tiers and records, and
render-lod-zoom-profile-metric.py checks the variant colours on screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jakildev
jakildev force-pushed the claude/4891-lod-zoom-profile branch from 5cf85ee to d10e572 Compare November 26, 2026 07:34
@github-actions

Copy link
Copy Markdown

Perf gate

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

perf comparison: 88f4fda → 78c9229-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/78c92299b-ci

host calibration

  • host: linux-x86_64-epyc-7763-64-unknown (matches baseline)
  • ref_ms: head 103.54 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 → 552.30 (+2.0%) 1913.83 → 1797.89 (-6.1%) ↓
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 1250.91 → 1275.52 (+2.0%) 2508.81 → 2548.63 (+1.6%)
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 735.85 → 762.96 (+3.7%) 14970.35 → 16353.26 (+9.2%)
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 1814.79 → 1835.11 (+1.1%) 3050.38 → 3114.21 (+2.1%)

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→23.09 65.86→66.24 55.49→56.45 1.28→1.01 ↓ 50.40→52.30 95.27→91.37 — 0.00→0.00 4.16→4.42 11.82→12.65 0.40→0.34 ↓ 33.43→35.55 1.64→1.74 1.24→1.41 ⚠ 0.17→0.23 ⚠ 0.25→0.31 ⚠ — 8.08→8.47
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1 22.63→22.30 323.79→326.57 260.00→263.66 4.09→4.11 225.58→229.92 146.94→151.63 — 0.00→0.00 10.42→11.05 10.67→11.27 0.32→0.34 29.44→29.28 1.86→2.20 ⚠ 1.39→1.72 ⚠ 0.16→0.23 ⚠ 0.40→0.43 — 7.60→8.06
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1 20.56→20.44 81.07→80.96 62.20→63.27 13.03→13.34 48.49→49.27 89.37→84.75 ↓ 1.11→1.15 0.00→0.00 16.62→17.34 63.77→68.41 0.61→0.57 ↓ 67.29→73.96 7.43→8.01 1.81→1.90 0.16→0.21 ⚠ 0.62→0.91 ⚠ 0.00→0.00 9.02→9.65
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1 21.90→20.81 530.39→534.74 425.15→425.73 6.40→6.43 363.80→367.42 153.61→149.52 1.12→1.21 0.00→0.00 8.54→9.13 10.87→11.59 0.31→0.34 28.98→30.01 1.89→2.10 ⚠ 1.46→1.78 ⚠ 0.18→0.23 ⚠ 1.06→1.21 ⚠ 0.00→0.00 7.67→8.07

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 → 296.204 (+0.1%)
RENDER CanvasToFramebuffer 38.061 → 40.631 (+6.8%)
RENDER ComputeLightVolume 33.464 → 35.462 (+6.0%)
RENDER BakeSunShadowMap 10.008 → 10.568 (+5.6%)
UPDATE FogRevealEval 6.533 → 6.652 (+1.8%)
UPDATE PropagateTransform 4.642 → 4.635 (-0.2%)
RENDER ComputeVoxelAO 4.341 → 4.625 (+6.5%)
RENDER UpdateVoxelSetChildren 2.881 → 3.027 (+5.1%)

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

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 988.226 → 1003.707 (+1.6%)
RENDER CanvasToFramebuffer 57.479 → 60.431 (+5.1%)
RENDER ComputeLightVolume 29.481 → 29.295 (-0.6%)
RENDER ComputeVoxelAO 10.735 → 11.354 (+5.8%)
RENDER BakeSunShadowMap 8.782 → 8.910 (+1.5%)
UPDATE FogRevealEval 6.420 → 6.401 (-0.3%)
UPDATE PropagateTransform 4.428 → 4.366 (-1.4%)
RENDER UpdateVoxelSetChildren 2.919 → 3.104 (+6.3%)

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

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 336.427 → 340.100 (+1.1%)
RENDER CanvasToFramebuffer 59.909 → 65.073 (+8.6%)
RENDER ComputeSunShadow 54.342 → 58.842 (+8.3%)
RENDER LightingToTrixel 36.057 → 41.319 (+14.6%) ⚠
RENDER ComputeLightVolume 32.463 → 33.771 (+4.0%)
RENDER BakeSunShadowMap 22.601 → 23.171 (+2.5%)
RENDER FogToTrixel 7.153 → 7.717 (+7.9%)
RENDER ComputeVoxelAO 6.127 → 6.638 (+8.3%)

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

pipeline system avg ms (base→head)
RENDER SingleVoxelToCanvasFirst 1506.783 → 1510.148 (+0.2%)
RENDER CanvasToFramebuffer 84.594 → 88.172 (+4.2%)
RENDER ComputeLightVolume 29.056 → 30.004 (+3.3%)
RENDER ComputeVoxelAO 8.777 → 9.411 (+7.2%)
RENDER BakeSunShadowMap 8.915 → 9.259 (+3.9%)
UPDATE PropagateTransform 6.029 → 6.035 (+0.1%)
UPDATE FogRevealEval 5.531 → 5.724 (+3.5%)
UPDATE PeriodicIdle 2.988 → 3.234 (+8.2%)

@evin-mac-claude-app

Copy link
Copy Markdown
Contributor

Every failed workflow on this head is also red on master:

These failures are inherited and are not this pull request's to fix.

@jakildev jakildev added the fleet:awaiting-infra Complete-but-unverifiable PR parked until an infra blocker lands; body carries Parked-until: #N label Nov 26, 2026
@jakildev

Copy link
Copy Markdown
Owner Author

Resumed after the previous park. #4904, #4913, #4920 and #4892 have all closed. Re-parked fleet:awaiting-infra on #5240 (keeps fleet:wip).

Done in this pass:

  • Rebased onto master f6d489ad6 (head d10e572d5). The one conflict was creations/demos/shape_debug/main.cpp against render: measure ownership-restricted gather filtering at fractional zoom #4919's --gather-filter-fixture. Both fixtures now share the ENTITY_CANVAS_TO_FRAMEBUFFER insertion. --lod-zoom-profile also refuses --zoom-calibration, --canvas-image-sample and --framebuffer-image-sample.
  • Built IRShapeDebug and IrredenEngineTest. LOD filter: 48/48 pass. Full suite: 4250 pass, 3 skipped. The fixture metric passes 105/105 with the same tier trace.
  • Header checks, ruff and the comment-ref lint are clean. fleet-pr-overlap returns VERDICT: overlap, with every competitor row clean.

Why it is parked: criterion 4 (render-verify --all passes) still fails as written because master is red on macOS. This head reads 371 of 376. The 5 failing rows are exactly those #5240 lists for master f6d489ad6, with the same numbers: voxel_editor mode_preview_grid and mode_preview_revox, lua_perf_grid fit_grid and zoom1_origin, and lighting zoom1_origin. Every other row passes, including all 187 shape_debug rows and every LOD reference.

Resume once #5240 closes: rebase, rerun render-verify --all (on macOS, use --target per demo with IR_QUEUE_TIMEOUT=2400 if the GPU lock is contended), then drop fleet:wip. — worker

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

Labels

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 fleet:wip Work in progress — not ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

render: configure authored LOD thresholds and hysteresis per camera

1 participant