fix(rendering): bound portal resource lifetime
Separate logical ownership, render publication, and GPU retirement across live entities, landblocks, particles, textures, mesh arenas, portal/UI teardown, and per-frame scratch storage. Add bounded DAT/texture caches, upload budgets, three-frame fence retirement, exact-incarnation appearance reconciliation, frame pacing, and extensive lifetime conformance coverage.\n\nThe seven-destination connected route now cuts peak working/private memory roughly in half, returns Caul to 125-153 FPS locally, and produces no WER or AMD reset.\n\nCo-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
parent
3971997689
commit
749e8ceeb1
225 changed files with 29107 additions and 3914 deletions
31
src/AcDream.App/Rendering/FramePacingPolicy.cs
Normal file
31
src/AcDream.App/Rendering/FramePacingPolicy.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
namespace AcDream.App.Rendering;
|
||||
|
||||
/// <summary>
|
||||
/// Resolves the user's presentation preference into a bounded render policy.
|
||||
/// A normal client is never uncapped: disabling VSync selects a software
|
||||
/// ceiling at the active monitor's refresh rate. Only the explicit startup
|
||||
/// diagnostic may disable both mechanisms.
|
||||
/// </summary>
|
||||
internal readonly record struct FramePacingPolicy(
|
||||
bool UseVSync,
|
||||
double? SoftwareLimitHz)
|
||||
{
|
||||
internal const double FallbackRefreshHz = 60d;
|
||||
|
||||
public static FramePacingPolicy Resolve(
|
||||
bool requestedVSync,
|
||||
bool uncappedRendering,
|
||||
int? monitorRefreshHz)
|
||||
{
|
||||
if (uncappedRendering)
|
||||
return new FramePacingPolicy(UseVSync: false, SoftwareLimitHz: null);
|
||||
|
||||
if (requestedVSync)
|
||||
return new FramePacingPolicy(UseVSync: true, SoftwareLimitHz: null);
|
||||
|
||||
double refreshHz = monitorRefreshHz is > 0
|
||||
? monitorRefreshHz.Value
|
||||
: FallbackRefreshHz;
|
||||
return new FramePacingPolicy(UseVSync: false, SoftwareLimitHz: refreshHz);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue