perf(rendering): draw retained frame product
Make the incremental render scene the production entity source at the existing retail PView stages while retaining the accepted dispatcher upload and draw executor. Keep diagnostics consumer-gated, retain ordered indices across unchanged frames, refresh only dirty records, and preserve exact mesh-load, selection, alpha, lighting, and route lifecycle semantics.
This commit is contained in:
parent
c7d7848dd2
commit
ef1d263337
13 changed files with 1333 additions and 267 deletions
|
|
@ -575,6 +575,62 @@ public sealed class ArchRenderSceneTests
|
|||
Assert.True(scene.Memory.EstimatedIndexBytes > 0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IndexRevision_AdvancesOnlyWhenOrderedMembershipCanChange()
|
||||
{
|
||||
RenderSceneGeneration generation = Generation(18);
|
||||
using var scene = new ArchRenderScene(generation);
|
||||
RenderProjectionRecord original = Record(
|
||||
18,
|
||||
1,
|
||||
RenderProjectionClass.OutdoorStatic);
|
||||
scene.Apply(
|
||||
[RenderProjectionDelta.Register(generation, 1, original)]);
|
||||
scene.ClearDirty();
|
||||
ulong registeredRevision = scene.OpenQuery().IndexRevision;
|
||||
|
||||
Matrix4x4 movedTransform =
|
||||
Matrix4x4.CreateTranslation(4, 5, 6);
|
||||
RenderProjectionRecord moved = original with
|
||||
{
|
||||
Transform = new RenderTransform(movedTransform),
|
||||
PreviousTransform =
|
||||
new PreviousRenderTransform(
|
||||
original.Transform.LocalToWorld),
|
||||
Bounds = new RenderWorldBounds(
|
||||
new Vector3(3, 4, 5),
|
||||
new Vector3(5, 6, 7)),
|
||||
};
|
||||
scene.Apply(
|
||||
[
|
||||
RenderProjectionDelta.Update(
|
||||
RenderProjectionDeltaKind.UpdateTransform,
|
||||
generation,
|
||||
2,
|
||||
moved),
|
||||
]);
|
||||
|
||||
RenderSceneQuery movedQuery = scene.OpenQuery();
|
||||
Assert.Equal(registeredRevision, movedQuery.IndexRevision);
|
||||
Assert.Equal(1, movedQuery.IndexCounts.Dirty);
|
||||
|
||||
RenderProjectionRecord reordered = moved with
|
||||
{
|
||||
SortKey = new RenderSortKey(moved.SortKey.Value + 1),
|
||||
};
|
||||
scene.Apply(
|
||||
[
|
||||
RenderProjectionDelta.Update(
|
||||
RenderProjectionDeltaKind.UpdateTransform,
|
||||
generation,
|
||||
3,
|
||||
reordered),
|
||||
]);
|
||||
|
||||
Assert.True(
|
||||
scene.OpenQuery().IndexRevision > registeredRevision);
|
||||
}
|
||||
|
||||
private static RenderProjectionRecord Record(
|
||||
ulong id,
|
||||
ulong incarnation,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue