acdream/tests/AcDream.Core.Tests/Rendering/Wb
Erik c55acdc3d5 fix(render #53): skip cache populate when classification is incomplete
User reported: the drudge statue on top of the Foundry (a multi-part
live-spawned entity with AnimPartChange + texChanges) renders only
PARTIALLY — some parts visible, some missing.

Root cause: the dispatcher's slow path skips a MeshRef when
_meshAdapter.TryGetRenderData returns null (mesh still async-decoding
via ObjectMeshManager.PrepareMeshDataAsync). The classified-batches
collector accumulates only the MeshRefs that DID resolve. At entity
boundary, the cache populates with the PARTIAL set. Frame-2 cache hits
serve that partial entry forever — even after the missing mesh loads,
the cache continues to skip those parts because classification never
reruns for cached entities.

Fix: track currentEntityIncomplete during the foreach. Set it true on
any null renderData. At entity boundary (and at end-of-loop), if the
flag is set, DROP the accumulated populate scratch instead of writing
it to the cache. The slow path retries on the next frame; once all
meshes have loaded, the populate fires correctly with the complete
classification.

Adds a regression test pinning the contract — incomplete entities
produce zero cache entries.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 23:42:46 +02:00
..
AcSurfaceMetadataTableTests.cs phase(N.4): AcSurfaceMetadata side-table for WB-pristine surface props 2026-05-08 13:08:56 +02:00
AnimatedEntityStateTests.cs phase(N.4) Tasks 16+18+19: AnimatedEntityState + AnimPartChange + HiddenParts 2026-05-08 14:37:09 +02:00
AnimPartChangeTests.cs phase(N.4) Tasks 16+18+19: AnimatedEntityState + AnimPartChange + HiddenParts 2026-05-08 14:37:09 +02:00
EntityClassificationCacheTests.cs fix(render #53): key cache by (entityId, landblockHint) to defeat ID collision 2026-05-10 23:02:14 +02:00
EntitySpawnAdapterTests.cs phase(N.4) Task 17: EntitySpawnAdapter for server-spawned per-instance content 2026-05-08 14:46:34 +02:00
HiddenPartsTests.cs phase(N.4) Tasks 16+18+19: AnimatedEntityState + AnimPartChange + HiddenParts 2026-05-08 14:37:09 +02:00
LandblockSpawnAdapterTests.cs phase(N.4) Task 11: LandblockSpawnAdapter (atlas-tier ref-count bridge) 2026-05-08 13:53:38 +02:00
MatrixCompositionTests.cs phase(N.4) Tasks 22+23: WbDrawDispatcher + surface metadata side-table 2026-05-08 15:30:33 +02:00
MeshExtractionConformanceTests.cs test(N.4): conformance tests for mesh extraction + setup flatten 2026-05-08 13:14:36 +02:00
PendingSpawnIntegrationTests.cs phase(N.5): retirement amendment — InstancedMeshRenderer + StaticMeshRenderer + WbFoundationFlag deleted 2026-05-08 22:01:36 +02:00
SetupFlattenConformanceTests.cs test(N.4): conformance tests for mesh extraction + setup flatten 2026-05-08 13:14:36 +02:00
WbDispatcherDepthMaskTests.cs test(A.5 T21): lock in depth-write attribution per translucency kind 2026-05-10 08:27:03 +02:00
WbDrawDispatcherBucketingTests.cs fix(render #53): skip cache populate when classification is incomplete 2026-05-10 23:42:46 +02:00
WbDrawDispatcherIndirectBuilderTests.cs phase(N.5) Task 9 fixup: layout assertion + DrawCommandStride const 2026-05-08 20:42:49 +02:00
WbDrawDispatcherTranslucencyTests.cs phase(N.5) Task 11: translucency partition contract test 2026-05-08 20:53:36 +02:00
WbMeshAdapterTests.cs phase(N.4) Tasks 22+23: WbDrawDispatcher + surface metadata side-table 2026-05-08 15:30:33 +02:00