feat(render): unify physical residency accounting
This commit is contained in:
parent
1866ea0c6d
commit
3e18fc2730
25 changed files with 642 additions and 48 deletions
|
|
@ -119,6 +119,12 @@ public interface IPreparedAssetSource : IDisposable
|
|||
PreparedAssetSourceStats Stats { get; }
|
||||
|
||||
CacheStats DecodedTextureCacheStats { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Immutable package address-space mapped by this source. This is virtual
|
||||
/// address space, not committed managed or process-working-set bytes.
|
||||
/// </summary>
|
||||
long MappedVirtualBytes => 0;
|
||||
}
|
||||
|
||||
internal static class PreparedAssetRequestContract
|
||||
|
|
@ -211,6 +217,8 @@ public sealed class PakPreparedAssetSource : IPreparedAssetSource
|
|||
|
||||
public CacheStats DecodedTextureCacheStats => default;
|
||||
|
||||
public long MappedVirtualBytes => _reader.FileLength;
|
||||
|
||||
public PreparedAssetPresence Probe(
|
||||
PakAssetType type,
|
||||
uint sourceFileId)
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ public sealed class PakReader : IDisposable {
|
|||
private readonly ConcurrentDictionary<int, bool> _loggedCorruption = new();
|
||||
|
||||
public PakHeader Header { get; }
|
||||
public long FileLength => _fileLength;
|
||||
|
||||
public PakReader(string path) {
|
||||
_fileLength = new FileInfo(path).Length;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue