C Specification
The xrSaveSpacesMETA function is defined as:
// Provided by XR_META_spatial_entity_persistence
XrResult xrSaveSpacesMETA(
XrSession session,
const XrSpacesSaveInfoMETA* info,
XrAsyncRequestIdFB* requestId);
Parameters
Description
The xrSaveSpacesMETA function persists the space(s) provided. The scope of the save operation is same-user, same-device, same-app. This is an asynchronous operation. Completion results are conveyed in the event XrEventDataSpacesSaveResultMETA.
The runtime must return XR_ERROR_HANDLE_INVALID from
xrSaveSpacesMETA if any of the
XrSpacesSaveInfoMETA::spaces are XR_NULL_HANDLE or
otherwise invalid (e.g. not a Meta Spatial Entity XrSpace).
Note that saving an entity which has already been saved previously is valid
and a no-op.
The runtime must return XR_ERROR_VALIDATION_FAILURE from
xrSaveSpacesMETA if either one of the following is true:
-
The XrSpacesSaveInfoMETA::
spacesisNULL. -
The XrSpacesSaveInfoMETA::
spaceCountis 0.
The length of the array XrSpacesSaveInfoMETA::spaces must have
a size of at least XrSpacesSaveInfoMETA::spaceCount.
When initiated unsuccessfully (i.e. the immediate return value of the xrSaveSpacesMETA call is an error), the save operation terminates without saving any entities, and no save result event is queued.
When initiated successfully (i.e. the immediate return value of the xrSaveSpacesMETA call is not an error), the full save operation is asynchronous. The runtime must queue an XrEventDataSpacesSaveResultMETA event when the save operation completes, either successfully, qualified success (warning), or with an error. See the XrEventDataSpacesSaveResultMETA for which XrResult enumerants may be returned in the event.
Note that if the XrEventDataSpacesSaveResultMETA::result is an
error, it is possible that any subset of the Spatial Entity Spaces were
saved.
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.