phase(N.4) Task 14: pending-spawn list integration test
Verifies Task 12's GpuWorldState wiring preserves the pending-spawn list mechanism: 1. Live entity parked before its landblock loads — pending count = 1, adapter not called yet. 2. Landblock arrives with its own atlas-tier entity AND drains the pending live entity. Adapter sees ONLY the atlas-tier GfxObj (server-spawned drained entity is filtered by ServerGuid != 0). 3. Live entity arriving AFTER landblock load goes straight to flat view; adapter is not re-invoked. 4. Landblock unload decrements match load increments. Three integration tests confirm the existing pending-spawn drain semantics work correctly with the new adapter, and per-instance-tier entities (server-spawned) never leak into WB's atlas pipeline. To exercise the adapter code path (which GpuWorldState gates on WbFoundationFlag.IsEnabled) without requiring the env var set before process startup, WbFoundationFlag gains an internal ForTestsOnly_ForceEnable() method and AcDream.App exposes internals to AcDream.Core.Tests via InternalsVisibleTo. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
931a690c4c
commit
f4f0101d2c
3 changed files with 163 additions and 1 deletions
|
|
@ -9,6 +9,9 @@
|
|||
<RootNamespace>AcDream.App</RootNamespace>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<InternalsVisibleTo Include="AcDream.Core.Tests" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Silk.NET.OpenGL" Version="2.23.0" />
|
||||
<PackageReference Include="Silk.NET.Windowing" Version="2.23.0" />
|
||||
|
|
|
|||
|
|
@ -17,6 +17,16 @@ namespace AcDream.App.Rendering.Wb;
|
|||
/// </summary>
|
||||
public static class WbFoundationFlag
|
||||
{
|
||||
public static bool IsEnabled { get; } =
|
||||
private static bool _isEnabled =
|
||||
System.Environment.GetEnvironmentVariable("ACDREAM_USE_WB_FOUNDATION") == "1";
|
||||
|
||||
public static bool IsEnabled => _isEnabled;
|
||||
|
||||
/// <summary>
|
||||
/// FOR TESTS ONLY. Forces <see cref="IsEnabled"/> to <c>true</c> so
|
||||
/// integration tests can exercise the WB adapter path without having to
|
||||
/// set the env var before static initialisation. Never call from
|
||||
/// production code.
|
||||
/// </summary>
|
||||
internal static void ForTestsOnly_ForceEnable() => _isEnabled = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue