C Specification

The xrCreateEnvironmentDepthProviderMETA function is defined as:

// Provided by XR_META_environment_depth
XrResult xrCreateEnvironmentDepthProviderMETA(
    XrSession                                   session,
    const XrEnvironmentDepthProviderCreateInfoMETA* createInfo,
    XrEnvironmentDepthProviderMETA*             environmentDepthProvider);

Parameters

Parameter Descriptions

Description

The xrCreateEnvironmentDepthProviderMETA function creates a depth provider instance.

Creating the depth provider may allocate resources, but should not incur any per-frame compute costs until the provider has been started.

  • Runtimes must create the provider in a stopped state.

  • Runtimes may limit the number of depth providers per XrInstance. If xrCreateEnvironmentDepthProviderMETA fails due to reaching this limit, the runtime must return XR_ERROR_LIMIT_REACHED.

  • Runtimes must support at least 1 provider per XrInstance.

  • Runtimes may return XR_ERROR_NOT_PERMITTED_PASSTHROUGH_FB if the app permissions have not been granted to the calling app.

  • Applications can call xrStartEnvironmentDepthProviderMETA to start the generation of depth maps.

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_OUT_OF_MEMORY

  • XR_ERROR_LIMIT_REACHED

  • XR_ERROR_NOT_PERMITTED_PASSTHROUGH_FB

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.