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>
29 lines
904 B
C#
29 lines
904 B
C#
namespace AcDream.App.Rendering.Wb;
|
|
|
|
internal enum WbTextureResolutionKind : byte
|
|
{
|
|
SharedAtlas,
|
|
OriginalTextureOverride,
|
|
PaletteComposite,
|
|
}
|
|
|
|
/// <summary>
|
|
/// Selects the retail texture ownership path for one rendered surface.
|
|
/// Retail creates a palette-combined <c>ImgTex</c> only for indexed source
|
|
/// images; ordinary surfaces continue to reference their shared image.
|
|
/// </summary>
|
|
internal static class WbTextureResolutionPolicy
|
|
{
|
|
public static WbTextureResolutionKind Select(
|
|
bool hasOriginalTextureOverride,
|
|
bool hasPaletteOverride,
|
|
bool sourceIsPaletteIndexed)
|
|
{
|
|
if (hasPaletteOverride && sourceIsPaletteIndexed)
|
|
return WbTextureResolutionKind.PaletteComposite;
|
|
|
|
return hasOriginalTextureOverride
|
|
? WbTextureResolutionKind.OriginalTextureOverride
|
|
: WbTextureResolutionKind.SharedAtlas;
|
|
}
|
|
}
|