fix(render): restore retail per-cell alpha order
Reconstruct one combined static/dynamic object-part stream for each ordinary outdoor or interior cell, compute authored SortCenter CYpt keys, and stable-sort far to near before projecting opaque and delayed subsets. Prepare real cell-particle records at the leaf, preserve every S4-c2 router outcome, and merge object and particle delayed records by retained key before either source appends to the unchanged CLIP/ALPHA FIFO lists. Cell turns remain cell-major; equal cross-source ties are deterministically object-first. File AP-241 and AP-242 for the remaining separate opaque/row-5 channels and unrepresented equal-key common ordinal. File AP-243 for the paired-binary correction: retail shares the cell CYpt/heading beyond 50 m while this bounded port always uses the more exact authored per-part center. Pin 162 active AP rows and correct world-alpha and AlphaFlushCounts prose. Lead-approved scope clarification: RetailPViewPassExecutor.WalkLeaf.cs and RetailPViewPassExecutor.cs are the minimum existing production leaf adapter and thin particle-prepare forwarder omitted by the literal Walk/Wb file list. They contain no router, queue, mask, state, depth, or flush behavior; relocating them would create an artificial seam. Gates: Release solution build 0W/0E; shader/manifest 32/32; focused production 210/210; real allocation 3/3 at 0 B; one-shot hermetic 16743/0/0 across 14 assemblies; InstalledDat 385 pass/10 documented fail/1 skip with all six AlphaFlushSites passing; git diff --check PASS. Initial no-restore solution build failed NETSDK1004 for 42 missing scratch assets; one solution restore preceded the official build. Mutation proof, each restored before final gates: 1. Reverse comparator: authored-center order expected [202,101], actual [101,202]. 2. Move ties left: multipart/subset order expected [11,12,21,22], actual [22,21,12,11]. 3. Restore static/dynamic blocks: expected [2,3,1], actual [3,1,2]. 4. Use entity origin: authored-center order expected [202,101], actual [101,202]. 5. Restore particle tail: expected [Wb,Particle,Wb,Particle], actual [Wb,Wb,Particle,Particle]. 6. Scope-global sort: first cell model X expected 5, actual 50. 7. Restore dead camera parameter: SubmitWalkAlphaInstance parameter count expected 2, actual 3. 8. Restore stale global-queue prose: exact Assert.DoesNotContain failure on distance-sorts one shared queue. 9. Remove AP-241 identity: Assert.Single found no matching row. 10. Allocate in real merge: expected 0 B, actual 3072 B. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
06b986622b
commit
a86ec73ece
17 changed files with 1067 additions and 197 deletions
|
|
@ -1135,8 +1135,11 @@ explicit Campaign OVERHAUL divergences, not accepted retail contracts:
|
|||
retail's `DrawLandCell` then `DrawSortCell` interleave for each land cell;
|
||||
- depth clear/seal events are emitted for zero-outside-view roots and do not
|
||||
consume retail's persistent previous-call `uint16 portalsDrawnCount` gate;
|
||||
- `RetailAlphaQueue` distance-sorts one shared queue, whereas retail owns two
|
||||
FIFO mesh lists and drains clip before alpha at exact barriers.
|
||||
- ordinary object and particle parts now receive retail's stable per-cell
|
||||
authored-CYpt order before entering the two FIFO mesh lists, which drain
|
||||
CLIP before ALPHA at exact barriers. The retained differences are AP-241
|
||||
(opaque/row-5 GPU channels), AP-242 (equal cross-source tie ordinal), and
|
||||
AP-243 (retail's >50 m shared-cell-key optimization).
|
||||
|
||||
The exact target and evidence are recorded in
|
||||
`docs/research/2026-09-01-overhaul/oh1-retail-world-contract.md`; OH5, OH6, and
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -400,11 +400,14 @@ renderers classify translucent mesh batches correctly, but they have no live
|
|||
retail `CPartCell`/`CShadowPart` list and render particles in a separate
|
||||
batcher. `src/AcDream.App/Rendering/RetailAlphaQueue.cs` is therefore an
|
||||
acdream-owned runtime seam above the extracted mesh pipeline. During the main
|
||||
world frame, `WbDrawDispatcher` and `ParticleRenderer` submit transparent
|
||||
GfxObj subsets and scene particles into one stable far-to-near stream keyed by
|
||||
the transformed DAT `SortCenter`; only adjacent compatible entries may batch.
|
||||
world frame, `WalkFrameDriver` reconstructs retail's stable far-to-near order
|
||||
inside each object-cell turn from transformed authored DAT `SortCenter`, merges
|
||||
the cell's `WbDrawDispatcher` GfxObj subsets with prepared `ParticleRenderer`
|
||||
records, then appends the result to retail's two FIFO lists (CLIP/ALPHA).
|
||||
It never performs one scope-global distance sort; only adjacent compatible
|
||||
entries may batch at drain.
|
||||
Billboard particle textures are resident bindless `sampler2DArray` handles in
|
||||
the per-instance vertex ABI, so different textures preserve that sorted order
|
||||
the per-instance vertex ABI, so different textures preserve that per-cell order
|
||||
inside one instanced draw; only a DAT blend-mode boundary splits the run. This
|
||||
keeps dense particle fields from becoming one Vulkan draw per alternating
|
||||
texture. `WalkFrameDriver` drains the landscape and world scopes at the exact
|
||||
|
|
|
|||
|
|
@ -1349,72 +1349,86 @@ register count, allowed files, and every gate claim. A failed lens gets one
|
|||
bounded fix contract; a third fix round stops and is written up. Dual PASS
|
||||
lands c3a; the lead then writes c3b's deletion-only contract from that code.
|
||||
|
||||
## 19. S4-c3a stop record — owner attempts 3–5 exhausted (2026-09-04)
|
||||
### 18.7 Implementation result (scratch implementation, 2026-09-04)
|
||||
|
||||
**STOPPED UNLANDED.** The clean scratch worktree
|
||||
`C:\Users\erikn\source\repos\acdream\.claude\worktrees\s4-c3a-impl`
|
||||
ends at `359061b8299dd77a2335935868b739b8295b9b0c`. Nothing from c3a was
|
||||
cherry-picked to the campaign branch; the campaign renderer remains the
|
||||
reviewed S4-c2 stack through `252886e84`, with this §18 contract at
|
||||
`5c9da6fc2`. c3b is locked and G3/G4 remain unpassed.
|
||||
The bounded c3a implementation now builds one combined registry view for each
|
||||
ordinary outdoor/interior object-cell turn, transforms each GfxObj's authored
|
||||
`SortCenter`, applies a stable descending per-cell insertion sort, and derives
|
||||
both opaque/cutout commands and delayed object records from that same order.
|
||||
The real particle leaf prepares but does not expose delayed records; the cell
|
||||
event merges their retained keys with the object's range before either source
|
||||
appends to the unchanged CLIP/ALPHA FIFO lists. Row-5 immediate routing,
|
||||
capacity-drop/source rollback, barriers, and building-shell ownership are
|
||||
unchanged. Exact equal object/particle keys use the disclosed object-first tie.
|
||||
|
||||
The complete unlanded scratch stack is:
|
||||
The paired-binary correction is recorded as AP-243: retail's
|
||||
`UpdateObjCell` greater-than-50 m branch at `0x005A06B7..0x005A0720` gives
|
||||
all parts one cell CYpt/heading through `CPhysicsObj::UpdateViewerDistance`
|
||||
and therefore retains insertion order, while this bounded port always uses
|
||||
the more exact per-part authored center. AP-241/AP-242 record the two other
|
||||
narrow residuals. The active AP header and physical table are pinned at 162
|
||||
rows, with exactly one row for each AP-241/AP-242/AP-243.
|
||||
|
||||
1. `44e2bc227b` — initial c3a implementation;
|
||||
2. `b6bf6c131` — lead fix-round-1 contract;
|
||||
3. `eea5793d2` — fix round 1;
|
||||
4. `14397b14c` — lead fix-round-2 contract, explicitly the last round;
|
||||
5. `359061b82` — fix round 2.
|
||||
Lead-approved process-scope clarification: the real-path integration also
|
||||
changes exactly `src/AcDream.App/Rendering/RetailPViewPassExecutor.WalkLeaf.cs`
|
||||
and `src/AcDream.App/Rendering/RetailPViewPassExecutor.cs`. The literal
|
||||
`{Walk,Wb}/` production-file list omitted the existing leaf adapter and the
|
||||
thin `PrepareCellParticleAlpha` forwarder required to reach the expressly
|
||||
allowed `ParticleRenderer`; relocating that bridge would create an artificial
|
||||
seam. These two files contain only the interface adaptation and forwarder—no
|
||||
router, queue, mask, pipeline, reference, depth, or flush behavior. The lead
|
||||
approved this minimum real-path reachability delta before commit. It is a
|
||||
contract-scope clarification, not a retail behavior deviation, so it files no
|
||||
additional AP row.
|
||||
|
||||
Attempt 3 failed the retail lens because billboard/mode-2–5 particles keyed
|
||||
CYpt from their rendered/AABB center instead of the GfxObj-authored
|
||||
`sort_center`; the same lens found one stale static-record-order comment.
|
||||
Fix round 1 separated authored and visual centers, applied particle scale and
|
||||
orientation to the authored point, made prepared payload reservation lazy,
|
||||
rolled back false/exception append exactly once, bounded preparation to 3,000
|
||||
CLIP plus 3,000 ALPHA candidates, and corrected the prose.
|
||||
Clean-state return matrix (no graphical client was launched):
|
||||
|
||||
Attempt 4 failed the retail re-review on one universal edge: a successfully
|
||||
decoded real GfxObj with no Surface DID was replaced by
|
||||
`ParticleGfxInfo.Default`, discarding its authored center. The installed scan
|
||||
found zero practical exposure (2,051 emitter records / 360 referenced GfxObjs,
|
||||
all with a nonzero first Surface DID), but retail's CYpt read is surface-
|
||||
independent. Fix round 2 preserved the decoded record and made only texture
|
||||
acquisition conditional; it also corrected the synthetic-fixture evidence
|
||||
wording.
|
||||
- Initial solution `--no-restore` build was invalid setup evidence: 42
|
||||
projects lacked `project.assets.json` (`NETSDK1004`). One solution restore
|
||||
followed; the official Release solution build then succeeded with 0
|
||||
warnings and 0 errors.
|
||||
- Shader descriptor/manifest/SPIR-V validation: 32/32. No shader source,
|
||||
checked-in SPIR-V, manifest, Content model, serializer, or package format
|
||||
changed.
|
||||
- Focused queue/router/particle/Wb/walk/EnvCell/PView production filter:
|
||||
210/210. The three real warmed routes (EnvCell whole-leaf SubmitRhi,
|
||||
immediate mesh particle RHI, and the new driver/particle/dispatcher merge)
|
||||
pass 3/3 and each asserts 0 managed bytes.
|
||||
- Official one-shot 14-assembly hermetic gate: 16,743 passed / 0 skipped /
|
||||
0 failed. Evidence:
|
||||
`%TEMP%/acdream-s4-c3a-impl-20260904-2015`.
|
||||
- InstalledDat with explicit `C:\Turbine\Asheron's Call`: 385 passed / 10
|
||||
failed / 1 skipped. The failures are exactly TowerAscent, the two #383
|
||||
layout sweeps, #458 `Oh_doorway_still_first_frame_diff`, and the six
|
||||
retained `AlphaFlushCounts_*`; all six paired `AlphaFlushSites_*` pass.
|
||||
Evidence: `%TEMP%/acdream-s4-c3a-installed-20260904-2017`.
|
||||
- `git diff --check`: pass.
|
||||
|
||||
Attempt 5's final retail lens **PASSED**. It reconfirmed the paired executable
|
||||
and PDB, `CPhysicsPart::UpdateViewerDistance @0x0050E030`, stable descending
|
||||
per-cell order, combined static/dynamic membership, the real object/particle
|
||||
merge, building separation, unchanged two-list FIFO/router/row-5 behavior,
|
||||
and AP-241/AP-242/AP-243 truth/count in the scratch stack. Its focused
|
||||
reproduction passed 117/117.
|
||||
Observed mutation first failures (every mutation was reversed with a patch
|
||||
before the return matrix):
|
||||
|
||||
The final production/gate-honesty lens found no production, lifecycle,
|
||||
allocation, scope, register, or retained-memory defect. It nevertheless
|
||||
returned **FAIL** on one mandatory evidence error. The initial candidate's
|
||||
mutation ledger says renaming AP-241 first fails `Assert.Single`. The unchanged
|
||||
pin actually computes `rowIndex == -1` and first fails the earlier AP-section
|
||||
boundary `Assert.True` in `WalkStaticStreamPopulatorTests.cs`; `Assert.Single`
|
||||
is reached later. The other eighteen mutation claims match their actual first
|
||||
assertions. Correcting that sentence would be a third c3a fix round, forbidden
|
||||
by plan §5, packet §18.6, and the owner's explicit attempt limit. Therefore no
|
||||
evidence-only correction, landing, graphical gate, or c3b contract follows.
|
||||
|
||||
Final read-only evidence on `359061b82`:
|
||||
|
||||
- Release solution: 0 warnings / 0 errors;
|
||||
- focused §19 lane: 95/95; no-surface target: 1/1; final retail superset:
|
||||
117/117;
|
||||
- AP boundary/count pin: 1/1; physical and unique AP counts: 162;
|
||||
- real allocation pins: 2/2 at 0 managed bytes;
|
||||
- shader/manifest/SPIR-V: 32/32;
|
||||
- one-shot hermetic artifact: 16,751 passed / 0 skipped / 0 failed at
|
||||
`%TEMP%\acdream-s4-c3a-fix1-20260904-2215`;
|
||||
- inclusive InstalledDat artifact: 385 passed / 10 documented failures / 1
|
||||
skip at `%TEMP%\acdream-s4-c3a-fix1-installed-inclusive-20260904-2222`;
|
||||
- `git diff --check`: PASS; scratch HEAD clean; no graphical client launched.
|
||||
|
||||
Resume only after an explicit owner process change. The minimum mechanical
|
||||
correction is known, but the stop rule exists precisely to prevent a green
|
||||
renderer from bypassing a failed evidence contract.
|
||||
1. Reverse the CYpt comparator: `PopulateCellObjects_UsesAuthoredSortCenterAndStableFarToNearOrder`
|
||||
expected `[202,101]`, actual `[101,202]` at the first sequence assertion.
|
||||
2. Move equal keys left (`>=`): `PopulateCellObjects_EqualCyptRetainsEntityPartAndSubsetOrder`
|
||||
expected `[11,12,21,22]`, actual `[22,21,12,11]`.
|
||||
3. Restore static/dynamic blocks: `PopulateCellObjects_InterleavesStaticAndDynamicOpaquePartsByCypt`
|
||||
expected `[2,3,1]`, actual `[3,1,2]`.
|
||||
4. Replace authored SortCenter with entity translation: the authored-center
|
||||
test first expected `[202,101]`, actual `[101,202]`.
|
||||
5. Restore the old object-then-particle tail: `CellTurn_RealParticlePreparationMergesWithObjectAlphaByCypt`
|
||||
expected source order `[Wb,Particle,Wb,Particle]`, actual
|
||||
`[Wb,Wb,Particle,Particle]` at position 1.
|
||||
6. Sort all staged objects scope-globally before replay:
|
||||
`SeparateCellTurnsRemainCellMajorWhenLaterCellIsFarther` first expected
|
||||
model X `5`, actual `50`.
|
||||
7. Restore a dead optional camera parameter on `SubmitWalkAlphaInstance`:
|
||||
`WorldAlphaCyptContract_RetainsTheKeyWithoutDeadCameraSubmitThreading`
|
||||
first expected parameter count 2, actual 3.
|
||||
8. Reinsert “distance-sorts one shared queue” into the inventory:
|
||||
`WorldAlphaCyptDocumentationAndRegister_PinPerCellTruthAndThreeResiduals`
|
||||
first failed `Assert.DoesNotContain` on that exact phrase.
|
||||
9. Rename AP-241 away: that same truth pin first failed `Assert.Single`
|
||||
because no AP-241 row matched.
|
||||
10. Allocate one object in the real cell-merge path:
|
||||
`ProductionCellObjectParticleMerge_WarmedPathAllocatesZeroBytes` first
|
||||
expected 0, actual 3,072 managed bytes.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue