perf(streaming): cursor publication across frame budgets
This commit is contained in:
parent
bb16f74fd4
commit
98f1ac8934
32 changed files with 2215 additions and 823 deletions
|
|
@ -330,6 +330,65 @@ public class ShadowObjectRegistryTests
|
|||
entry => entry.EntityId == entityId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void StreamingReceipts_AreStableOrderedAndAdvanceOneStaticOwner()
|
||||
{
|
||||
var reg = new ShadowObjectRegistry();
|
||||
reg.Register(
|
||||
9u,
|
||||
0x01000009u,
|
||||
new Vector3(12f, 12f, 50f),
|
||||
Quaternion.Identity,
|
||||
1f,
|
||||
OffX,
|
||||
OffY,
|
||||
LbId,
|
||||
seedCellId: LbId | 1u,
|
||||
isStatic: true);
|
||||
reg.Register(
|
||||
2u,
|
||||
0x01000002u,
|
||||
new Vector3(14f, 12f, 50f),
|
||||
Quaternion.Identity,
|
||||
1f,
|
||||
OffX,
|
||||
OffY,
|
||||
LbId,
|
||||
seedCellId: LbId | 1u,
|
||||
isStatic: true);
|
||||
reg.Register(
|
||||
5u,
|
||||
0x01000005u,
|
||||
new Vector3(16f, 12f, 50f),
|
||||
Quaternion.Identity,
|
||||
1f,
|
||||
OffX,
|
||||
OffY,
|
||||
LbId,
|
||||
seedCellId: LbId | 1u,
|
||||
isStatic: false);
|
||||
|
||||
Assert.Equal(
|
||||
[2u, 9u],
|
||||
reg.CaptureStaticOwnersForLandblock(LbId));
|
||||
Assert.Equal(
|
||||
[2u, 5u, 9u],
|
||||
reg.CaptureRefloodOwnersForLandblock(LbId));
|
||||
|
||||
reg.DeregisterStaticOwnerForLandblock(2u, LbId);
|
||||
|
||||
Assert.Equal(2, reg.RetainedRegistrationCount);
|
||||
Assert.DoesNotContain(
|
||||
reg.GetObjectsInCell(LbId | 1u),
|
||||
entry => entry.EntityId == 2u);
|
||||
Assert.Contains(
|
||||
reg.GetObjectsInCell(LbId | 1u),
|
||||
entry => entry.EntityId == 5u);
|
||||
Assert.Contains(
|
||||
reg.GetObjectsInCell(LbId | 1u),
|
||||
entry => entry.EntityId == 9u);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RefloodLandblock_RestoresAdjacentOwnedFootprintWithdrawnByUnload()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -372,7 +372,8 @@ public class StreamingControllerTests
|
|||
System.Array.Empty<uint>());
|
||||
fake.Pending.Enqueue(new LandblockStreamResult.Loaded(landblockId, LandblockStreamTier.Near, lb, stubMesh));
|
||||
|
||||
controller.Tick(50, 50);
|
||||
for (int frame = 0; frame < 32 && !state.IsLoaded(landblockId); frame++)
|
||||
controller.Tick(50, 50);
|
||||
|
||||
Assert.Single(applied);
|
||||
Assert.True(state.IsLoaded(landblockId));
|
||||
|
|
|
|||
|
|
@ -136,7 +136,15 @@ public class StreamingControllerTwoTierTests
|
|||
},
|
||||
state: state,
|
||||
nearRadius: 2,
|
||||
farRadius: 2);
|
||||
farRadius: 2,
|
||||
workBudgetOptions: new StreamingWorkBudgetOptions(
|
||||
MaxUpdateMilliseconds: 100,
|
||||
MaxCompletionAdmissions: 64,
|
||||
MaxAdoptedCpuBytes: 16 * StreamingWorkBudgetOptions.MiB,
|
||||
MaxEntityOperations: 512,
|
||||
MaxGpuUploadBytes: 16 * StreamingWorkBudgetOptions.MiB,
|
||||
MaxGlRetireOperations: 128,
|
||||
DestinationReserveFraction: 0.75f));
|
||||
|
||||
ctrl.Tick(50, 50); // drains the Promoted result
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue