C Specification
The xrDiscoverSpacesMETA function is defined as:
// Provided by XR_META_spatial_entity_discovery
XrResult xrDiscoverSpacesMETA(
XrSession session,
const XrSpaceDiscoveryInfoMETA* info,
XrAsyncRequestIdFB* requestId);
Parameters
Description
The xrDiscoverSpacesMETA function discovers spaces that were persisted
previously, and which comply with the filters passed in the
XrSpaceDiscoveryInfoMETA info structure.
This operation is asynchronous.
If xrDiscoverSpacesMETA returns a XR_FAILED result, no discovery operation takes place and no events will be queued for this operation.
If the asynchronous operation is scheduled successfully, the runtime must
return XR_SUCCESS and the asynchronous discovery operation will queue
at least 1 event.
If Spatial Entities have been discovered and are ready for retrieval, the runtime must queue an XrEventDataSpaceDiscoveryResultsAvailableMETA event. The runtime may queue 0, 1, or more XrEventDataSpaceDiscoveryResultsAvailableMETA events depending on the Spatial Entities found.
If and only if the runtime returns XR_SUCCESS, the runtime must queue
a single XrEventDataSpaceDiscoveryCompleteMETA event identified with a
XrEventDataSpaceDiscoveryCompleteMETA::requestId matching the
requestId value output by this function, referred to as the
"corresponding completion event." The
XrEventDataSpaceDiscoveryCompleteMETA event is queued after all
XrEventDataSpaceDiscoveryResultsAvailableMETA events for this
operation have been queued.
Completion results are conveyed in the event XrEventDataSpaceDiscoveryCompleteMETA, while availability of output for xrRetrieveSpaceDiscoveryResultsMETA is signaled by either this completion event or the event XrEventDataSpaceDiscoveryResultsAvailableMETA.
If the asynchronous operation is successful, in the corresponding completion
event, the runtime must set the
XrEventDataSpaceDiscoveryCompleteMETA::result field to
XR_SUCCESS.
If the asynchronous operation is scheduled but not successful, in the
corresponding completion event, the runtime must set the
XrEventDataSpaceDiscoveryCompleteMETA::result field to an
appropriate error code instead of XR_SUCCESS.
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.