feat(diagnostics): complete residency pressure ledger
Complete Slice D4 by adding aggregate lifecycle occupancy and traffic facts, validating physical source reports, and including decoded audio under the typed startup budget. Exercise every domain under forced pressure and retain the real cache/fence convergence gates.
This commit is contained in:
parent
f2644d42c2
commit
1853a57c12
15 changed files with 297 additions and 15 deletions
|
|
@ -5,6 +5,7 @@ using AcDream.App.Rendering.Residency;
|
|||
using AcDream.App.World;
|
||||
using AcDream.Content;
|
||||
using AcDream.Content.Vfx;
|
||||
using AcDream.Core.Audio;
|
||||
using AcDream.Core.Physics;
|
||||
using AcDream.Core.Terrain;
|
||||
using AcDream.UI.Abstractions.Settings;
|
||||
|
|
@ -119,7 +120,8 @@ internal interface IWorldRenderCompositionFactory
|
|||
WbMeshAdapter meshes,
|
||||
TextureCache textures,
|
||||
IPreparedAssetSource preparedAssets,
|
||||
IAnimationLoader animations);
|
||||
IAnimationLoader animations,
|
||||
DatSoundCache? audio);
|
||||
SamplerCache CreateSamplerCache(GL gl);
|
||||
void Release(IDisposable resource);
|
||||
}
|
||||
|
|
@ -299,7 +301,8 @@ internal sealed class RetailWorldRenderCompositionFactory
|
|||
WbMeshAdapter meshes,
|
||||
TextureCache textures,
|
||||
IPreparedAssetSource preparedAssets,
|
||||
IAnimationLoader animations)
|
||||
IAnimationLoader animations,
|
||||
DatSoundCache? audio)
|
||||
{
|
||||
meshes.RegisterResidencySources(manager);
|
||||
textures.RegisterResidencySources(manager);
|
||||
|
|
@ -328,9 +331,30 @@ internal sealed class RetailWorldRenderCompositionFactory
|
|||
DecodedBytes:
|
||||
diagnostics.EstimatedBytes),
|
||||
BudgetBytes: diagnostics.BudgetBytes,
|
||||
Hits: diagnostics.Stats.Hits,
|
||||
Misses: diagnostics.Stats.Misses,
|
||||
Evictions: diagnostics.Stats.Evictions);
|
||||
}));
|
||||
}
|
||||
if (audio is not null)
|
||||
{
|
||||
manager.RegisterDomainSource(new DelegateResidencyDomainSource(
|
||||
ResidencyDomain.Audio,
|
||||
() =>
|
||||
{
|
||||
DatSoundCacheDiagnostics diagnostics = audio.Diagnostics;
|
||||
return new ResidencyDomainSnapshot(
|
||||
ResidencyDomain.Audio,
|
||||
EntryCount: diagnostics.CachedWaveCount,
|
||||
OwnerCount: 0,
|
||||
Charges: new ResidencyCharges(
|
||||
DecodedBytes: diagnostics.ResidentWaveBytes),
|
||||
BudgetBytes: diagnostics.BudgetBytes,
|
||||
Hits: diagnostics.Hits,
|
||||
Misses: diagnostics.Misses,
|
||||
Evictions: diagnostics.Evictions);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
public SamplerCache CreateSamplerCache(GL gl) => new(gl);
|
||||
|
|
@ -517,7 +541,8 @@ internal sealed class WorldRenderCompositionPhase
|
|||
meshAdapter,
|
||||
textureCache,
|
||||
content.PreparedAssets,
|
||||
content.AnimationLoader);
|
||||
content.AnimationLoader,
|
||||
content.Audio?.SoundCache);
|
||||
|
||||
scope.Complete();
|
||||
_dependencies.Log(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue