C Specification

The xrShareSpacesMETA function is defined as:

// Provided by XR_META_spatial_entity_sharing
XrResult xrShareSpacesMETA(
    XrSession                                   session,
    const XrShareSpacesInfoMETA*                info,
    XrAsyncRequestIdFB*                         requestId);

Parameters

Parameter Descriptions

Description

The application may use the xrShareSpacesMETA function to share spaces (XrSpace) if the XR_SPACE_COMPONENT_TYPE_SHARABLE_FB component has been enabled on the space.

This is an asynchronous operation. Completion results are conveyed in the event XrEventDataShareSpacesCompleteMETA.

If the asynchronous operation is scheduled successfully, the runtime must return XR_SUCCESS.

If and only if the runtime returns XR_SUCCESS, the runtime must queue a single XrEventDataShareSpacesCompleteMETA event identified with a requestId field matching the value output by this function, referred to as the "corresponding completion event."

(If the runtime returns anything other than XR_SUCCESS, the runtime must not queue any XrEventDataShareSpacesCompleteMETA events with requestId field matching the requestId populated by this function.)

If the asynchronous operation is successful, the runtime must set the XrEventDataShareSpacesCompleteMETA::result field to XR_SUCCESS in the corresponding completion event.

If the asynchronous operation is scheduled but not successful, in the corresponding completion event, the runtime must set the XrEventDataShareSpacesCompleteMETA::result field to an appropriate error code instead of XR_SUCCESS.

Valid Usage (Implicit)
Return Codes
On success, this command returns
  • XR_SUCCESS

  • XR_SESSION_LOSS_PENDING

On failure, this command returns
  • XR_ERROR_FUNCTION_UNSUPPORTED

  • XR_ERROR_VALIDATION_FAILURE

  • XR_ERROR_RUNTIME_FAILURE

  • XR_ERROR_HANDLE_INVALID

  • XR_ERROR_INSTANCE_LOST

  • XR_ERROR_SESSION_LOST

  • XR_ERROR_FEATURE_UNSUPPORTED

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 2014-2025 The Khronos Group Inc.