Repository navigation
Conversation
|
Parked 1. Criterion 4 cannot pass as written because master is red on macOS/Metal.
2. Both PRs add a shape_debug fixture flag next to each other. The remaining rows are Resume once #4904, #4913, #4920 and #4892 close: rebase onto master, rebuild, rerun |
Perf gateHead host slug: perf comparison: 596ab14 → b5f9a1f-cibaseline: host calibration
thresholds: regress ≥ 10%, improve ≥ 5% voxel cull effectiveness
frame timing (ms)
GPU frame timing (ms; separate from stage samples)
GPU stage timing (avg ms per sampled invocation)
top CPU systems by avg ms (head)
|
| 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%) |
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>
5cf85ee to
d10e572
Compare
Perf gateHead host slug: perf comparison: 88f4fda → 78c9229-cibaseline: host calibration
thresholds: regress ≥ 10%, improve ≥ 5% voxel cull effectiveness
frame timing (ms)
GPU frame timing (ms; separate from stage samples)
GPU stage timing (avg ms per sampled invocation)
top CPU systems by avg ms (head)
|
| 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%) |
|
Every failed workflow on this head is also red on master:
These failures are inherited and are not this pull request's to fix. |
|
Resumed after the previous park. #4904, #4913, #4920 and #4892 have all closed. Re-parked Done in this pass:
Why it is parked: criterion 4 ( Resume once #5240 closes: rebase, rerun |
Summary
IRRender::LodZoomProfile+LodTierHistory(render/lod_zoom_profile.hpp): four ascending display-zoom thresholds and a hysteresis half-width in octaves.make/whyInvalidreject 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.tierAtis the history-free answer (finer tier owns the exact threshold);advancemoves finer att * 2^h, coarser strictly belowt / 2^h, and resolves a multi-tier jump in one update.computeLodLevelis now the default profile'stierAt, which gives the same answers as before.C_LodZoomProfileon the main camera (entity"camera") drivesLOD_UPDATE; a secondary viewport inherits it unless it carries its own. Each consumer owns its own history: the main camera's lives in theC_ActiveLodLevelsingleton, each viewport's inC_ViewportCamera::lodHistory_. A history seeds fromtierAt(zoom)on first use, afterreset*ZoomHistory, and whenever the profile it resolves under changes (replacement, in-placeset, removal, a viewport switching between its own profile and the inherited one).IRPrefab::Lod::inrender/lod_zoom_policy.hpp(set / clear / reset / read for the main camera and per viewport, plusviewportTier); the Lua bindingcomponent_lod_zoom_profile_lua.hpp(addLuaComponent/ prefabcomponents = {}/threshold(i)/hysteresis/set{}), which raises with the samewhyInvalidreason 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.IRShapeDebug --lod-zoom-profile(lod_zoom_profile_scene.hpp): GRID, DETACHED and DETACHED_REVOXELIZE DENSE pairs, an SDF pair, a pair pinned toLOD_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.pyreads each box's variant colour from the screenshot. The flag also registersPROPAGATE_CANVAS_ROTATION/REBUILD_DETACHED_VOXELS/ENTITY_CANVAS_TO_FRAMEBUFFERso 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 headd10e572d5(rebased onto masterf6d489ad6):48 tests from 14 test suites ran/[ PASSED ] 48 tests.The filter now also matches LOD suites that master added since the previous head.fleet-run IrredenEngineTestond10e572d5:4253 tests from 670 test suites ran,[ PASSED ] 4250 tests, 3 skipped (BinaryIO.CloseReportsBufferedOutputFailure,RigFormat.SaveReportsBufferedWriteFailureBeforeEmittingSummary, andFogCrossSectionTest.SkippedOnNonOpenGLBackend, which skips itself off OpenGL).fleet-run IRShapeDebug --lod-zoom-profile --auto-screenshot 20exits 0 with every in-captureIR_ASSERTholding;render-lod-zoom-profile-metric.py→105/105 regions passond10e572d5, with the same tier trace as before the rebase. The negative control (every expected label flipped →0/105 regions pass) ran on the previous head5cf85ee42. The rebase did not touch the fixture or the metric.python3 scripts/render-verify.py --all(macOS / Metal, Debug) ond10e572d5: 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 masterf6d489ad6(this PR's base), and match %, max delta and PSNR agree to the last digit: voxel_editormode_preview_grid73.7596 / 255 / 16.11 andmode_preview_revox73.7836 / 255 / 16.10, lua_perf_gridfit_gridandzoom1_origin99.960 / 57, lightingzoom1_origin99.9783 / 66 / 56.19. Every other demo passes every row: shape_debug 187/187 (everylod_*,portrait_lod_swap_z1andzoom16_lod_fine_sphererow 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--allrun hit the 90-minute background limit during font_maker. fog_demo, font_maker, voxel_editor and launcher were run again with--target; fog_demo neededIR_QUEUE_TIMEOUT=2400because GPU-lock contention made passesLOCK-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
*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 inputsfleet-run IrredenEngineTest --gtest_filter='*Lod*:*LOD*'LodZoomProfile.DefaultKeepsTheFixedBoundariesOnBothSides(nextafterbelow / 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.ond10e572d5)fleet-run IRShapeDebug --lod-zoom-profile --auto-screenshot 20;python3 scripts/render-lod-zoom-profile-metric.py --log … --screenshots build/creations/demos/shape_debugtier-trace.txt): main tier3,2,3,2for 4.9/5.1/4.9/5.1 at width 0; with h = 0.25:2,2,2,2(held fine),3at 4.1 (one swap below 4.20),3,3,3at 5.1/4.9/5.9 (held coarse),2at 6.0 (one swap above 5.95),2,2. Pixel gate105/105 regions pass, with no pixels of the other colour in any boxViewportTest.*Lod*pinned_lod0reads fine in all 15 shots. The inherit portrait readsLOD_3(coarse) at 4× in every shot, where the default profile would giveLOD_2. The own portrait holds at 4× from either side (3,3then2,2then3,3) while the main camera is in a different state. Every capture assertsdrawnSubjectand the unchanged voxel and SDF records.TheMainCameraAndEachViewportKeepTheirOwnLodHistoryandAViewportInheritsTheMainLodProfileUnlessItCarriesItsOwnpassrender-verify --allpasses existing default references; threshold trace and before/after captures in the PRpython3 scripts/render-verify.py --allond10e572d5, compared with #5240's masterf6d489ad6runzoom1_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 onmediaunderdocs/pr-screenshots/claude/4891-lod-zoom-profile/(below); this rebase changes no render code they depend onCaptures (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.Plan departures
IRPrefab::Camera::setZoomContinuous) is untouched; the fixture turns it on.Viewport::setCamera). The portraits use 2/4/8 sequences against profiles whose bands contain or exclude those values. The headless viewport tests write a fractionalC_ZoomLeveldirectly.Notes for reviewer
fleet-pr-overlap --base masteron the pushed head:VERDICT: overlap. The competitor rows (render: prototype event-cursor picks from completed images #5135 oncreations/demos/shape_debug/main.cpp, render: bound Metal frame overlap and pace input [WIP] #5161 ontest/CMakeLists.txt) areclean.f6d489ad6had one conflict, increations/demos/shape_debug/main.cpp, against the--gather-filter-fixtureflag that render: measure ownership-restricted gather filtering at fractional zoom #4919 merged. Both fixtures insertENTITY_CANVAS_TO_FRAMEBUFFERafter the composite, so that insertion now runs forg_gatherFilterFixture || g_lodZoomProfile. Master's canvas- and framebuffer-image-sample insertions are kept, and the viewport-subject sync still runs forg_viewportPortrait || g_lodZoomProfile.--lod-zoom-profilenow also refuses to combine with--zoom-calibration(which--gather-filter-fixturerequires),--canvas-image-sampleand--framebuffer-image-sample. Those flags add their own pipeline stages and scenes, and their scenes come before this fixture in theinitEntitieschain.LodTierHistorystores 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.Parked-until: #5240
Closes #4891
🤖 Generated with Claude Code