perf(render): bound animation and alpha scratch residency
Complete Slice D3 by replacing the unbounded animation dictionary with a concurrent byte/count LRU and by putting the three retail alpha scratch owners behind one typed aggregate budget. Preserve immediate growth and draw order while reclaiming one-frame density spikes after sustained under-use. Close stale bounds-cache issue evidence without inventing a cache.
This commit is contained in:
parent
3e18fc2730
commit
f2644d42c2
18 changed files with 857 additions and 34 deletions
|
|
@ -4,6 +4,7 @@ using AcDream.App.Audio;
|
|||
using AcDream.App.Composition;
|
||||
using AcDream.App.Physics;
|
||||
using AcDream.App.Rendering;
|
||||
using AcDream.App.Rendering.Residency;
|
||||
using AcDream.App.Rendering.Vfx;
|
||||
using AcDream.App.Spells;
|
||||
using AcDream.Content;
|
||||
|
|
@ -253,6 +254,7 @@ public sealed class ContentEffectsAudioCompositionTests
|
|||
Dependencies = new ContentEffectsAudioDependencies(
|
||||
"test-dat",
|
||||
"test.pak",
|
||||
ResidencyBudgetOptions.Default,
|
||||
new PhysicsDataCache(),
|
||||
false,
|
||||
new Spellbook(),
|
||||
|
|
@ -386,7 +388,19 @@ public sealed class ContentEffectsAudioCompositionTests
|
|||
public MagicCatalog LoadMagicCatalog(IDatReaderWriter dats) => _magic;
|
||||
public void InstallSpellMetadata(Spellbook spellBook, MagicCatalog catalog) { }
|
||||
public int GetSpellCount(MagicCatalog catalog) => 0;
|
||||
public IAnimationLoader CreateAnimationLoader(IDatReaderWriter dats) => _animations;
|
||||
public IAnimationLoader CreateAnimationLoader(
|
||||
IDatReaderWriter dats,
|
||||
long maximumEstimatedBytes,
|
||||
int maximumEntries)
|
||||
{
|
||||
Assert.Equal(
|
||||
ResidencyBudgetOptions.Default.AnimationBytes,
|
||||
maximumEstimatedBytes);
|
||||
Assert.Equal(
|
||||
ResidencyBudgetOptions.Default.AnimationEntries,
|
||||
maximumEntries);
|
||||
return _animations;
|
||||
}
|
||||
|
||||
public LiveEntityCollisionBuilder CreateCollisionBuilder(
|
||||
PhysicsDataCache physicsData,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue