feat(render): unify physical residency accounting
This commit is contained in:
parent
1866ea0c6d
commit
3e18fc2730
25 changed files with 642 additions and 48 deletions
|
|
@ -137,6 +137,19 @@ public sealed class GlobalMeshBuffer : IDisposable
|
|||
|| _retiredCapacityBytes != 0;
|
||||
internal int VertexHighWaterMark => _vertices.HighWaterMark;
|
||||
internal int IndexHighWaterMark => _indices.HighWaterMark;
|
||||
internal long UsedBytes => checked(
|
||||
(long)_vertices.Used * VertexPositionNormalTexture.Size
|
||||
+ (long)_indices.Used * sizeof(ushort));
|
||||
internal long LargestFreeBytes => checked(
|
||||
(long)_vertices.LargestFreeRange * VertexPositionNormalTexture.Size
|
||||
+ (long)_indices.LargestFreeRange * sizeof(ushort));
|
||||
internal long PendingRangeRetirementBytes => checked(
|
||||
(long)_vertices.PendingReleaseLength * VertexPositionNormalTexture.Size
|
||||
+ (long)_indices.PendingReleaseLength * sizeof(ushort));
|
||||
internal long RequestedMigrationBytes => _migration?.NewCapacityBytes ?? 0;
|
||||
internal long RetiredBackingBytes => _retiredCapacityBytes;
|
||||
internal long ResidentCapacityBytes => checked(
|
||||
CapacityBytes - PendingRangeRetirementBytes);
|
||||
|
||||
internal GlobalMeshUploadPlan PlanUpload(int vertexCount, int indexCount)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue