C Specification
The XrSpatialDiscoveryPersistenceUuidFilterEXT structure is defined as:
// Provided by XR_EXT_spatial_persistence
typedef struct XrSpatialDiscoveryPersistenceUuidFilterEXT {
XrStructureType type;
const void* next;
uint32_t persistedUuidCount;
const XrUuid* persistedUuids;
} XrSpatialDiscoveryPersistenceUuidFilterEXT;
Members
Description
The application can use XrSpatialDiscoveryPersistenceUuidFilterEXT in
the next chain of XrSpatialDiscoverySnapshotCreateInfoEXT to scope the
discovery operation to just the entities whose persisted UUIDs are in the
set of the UUIDs provided in persistedUuids.
If the application adds XrSpatialDiscoveryPersistenceUuidFilterEXT in
the next chain of XrSpatialDiscoverySnapshotCreateInfoEXT but the
xrCreateSpatialDiscoverySnapshotAsyncEXT::spatialContext was not
configured with any XrSpatialPersistenceContextEXT using
XrSpatialContextPersistenceConfigEXT, the runtime must return
XR_ERROR_VALIDATION_FAILURE from
xrCreateSpatialDiscoverySnapshotAsyncEXT.
The runtime must treat the XrSpatialDiscoveryPersistenceUuidFilterEXT
filter as an 'AND' condition with any other filters provided in
XrSpatialDiscoverySnapshotCreateInfoEXT or its next chain.
The runtime must treat the persistedUuids array itself as an 'OR'
condition i.e. filter for entities that have any of the UUIDs provided in
that array.
The runtime must include one entry in the created snapshot for each of the
UUIDs in persistedUuids for which it was able to determine the
XrSpatialPersistenceStateEXT state at this time.
-
If the runtime has successfully found the UUID in its storage, then -
-
The runtime must set the XrSpatialPersistenceStateEXT in the XrSpatialPersistenceDataEXT of this entity to
XR_SPATIAL_PERSISTENCE_STATE_LOADED_EXT. -
The runtime must include a valid XrSpatialEntityIdEXT for this entity in the created snapshot.
-
The runtime must set the XrSpatialEntityTrackingStateEXT of that entity to
XR_SPATIAL_ENTITY_TRACKING_STATE_TRACKING_EXTif it is actively tracking the entity and has valid data for its components. Otherwise, the runtime must set the XrSpatialEntityTrackingStateEXT toXR_SPATIAL_ENTITY_TRACKING_STATE_PAUSED_EXT.
-
-
If the runtime has determined that the UUID is not present in its storage (regardless of whether that UUID was never in the storage or has was present once but has since been unpersisted), then -
-
The runtime must set the XrSpatialPersistenceStateEXT in the XrSpatialPersistenceDataEXT of this entity to
XR_SPATIAL_PERSISTENCE_STATE_NOT_FOUND_EXTto indicate to the application that this UUID is no longer present in the storage. -
The runtime must set the XrSpatialEntityIdEXT for this entity in the created snapshot to XR_NULL_SPATIAL_ENTITY_ID_EXT.
-
The runtime must set the XrSpatialEntityTrackingStateEXT of that entity to
XR_SPATIAL_ENTITY_TRACKING_STATE_STOPPED_EXTto indicate to the application that this entity will never be tracked.
-
-
If the runtime was not able to determine if the UUID is present in its storage or not, it must not include it in the snapshot.
The application can also use
XrSpatialDiscoveryPersistenceUuidFilterEXT in the next chain of
XrSpatialComponentDataQueryConditionEXT to query for entities of
specific UUIDs in existing snapshots.
When used with XrSpatialComponentDataQueryConditionEXT, if
XrSpatialDiscoveryPersistenceUuidFilterEXT::persistedUuids
contains any XrUuid that is not in the XrSpatialSnapshotEXT, the
runtime must not include an entry for that XrUuid in the query
result.
Also, the order (sequence) of entities in the query result may not match
the order of UUIDs provided in
XrSpatialDiscoveryPersistenceUuidFilterEXT::persistedUuids.
Application should include XR_SPATIAL_COMPONENT_TYPE_PERSISTENCE_EXT
in XrSpatialComponentDataQueryConditionEXT::componentTypes and
XrSpatialComponentPersistenceListEXT in the next chain of
XrSpatialComponentDataQueryResultEXT and then check the
XrSpatialPersistenceDataEXT::persistUuid of the each query
result index to understand which UUID the current result index corresponds
to.
See Also
Document Notes
For more information, see the OpenXR Specification
This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.
Copyright
Copyright 2014-2025 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.