fix(streaming): prepare quiesced destination entities
Separate loaded spatial residency from the world presentation gate so destination live objects acquire mesh owners behind portal space while drawing and simulation stay quiesced. Prevent unowned CPU-cache hits from recreating stale GPU staging work. Co-authored-by: Erik Nilsson <erikn@users.noreply.github.com>
This commit is contained in:
parent
e991eeca34
commit
91e82c3c68
6 changed files with 142 additions and 23 deletions
|
|
@ -843,7 +843,7 @@ public sealed class LiveEntityRuntime
|
|||
runtimeNotificationFailure: null);
|
||||
return false;
|
||||
}
|
||||
bool visible = _spatial.IsLiveEntityVisible(serverGuid);
|
||||
bool visible = _spatial.IsLiveEntityProjectionResident(serverGuid);
|
||||
record.IsSpatiallyVisible = visible;
|
||||
if (record.ProjectionKind is LiveEntityProjectionKind.World)
|
||||
_materializedWorldEntitiesByGuid[serverGuid] = entity;
|
||||
|
|
@ -2584,7 +2584,7 @@ public sealed class LiveEntityRuntime
|
|||
// an older queued edge drains. Apply an edge only while it still
|
||||
// matches current spatial truth; otherwise it belongs to the displaced
|
||||
// projection and must not mutate the replacement generation.
|
||||
if (_spatial.IsLiveEntityVisible(serverGuid) != visible)
|
||||
if (_spatial.IsLiveEntityProjectionResident(serverGuid) != visible)
|
||||
return;
|
||||
if (!_recordsByGuid.TryGetValue(serverGuid, out LiveEntityRecord? record)
|
||||
|| record.WorldEntity is not { } entity)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue