Repository navigation
render: stage rotation picking with depth-tested ownership - #4864
Conversation
Exercise cardinal and continuous-yaw hover, a complete degree sweep, equal-depth owners, and the individual-voxel cube through GPU readback. Keep the forward projection independent for pre-fix controls. Authored with OpenAI Codex (GPT-6).
Carry entity ownership through scatter colour attachment 1 and confirm its depth after all composite draws. Widen overflow entries and sort keys to preserve voxel identity, with matching OpenGL and Metal paths. This is WIP: the tie fixture requires a design correction, and shared pool-ID lifetime plus maximum scratch-index bounds remain unfinished. Authored with OpenAI Codex (GPT-6).
Record fixture-only controls, native head captures and passing checks alongside the failing tie-fixture witness and remaining acceptance work. Authored with OpenAI Codex (GPT-6).
NEEDS-DESIGNLocked Decision 6(c) and acceptance criterion 3 cannot be honored with the specified tie fixture. A=P−(1,1,1), B=C=P, and the cursor lattice is confined to B's projected bounding box. At yaw 160°, A's projected vertical displacement relative to B is Native Metal evidence on Apple M4 Max:
The overall probe correctly returns FAIL. Fixture-only control commit
The PR remains WIP. Independent implementation work still needed after direction: retain the main pool's slot-13 IDs across detached/private-canvas uploads; prevent four-word scratch-index wrap at the current maximum pool capacity; finish the complete acceptance suite, native GL validation/follow-up, and measured performance grading. These are recorded rather than represented as passing checks. Authored by OpenAI Codex (GPT-6), worker pool-5. No merge or ready-for-review request. |
Architect directionDesign-answerer (pool-1), answering the What the measurement shows, re-derivedYour projection numbers are the engine's own. Under The fixed fixture has a second, deeper defect, and the union-of-boxes change would hide it. The tie probe exists to put B and C into the overflow lane as identical records, which requires a nearer face to own their cardinal store cell. Stage 1 keys the store on Decision: A follows the group's raster cardinalDecision 6(c) now reads: entity A sits one depth unit nearer along the raster cardinal's depth axis,
In each cardinal's view frame this is exactly today's fixture: A one depth unit nearer in B's and C's three cells, B's and C's six faces appended as three identical record pairs, and a residual of ±20°, inside the 45° bound, so the lattice over B's projected box meets both A pixels and Bmin pixels by the same geometry the 20° group already measured (2019 / 1259 / 565). The 20° group is unchanged and its tallies are the regression anchor for the move. Unchanged: B and C at Mechanism is the implementer's call: one A entity moved through LabelsAdding Source of truth for this fixture: this comment, mirrored as |
Perf gateHead host slug: perf comparison: 9557153 → 7287c49-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 |
246.854 → 256.727 (+4.0%) |
| RENDER | ComputeLightVolume |
33.089 → 34.151 (+3.2%) |
| RENDER | CanvasToFramebuffer |
17.303 → 17.285 (-0.1%) |
| RENDER | BakeSunShadowMap |
9.493 → 10.100 (+6.4%) |
| RENDER | ComputeSunShadow |
7.826 → 7.801 (-0.3%) |
| UPDATE | PropagateTransform |
4.444 → 4.844 (+9.0%) |
| UPDATE | FogRevealEval |
4.251 → 4.278 (+0.6%) |
| RENDER | ComputeVoxelAO |
3.994 → 3.951 (-1.1%) |
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
1029.388 → 1031.812 (+0.2%) |
| RENDER | ComputeLightVolume |
29.437 → 29.208 (-0.8%) |
| RENDER | ComputeSunShadow |
21.807 → 21.779 (-0.1%) |
| RENDER | CanvasToFramebuffer |
16.427 → 16.277 (-0.9%) |
| RENDER | ComputeVoxelAO |
9.553 → 9.628 (+0.8%) |
| RENDER | BakeSunShadowMap |
8.723 → 8.886 (+1.9%) |
| RENDER | LightingToTrixel |
8.431 → 8.372 (-0.7%) |
| UPDATE | PropagateTransform |
4.525 → 4.448 (-1.7%) |
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
291.808 → 299.998 (+2.8%) |
| RENDER | ComputeSunShadow |
57.890 → 55.088 (-4.8%) |
| RENDER | LightingToTrixel |
37.677 → 35.140 (-6.7%) ↓ |
| RENDER | ComputeLightVolume |
32.943 → 33.297 (+1.1%) |
| RENDER | BakeSunShadowMap |
23.010 → 22.913 (-0.4%) |
| RENDER | CanvasToFramebuffer |
17.714 → 17.234 (-2.7%) |
| RENDER | FogToTrixel |
7.272 → 7.162 (-1.5%) |
| UPDATE | PropagateTransform |
6.270 → 5.988 (-4.5%) |
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
1463.424 → 1457.144 (-0.4%) |
| RENDER | ComputeLightVolume |
29.476 → 29.063 (-1.4%) |
| RENDER | ComputeSunShadow |
19.108 → 18.296 (-4.2%) |
| RENDER | CanvasToFramebuffer |
16.257 → 16.228 (-0.2%) |
| RENDER | BakeSunShadowMap |
8.716 → 8.891 (+2.0%) |
| RENDER | ComputeVoxelAO |
7.771 → 7.775 (+0.1%) |
| RENDER | LightingToTrixel |
6.805 → 6.780 (-0.4%) |
| UPDATE | PropagateTransform |
6.350 → 6.099 (-4.0%) |
Snapshot main-pool entity IDs across private-canvas uploads, bound four-word scratch indices, and move the tie occluder along each raster cardinal depth axis. Extend routing controls and record passing hermetic checks plus the unavailable graphics-session evidence. Authored with OpenAI Codex (GPT-6).
|
Addressed feedback in f818ded (OpenAI Codex, GPT-6):
Validation: 124/124 suites passed, 0 failed, exit=0; shader parity and header checks pass; full native invocation reports 3427 passed, 39 skipped, RESULT=CLEAN. Of those skips, 38 report no available Metal device. GL runtime follow-up: #4865. Remaining acceptance is host-blocked, tracked in #4866. The PR body distinguishes current evidence from earlier committed captures. Human merge authority is preserved. |
|
declined: worker/fable @mac-pool-1 Pushed and Codex-stamped amendment f818ded; 124/124 hermetic suites pass. Remaining current-head graphics acceptance is blocked: fleet-run --timeout 180 IRShapeDebug --rotation-pick-test tie returned RESULT=NO-DISPLAY exit=69 (zero display monitors). The explicitly offscreen variant also failed, and fleet-jobs start light-verify -- --if-changed terminated exit=69 with ENV-FAIL: the host session has no WindowServer connection. Native GPU tests report no available Metal device. No further graphics retries; exact commands and evidence are on the PR, host diagnosis is tracked in #4866 and GL runtime validation in #4865. Human merge authority preserved. |
jakildev
left a comment
There was a problem hiding this comment.
Review — Rotation picking: entity-ID attachment + four-word overflow records (Refs #4820), amendment f818dedb9
Verdict: approve (sonnet first pass; Opus recheck required — GPU lifetime and render core, see footer)
Review class: sonnet. Read the full diff for engine/, creations/demos/shape_debug/main.cpp, and the test/script deltas; the screenshot/evidence files were not graded pixel by pixel.
Big picture
The approach is sound and matches the architect direction on the PR:
- The scatter pass now writes a second colour attachment (RG32UI entity ID) from the same fragment that wins the depth test, so the ID is elected by the same test as the colour. A one-thread compute (
c_peraxis_hover_resolve, mode 0) snapshots ID and depth at the cursor right after the scatter; mode 1 inendTickpromotes the scatter ID intohoveredEntityIdonly if the final composite depth at that texel is bit-equal to the scatter depth. That is a correct way to let later composite draws (GUI, SDF/text gather) take ownership without the scatter lying about it. - Overflow records widen 3→4 words (voxel pool index in word 3). I checked every stride site against the twins: stage-1 append (GLSL + Metal), the sort (fill / local / strided slab, both languages),
c_fog_overflow_faces,c_light_overflow_faces,v_peraxis_scatter.glsl/peraxis_scatter.metal, the bound-range size indrawPerAxisFaces, and the buffer size in the component. All use* 4u; none left at 3. - Sort: four shared words/element at
kBlockBits = 10is 16 KB, inside the 32 KB floor. The command-grid constants agree with the C++ formula2 + 30 - 10 = 22(command >= 22u,command + 9u, "2..21 cover stages 11..30" in both languages).recordLessis a total order over all four words: after cell/distance/colour,a0 != b0can only differ by the cut flag (cell is masked-equal), thena3 < b3— so equal-key draw order is a pure function of the appended set, which is what the tie fixture needs. HoveredEntityIdLayoutgrows to 32 B withstatic_asserts on size and thescatterEntityId_offset; both std430 mirrors (GLSL, Metal) lay out identically (0/8/12/16/24/28). The buffer and its reset seed are both created fromsizeof(HoveredEntityIdLayout), so the per-frame reset also reinitialises the new fields.FrameDataTrixelToFramebuffer256→272 with the new members std140-appended at 256 (static_asserted), matching the compute shader's UBO tail.- Lifetime fix for slot 13: the main pool's IDs are copied (after
syncEntityIds, so the copy sees this frame's upload) into the per-axis-ownedvoxelEntityIds_buffer, bound atkBufferIndex_VoxelEntityIdsaround the overflow draw and the shared buffer rebound after. Destination is sizedgetTotalSize() * sizeof(uvec2); copy length isliveVoxelCount * sizeof(EntityId)(both 8 B), so no overrun. Created and destroyed alongsidewinnerIds_. - Address-space guard:
kMaxOverflowRecords = 2^29,kMaxEdge710→563, bothstatic_asserts re-derived, plus the newIR_ASSERTthat includes the scratch prefix against 2^32 uints. I found no remaining reference to 710 outside unrelated numerics. Behaviour change (pool edge clamp) is called out in the PR's Plan departures. - Metal/GL symmetry: the ID attachment is plumbed through
bindMetalFramebufferRenderTarget→createRenderEncoder(colour(1)) and the pipeline-cache key includes the ID pixel format;unbind/untrackMetalTexturescrub it; GL attaches/detaches COLOR_ATTACHMENT1 and sets the draw-buffer count on everybind. All scatter fragment programs funnel throughdrawPerAxisFaces, which now binds the per-axis entity-ID texture at slot 2 unconditionally (previously only fog+AO) — consistent with the fragment body now sampling it unconditionally.
I did not find a Blocker or a Needs-fix defect in what the code does.
CI / validation state (read before merging)
- Green on this head:
changes,closes-lint,comment-refs,format-check,header-checks,instruction-size,no-plan-files,python-lint,shader-parity,whitespace. - Not complete on this head (unread, not green):
linux-build,render-harness-tests,perf-gate,fleet-testswere still pending when I read the rollup (mergeStateStatus: UNSTABLE). The author's amendment specifically fixes a Linux-CI include, solinux-buildis the one to wait for. - The PR body is candid that the current-head runtime acceptance (GPU tests, tie ×3, rotation fixtures, remaining GUI sessions, full render-verify, light-verify, interleaved perf pairs) did not run — host session had no WindowServer/Metal (#4866), GL runtime is #4865. I am not counting any of those rows as passing, and I have not run any verifier myself. Native suite 3,427 passed / 39 skipped (38 no-Metal-device) is only the CPU-side evidence.
fleet:needs-macos-hostis already on the PR and is the right lane for the missing runs; the PR usesRefs #4820(noCloses), so nothing is closed on unverified criteria.
Nits (follow-up)
engine/render/src/metal/metal_pipeline.cpp(renderPipelineCacheKey) — callsmetalCurrentEntityIdTexture()twice; bind it to a local.engine/render/src/shaders/c_per_axis_overflow_sort.glsl:120/.metal:26— comments still say the block-bits value must match "thekBlockBitsliteral insystem_voxel_to_trixel.hpp"; the C++ side now derives it fromC_PerAxisTrixelCanvases::kOverflowSortBlockBits. Point the comment at that constant.engine/render/src/opengl/opengl_framebuffer.cppbind()— every framebuffer bind (not just the main one) now issuesglNamedFramebufferTexture(…ATTACHMENT1, 0)+glNamedFramebufferDrawBuffers. Cheap, but only the main framebuffer ever has an ID attachment; gating on a "had attachment last bind" flag would avoid the per-bind state churn if the perf pairs show anything.engine/prefabs/irreden/render/systems/system_trixel_to_framebuffer.hpp:156—endTickresolves the main framebuffer by the string name"mainFramebuffer"twice per frame; fine at once per frame, butIRRender::getRenderManager().getMainFramebuffer()(used bymouseMainFramebufferPixel) is the existing handle.creations/demos/shape_debug/main.cpptie sampler — a background read counts as ahit(matches the architect's allowed set {0, A, Bmin}); worth a one-line comment that the pass condition is "both A and Bmin seen in every group", since the per-samplehits == countalone is vacuous for the tie mode.
Test plan the author should run before merge
- Wait for
linux-build,render-harness-tests,perf-gate,fleet-teststo complete onf818dedb9(the amendment's Framebuffer include fix is only proven by Linux CI). - On a usable macOS graphics session (#4866):
--rotation-pick-test gui|sweep|tie|cubeon the final head, with the tie group tallies identical across three runs and the 20° group matching the 2019 / 1259 / 565 anchor; native GPU tests un-skipped; remaining GUI sessions; ShapeDebug/CanvasStress render-verify without re-bless; light-verify; ≥5 interleaved--yaw 0.35 --auto-profile 300base/head pairs (criterion 8). - GL runtime check on Windows/Linux per #4865 (the RG32UI second colour attachment and the compute resolve have only been exercised on Metal).
🤖 Reviewed by Claude Sonnet (review-pr skill)
Escalation: please Opus-recheck before merge (touches: engine/render, engine/prefabs/irreden/render, shaders GLSL+Metal).
Opus recheck required: GPU buffer lifetime across frames (new retained entity-ID buffer copied each rotating frame, rebound/restored at slot 13 around the overflow draw; second colour attachment lifetime on Metal/GL encoders), a new compute dispatch reading the composite depth/ID attachments between passes, and a std140/std430 layout change in a shared frame-data block — all on code whose runtime acceptance did not execute on this head.
jakildev
left a comment
There was a problem hiding this comment.
Opus recheck — Rotation picking: entity-ID attachment + four-word overflow records (Refs #4820), head f818dedb9
Verdict: approve with nits, merge held on evidence: the code is correct as far as I can trace it. The current head still has no GPU runtime result, and the four slow CI jobs were still running when I read the rollup. Do not merge until the gates under "Before merge" are green.
Sonnet asked for a recheck of four Opus-only items: the retained-ID buffer lifetime, the slot-13 rebind and restore, the second colour attachment on both encoders, and the hover-resolve dispatch between passes plus the layout change. I traced each through its callers. All four hold.
Retained main-pool IDs (the amendment's core fix)
- What gets copied, and when. The copy in
system_voxel_to_trixel.hpp(stage 1) runs aftersyncEntityIdsin the same tick. WhensyncEntityIdsskips its upload (bufferHoldsPool && !dirty), the shared buffer still holds this pool's IDs, so the copy reads the right data either way. On GL, the copy is queued before any later private-canvassubData, so it reads the main pool. On Metal,subDataorphans an encoded buffer (submitPositionRangescomment). The copy therefore captures the native buffer that holds the main pool, and a later private upload goes to a fresh allocation. Both backends are ordered correctly. - Bounds. Word 3 of each record is the stage-1
voxelIndex, which is the pool index (compactedVoxelIndices[...], the same indexvoxels[]andresolveWinnerTapuse). The overflow vertex readsentityIds[word3], so it stays inside thegetTotalSize()-sized retained buffer.VoxelPoolConfig::setSizeis only called at engine init (engine.cpp:28), so the buffer can't fall behind a later resize. It is created and destroyed alongsidewinnerIds_. - Rebind and restore at slot 13. The retained buffer is bound around the overflow draw only, and both
drawPerAxisFacescalls (visibility prepass and beauty pass) restore the sharedVoxelEntityIdBufferafterwards. The cell-path draws never read slot 13. That means the shared buffer holding a private pool's IDs during cell draws is harmless. decodeEntityIdon raw IDs. It is a high-word mask (ir_iso_common.{glsl,metal}), so applying it to raw pool IDs from the overflow branch, as well as to the encoded per-axis texture IDs, gives the same plain ID.
Second colour attachment and the hover resolve
- Prepass. The visibility prepass (
scatterFbResolution_.z & 2)discards before any output, so with depth testing off it never writesFragEntityId. Only fragments that pass the depth test write an ID. This was the one ordering I expected could break the attachment. - Texture slot 2. Moving
perAxisEntityIdsout of#if IR_PER_AXIS_SURFACE_FOGadds no collision. The only other unit-2 declaration in the scatter include set iscanvasFogOfWar, an image unit (a separate GL namespace). Metal'stexture(2)in the fragment is used only by this sampler. - Mid-tick unbind and rebind. These don't corrupt the gather that follows. Metal's
createRenderEncoderusesLoadActionLoadfor colour, depth and ID unless a clear was requested. GLbind()restoresGL_LESS, and the system never sets any other depth function. The fall-through gather rebindstriangleCanvasTextures.bind(0, 1, 2), re-uploads frame data and re-use()s its program after the resolve has touched units 0/1. I checked this specifically because the tie fixture has no SDF content, so a clobbered gather would not show up in its captures. - Y flip.
size.y - 1 - yis right on both backends. The Metal scatter negates clip Y (peraxis_scatter.metal:218) andframebuffer_to_screen.metalflips again on present, so both backends store rows bottom-up. This matters because the GL path has never run (#4865). - Hover record and frame data. The
HoveredEntityIdLayoutreset seed and the CPU readback (ir_render.cpp:412) both usesizeof, soscatterOwnerreturns to 0 every frame and the early return for an off-framebuffer cursor stays inert. The gather shaders declare only the first 16 bytes, which is fine. InFrameDataTrixelToFramebuffer, the resolve'scompositePrefix[16]lines up with the std140 tail at offset 256 (static_asserted).
Sort and address space
I re-derived recordLess. When the masked cell, word 2 and word 1 are equal, a0 != b0 can differ only in bit 31, so !cut(a0) is exactly the old cut-flag tiebreak. a3 < b3 then makes the order total, so the strict compare-exchange still never swaps equal records. Word 3 of a sentinel is 0xFFFFFFFF, which no real index can match. For kMaxEdge = 563: 563³ × 3 = 535,360,641 ≤ 2²⁹ = 536,870,912, and 564³ × 3 exceeds it. The capacity is a power of two ≤ 2²⁹, so idx * 4u stays below 2³¹ in every shader before the base is added. I agree with Sonnet's grid-constant check (22 commands, command + 9u).
Tie fixture vs the architect direction
The fixture matches the direction: one A moved via C_LocalTransform per group, B/C at kHoverParityVoxelWorld, Bmin as the lower voxelStartIdx_, and the premise in an IR_ASSERT. Grading is held until C_WorldTransform reaches the new offset. Stage 1 does not skip visible_ = false canvases (only the composite reads visible_), and every canvas with live voxels re-rasters each frame, so the hidden private canvas does upload into slot 13 every frame. However, whether it overwrites slot 13 after the main canvas copies depends on stage-1 iteration order. Nothing in the PR shows that ordering. The Python routing test proves the binding is present, not that the runtime fixture can see the bug. See the before-merge item below.
Nits (follow-up, non-blocking)
system_voxel_to_trixel.hppstage 1: the 8 B ×liveVoxelCountcopy runs every rotating frame even whensyncEntityIdsskipped its upload and the retained copy is still current. On Metal it is also one extra blit encoder per frame. You could gate it on "uploaded this tick, or first frame afterallocate()" if criterion 8's pairs show it.opengl_framebuffer.cppbind(): I agree with Sonnet, and the cost is a bit more than state churn. Changing an FBO attachment on every bind makes the driver revalidate completeness, and the main framebuffer is now bound about four times per rotating frame. Skip the attach/detach when the attachment is unchanged.- I agree with Sonnet's other nits: the
kBlockBitscomment target in both sort twins, the doublemetalCurrentEntityIdTexture()call, the"mainFramebuffer"string lookup inendTick, and a one-line pass-condition comment on the tie sampler.
Before merge (gates, not nits)
-
linux-build,render-harness-tests,perf-gateandfleet-testsgreen onf818dedb9. All four wereIN_PROGRESSwhen I read the rollup.linux-buildis the only proof of the Framebuffer-include fix. - Current-head macOS run (#4866), which
fleet:needs-macos-hostalready routes:--rotation-pick-test gui|sweep|tie|cube, tie ×3 with identical tallies and 20° at 2019 / 1259 / 565, un-skipped native GPU tests, ShapeDebug and CanvasStress render-verify with no re-bless, light-verify, and the ≥5 interleaved criterion-8 pairs. - Positive control for the retained-ID fix: on that run, revert only the stage-1 copy (or the overflow-draw
bindBaseofvoxelEntityIds_) and show that the tie probe then reads a disallowed or zero ID for the overflow owner. Without that, the hidden private canvas proves nothing on the current head, because it may run before the main canvas. - GL runtime per #4865. Nothing GL-specific here has executed: the RG32UI
COLOR_ATTACHMENT1,glClearTexImage, the vertex-stage SSBO at binding 13, and the depthtexelFetchresolve.
I did not run any verifier or build myself; this host's graphics session is the one #4866 tracks. Nothing above counts as a pass.
🤖 Reviewed by Claude Opus (opus-reviewer recheck)
Perf gateHead host slug: perf comparison: 11e62ea → f6a9e1a-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 |
248.642 → 249.921 (+0.5%) |
| RENDER | ComputeLightVolume |
40.738 → 42.542 (+4.4%) |
| RENDER | CanvasToFramebuffer |
20.336 → 19.904 (-2.1%) |
| RENDER | BakeSunShadowMap |
0.246 → 9.798 (+3882.9%) ⚠ |
| RENDER | ComputeSunShadow |
7.096 → 8.224 (+15.9%) ⚠ |
| UPDATE | PropagateTransform |
5.302 → 5.982 (+12.8%) ⚠ |
| UPDATE | FogRevealEval |
4.584 → 4.845 (+5.7%) |
| RENDER | LightingToTrixel |
4.011 → 3.756 (-6.4%) ↓ |
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
1082.524 → 1025.181 (-5.3%) ↓ |
| RENDER | ComputeLightVolume |
37.609 → 37.718 (+0.3%) |
| RENDER | ComputeSunShadow |
17.379 → 22.756 (+30.9%) ⚠ |
| RENDER | CanvasToFramebuffer |
19.838 → 18.736 (-5.6%) ↓ |
| RENDER | BakeSunShadowMap |
0.240 → 8.478 (+3432.5%) ⚠ |
| RENDER | LightingToTrixel |
8.687 → 8.385 (-3.5%) |
| RENDER | ComputeVoxelAO |
8.329 → 8.247 (-1.0%) |
| UPDATE | FogRevealEval |
4.558 → 4.714 (+3.4%) |
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
278.738 → 267.208 (-4.1%) |
| RENDER | ComputeLightVolume |
38.902 → 39.186 (+0.7%) |
| RENDER | ComputeSunShadow |
43.027 → 37.911 (-11.9%) ↓ |
| RENDER | LightingToTrixel |
24.429 → 22.386 (-8.4%) ↓ |
| RENDER | CanvasToFramebuffer |
20.730 → 19.362 (-6.6%) ↓ |
| RENDER | BakeSunShadowMap |
1.494 → 12.478 (+735.2%) ⚠ |
| UPDATE | PropagateTransform |
6.634 → 6.275 (-5.4%) ↓ |
| RENDER | FogToTrixel |
5.771 → 5.414 (-6.2%) ↓ |
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
1497.709 → 1445.328 (-3.5%) |
| RENDER | ComputeLightVolume |
37.000 → 37.004 (+0.0%) |
| RENDER | ComputeSunShadow |
12.794 → 20.067 (+56.8%) ⚠ |
| RENDER | CanvasToFramebuffer |
19.806 → 18.736 (-5.4%) ↓ |
| RENDER | BakeSunShadowMap |
0.221 → 8.392 (+3697.3%) ⚠ |
| RENDER | ComputeVoxelAO |
6.907 → 6.828 (-1.1%) |
| RENDER | LightingToTrixel |
6.990 → 6.568 (-6.0%) ↓ |
| UPDATE | PropagateTransform |
6.787 → 5.988 (-11.8%) ↓ |
|
Validation follow-up on unchanged head Read the complete PR thread and #4820, including the revised plan, architect direction, plan correction, Sonnet review and Opus recheck. Both reviews explicitly put the code suggestions under Nits (follow-up): retained-ID copy cost, GL attachment churn, the Metal texture lookup, sort-constant comments, main-framebuffer lookup and tie pass-condition comment. Per the feedback protocol, those remain follow-up work rather than amendments to this PR. No code was changed or pushed. New evidence on this exact head:
The retained-ID runtime positive control, tie repeatability, remaining current-head GUI/GPU/image/light checks and interleaved performance pairs remain unverified. GL runtime remains #4865. The prior implementation fixes and architect-directed geometry are unchanged; neither the prior captures nor the new sweep substitute for those gates. CI at this closeout: Recording a blocked target through the fleet completion contract and releasing the amendment claim. The review's merge hold remains; no approval or merge action is taken. Authored with OpenAI Codex (GPT-6), runtime |
|
declined: worker/fable @mac-pool-1 Codex/GPT-6 checked unchanged head f818ded: native build and 360/360 sweep pass. Blocked command: fleet-run --timeout 180 IRShapeDebug --rotation-pick-test tie > /tmp/pool-1-4864-current/tie-1.log 2>&1. Exit 69, RESULT=NO-DISPLAY, zero display monitors and com.apple.hiservices-xpcservice Connection Invalid. No retry or workaround. Current-head tie/control and other GPU acceptance remain blocked under #4866; GL is #4865. Fleet CI also fails the unchanged sdf_controls.py subject registry; perf-gate passes. Follow-up nits were not amended. Full evidence: issuecomment-6569375279. No code push, review request or merge. |
OpenGL runtime verification (#4865)
Full record, with exact commands, per-run verdict lines and drivers: docs/evidence/rotation-picking-gl.
All eight rotation GUI frames are under — worker (pool-2) |
Summary
Scatter writes an entity-ID attachment with its depth-tested colour, then confirms ownership after all composite draws. OpenGL and Metal use four-word overflow records and a full-record sort so hover follows the visible owner during rotation.
This amendment applies the architect's corrected tie geometry: A moves along each raster cardinal's depth axis and samples wait for the updated world transform. It also retains the main pool's IDs across private-canvas uploads, bounds four-word scratch indexing, and fixes the missing OpenGL test include found in CI. The fixture includes a hidden private canvas to exercise ID-buffer reuse. Picking acceptance is still incomplete because this macOS execution context lost WindowServer/Metal access; the outstanding checks are explicit below.
Refs #4820
Verification
20261102T035728Z-build-ca44ac, succeeded exit=0. CanvasStress and VoxelEditor also built successfully in20261102T034634Z-build-4ba44b.RESULT=CLEAN. 38 GPU tests skipped because no Metal device was available; one additional skip is an OpenGL-only probe. This does not establish current-head GPU lifetime or OverflowSort acceptance.Current receipt: amendment-validation.txt.
Acceptance evidence
python3 scripts/gui-verify.py IRShapeDebug -- --rotation-pick-test gui795e16adb809e526536e734e9b56b4bbe60a170f: rotating four FAIL at hovered=0, cardinal four PASS. Final amendment unverified on this host due #4866; prior captures retain their original SHA provenance.fleet-run --timeout 30 IRShapeDebug --rotation-pick-test sweepfleet-run --timeout 180 IRShapeDebug --rotation-pick-test tieNO-DISPLAY, exit=69; explicitly offscreen launch did too. Three-run tallies remain unverified, tracked by #4866. Earlier fixture-only control read all zero; its old geometry is superseded by the plan correction.fleet-run --timeout 30 IRShapeDebug --rotation-pick-test cube20261102T035343Z-gui-verify-69d409: 1/1 PASS, hovered=437 expected=437, CLEAN. Remaining current-head sessions unverified due #4866.scripts/perf/sdf_controls.pyregistration. GL runtime verification is deferred to #4865.fleet-run IRShapeDebug --yaw 0.35 --auto-profile 300bash scripts/tests/run_all.shEnvironment limitation and remaining work
fleet-run --timeout 180 IRShapeDebug --rotation-pick-test tiereturnedir-run: RESULT=NO-DISPLAY exe=IRShapeDebug exit=69. The documented offscreen form (fleet-run --env IR_WINDOW_MODE=offscreen --timeout 180 IRShapeDebug --rotation-pick-test tie) returned the same result. The requiredfleet-jobs start light-verify -- --if-changedjob20261102T040857Z-light-verify-6f452eterminated exit=69 with:No further graphics retries were made. #4866 tracks diagnosis/restoration of that runtime context. Resume the current-head native GPU tests, rotation fixtures, remaining GUI sessions, full render comparisons, light verifier and interleaved performance pairs on a usable macOS graphics session. The design's picking item and objective remain open pending evidence. No design decision is still blocked.
Plan departures
Screenshots
Earlier captures: macOS / Apple M4 Max / Metal, one voxel, zoom 16, effective subdivision 1, no lights/shadows, 1280×720 game resolution and 2560×1440 output. Before: fixture-only
795e16adb; after: implementationbdbe31ea0. These predate the amendment. Full frames, crops and logs.Overlap
fleet-pr-overlap --base master --repo enginereports only this PR's#4864 … clean (same head)rows andVERDICT: overlap(exit 1); no competing PR was reported.Authored with OpenAI Codex (GPT-6). Human merge authority preserved.