acdream/src/AcDream.App/Rendering/Wb
Erik 25cb147d97 fix(perf #N6.1): gate gpu_us read on diag for symmetric toggle behavior
Code-quality review on Task 1 (commit a7c9800) flagged an asymmetric
diag gate: the read-before-overwrite block at the top of the dispatcher
was not gated on diag, but the frame-counter increment and BeginQuery
calls were. If a maintainer toggled ACDREAM_WB_DIAG from "1" to "" mid-
session, _gpuQueryFrameIndex would freeze (gated inside if(diag)) while
the read kept firing every frame at the same slot — producing duplicate
stale samples.

Add diag to the read block's outer condition so the read/issue/increment
trio is symmetric. One-line change; behavior under the normal usage
pattern (env var set at launch, never toggled) is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 11:28:22 +02:00
..
AcSurfaceMetadata.cs phase(N.4): AcSurfaceMetadata side-table for WB-pristine surface props 2026-05-08 13:08:56 +02:00
AcSurfaceMetadataTable.cs phase(N.4): AcSurfaceMetadata side-table for WB-pristine surface props 2026-05-08 13:08:56 +02:00
AnimatedEntityState.cs phase(N.4) Tasks 16+18+19: AnimatedEntityState + AnimPartChange + HiddenParts 2026-05-08 14:37:09 +02:00
BindlessSupport.cs fix(N.5b): black terrain — switch to uvec2 handle + sampler constructor 2026-05-09 12:53:21 +02:00
CachedBatch.cs feat(render #53): EntityClassificationCache skeleton + first test 2026-05-10 17:23:37 +02:00
DrawElementsIndirectCommand.cs phase(N.5) Task 7: dispatcher SSBO + indirect buffer infrastructure 2026-05-08 20:25:29 +02:00
EntityClassificationCache.cs fix(render #53): key cache by (entityId, landblockHint) to defeat ID collision 2026-05-10 23:02:14 +02:00
EntitySpawnAdapter.cs feat(A.5 T18): use cached WorldEntity AABB in dispatcher; populate at register 2026-05-10 08:20:20 +02:00
GroupKey.cs refactor(render): extract WbDrawDispatcher.GroupKey to internal type at namespace scope 2026-05-10 17:13:44 +02:00
ITextureCachePerInstance.cs phase(N.4) Task 17: EntitySpawnAdapter for server-spawned per-instance content 2026-05-08 14:46:34 +02:00
IWbMeshAdapter.cs phase(N.4): WbMeshAdapter stub + IWbMeshAdapter interface 2026-05-08 13:18:50 +02:00
LandblockSpawnAdapter.cs phase(N.4) Task 11: LandblockSpawnAdapter (atlas-tier ref-count bridge) 2026-05-08 13:53:38 +02:00
WbDrawDispatcher.cs fix(perf #N6.1): gate gpu_us read on diag for symmetric toggle behavior 2026-05-11 11:28:22 +02:00
WbMeshAdapter.cs phase(N.4) Tasks 22+23 fixup: trigger WB mesh loads + correct SurfaceId source 2026-05-08 15:50:21 +02:00