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:
Erik 2026-07-18 21:35:16 +02:00
parent 3971997689
commit 749e8ceeb1
225 changed files with 29107 additions and 3914 deletions

View file

@ -1,6 +1,7 @@
using DatReaderWriter;
using DatReaderWriter.Enums;
using DatReaderWriter.Lib.IO;
using AcDream.Core.Content;
using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
@ -20,7 +21,7 @@ namespace AcDream.Content;
/// <summary>
/// Interface for the dat reader/writer
/// </summary>
public interface IDatReaderWriter : IDisposable {
public interface IDatReaderWriter : IDisposable, IDatObjectSource {
/// <summary>
/// Gets the source directory of the DAT files.
/// </summary>
@ -36,6 +37,9 @@ public interface IDatReaderWriter : IDisposable {
/// </summary>
IDatDatabase Portal { get; }
/// <summary>The single cell database exposed by DatCollection.</summary>
IDatDatabase Cell { get; }
/// <summary>
/// The cell region databases. Each key is a cell region ID
/// </summary>
@ -51,6 +55,12 @@ public interface IDatReaderWriter : IDisposable {
/// </summary>
IDatDatabase Language { get; }
/// <summary>Alias matching DatCollection's Local database name.</summary>
IDatDatabase Local { get; }
/// <summary>Enumerates typed ids across the database selected for the type.</summary>
IEnumerable<uint> GetAllIdsOfType<T>() where T : IDBObj;
/// <summary>
/// A mapping of region ids to region dat file entry ids. key: region id, value: region dat file entry
/// </summary>