Merge pull request #86980 from BastiaanOlij/openxr_1_0_33
Updated thirdparty OpenXR library to 1.0.33
This commit is contained in:
commit
27509a6027
|
@ -727,7 +727,7 @@ with the provided patch.
|
|||
## openxr
|
||||
|
||||
- Upstream: https://github.com/KhronosGroup/OpenXR-SDK
|
||||
- Version: 1.0.31 (95fe35ffb383710a6e0567e958ead9a3b66e930c, 2023)
|
||||
- Version: 1.0.33 (dc1e23937fe45eabcce80f6588cf47449edb29d1, 2024)
|
||||
- License: Apache 2.0
|
||||
|
||||
Files extracted from upstream source:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
= COPYING.adoc for the Khronos Group OpenXR projects
|
||||
|
||||
// Copyright (c) 2020-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2020-2024, The Khronos Group Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: CC-BY-4.0
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define OPENXR_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2017-2023 The Khronos Group Inc.
|
||||
** Copyright 2017-2024, The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
@ -25,7 +25,7 @@ extern "C" {
|
|||
((((major) & 0xffffULL) << 48) | (((minor) & 0xffffULL) << 32) | ((patch) & 0xffffffffULL))
|
||||
|
||||
// OpenXR current version number.
|
||||
#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 0, 31)
|
||||
#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 0, 33)
|
||||
|
||||
#define XR_VERSION_MAJOR(version) (uint16_t)(((uint64_t)(version) >> 48)& 0xffffULL)
|
||||
#define XR_VERSION_MINOR(version) (uint16_t)(((uint64_t)(version) >> 32) & 0xffffULL)
|
||||
|
@ -218,6 +218,18 @@ typedef enum XrResult {
|
|||
XR_RENDER_MODEL_UNAVAILABLE_FB = 1000119020,
|
||||
XR_ERROR_MARKER_NOT_TRACKED_VARJO = -1000124000,
|
||||
XR_ERROR_MARKER_ID_INVALID_VARJO = -1000124001,
|
||||
XR_ERROR_MARKER_DETECTOR_PERMISSION_DENIED_ML = -1000138000,
|
||||
XR_ERROR_MARKER_DETECTOR_LOCATE_FAILED_ML = -1000138001,
|
||||
XR_ERROR_MARKER_DETECTOR_INVALID_DATA_QUERY_ML = -1000138002,
|
||||
XR_ERROR_MARKER_DETECTOR_INVALID_CREATE_INFO_ML = -1000138003,
|
||||
XR_ERROR_MARKER_INVALID_ML = -1000138004,
|
||||
XR_ERROR_LOCALIZATION_MAP_INCOMPATIBLE_ML = -1000139000,
|
||||
XR_ERROR_LOCALIZATION_MAP_UNAVAILABLE_ML = -1000139001,
|
||||
XR_ERROR_LOCALIZATION_MAP_FAIL_ML = -1000139002,
|
||||
XR_ERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_ML = -1000139003,
|
||||
XR_ERROR_LOCALIZATION_MAP_PERMISSION_DENIED_ML = -1000139004,
|
||||
XR_ERROR_LOCALIZATION_MAP_ALREADY_EXISTS_ML = -1000139005,
|
||||
XR_ERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML = -1000139006,
|
||||
XR_ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT = -1000142001,
|
||||
XR_ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT = -1000142002,
|
||||
XR_SCENE_MARKER_DATA_NOT_STRING_MSFT = 1000147000,
|
||||
|
@ -228,6 +240,7 @@ typedef enum XrResult {
|
|||
XR_ERROR_SPACE_CLOUD_STORAGE_DISABLED_FB = -1000169004,
|
||||
XR_ERROR_PASSTHROUGH_COLOR_LUT_BUFFER_SIZE_MISMATCH_META = -1000266000,
|
||||
XR_ERROR_HINT_ALREADY_SET_QCOM = -1000306000,
|
||||
XR_ERROR_NOT_AN_ANCHOR_HTC = -1000319000,
|
||||
XR_ERROR_SPACE_NOT_LOCATABLE_EXT = -1000429000,
|
||||
XR_ERROR_PLANE_DETECTION_PERMISSION_DENIED_EXT = -1000429001,
|
||||
XR_RESULT_MAX_ENUM = 0x7FFFFFFF
|
||||
|
@ -445,6 +458,20 @@ typedef enum XrStructureType {
|
|||
XR_TYPE_FRAME_END_INFO_ML = 1000135000,
|
||||
XR_TYPE_GLOBAL_DIMMER_FRAME_END_INFO_ML = 1000136000,
|
||||
XR_TYPE_COORDINATE_SPACE_CREATE_INFO_ML = 1000137000,
|
||||
XR_TYPE_SYSTEM_MARKER_UNDERSTANDING_PROPERTIES_ML = 1000138000,
|
||||
XR_TYPE_MARKER_DETECTOR_CREATE_INFO_ML = 1000138001,
|
||||
XR_TYPE_MARKER_DETECTOR_ARUCO_INFO_ML = 1000138002,
|
||||
XR_TYPE_MARKER_DETECTOR_SIZE_INFO_ML = 1000138003,
|
||||
XR_TYPE_MARKER_DETECTOR_APRIL_TAG_INFO_ML = 1000138004,
|
||||
XR_TYPE_MARKER_DETECTOR_CUSTOM_PROFILE_INFO_ML = 1000138005,
|
||||
XR_TYPE_MARKER_DETECTOR_SNAPSHOT_INFO_ML = 1000138006,
|
||||
XR_TYPE_MARKER_DETECTOR_STATE_ML = 1000138007,
|
||||
XR_TYPE_MARKER_SPACE_CREATE_INFO_ML = 1000138008,
|
||||
XR_TYPE_LOCALIZATION_MAP_ML = 1000139000,
|
||||
XR_TYPE_EVENT_DATA_LOCALIZATION_CHANGED_ML = 1000139001,
|
||||
XR_TYPE_MAP_LOCALIZATION_REQUEST_INFO_ML = 1000139002,
|
||||
XR_TYPE_LOCALIZATION_MAP_IMPORT_INFO_ML = 1000139003,
|
||||
XR_TYPE_LOCALIZATION_ENABLE_EVENTS_INFO_ML = 1000139004,
|
||||
XR_TYPE_EVENT_DATA_HEADSET_FIT_CHANGED_ML = 1000472000,
|
||||
XR_TYPE_EVENT_DATA_EYE_CALIBRATION_CHANGED_ML = 1000472001,
|
||||
XR_TYPE_USER_CALIBRATION_ENABLE_EVENTS_INFO_ML = 1000472002,
|
||||
|
@ -534,6 +561,8 @@ typedef enum XrStructureType {
|
|||
XR_TYPE_FOVEATION_APPLY_INFO_HTC = 1000318000,
|
||||
XR_TYPE_FOVEATION_DYNAMIC_MODE_INFO_HTC = 1000318001,
|
||||
XR_TYPE_FOVEATION_CUSTOM_MODE_INFO_HTC = 1000318002,
|
||||
XR_TYPE_SYSTEM_ANCHOR_PROPERTIES_HTC = 1000319000,
|
||||
XR_TYPE_SPATIAL_ANCHOR_CREATE_INFO_HTC = 1000319001,
|
||||
XR_TYPE_ACTIVE_ACTION_SET_PRIORITIES_EXT = 1000373000,
|
||||
XR_TYPE_SYSTEM_FORCE_FEEDBACK_CURL_PROPERTIES_MNDX = 1000375000,
|
||||
XR_TYPE_FORCE_FEEDBACK_CURL_APPLY_LOCATIONS_MNDX = 1000375001,
|
||||
|
@ -580,6 +609,7 @@ typedef enum XrReferenceSpaceType {
|
|||
XR_REFERENCE_SPACE_TYPE_STAGE = 3,
|
||||
XR_REFERENCE_SPACE_TYPE_UNBOUNDED_MSFT = 1000038000,
|
||||
XR_REFERENCE_SPACE_TYPE_COMBINED_EYE_VARJO = 1000121000,
|
||||
XR_REFERENCE_SPACE_TYPE_LOCALIZATION_MAP_ML = 1000139000,
|
||||
XR_REFERENCE_SPACE_TYPE_LOCAL_FLOOR_EXT = 1000426000,
|
||||
XR_REFERENCE_SPACE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||
} XrReferenceSpaceType;
|
||||
|
@ -634,6 +664,8 @@ typedef enum XrObjectType {
|
|||
XR_OBJECT_TYPE_PASSTHROUGH_FB = 1000118000,
|
||||
XR_OBJECT_TYPE_PASSTHROUGH_LAYER_FB = 1000118002,
|
||||
XR_OBJECT_TYPE_GEOMETRY_INSTANCE_FB = 1000118004,
|
||||
XR_OBJECT_TYPE_MARKER_DETECTOR_ML = 1000138000,
|
||||
XR_OBJECT_TYPE_EXPORTED_LOCALIZATION_MAP_ML = 1000139000,
|
||||
XR_OBJECT_TYPE_SPATIAL_ANCHOR_STORE_CONNECTION_MSFT = 1000142000,
|
||||
XR_OBJECT_TYPE_FACE_TRACKER_FB = 1000201000,
|
||||
XR_OBJECT_TYPE_EYE_TRACKER_FB = 1000202000,
|
||||
|
@ -1677,7 +1709,7 @@ typedef struct XrCompositionLayerColorScaleBiasKHR {
|
|||
|
||||
|
||||
#define XR_KHR_loader_init 1
|
||||
#define XR_KHR_loader_init_SPEC_VERSION 1
|
||||
#define XR_KHR_loader_init_SPEC_VERSION 2
|
||||
#define XR_KHR_LOADER_INIT_EXTENSION_NAME "XR_KHR_loader_init"
|
||||
typedef struct XR_MAY_ALIAS XrLoaderInitInfoBaseHeaderKHR {
|
||||
XrStructureType type;
|
||||
|
@ -4342,6 +4374,360 @@ typedef struct XrGlobalDimmerFrameEndInfoML {
|
|||
|
||||
|
||||
|
||||
#define XR_ML_marker_understanding 1
|
||||
XR_DEFINE_ATOM(XrMarkerML)
|
||||
XR_DEFINE_HANDLE(XrMarkerDetectorML)
|
||||
#define XR_ML_marker_understanding_SPEC_VERSION 1
|
||||
#define XR_ML_MARKER_UNDERSTANDING_EXTENSION_NAME "XR_ML_marker_understanding"
|
||||
|
||||
typedef enum XrMarkerDetectorProfileML {
|
||||
XR_MARKER_DETECTOR_PROFILE_DEFAULT_ML = 0,
|
||||
XR_MARKER_DETECTOR_PROFILE_SPEED_ML = 1,
|
||||
XR_MARKER_DETECTOR_PROFILE_ACCURACY_ML = 2,
|
||||
XR_MARKER_DETECTOR_PROFILE_SMALL_TARGETS_ML = 3,
|
||||
XR_MARKER_DETECTOR_PROFILE_LARGE_FOV_ML = 4,
|
||||
XR_MARKER_DETECTOR_PROFILE_CUSTOM_ML = 5,
|
||||
XR_MARKER_DETECTOR_PROFILE_MAX_ENUM_ML = 0x7FFFFFFF
|
||||
} XrMarkerDetectorProfileML;
|
||||
|
||||
typedef enum XrMarkerTypeML {
|
||||
XR_MARKER_TYPE_ARUCO_ML = 0,
|
||||
XR_MARKER_TYPE_APRIL_TAG_ML = 1,
|
||||
XR_MARKER_TYPE_QR_ML = 2,
|
||||
XR_MARKER_TYPE_EAN_13_ML = 3,
|
||||
XR_MARKER_TYPE_UPC_A_ML = 4,
|
||||
XR_MARKER_TYPE_CODE_128_ML = 5,
|
||||
XR_MARKER_TYPE_MAX_ENUM_ML = 0x7FFFFFFF
|
||||
} XrMarkerTypeML;
|
||||
|
||||
typedef enum XrMarkerArucoDictML {
|
||||
XR_MARKER_ARUCO_DICT_4X4_50_ML = 0,
|
||||
XR_MARKER_ARUCO_DICT_4X4_100_ML = 1,
|
||||
XR_MARKER_ARUCO_DICT_4X4_250_ML = 2,
|
||||
XR_MARKER_ARUCO_DICT_4X4_1000_ML = 3,
|
||||
XR_MARKER_ARUCO_DICT_5X5_50_ML = 4,
|
||||
XR_MARKER_ARUCO_DICT_5X5_100_ML = 5,
|
||||
XR_MARKER_ARUCO_DICT_5X5_250_ML = 6,
|
||||
XR_MARKER_ARUCO_DICT_5X5_1000_ML = 7,
|
||||
XR_MARKER_ARUCO_DICT_6X6_50_ML = 8,
|
||||
XR_MARKER_ARUCO_DICT_6X6_100_ML = 9,
|
||||
XR_MARKER_ARUCO_DICT_6X6_250_ML = 10,
|
||||
XR_MARKER_ARUCO_DICT_6X6_1000_ML = 11,
|
||||
XR_MARKER_ARUCO_DICT_7X7_50_ML = 12,
|
||||
XR_MARKER_ARUCO_DICT_7X7_100_ML = 13,
|
||||
XR_MARKER_ARUCO_DICT_7X7_250_ML = 14,
|
||||
XR_MARKER_ARUCO_DICT_7X7_1000_ML = 15,
|
||||
XR_MARKER_ARUCO_DICT_MAX_ENUM_ML = 0x7FFFFFFF
|
||||
} XrMarkerArucoDictML;
|
||||
|
||||
typedef enum XrMarkerAprilTagDictML {
|
||||
XR_MARKER_APRIL_TAG_DICT_16H5_ML = 0,
|
||||
XR_MARKER_APRIL_TAG_DICT_25H9_ML = 1,
|
||||
XR_MARKER_APRIL_TAG_DICT_36H10_ML = 2,
|
||||
XR_MARKER_APRIL_TAG_DICT_36H11_ML = 3,
|
||||
XR_MARKER_APRIL_TAG_DICT_MAX_ENUM_ML = 0x7FFFFFFF
|
||||
} XrMarkerAprilTagDictML;
|
||||
|
||||
typedef enum XrMarkerDetectorFpsML {
|
||||
XR_MARKER_DETECTOR_FPS_LOW_ML = 0,
|
||||
XR_MARKER_DETECTOR_FPS_MEDIUM_ML = 1,
|
||||
XR_MARKER_DETECTOR_FPS_HIGH_ML = 2,
|
||||
XR_MARKER_DETECTOR_FPS_MAX_ML = 3,
|
||||
XR_MARKER_DETECTOR_FPS_MAX_ENUM_ML = 0x7FFFFFFF
|
||||
} XrMarkerDetectorFpsML;
|
||||
|
||||
typedef enum XrMarkerDetectorResolutionML {
|
||||
XR_MARKER_DETECTOR_RESOLUTION_LOW_ML = 0,
|
||||
XR_MARKER_DETECTOR_RESOLUTION_MEDIUM_ML = 1,
|
||||
XR_MARKER_DETECTOR_RESOLUTION_HIGH_ML = 2,
|
||||
XR_MARKER_DETECTOR_RESOLUTION_MAX_ENUM_ML = 0x7FFFFFFF
|
||||
} XrMarkerDetectorResolutionML;
|
||||
|
||||
typedef enum XrMarkerDetectorCameraML {
|
||||
XR_MARKER_DETECTOR_CAMERA_RGB_CAMERA_ML = 0,
|
||||
XR_MARKER_DETECTOR_CAMERA_WORLD_CAMERAS_ML = 1,
|
||||
XR_MARKER_DETECTOR_CAMERA_MAX_ENUM_ML = 0x7FFFFFFF
|
||||
} XrMarkerDetectorCameraML;
|
||||
|
||||
typedef enum XrMarkerDetectorCornerRefineMethodML {
|
||||
XR_MARKER_DETECTOR_CORNER_REFINE_METHOD_NONE_ML = 0,
|
||||
XR_MARKER_DETECTOR_CORNER_REFINE_METHOD_SUBPIX_ML = 1,
|
||||
XR_MARKER_DETECTOR_CORNER_REFINE_METHOD_CONTOUR_ML = 2,
|
||||
XR_MARKER_DETECTOR_CORNER_REFINE_METHOD_APRIL_TAG_ML = 3,
|
||||
XR_MARKER_DETECTOR_CORNER_REFINE_METHOD_MAX_ENUM_ML = 0x7FFFFFFF
|
||||
} XrMarkerDetectorCornerRefineMethodML;
|
||||
|
||||
typedef enum XrMarkerDetectorFullAnalysisIntervalML {
|
||||
XR_MARKER_DETECTOR_FULL_ANALYSIS_INTERVAL_MAX_ML = 0,
|
||||
XR_MARKER_DETECTOR_FULL_ANALYSIS_INTERVAL_FAST_ML = 1,
|
||||
XR_MARKER_DETECTOR_FULL_ANALYSIS_INTERVAL_MEDIUM_ML = 2,
|
||||
XR_MARKER_DETECTOR_FULL_ANALYSIS_INTERVAL_SLOW_ML = 3,
|
||||
XR_MARKER_DETECTOR_FULL_ANALYSIS_INTERVAL_MAX_ENUM_ML = 0x7FFFFFFF
|
||||
} XrMarkerDetectorFullAnalysisIntervalML;
|
||||
|
||||
typedef enum XrMarkerDetectorStatusML {
|
||||
XR_MARKER_DETECTOR_STATUS_PENDING_ML = 0,
|
||||
XR_MARKER_DETECTOR_STATUS_READY_ML = 1,
|
||||
XR_MARKER_DETECTOR_STATUS_ERROR_ML = 2,
|
||||
XR_MARKER_DETECTOR_STATUS_MAX_ENUM_ML = 0x7FFFFFFF
|
||||
} XrMarkerDetectorStatusML;
|
||||
// XrSystemMarkerUnderstandingPropertiesML extends XrSystemProperties
|
||||
typedef struct XrSystemMarkerUnderstandingPropertiesML {
|
||||
XrStructureType type;
|
||||
void* XR_MAY_ALIAS next;
|
||||
XrBool32 supportsMarkerUnderstanding;
|
||||
} XrSystemMarkerUnderstandingPropertiesML;
|
||||
|
||||
typedef struct XrMarkerDetectorCreateInfoML {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
XrMarkerDetectorProfileML profile;
|
||||
XrMarkerTypeML markerType;
|
||||
} XrMarkerDetectorCreateInfoML;
|
||||
|
||||
// XrMarkerDetectorArucoInfoML extends XrMarkerDetectorCreateInfoML
|
||||
typedef struct XrMarkerDetectorArucoInfoML {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
XrMarkerArucoDictML arucoDict;
|
||||
} XrMarkerDetectorArucoInfoML;
|
||||
|
||||
// XrMarkerDetectorSizeInfoML extends XrMarkerDetectorCreateInfoML
|
||||
typedef struct XrMarkerDetectorSizeInfoML {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
float markerLength;
|
||||
} XrMarkerDetectorSizeInfoML;
|
||||
|
||||
// XrMarkerDetectorAprilTagInfoML extends XrMarkerDetectorCreateInfoML
|
||||
typedef struct XrMarkerDetectorAprilTagInfoML {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
XrMarkerAprilTagDictML aprilTagDict;
|
||||
} XrMarkerDetectorAprilTagInfoML;
|
||||
|
||||
// XrMarkerDetectorCustomProfileInfoML extends XrMarkerDetectorCreateInfoML
|
||||
typedef struct XrMarkerDetectorCustomProfileInfoML {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
XrMarkerDetectorFpsML fpsHint;
|
||||
XrMarkerDetectorResolutionML resolutionHint;
|
||||
XrMarkerDetectorCameraML cameraHint;
|
||||
XrMarkerDetectorCornerRefineMethodML cornerRefineMethod;
|
||||
XrBool32 useEdgeRefinement;
|
||||
XrMarkerDetectorFullAnalysisIntervalML fullAnalysisIntervalHint;
|
||||
} XrMarkerDetectorCustomProfileInfoML;
|
||||
|
||||
typedef struct XrMarkerDetectorSnapshotInfoML {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
} XrMarkerDetectorSnapshotInfoML;
|
||||
|
||||
typedef struct XrMarkerDetectorStateML {
|
||||
XrStructureType type;
|
||||
void* XR_MAY_ALIAS next;
|
||||
XrMarkerDetectorStatusML state;
|
||||
} XrMarkerDetectorStateML;
|
||||
|
||||
typedef struct XrMarkerSpaceCreateInfoML {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
XrMarkerDetectorML markerDetector;
|
||||
XrMarkerML marker;
|
||||
XrPosef poseInMarkerSpace;
|
||||
} XrMarkerSpaceCreateInfoML;
|
||||
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrCreateMarkerDetectorML)(XrSession session, const XrMarkerDetectorCreateInfoML* createInfo, XrMarkerDetectorML* markerDetector);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrDestroyMarkerDetectorML)(XrMarkerDetectorML markerDetector);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrSnapshotMarkerDetectorML)(XrMarkerDetectorML markerDetector, XrMarkerDetectorSnapshotInfoML* snapshotInfo);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrGetMarkerDetectorStateML)(XrMarkerDetectorML markerDetector, XrMarkerDetectorStateML* state);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrGetMarkersML)(XrMarkerDetectorML markerDetector, uint32_t markerCapacityInput, uint32_t* markerCountOutput, XrMarkerML* markers);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrGetMarkerReprojectionErrorML)(XrMarkerDetectorML markerDetector, XrMarkerML marker, float* reprojectionErrorMeters);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrGetMarkerLengthML)(XrMarkerDetectorML markerDetector, XrMarkerML marker, float* meters);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrGetMarkerNumberML)(XrMarkerDetectorML markerDetector, XrMarkerML marker, uint64_t* number);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrGetMarkerStringML)(XrMarkerDetectorML markerDetector, XrMarkerML marker, uint32_t bufferCapacityInput, uint32_t* bufferCountOutput, char* buffer);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrCreateMarkerSpaceML)(XrSession session, const XrMarkerSpaceCreateInfoML* createInfo, XrSpace* space);
|
||||
|
||||
#ifndef XR_NO_PROTOTYPES
|
||||
#ifdef XR_EXTENSION_PROTOTYPES
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrCreateMarkerDetectorML(
|
||||
XrSession session,
|
||||
const XrMarkerDetectorCreateInfoML* createInfo,
|
||||
XrMarkerDetectorML* markerDetector);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrDestroyMarkerDetectorML(
|
||||
XrMarkerDetectorML markerDetector);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrSnapshotMarkerDetectorML(
|
||||
XrMarkerDetectorML markerDetector,
|
||||
XrMarkerDetectorSnapshotInfoML* snapshotInfo);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrGetMarkerDetectorStateML(
|
||||
XrMarkerDetectorML markerDetector,
|
||||
XrMarkerDetectorStateML* state);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrGetMarkersML(
|
||||
XrMarkerDetectorML markerDetector,
|
||||
uint32_t markerCapacityInput,
|
||||
uint32_t* markerCountOutput,
|
||||
XrMarkerML* markers);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrGetMarkerReprojectionErrorML(
|
||||
XrMarkerDetectorML markerDetector,
|
||||
XrMarkerML marker,
|
||||
float* reprojectionErrorMeters);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrGetMarkerLengthML(
|
||||
XrMarkerDetectorML markerDetector,
|
||||
XrMarkerML marker,
|
||||
float* meters);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrGetMarkerNumberML(
|
||||
XrMarkerDetectorML markerDetector,
|
||||
XrMarkerML marker,
|
||||
uint64_t* number);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrGetMarkerStringML(
|
||||
XrMarkerDetectorML markerDetector,
|
||||
XrMarkerML marker,
|
||||
uint32_t bufferCapacityInput,
|
||||
uint32_t* bufferCountOutput,
|
||||
char* buffer);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrCreateMarkerSpaceML(
|
||||
XrSession session,
|
||||
const XrMarkerSpaceCreateInfoML* createInfo,
|
||||
XrSpace* space);
|
||||
#endif /* XR_EXTENSION_PROTOTYPES */
|
||||
#endif /* !XR_NO_PROTOTYPES */
|
||||
|
||||
|
||||
#define XR_ML_localization_map 1
|
||||
XR_DEFINE_HANDLE(XrExportedLocalizationMapML)
|
||||
#define XR_MAX_LOCALIZATION_MAP_NAME_LENGTH_ML 64
|
||||
#define XR_ML_localization_map_SPEC_VERSION 1
|
||||
#define XR_ML_LOCALIZATION_MAP_EXTENSION_NAME "XR_ML_localization_map"
|
||||
|
||||
typedef enum XrLocalizationMapStateML {
|
||||
XR_LOCALIZATION_MAP_STATE_NOT_LOCALIZED_ML = 0,
|
||||
XR_LOCALIZATION_MAP_STATE_LOCALIZED_ML = 1,
|
||||
XR_LOCALIZATION_MAP_STATE_LOCALIZATION_PENDING_ML = 2,
|
||||
XR_LOCALIZATION_MAP_STATE_LOCALIZATION_SLEEPING_BEFORE_RETRY_ML = 3,
|
||||
XR_LOCALIZATION_MAP_STATE_MAX_ENUM_ML = 0x7FFFFFFF
|
||||
} XrLocalizationMapStateML;
|
||||
|
||||
typedef enum XrLocalizationMapTypeML {
|
||||
XR_LOCALIZATION_MAP_TYPE_ON_DEVICE_ML = 0,
|
||||
XR_LOCALIZATION_MAP_TYPE_CLOUD_ML = 1,
|
||||
XR_LOCALIZATION_MAP_TYPE_MAX_ENUM_ML = 0x7FFFFFFF
|
||||
} XrLocalizationMapTypeML;
|
||||
|
||||
typedef enum XrLocalizationMapConfidenceML {
|
||||
XR_LOCALIZATION_MAP_CONFIDENCE_POOR_ML = 0,
|
||||
XR_LOCALIZATION_MAP_CONFIDENCE_FAIR_ML = 1,
|
||||
XR_LOCALIZATION_MAP_CONFIDENCE_GOOD_ML = 2,
|
||||
XR_LOCALIZATION_MAP_CONFIDENCE_EXCELLENT_ML = 3,
|
||||
XR_LOCALIZATION_MAP_CONFIDENCE_MAX_ENUM_ML = 0x7FFFFFFF
|
||||
} XrLocalizationMapConfidenceML;
|
||||
typedef XrFlags64 XrLocalizationMapErrorFlagsML;
|
||||
|
||||
// Flag bits for XrLocalizationMapErrorFlagsML
|
||||
static const XrLocalizationMapErrorFlagsML XR_LOCALIZATION_MAP_ERROR_UNKNOWN_BIT_ML = 0x00000001;
|
||||
static const XrLocalizationMapErrorFlagsML XR_LOCALIZATION_MAP_ERROR_OUT_OF_MAPPED_AREA_BIT_ML = 0x00000002;
|
||||
static const XrLocalizationMapErrorFlagsML XR_LOCALIZATION_MAP_ERROR_LOW_FEATURE_COUNT_BIT_ML = 0x00000004;
|
||||
static const XrLocalizationMapErrorFlagsML XR_LOCALIZATION_MAP_ERROR_EXCESSIVE_MOTION_BIT_ML = 0x00000008;
|
||||
static const XrLocalizationMapErrorFlagsML XR_LOCALIZATION_MAP_ERROR_LOW_LIGHT_BIT_ML = 0x00000010;
|
||||
static const XrLocalizationMapErrorFlagsML XR_LOCALIZATION_MAP_ERROR_HEADPOSE_BIT_ML = 0x00000020;
|
||||
|
||||
typedef struct XrLocalizationMapML {
|
||||
XrStructureType type;
|
||||
void* XR_MAY_ALIAS next;
|
||||
char name[XR_MAX_LOCALIZATION_MAP_NAME_LENGTH_ML];
|
||||
XrUuidEXT mapUuid;
|
||||
XrLocalizationMapTypeML mapType;
|
||||
} XrLocalizationMapML;
|
||||
|
||||
typedef struct XrEventDataLocalizationChangedML {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
XrSession session;
|
||||
XrLocalizationMapStateML state;
|
||||
XrLocalizationMapML map;
|
||||
XrLocalizationMapConfidenceML confidence;
|
||||
XrLocalizationMapErrorFlagsML errorFlags;
|
||||
} XrEventDataLocalizationChangedML;
|
||||
|
||||
typedef struct XrLocalizationMapQueryInfoBaseHeaderML {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
} XrLocalizationMapQueryInfoBaseHeaderML;
|
||||
|
||||
typedef struct XrMapLocalizationRequestInfoML {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
XrUuidEXT mapUuid;
|
||||
} XrMapLocalizationRequestInfoML;
|
||||
|
||||
typedef struct XrLocalizationMapImportInfoML {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
uint32_t size;
|
||||
char* data;
|
||||
} XrLocalizationMapImportInfoML;
|
||||
|
||||
typedef struct XrLocalizationEnableEventsInfoML {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
XrBool32 enabled;
|
||||
} XrLocalizationEnableEventsInfoML;
|
||||
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrEnableLocalizationEventsML)(XrSession session, const XrLocalizationEnableEventsInfoML * info);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrQueryLocalizationMapsML)(XrSession session, const XrLocalizationMapQueryInfoBaseHeaderML* queryInfo, uint32_t mapCapacityInput, uint32_t * mapCountOutput, XrLocalizationMapML* maps);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrRequestMapLocalizationML)(XrSession session, const XrMapLocalizationRequestInfoML* requestInfo);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrImportLocalizationMapML)(XrSession session, const XrLocalizationMapImportInfoML* importInfo, XrUuidEXT* mapUuid);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrCreateExportedLocalizationMapML)(XrSession session, const XrUuidEXT* mapUuid, XrExportedLocalizationMapML* map);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrDestroyExportedLocalizationMapML)(XrExportedLocalizationMapML map);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrGetExportedLocalizationMapDataML)(XrExportedLocalizationMapML map, uint32_t bufferCapacityInput, uint32_t* bufferCountOutput, char* buffer);
|
||||
|
||||
#ifndef XR_NO_PROTOTYPES
|
||||
#ifdef XR_EXTENSION_PROTOTYPES
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrEnableLocalizationEventsML(
|
||||
XrSession session,
|
||||
const XrLocalizationEnableEventsInfoML * info);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrQueryLocalizationMapsML(
|
||||
XrSession session,
|
||||
const XrLocalizationMapQueryInfoBaseHeaderML* queryInfo,
|
||||
uint32_t mapCapacityInput,
|
||||
uint32_t * mapCountOutput,
|
||||
XrLocalizationMapML* maps);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrRequestMapLocalizationML(
|
||||
XrSession session,
|
||||
const XrMapLocalizationRequestInfoML* requestInfo);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrImportLocalizationMapML(
|
||||
XrSession session,
|
||||
const XrLocalizationMapImportInfoML* importInfo,
|
||||
XrUuidEXT* mapUuid);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrCreateExportedLocalizationMapML(
|
||||
XrSession session,
|
||||
const XrUuidEXT* mapUuid,
|
||||
XrExportedLocalizationMapML* map);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrDestroyExportedLocalizationMapML(
|
||||
XrExportedLocalizationMapML map);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrGetExportedLocalizationMapDataML(
|
||||
XrExportedLocalizationMapML map,
|
||||
uint32_t bufferCapacityInput,
|
||||
uint32_t* bufferCountOutput,
|
||||
char* buffer);
|
||||
#endif /* XR_EXTENSION_PROTOTYPES */
|
||||
#endif /* !XR_NO_PROTOTYPES */
|
||||
|
||||
|
||||
#define XR_MSFT_spatial_anchor_persistence 1
|
||||
XR_DEFINE_HANDLE(XrSpatialAnchorStoreConnectionMSFT)
|
||||
#define XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_MSFT 256
|
||||
|
@ -5814,6 +6200,11 @@ XRAPI_ATTR XrResult XRAPI_CALL xrUpdatePassthroughColorLutMETA(
|
|||
#endif /* !XR_NO_PROTOTYPES */
|
||||
|
||||
|
||||
#define XR_META_touch_controller_plus 1
|
||||
#define XR_META_touch_controller_plus_SPEC_VERSION 1
|
||||
#define XR_META_TOUCH_CONTROLLER_PLUS_EXTENSION_NAME "XR_META_touch_controller_plus"
|
||||
|
||||
|
||||
#define XR_EXT_uuid 1
|
||||
#define XR_EXT_uuid_SPEC_VERSION 1
|
||||
#define XR_EXT_UUID_EXTENSION_NAME "XR_EXT_uuid"
|
||||
|
@ -5980,6 +6371,46 @@ XRAPI_ATTR XrResult XRAPI_CALL xrApplyFoveationHTC(
|
|||
#endif /* !XR_NO_PROTOTYPES */
|
||||
|
||||
|
||||
#define XR_HTC_anchor 1
|
||||
#define XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_HTC 256
|
||||
#define XR_HTC_anchor_SPEC_VERSION 1
|
||||
#define XR_HTC_ANCHOR_EXTENSION_NAME "XR_HTC_anchor"
|
||||
// XrSystemAnchorPropertiesHTC extends XrSystemProperties
|
||||
typedef struct XrSystemAnchorPropertiesHTC {
|
||||
XrStructureType type;
|
||||
void* XR_MAY_ALIAS next;
|
||||
XrBool32 supportsAnchor;
|
||||
} XrSystemAnchorPropertiesHTC;
|
||||
|
||||
typedef struct XrSpatialAnchorNameHTC {
|
||||
char name[XR_MAX_SPATIAL_ANCHOR_NAME_SIZE_HTC];
|
||||
} XrSpatialAnchorNameHTC;
|
||||
|
||||
typedef struct XrSpatialAnchorCreateInfoHTC {
|
||||
XrStructureType type;
|
||||
const void* XR_MAY_ALIAS next;
|
||||
XrSpace space;
|
||||
XrPosef poseInSpace;
|
||||
XrSpatialAnchorNameHTC name;
|
||||
} XrSpatialAnchorCreateInfoHTC;
|
||||
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrCreateSpatialAnchorHTC)(XrSession session, const XrSpatialAnchorCreateInfoHTC* createInfo, XrSpace* anchor);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrGetSpatialAnchorNameHTC)(XrSpace anchor, XrSpatialAnchorNameHTC* name);
|
||||
|
||||
#ifndef XR_NO_PROTOTYPES
|
||||
#ifdef XR_EXTENSION_PROTOTYPES
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrCreateSpatialAnchorHTC(
|
||||
XrSession session,
|
||||
const XrSpatialAnchorCreateInfoHTC* createInfo,
|
||||
XrSpace* anchor);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrGetSpatialAnchorNameHTC(
|
||||
XrSpace anchor,
|
||||
XrSpatialAnchorNameHTC* name);
|
||||
#endif /* XR_EXTENSION_PROTOTYPES */
|
||||
#endif /* !XR_NO_PROTOTYPES */
|
||||
|
||||
|
||||
#define XR_EXT_active_action_set_priority 1
|
||||
#define XR_EXT_active_action_set_priority_SPEC_VERSION 1
|
||||
#define XR_EXT_ACTIVE_ACTION_SET_PRIORITY_EXTENSION_NAME "XR_EXT_active_action_set_priority"
|
||||
|
@ -6274,7 +6705,7 @@ typedef struct XrUserCalibrationEnableEventsInfoML {
|
|||
XrBool32 enabled;
|
||||
} XrUserCalibrationEnableEventsInfoML;
|
||||
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrEnableUserCalibrationEventsML)(XrInstance instance, const XrUserCalibrationEnableEventsInfoML* enableInfo);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrEnableUserCalibrationEventsML)(XrInstance instance, const XrUserCalibrationEnableEventsInfoML* enableInfo);
|
||||
|
||||
#ifndef XR_NO_PROTOTYPES
|
||||
#ifdef XR_EXTENSION_PROTOTYPES
|
||||
|
|
|
@ -0,0 +1,140 @@
|
|||
#ifndef OPENXR_LOADER_NEGOTIATION_H_
|
||||
#define OPENXR_LOADER_NEGOTIATION_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2017-2024, The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos OpenXR XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
#include "openxr.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define XR_LOADER_VERSION_1_0 1
|
||||
|
||||
#define XR_CURRENT_LOADER_API_LAYER_VERSION 1
|
||||
|
||||
|
||||
#define XR_CURRENT_LOADER_RUNTIME_VERSION 1
|
||||
|
||||
|
||||
#define XR_LOADER_INFO_STRUCT_VERSION 1
|
||||
|
||||
|
||||
#define XR_API_LAYER_INFO_STRUCT_VERSION 1
|
||||
|
||||
|
||||
#define XR_RUNTIME_INFO_STRUCT_VERSION 1
|
||||
|
||||
|
||||
#define XR_API_LAYER_NEXT_INFO_STRUCT_VERSION 1
|
||||
|
||||
|
||||
#define XR_API_LAYER_CREATE_INFO_STRUCT_VERSION 1
|
||||
|
||||
|
||||
#define XR_API_LAYER_MAX_SETTINGS_PATH_SIZE 512
|
||||
|
||||
|
||||
typedef enum XrLoaderInterfaceStructs {
|
||||
XR_LOADER_INTERFACE_STRUCT_UNINTIALIZED = 0,
|
||||
XR_LOADER_INTERFACE_STRUCT_LOADER_INFO = 1,
|
||||
XR_LOADER_INTERFACE_STRUCT_API_LAYER_REQUEST = 2,
|
||||
XR_LOADER_INTERFACE_STRUCT_RUNTIME_REQUEST = 3,
|
||||
XR_LOADER_INTERFACE_STRUCT_API_LAYER_CREATE_INFO = 4,
|
||||
XR_LOADER_INTERFACE_STRUCT_API_LAYER_NEXT_INFO = 5,
|
||||
XR_LOADER_INTERFACE_STRUCTS_MAX_ENUM = 0x7FFFFFFF
|
||||
} XrLoaderInterfaceStructs;
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrGetInstanceProcAddr)(XrInstance instance, const char* name, PFN_xrVoidFunction* function);
|
||||
|
||||
typedef struct XrApiLayerCreateInfo XrApiLayerCreateInfo;
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrCreateApiLayerInstance)(
|
||||
const XrInstanceCreateInfo* info,
|
||||
const XrApiLayerCreateInfo* apiLayerInfo,
|
||||
XrInstance* instance);
|
||||
|
||||
typedef struct XrApiLayerNextInfo {
|
||||
XrLoaderInterfaceStructs structType;
|
||||
uint32_t structVersion;
|
||||
size_t structSize;
|
||||
char layerName[XR_MAX_API_LAYER_NAME_SIZE];
|
||||
PFN_xrGetInstanceProcAddr nextGetInstanceProcAddr;
|
||||
PFN_xrCreateApiLayerInstance nextCreateApiLayerInstance;
|
||||
struct XrApiLayerNextInfo* next;
|
||||
} XrApiLayerNextInfo;
|
||||
|
||||
typedef struct XrApiLayerCreateInfo {
|
||||
XrLoaderInterfaceStructs structType;
|
||||
uint32_t structVersion;
|
||||
size_t structSize;
|
||||
void* XR_MAY_ALIAS loaderInstance;
|
||||
char settings_file_location[XR_API_LAYER_MAX_SETTINGS_PATH_SIZE];
|
||||
XrApiLayerNextInfo* nextInfo;
|
||||
} XrApiLayerCreateInfo;
|
||||
|
||||
typedef struct XrNegotiateLoaderInfo {
|
||||
XrLoaderInterfaceStructs structType;
|
||||
uint32_t structVersion;
|
||||
size_t structSize;
|
||||
uint32_t minInterfaceVersion;
|
||||
uint32_t maxInterfaceVersion;
|
||||
XrVersion minApiVersion;
|
||||
XrVersion maxApiVersion;
|
||||
} XrNegotiateLoaderInfo;
|
||||
|
||||
typedef struct XrNegotiateRuntimeRequest {
|
||||
XrLoaderInterfaceStructs structType;
|
||||
uint32_t structVersion;
|
||||
size_t structSize;
|
||||
uint32_t runtimeInterfaceVersion;
|
||||
XrVersion runtimeApiVersion;
|
||||
PFN_xrGetInstanceProcAddr getInstanceProcAddr;
|
||||
} XrNegotiateRuntimeRequest;
|
||||
|
||||
typedef struct XrNegotiateApiLayerRequest {
|
||||
XrLoaderInterfaceStructs structType;
|
||||
uint32_t structVersion;
|
||||
size_t structSize;
|
||||
uint32_t layerInterfaceVersion;
|
||||
XrVersion layerApiVersion;
|
||||
PFN_xrGetInstanceProcAddr getInstanceProcAddr;
|
||||
PFN_xrCreateApiLayerInstance createApiLayerInstance;
|
||||
} XrNegotiateApiLayerRequest;
|
||||
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrCreateApiLayerInstance)(const XrInstanceCreateInfo* info, const XrApiLayerCreateInfo* layerInfo, XrInstance* instance);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrNegotiateLoaderRuntimeInterface)(const XrNegotiateLoaderInfo* loaderInfo, XrNegotiateRuntimeRequest* runtimeRequest);
|
||||
typedef XrResult (XRAPI_PTR *PFN_xrNegotiateLoaderApiLayerInterface)(const XrNegotiateLoaderInfo* loaderInfo, const char* layerName, XrNegotiateApiLayerRequest* apiLayerRequest);
|
||||
|
||||
#ifndef XR_NO_PROTOTYPES
|
||||
#ifdef XR_EXTENSION_PROTOTYPES
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrCreateApiLayerInstance(
|
||||
const XrInstanceCreateInfo* info,
|
||||
const XrApiLayerCreateInfo* layerInfo,
|
||||
XrInstance* instance);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrNegotiateLoaderRuntimeInterface(
|
||||
const XrNegotiateLoaderInfo* loaderInfo,
|
||||
XrNegotiateRuntimeRequest* runtimeRequest);
|
||||
|
||||
XRAPI_ATTR XrResult XRAPI_CALL xrNegotiateLoaderApiLayerInterface(
|
||||
const XrNegotiateLoaderInfo* loaderInfo,
|
||||
const char* layerName,
|
||||
XrNegotiateApiLayerRequest* apiLayerRequest);
|
||||
#endif /* XR_EXTENSION_PROTOTYPES */
|
||||
#endif /* !XR_NO_PROTOTYPES */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -2,7 +2,7 @@
|
|||
#define OPENXR_PLATFORM_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright 2017-2023 The Khronos Group Inc.
|
||||
** Copyright 2017-2024, The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
@ -22,7 +22,7 @@ extern "C" {
|
|||
#ifdef XR_USE_PLATFORM_ANDROID
|
||||
|
||||
#define XR_KHR_android_thread_settings 1
|
||||
#define XR_KHR_android_thread_settings_SPEC_VERSION 5
|
||||
#define XR_KHR_android_thread_settings_SPEC_VERSION 6
|
||||
#define XR_KHR_ANDROID_THREAD_SETTINGS_EXTENSION_NAME "XR_KHR_android_thread_settings"
|
||||
|
||||
typedef enum XrAndroidThreadTypeKHR {
|
||||
|
@ -489,7 +489,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetVulkanGraphicsRequirements2KHR(
|
|||
#ifdef XR_USE_PLATFORM_EGL
|
||||
|
||||
#define XR_MNDX_egl_enable 1
|
||||
#define XR_MNDX_egl_enable_SPEC_VERSION 1
|
||||
#define XR_MNDX_egl_enable_SPEC_VERSION 2
|
||||
#define XR_MNDX_EGL_ENABLE_EXTENSION_NAME "XR_MNDX_egl_enable"
|
||||
typedef PFN_xrVoidFunction (*PFN_xrEglGetProcAddressMNDX)(const char *name);
|
||||
// XrGraphicsBindingEGLMNDX extends XrSessionCreateInfo
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
** Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
** Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define OPENXR_REFLECTION_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
** Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
@ -114,6 +114,18 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_RENDER_MODEL_UNAVAILABLE_FB, 1000119020) \
|
||||
_(XR_ERROR_MARKER_NOT_TRACKED_VARJO, -1000124000) \
|
||||
_(XR_ERROR_MARKER_ID_INVALID_VARJO, -1000124001) \
|
||||
_(XR_ERROR_MARKER_DETECTOR_PERMISSION_DENIED_ML, -1000138000) \
|
||||
_(XR_ERROR_MARKER_DETECTOR_LOCATE_FAILED_ML, -1000138001) \
|
||||
_(XR_ERROR_MARKER_DETECTOR_INVALID_DATA_QUERY_ML, -1000138002) \
|
||||
_(XR_ERROR_MARKER_DETECTOR_INVALID_CREATE_INFO_ML, -1000138003) \
|
||||
_(XR_ERROR_MARKER_INVALID_ML, -1000138004) \
|
||||
_(XR_ERROR_LOCALIZATION_MAP_INCOMPATIBLE_ML, -1000139000) \
|
||||
_(XR_ERROR_LOCALIZATION_MAP_UNAVAILABLE_ML, -1000139001) \
|
||||
_(XR_ERROR_LOCALIZATION_MAP_FAIL_ML, -1000139002) \
|
||||
_(XR_ERROR_LOCALIZATION_MAP_IMPORT_EXPORT_PERMISSION_DENIED_ML, -1000139003) \
|
||||
_(XR_ERROR_LOCALIZATION_MAP_PERMISSION_DENIED_ML, -1000139004) \
|
||||
_(XR_ERROR_LOCALIZATION_MAP_ALREADY_EXISTS_ML, -1000139005) \
|
||||
_(XR_ERROR_LOCALIZATION_MAP_CANNOT_EXPORT_CLOUD_MAP_ML, -1000139006) \
|
||||
_(XR_ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT, -1000142001) \
|
||||
_(XR_ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT, -1000142002) \
|
||||
_(XR_SCENE_MARKER_DATA_NOT_STRING_MSFT, 1000147000) \
|
||||
|
@ -124,6 +136,7 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_ERROR_SPACE_CLOUD_STORAGE_DISABLED_FB, -1000169004) \
|
||||
_(XR_ERROR_PASSTHROUGH_COLOR_LUT_BUFFER_SIZE_MISMATCH_META, -1000266000) \
|
||||
_(XR_ERROR_HINT_ALREADY_SET_QCOM, -1000306000) \
|
||||
_(XR_ERROR_NOT_AN_ANCHOR_HTC, -1000319000) \
|
||||
_(XR_ERROR_SPACE_NOT_LOCATABLE_EXT, -1000429000) \
|
||||
_(XR_ERROR_PLANE_DETECTION_PERMISSION_DENIED_EXT, -1000429001) \
|
||||
_(XR_RESULT_MAX_ENUM, 0x7FFFFFFF)
|
||||
|
@ -340,6 +353,20 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_TYPE_FRAME_END_INFO_ML, 1000135000) \
|
||||
_(XR_TYPE_GLOBAL_DIMMER_FRAME_END_INFO_ML, 1000136000) \
|
||||
_(XR_TYPE_COORDINATE_SPACE_CREATE_INFO_ML, 1000137000) \
|
||||
_(XR_TYPE_SYSTEM_MARKER_UNDERSTANDING_PROPERTIES_ML, 1000138000) \
|
||||
_(XR_TYPE_MARKER_DETECTOR_CREATE_INFO_ML, 1000138001) \
|
||||
_(XR_TYPE_MARKER_DETECTOR_ARUCO_INFO_ML, 1000138002) \
|
||||
_(XR_TYPE_MARKER_DETECTOR_SIZE_INFO_ML, 1000138003) \
|
||||
_(XR_TYPE_MARKER_DETECTOR_APRIL_TAG_INFO_ML, 1000138004) \
|
||||
_(XR_TYPE_MARKER_DETECTOR_CUSTOM_PROFILE_INFO_ML, 1000138005) \
|
||||
_(XR_TYPE_MARKER_DETECTOR_SNAPSHOT_INFO_ML, 1000138006) \
|
||||
_(XR_TYPE_MARKER_DETECTOR_STATE_ML, 1000138007) \
|
||||
_(XR_TYPE_MARKER_SPACE_CREATE_INFO_ML, 1000138008) \
|
||||
_(XR_TYPE_LOCALIZATION_MAP_ML, 1000139000) \
|
||||
_(XR_TYPE_EVENT_DATA_LOCALIZATION_CHANGED_ML, 1000139001) \
|
||||
_(XR_TYPE_MAP_LOCALIZATION_REQUEST_INFO_ML, 1000139002) \
|
||||
_(XR_TYPE_LOCALIZATION_MAP_IMPORT_INFO_ML, 1000139003) \
|
||||
_(XR_TYPE_LOCALIZATION_ENABLE_EVENTS_INFO_ML, 1000139004) \
|
||||
_(XR_TYPE_EVENT_DATA_HEADSET_FIT_CHANGED_ML, 1000472000) \
|
||||
_(XR_TYPE_EVENT_DATA_EYE_CALIBRATION_CHANGED_ML, 1000472001) \
|
||||
_(XR_TYPE_USER_CALIBRATION_ENABLE_EVENTS_INFO_ML, 1000472002) \
|
||||
|
@ -429,6 +456,8 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_TYPE_FOVEATION_APPLY_INFO_HTC, 1000318000) \
|
||||
_(XR_TYPE_FOVEATION_DYNAMIC_MODE_INFO_HTC, 1000318001) \
|
||||
_(XR_TYPE_FOVEATION_CUSTOM_MODE_INFO_HTC, 1000318002) \
|
||||
_(XR_TYPE_SYSTEM_ANCHOR_PROPERTIES_HTC, 1000319000) \
|
||||
_(XR_TYPE_SPATIAL_ANCHOR_CREATE_INFO_HTC, 1000319001) \
|
||||
_(XR_TYPE_ACTIVE_ACTION_SET_PRIORITIES_EXT, 1000373000) \
|
||||
_(XR_TYPE_SYSTEM_FORCE_FEEDBACK_CURL_PROPERTIES_MNDX, 1000375000) \
|
||||
_(XR_TYPE_FORCE_FEEDBACK_CURL_APPLY_LOCATIONS_MNDX, 1000375001) \
|
||||
|
@ -467,6 +496,7 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_REFERENCE_SPACE_TYPE_STAGE, 3) \
|
||||
_(XR_REFERENCE_SPACE_TYPE_UNBOUNDED_MSFT, 1000038000) \
|
||||
_(XR_REFERENCE_SPACE_TYPE_COMBINED_EYE_VARJO, 1000121000) \
|
||||
_(XR_REFERENCE_SPACE_TYPE_LOCALIZATION_MAP_ML, 1000139000) \
|
||||
_(XR_REFERENCE_SPACE_TYPE_LOCAL_FLOOR_EXT, 1000426000) \
|
||||
_(XR_REFERENCE_SPACE_TYPE_MAX_ENUM, 0x7FFFFFFF)
|
||||
|
||||
|
@ -517,6 +547,8 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_OBJECT_TYPE_PASSTHROUGH_FB, 1000118000) \
|
||||
_(XR_OBJECT_TYPE_PASSTHROUGH_LAYER_FB, 1000118002) \
|
||||
_(XR_OBJECT_TYPE_GEOMETRY_INSTANCE_FB, 1000118004) \
|
||||
_(XR_OBJECT_TYPE_MARKER_DETECTOR_ML, 1000138000) \
|
||||
_(XR_OBJECT_TYPE_EXPORTED_LOCALIZATION_MAP_ML, 1000139000) \
|
||||
_(XR_OBJECT_TYPE_SPATIAL_ANCHOR_STORE_CONNECTION_MSFT, 1000142000) \
|
||||
_(XR_OBJECT_TYPE_FACE_TRACKER_FB, 1000201000) \
|
||||
_(XR_OBJECT_TYPE_EYE_TRACKER_FB, 1000202000) \
|
||||
|
@ -527,6 +559,15 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_OBJECT_TYPE_PLANE_DETECTOR_EXT, 1000429000) \
|
||||
_(XR_OBJECT_TYPE_MAX_ENUM, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrLoaderInterfaceStructs(_) \
|
||||
_(XR_LOADER_INTERFACE_STRUCT_UNINTIALIZED, 0) \
|
||||
_(XR_LOADER_INTERFACE_STRUCT_LOADER_INFO, 1) \
|
||||
_(XR_LOADER_INTERFACE_STRUCT_API_LAYER_REQUEST, 2) \
|
||||
_(XR_LOADER_INTERFACE_STRUCT_RUNTIME_REQUEST, 3) \
|
||||
_(XR_LOADER_INTERFACE_STRUCT_API_LAYER_CREATE_INFO, 4) \
|
||||
_(XR_LOADER_INTERFACE_STRUCT_API_LAYER_NEXT_INFO, 5) \
|
||||
_(XR_LOADER_INTERFACE_STRUCTS_MAX_ENUM, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrAndroidThreadTypeKHR(_) \
|
||||
_(XR_ANDROID_THREAD_TYPE_APPLICATION_MAIN_KHR, 1) \
|
||||
_(XR_ANDROID_THREAD_TYPE_APPLICATION_WORKER_KHR, 2) \
|
||||
|
@ -877,6 +918,107 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_PASSTHROUGH_LAYER_PURPOSE_TRACKED_KEYBOARD_MASKED_HANDS_FB, 1000203002) \
|
||||
_(XR_PASSTHROUGH_LAYER_PURPOSE_MAX_ENUM_FB, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrMarkerDetectorProfileML(_) \
|
||||
_(XR_MARKER_DETECTOR_PROFILE_DEFAULT_ML, 0) \
|
||||
_(XR_MARKER_DETECTOR_PROFILE_SPEED_ML, 1) \
|
||||
_(XR_MARKER_DETECTOR_PROFILE_ACCURACY_ML, 2) \
|
||||
_(XR_MARKER_DETECTOR_PROFILE_SMALL_TARGETS_ML, 3) \
|
||||
_(XR_MARKER_DETECTOR_PROFILE_LARGE_FOV_ML, 4) \
|
||||
_(XR_MARKER_DETECTOR_PROFILE_CUSTOM_ML, 5) \
|
||||
_(XR_MARKER_DETECTOR_PROFILE_MAX_ENUM_ML, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrMarkerTypeML(_) \
|
||||
_(XR_MARKER_TYPE_ARUCO_ML, 0) \
|
||||
_(XR_MARKER_TYPE_APRIL_TAG_ML, 1) \
|
||||
_(XR_MARKER_TYPE_QR_ML, 2) \
|
||||
_(XR_MARKER_TYPE_EAN_13_ML, 3) \
|
||||
_(XR_MARKER_TYPE_UPC_A_ML, 4) \
|
||||
_(XR_MARKER_TYPE_CODE_128_ML, 5) \
|
||||
_(XR_MARKER_TYPE_MAX_ENUM_ML, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrMarkerArucoDictML(_) \
|
||||
_(XR_MARKER_ARUCO_DICT_4X4_50_ML, 0) \
|
||||
_(XR_MARKER_ARUCO_DICT_4X4_100_ML, 1) \
|
||||
_(XR_MARKER_ARUCO_DICT_4X4_250_ML, 2) \
|
||||
_(XR_MARKER_ARUCO_DICT_4X4_1000_ML, 3) \
|
||||
_(XR_MARKER_ARUCO_DICT_5X5_50_ML, 4) \
|
||||
_(XR_MARKER_ARUCO_DICT_5X5_100_ML, 5) \
|
||||
_(XR_MARKER_ARUCO_DICT_5X5_250_ML, 6) \
|
||||
_(XR_MARKER_ARUCO_DICT_5X5_1000_ML, 7) \
|
||||
_(XR_MARKER_ARUCO_DICT_6X6_50_ML, 8) \
|
||||
_(XR_MARKER_ARUCO_DICT_6X6_100_ML, 9) \
|
||||
_(XR_MARKER_ARUCO_DICT_6X6_250_ML, 10) \
|
||||
_(XR_MARKER_ARUCO_DICT_6X6_1000_ML, 11) \
|
||||
_(XR_MARKER_ARUCO_DICT_7X7_50_ML, 12) \
|
||||
_(XR_MARKER_ARUCO_DICT_7X7_100_ML, 13) \
|
||||
_(XR_MARKER_ARUCO_DICT_7X7_250_ML, 14) \
|
||||
_(XR_MARKER_ARUCO_DICT_7X7_1000_ML, 15) \
|
||||
_(XR_MARKER_ARUCO_DICT_MAX_ENUM_ML, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrMarkerAprilTagDictML(_) \
|
||||
_(XR_MARKER_APRIL_TAG_DICT_16H5_ML, 0) \
|
||||
_(XR_MARKER_APRIL_TAG_DICT_25H9_ML, 1) \
|
||||
_(XR_MARKER_APRIL_TAG_DICT_36H10_ML, 2) \
|
||||
_(XR_MARKER_APRIL_TAG_DICT_36H11_ML, 3) \
|
||||
_(XR_MARKER_APRIL_TAG_DICT_MAX_ENUM_ML, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrMarkerDetectorFpsML(_) \
|
||||
_(XR_MARKER_DETECTOR_FPS_LOW_ML, 0) \
|
||||
_(XR_MARKER_DETECTOR_FPS_MEDIUM_ML, 1) \
|
||||
_(XR_MARKER_DETECTOR_FPS_HIGH_ML, 2) \
|
||||
_(XR_MARKER_DETECTOR_FPS_MAX_ML, 3) \
|
||||
_(XR_MARKER_DETECTOR_FPS_MAX_ENUM_ML, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrMarkerDetectorResolutionML(_) \
|
||||
_(XR_MARKER_DETECTOR_RESOLUTION_LOW_ML, 0) \
|
||||
_(XR_MARKER_DETECTOR_RESOLUTION_MEDIUM_ML, 1) \
|
||||
_(XR_MARKER_DETECTOR_RESOLUTION_HIGH_ML, 2) \
|
||||
_(XR_MARKER_DETECTOR_RESOLUTION_MAX_ENUM_ML, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrMarkerDetectorCameraML(_) \
|
||||
_(XR_MARKER_DETECTOR_CAMERA_RGB_CAMERA_ML, 0) \
|
||||
_(XR_MARKER_DETECTOR_CAMERA_WORLD_CAMERAS_ML, 1) \
|
||||
_(XR_MARKER_DETECTOR_CAMERA_MAX_ENUM_ML, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrMarkerDetectorCornerRefineMethodML(_) \
|
||||
_(XR_MARKER_DETECTOR_CORNER_REFINE_METHOD_NONE_ML, 0) \
|
||||
_(XR_MARKER_DETECTOR_CORNER_REFINE_METHOD_SUBPIX_ML, 1) \
|
||||
_(XR_MARKER_DETECTOR_CORNER_REFINE_METHOD_CONTOUR_ML, 2) \
|
||||
_(XR_MARKER_DETECTOR_CORNER_REFINE_METHOD_APRIL_TAG_ML, 3) \
|
||||
_(XR_MARKER_DETECTOR_CORNER_REFINE_METHOD_MAX_ENUM_ML, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrMarkerDetectorFullAnalysisIntervalML(_) \
|
||||
_(XR_MARKER_DETECTOR_FULL_ANALYSIS_INTERVAL_MAX_ML, 0) \
|
||||
_(XR_MARKER_DETECTOR_FULL_ANALYSIS_INTERVAL_FAST_ML, 1) \
|
||||
_(XR_MARKER_DETECTOR_FULL_ANALYSIS_INTERVAL_MEDIUM_ML, 2) \
|
||||
_(XR_MARKER_DETECTOR_FULL_ANALYSIS_INTERVAL_SLOW_ML, 3) \
|
||||
_(XR_MARKER_DETECTOR_FULL_ANALYSIS_INTERVAL_MAX_ENUM_ML, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrMarkerDetectorStatusML(_) \
|
||||
_(XR_MARKER_DETECTOR_STATUS_PENDING_ML, 0) \
|
||||
_(XR_MARKER_DETECTOR_STATUS_READY_ML, 1) \
|
||||
_(XR_MARKER_DETECTOR_STATUS_ERROR_ML, 2) \
|
||||
_(XR_MARKER_DETECTOR_STATUS_MAX_ENUM_ML, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrLocalizationMapStateML(_) \
|
||||
_(XR_LOCALIZATION_MAP_STATE_NOT_LOCALIZED_ML, 0) \
|
||||
_(XR_LOCALIZATION_MAP_STATE_LOCALIZED_ML, 1) \
|
||||
_(XR_LOCALIZATION_MAP_STATE_LOCALIZATION_PENDING_ML, 2) \
|
||||
_(XR_LOCALIZATION_MAP_STATE_LOCALIZATION_SLEEPING_BEFORE_RETRY_ML, 3) \
|
||||
_(XR_LOCALIZATION_MAP_STATE_MAX_ENUM_ML, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrLocalizationMapTypeML(_) \
|
||||
_(XR_LOCALIZATION_MAP_TYPE_ON_DEVICE_ML, 0) \
|
||||
_(XR_LOCALIZATION_MAP_TYPE_CLOUD_ML, 1) \
|
||||
_(XR_LOCALIZATION_MAP_TYPE_MAX_ENUM_ML, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrLocalizationMapConfidenceML(_) \
|
||||
_(XR_LOCALIZATION_MAP_CONFIDENCE_POOR_ML, 0) \
|
||||
_(XR_LOCALIZATION_MAP_CONFIDENCE_FAIR_ML, 1) \
|
||||
_(XR_LOCALIZATION_MAP_CONFIDENCE_GOOD_ML, 2) \
|
||||
_(XR_LOCALIZATION_MAP_CONFIDENCE_EXCELLENT_ML, 3) \
|
||||
_(XR_LOCALIZATION_MAP_CONFIDENCE_MAX_ENUM_ML, 0x7FFFFFFF)
|
||||
|
||||
#define XR_LIST_ENUM_XrSceneMarkerTypeMSFT(_) \
|
||||
_(XR_SCENE_MARKER_TYPE_QR_CODE_MSFT, 1) \
|
||||
_(XR_SCENE_MARKER_TYPE_MAX_ENUM_MSFT, 0x7FFFFFFF)
|
||||
|
@ -1281,6 +1423,14 @@ XR_ENUM_STR(XrResult);
|
|||
#define XR_LIST_BITS_XrGlobalDimmerFrameEndInfoFlagsML(_) \
|
||||
_(XR_GLOBAL_DIMMER_FRAME_END_INFO_ENABLED_BIT_ML, 0x00000001) \
|
||||
|
||||
#define XR_LIST_BITS_XrLocalizationMapErrorFlagsML(_) \
|
||||
_(XR_LOCALIZATION_MAP_ERROR_UNKNOWN_BIT_ML, 0x00000001) \
|
||||
_(XR_LOCALIZATION_MAP_ERROR_OUT_OF_MAPPED_AREA_BIT_ML, 0x00000002) \
|
||||
_(XR_LOCALIZATION_MAP_ERROR_LOW_FEATURE_COUNT_BIT_ML, 0x00000004) \
|
||||
_(XR_LOCALIZATION_MAP_ERROR_EXCESSIVE_MOTION_BIT_ML, 0x00000008) \
|
||||
_(XR_LOCALIZATION_MAP_ERROR_LOW_LIGHT_BIT_ML, 0x00000010) \
|
||||
_(XR_LOCALIZATION_MAP_ERROR_HEADPOSE_BIT_ML, 0x00000020) \
|
||||
|
||||
#define XR_LIST_BITS_XrCompositionLayerSpaceWarpInfoFlagsFB(_) \
|
||||
_(XR_COMPOSITION_LAYER_SPACE_WARP_INFO_FRAME_SKIP_BIT_FB, 0x00000001) \
|
||||
|
||||
|
@ -1851,6 +2001,54 @@ XR_ENUM_STR(XrResult);
|
|||
_(b) \
|
||||
_(a) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrApiLayerNextInfo, in order.
|
||||
#define XR_LIST_STRUCT_XrApiLayerNextInfo(_) \
|
||||
_(structType) \
|
||||
_(structVersion) \
|
||||
_(structSize) \
|
||||
_(layerName) \
|
||||
_(nextGetInstanceProcAddr) \
|
||||
_(nextCreateApiLayerInstance) \
|
||||
_(next) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrApiLayerCreateInfo, in order.
|
||||
#define XR_LIST_STRUCT_XrApiLayerCreateInfo(_) \
|
||||
_(structType) \
|
||||
_(structVersion) \
|
||||
_(structSize) \
|
||||
_(loaderInstance) \
|
||||
_(settings_file_location) \
|
||||
_(nextInfo) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrNegotiateLoaderInfo, in order.
|
||||
#define XR_LIST_STRUCT_XrNegotiateLoaderInfo(_) \
|
||||
_(structType) \
|
||||
_(structVersion) \
|
||||
_(structSize) \
|
||||
_(minInterfaceVersion) \
|
||||
_(maxInterfaceVersion) \
|
||||
_(minApiVersion) \
|
||||
_(maxApiVersion) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrNegotiateRuntimeRequest, in order.
|
||||
#define XR_LIST_STRUCT_XrNegotiateRuntimeRequest(_) \
|
||||
_(structType) \
|
||||
_(structVersion) \
|
||||
_(structSize) \
|
||||
_(runtimeInterfaceVersion) \
|
||||
_(runtimeApiVersion) \
|
||||
_(getInstanceProcAddr) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrNegotiateApiLayerRequest, in order.
|
||||
#define XR_LIST_STRUCT_XrNegotiateApiLayerRequest(_) \
|
||||
_(structType) \
|
||||
_(structVersion) \
|
||||
_(structSize) \
|
||||
_(layerInterfaceVersion) \
|
||||
_(layerApiVersion) \
|
||||
_(getInstanceProcAddr) \
|
||||
_(createApiLayerInstance) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrCompositionLayerCubeKHR, in order.
|
||||
#define XR_LIST_STRUCT_XrCompositionLayerCubeKHR(_) \
|
||||
_(type) \
|
||||
|
@ -3212,6 +3410,109 @@ XR_ENUM_STR(XrResult);
|
|||
_(cfuid) \
|
||||
_(poseInCoordinateSpace) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrSystemMarkerUnderstandingPropertiesML, in order.
|
||||
#define XR_LIST_STRUCT_XrSystemMarkerUnderstandingPropertiesML(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(supportsMarkerUnderstanding) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrMarkerDetectorCreateInfoML, in order.
|
||||
#define XR_LIST_STRUCT_XrMarkerDetectorCreateInfoML(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(profile) \
|
||||
_(markerType) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrMarkerDetectorArucoInfoML, in order.
|
||||
#define XR_LIST_STRUCT_XrMarkerDetectorArucoInfoML(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(arucoDict) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrMarkerDetectorSizeInfoML, in order.
|
||||
#define XR_LIST_STRUCT_XrMarkerDetectorSizeInfoML(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(markerLength) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrMarkerDetectorAprilTagInfoML, in order.
|
||||
#define XR_LIST_STRUCT_XrMarkerDetectorAprilTagInfoML(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(aprilTagDict) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrMarkerDetectorCustomProfileInfoML, in order.
|
||||
#define XR_LIST_STRUCT_XrMarkerDetectorCustomProfileInfoML(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(fpsHint) \
|
||||
_(resolutionHint) \
|
||||
_(cameraHint) \
|
||||
_(cornerRefineMethod) \
|
||||
_(useEdgeRefinement) \
|
||||
_(fullAnalysisIntervalHint) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrMarkerDetectorSnapshotInfoML, in order.
|
||||
#define XR_LIST_STRUCT_XrMarkerDetectorSnapshotInfoML(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrMarkerDetectorStateML, in order.
|
||||
#define XR_LIST_STRUCT_XrMarkerDetectorStateML(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(state) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrMarkerSpaceCreateInfoML, in order.
|
||||
#define XR_LIST_STRUCT_XrMarkerSpaceCreateInfoML(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(markerDetector) \
|
||||
_(marker) \
|
||||
_(poseInMarkerSpace) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrLocalizationMapML, in order.
|
||||
#define XR_LIST_STRUCT_XrLocalizationMapML(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(name) \
|
||||
_(mapUuid) \
|
||||
_(mapType) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrEventDataLocalizationChangedML, in order.
|
||||
#define XR_LIST_STRUCT_XrEventDataLocalizationChangedML(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(session) \
|
||||
_(state) \
|
||||
_(map) \
|
||||
_(confidence) \
|
||||
_(errorFlags) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrLocalizationMapQueryInfoBaseHeaderML, in order.
|
||||
#define XR_LIST_STRUCT_XrLocalizationMapQueryInfoBaseHeaderML(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrMapLocalizationRequestInfoML, in order.
|
||||
#define XR_LIST_STRUCT_XrMapLocalizationRequestInfoML(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(mapUuid) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrLocalizationMapImportInfoML, in order.
|
||||
#define XR_LIST_STRUCT_XrLocalizationMapImportInfoML(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(size) \
|
||||
_(data) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrLocalizationEnableEventsInfoML, in order.
|
||||
#define XR_LIST_STRUCT_XrLocalizationEnableEventsInfoML(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(enabled) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrSpatialAnchorPersistenceNameMSFT, in order.
|
||||
#define XR_LIST_STRUCT_XrSpatialAnchorPersistenceNameMSFT(_) \
|
||||
_(name) \
|
||||
|
@ -3941,6 +4242,24 @@ XR_ENUM_STR(XrResult);
|
|||
_(configCount) \
|
||||
_(configs) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrSystemAnchorPropertiesHTC, in order.
|
||||
#define XR_LIST_STRUCT_XrSystemAnchorPropertiesHTC(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(supportsAnchor) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrSpatialAnchorNameHTC, in order.
|
||||
#define XR_LIST_STRUCT_XrSpatialAnchorNameHTC(_) \
|
||||
_(name) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrSpatialAnchorCreateInfoHTC, in order.
|
||||
#define XR_LIST_STRUCT_XrSpatialAnchorCreateInfoHTC(_) \
|
||||
_(type) \
|
||||
_(next) \
|
||||
_(space) \
|
||||
_(poseInSpace) \
|
||||
_(name) \
|
||||
|
||||
/// Calls your macro with the name of each member of XrActiveActionSetPriorityEXT, in order.
|
||||
#define XR_LIST_STRUCT_XrActiveActionSetPriorityEXT(_) \
|
||||
_(actionSet) \
|
||||
|
@ -4278,6 +4597,20 @@ XR_ENUM_STR(XrResult);
|
|||
_(XrMarkerSpaceCreateInfoVARJO, XR_TYPE_MARKER_SPACE_CREATE_INFO_VARJO) \
|
||||
_(XrFrameEndInfoML, XR_TYPE_FRAME_END_INFO_ML) \
|
||||
_(XrGlobalDimmerFrameEndInfoML, XR_TYPE_GLOBAL_DIMMER_FRAME_END_INFO_ML) \
|
||||
_(XrSystemMarkerUnderstandingPropertiesML, XR_TYPE_SYSTEM_MARKER_UNDERSTANDING_PROPERTIES_ML) \
|
||||
_(XrMarkerDetectorCreateInfoML, XR_TYPE_MARKER_DETECTOR_CREATE_INFO_ML) \
|
||||
_(XrMarkerDetectorArucoInfoML, XR_TYPE_MARKER_DETECTOR_ARUCO_INFO_ML) \
|
||||
_(XrMarkerDetectorSizeInfoML, XR_TYPE_MARKER_DETECTOR_SIZE_INFO_ML) \
|
||||
_(XrMarkerDetectorAprilTagInfoML, XR_TYPE_MARKER_DETECTOR_APRIL_TAG_INFO_ML) \
|
||||
_(XrMarkerDetectorCustomProfileInfoML, XR_TYPE_MARKER_DETECTOR_CUSTOM_PROFILE_INFO_ML) \
|
||||
_(XrMarkerDetectorSnapshotInfoML, XR_TYPE_MARKER_DETECTOR_SNAPSHOT_INFO_ML) \
|
||||
_(XrMarkerDetectorStateML, XR_TYPE_MARKER_DETECTOR_STATE_ML) \
|
||||
_(XrMarkerSpaceCreateInfoML, XR_TYPE_MARKER_SPACE_CREATE_INFO_ML) \
|
||||
_(XrLocalizationMapML, XR_TYPE_LOCALIZATION_MAP_ML) \
|
||||
_(XrEventDataLocalizationChangedML, XR_TYPE_EVENT_DATA_LOCALIZATION_CHANGED_ML) \
|
||||
_(XrMapLocalizationRequestInfoML, XR_TYPE_MAP_LOCALIZATION_REQUEST_INFO_ML) \
|
||||
_(XrLocalizationMapImportInfoML, XR_TYPE_LOCALIZATION_MAP_IMPORT_INFO_ML) \
|
||||
_(XrLocalizationEnableEventsInfoML, XR_TYPE_LOCALIZATION_ENABLE_EVENTS_INFO_ML) \
|
||||
_(XrSpatialAnchorPersistenceInfoMSFT, XR_TYPE_SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT) \
|
||||
_(XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT, XR_TYPE_SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT) \
|
||||
_(XrSceneMarkersMSFT, XR_TYPE_SCENE_MARKERS_MSFT) \
|
||||
|
@ -4359,6 +4692,8 @@ XR_ENUM_STR(XrResult);
|
|||
_(XrFoveationApplyInfoHTC, XR_TYPE_FOVEATION_APPLY_INFO_HTC) \
|
||||
_(XrFoveationDynamicModeInfoHTC, XR_TYPE_FOVEATION_DYNAMIC_MODE_INFO_HTC) \
|
||||
_(XrFoveationCustomModeInfoHTC, XR_TYPE_FOVEATION_CUSTOM_MODE_INFO_HTC) \
|
||||
_(XrSystemAnchorPropertiesHTC, XR_TYPE_SYSTEM_ANCHOR_PROPERTIES_HTC) \
|
||||
_(XrSpatialAnchorCreateInfoHTC, XR_TYPE_SPATIAL_ANCHOR_CREATE_INFO_HTC) \
|
||||
_(XrActiveActionSetPrioritiesEXT, XR_TYPE_ACTIVE_ACTION_SET_PRIORITIES_EXT) \
|
||||
_(XrSystemForceFeedbackCurlPropertiesMNDX, XR_TYPE_SYSTEM_FORCE_FEEDBACK_CURL_PROPERTIES_MNDX) \
|
||||
_(XrForceFeedbackCurlApplyLocationsMNDX, XR_TYPE_FORCE_FEEDBACK_CURL_APPLY_LOCATIONS_MNDX) \
|
||||
|
@ -4629,6 +4964,8 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_ML_frame_end_info, 136) \
|
||||
_(XR_ML_global_dimmer, 137) \
|
||||
_(XR_ML_compat, 138) \
|
||||
_(XR_ML_marker_understanding, 139) \
|
||||
_(XR_ML_localization_map, 140) \
|
||||
_(XR_MSFT_spatial_anchor_persistence, 143) \
|
||||
_(XR_MSFT_scene_marker, 148) \
|
||||
_(XR_ULTRALEAP_hand_tracking_forearm, 150) \
|
||||
|
@ -4667,11 +5004,13 @@ XR_ENUM_STR(XrResult);
|
|||
_(XR_FB_spatial_entity_user, 242) \
|
||||
_(XR_META_headset_id, 246) \
|
||||
_(XR_META_passthrough_color_lut, 267) \
|
||||
_(XR_META_touch_controller_plus, 280) \
|
||||
_(XR_EXT_uuid, 300) \
|
||||
_(XR_EXT_hand_interaction, 303) \
|
||||
_(XR_QCOM_tracking_optimization_settings, 307) \
|
||||
_(XR_HTC_passthrough, 318) \
|
||||
_(XR_HTC_foveation, 319) \
|
||||
_(XR_HTC_anchor, 320) \
|
||||
_(XR_EXT_active_action_set_priority, 374) \
|
||||
_(XR_MNDX_force_feedback_curl, 376) \
|
||||
_(XR_BD_controller_interaction, 385) \
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define OPENXR_REFLECTION_PARENT_STRUCTS_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
** Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
@ -58,6 +58,7 @@ This file contains expansion macros (X Macros) for OpenXR structures that have a
|
|||
_avail(XrEventDataSpatialAnchorCreateCompleteFB, XR_TYPE_EVENT_DATA_SPATIAL_ANCHOR_CREATE_COMPLETE_FB) \
|
||||
_avail(XrEventDataSpaceSetStatusCompleteFB, XR_TYPE_EVENT_DATA_SPACE_SET_STATUS_COMPLETE_FB) \
|
||||
_avail(XrEventDataMarkerTrackingUpdateVARJO, XR_TYPE_EVENT_DATA_MARKER_TRACKING_UPDATE_VARJO) \
|
||||
_avail(XrEventDataLocalizationChangedML, XR_TYPE_EVENT_DATA_LOCALIZATION_CHANGED_ML) \
|
||||
_avail(XrEventDataSpaceQueryResultsAvailableFB, XR_TYPE_EVENT_DATA_SPACE_QUERY_RESULTS_AVAILABLE_FB) \
|
||||
_avail(XrEventDataSpaceQueryCompleteFB, XR_TYPE_EVENT_DATA_SPACE_QUERY_COMPLETE_FB) \
|
||||
_avail(XrEventDataSpaceSaveCompleteFB, XR_TYPE_EVENT_DATA_SPACE_SAVE_COMPLETE_FB) \
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define OPENXR_REFLECTION_STRUCTS_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
** Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*/
|
||||
|
@ -225,6 +225,20 @@ This file contains expansion macros (X Macros) for OpenXR structures.
|
|||
_avail(XrMarkerSpaceCreateInfoVARJO, XR_TYPE_MARKER_SPACE_CREATE_INFO_VARJO) \
|
||||
_avail(XrFrameEndInfoML, XR_TYPE_FRAME_END_INFO_ML) \
|
||||
_avail(XrGlobalDimmerFrameEndInfoML, XR_TYPE_GLOBAL_DIMMER_FRAME_END_INFO_ML) \
|
||||
_avail(XrSystemMarkerUnderstandingPropertiesML, XR_TYPE_SYSTEM_MARKER_UNDERSTANDING_PROPERTIES_ML) \
|
||||
_avail(XrMarkerDetectorCreateInfoML, XR_TYPE_MARKER_DETECTOR_CREATE_INFO_ML) \
|
||||
_avail(XrMarkerDetectorArucoInfoML, XR_TYPE_MARKER_DETECTOR_ARUCO_INFO_ML) \
|
||||
_avail(XrMarkerDetectorSizeInfoML, XR_TYPE_MARKER_DETECTOR_SIZE_INFO_ML) \
|
||||
_avail(XrMarkerDetectorAprilTagInfoML, XR_TYPE_MARKER_DETECTOR_APRIL_TAG_INFO_ML) \
|
||||
_avail(XrMarkerDetectorCustomProfileInfoML, XR_TYPE_MARKER_DETECTOR_CUSTOM_PROFILE_INFO_ML) \
|
||||
_avail(XrMarkerDetectorSnapshotInfoML, XR_TYPE_MARKER_DETECTOR_SNAPSHOT_INFO_ML) \
|
||||
_avail(XrMarkerDetectorStateML, XR_TYPE_MARKER_DETECTOR_STATE_ML) \
|
||||
_avail(XrMarkerSpaceCreateInfoML, XR_TYPE_MARKER_SPACE_CREATE_INFO_ML) \
|
||||
_avail(XrLocalizationMapML, XR_TYPE_LOCALIZATION_MAP_ML) \
|
||||
_avail(XrEventDataLocalizationChangedML, XR_TYPE_EVENT_DATA_LOCALIZATION_CHANGED_ML) \
|
||||
_avail(XrMapLocalizationRequestInfoML, XR_TYPE_MAP_LOCALIZATION_REQUEST_INFO_ML) \
|
||||
_avail(XrLocalizationMapImportInfoML, XR_TYPE_LOCALIZATION_MAP_IMPORT_INFO_ML) \
|
||||
_avail(XrLocalizationEnableEventsInfoML, XR_TYPE_LOCALIZATION_ENABLE_EVENTS_INFO_ML) \
|
||||
_avail(XrSpatialAnchorPersistenceInfoMSFT, XR_TYPE_SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT) \
|
||||
_avail(XrSpatialAnchorFromPersistedAnchorCreateInfoMSFT, XR_TYPE_SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT) \
|
||||
_avail(XrSceneMarkersMSFT, XR_TYPE_SCENE_MARKERS_MSFT) \
|
||||
|
@ -306,6 +320,8 @@ This file contains expansion macros (X Macros) for OpenXR structures.
|
|||
_avail(XrFoveationApplyInfoHTC, XR_TYPE_FOVEATION_APPLY_INFO_HTC) \
|
||||
_avail(XrFoveationDynamicModeInfoHTC, XR_TYPE_FOVEATION_DYNAMIC_MODE_INFO_HTC) \
|
||||
_avail(XrFoveationCustomModeInfoHTC, XR_TYPE_FOVEATION_CUSTOM_MODE_INFO_HTC) \
|
||||
_avail(XrSystemAnchorPropertiesHTC, XR_TYPE_SYSTEM_ANCHOR_PROPERTIES_HTC) \
|
||||
_avail(XrSpatialAnchorCreateInfoHTC, XR_TYPE_SPATIAL_ANCHOR_CREATE_INFO_HTC) \
|
||||
_avail(XrActiveActionSetPrioritiesEXT, XR_TYPE_ACTIVE_ACTION_SET_PRIORITIES_EXT) \
|
||||
_avail(XrSystemForceFeedbackCurlPropertiesMNDX, XR_TYPE_SYSTEM_FORCE_FEEDBACK_CURL_PROPERTIES_MNDX) \
|
||||
_avail(XrForceFeedbackCurlApplyLocationsMNDX, XR_TYPE_FORCE_FEEDBACK_CURL_APPLY_LOCATIONS_MNDX) \
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
// Copyright (c) 2019 Collabora, Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
// Initial Author: Ryan Pavlik <ryan.pavlik@collabora.com>
|
||||
// Initial Author: Rylie Pavlik <rylie.pavlik@collabora.com>
|
||||
//
|
||||
|
||||
/*!
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017 Valve Corporation
|
||||
// Copyright (c) 2017 LunarG, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017 Valve Corporation
|
||||
// Copyright (c) 2017 LunarG, Inc.
|
||||
//
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
// Copyright (c) 2019 Collabora, Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
// Initial Author: Ryan Pavlik <ryan.pavlik@collabora.com>
|
||||
// Initial Author: Rylie Pavlik <rylie.pavlik@collabora.com>
|
||||
//
|
||||
|
||||
/*!
|
||||
|
|
|
@ -1,114 +0,0 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017 Valve Corporation
|
||||
// Copyright (c) 2017 LunarG, Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
// Initial Author: Mark Young <marky@lunarg.com>
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Forward declare.
|
||||
typedef struct XrApiLayerCreateInfo XrApiLayerCreateInfo;
|
||||
|
||||
// Function pointer prototype for the xrCreateApiLayerInstance function used in place of xrCreateInstance.
|
||||
// This function allows us to pass special API layer information to each layer during the process of creating an Instance.
|
||||
typedef XrResult(XRAPI_PTR *PFN_xrCreateApiLayerInstance)(const XrInstanceCreateInfo *info,
|
||||
const XrApiLayerCreateInfo *apiLayerInfo, XrInstance *instance);
|
||||
|
||||
// Loader/API Layer Interface versions
|
||||
// 1 - First version, introduces negotiation structure and functions
|
||||
#define XR_CURRENT_LOADER_API_LAYER_VERSION 1
|
||||
|
||||
// Loader/Runtime Interface versions
|
||||
// 1 - First version, introduces negotiation structure and functions
|
||||
#define XR_CURRENT_LOADER_RUNTIME_VERSION 1
|
||||
|
||||
// Version negotiation values
|
||||
typedef enum XrLoaderInterfaceStructs {
|
||||
XR_LOADER_INTERFACE_STRUCT_UNINTIALIZED = 0,
|
||||
XR_LOADER_INTERFACE_STRUCT_LOADER_INFO,
|
||||
XR_LOADER_INTERFACE_STRUCT_API_LAYER_REQUEST,
|
||||
XR_LOADER_INTERFACE_STRUCT_RUNTIME_REQUEST,
|
||||
XR_LOADER_INTERFACE_STRUCT_API_LAYER_CREATE_INFO,
|
||||
XR_LOADER_INTERFACE_STRUCT_API_LAYER_NEXT_INFO,
|
||||
} XrLoaderInterfaceStructs;
|
||||
|
||||
#define XR_LOADER_INFO_STRUCT_VERSION 1
|
||||
typedef struct XrNegotiateLoaderInfo {
|
||||
XrLoaderInterfaceStructs structType; // XR_LOADER_INTERFACE_STRUCT_LOADER_INFO
|
||||
uint32_t structVersion; // XR_LOADER_INFO_STRUCT_VERSION
|
||||
size_t structSize; // sizeof(XrNegotiateLoaderInfo)
|
||||
uint32_t minInterfaceVersion;
|
||||
uint32_t maxInterfaceVersion;
|
||||
XrVersion minApiVersion;
|
||||
XrVersion maxApiVersion;
|
||||
} XrNegotiateLoaderInfo;
|
||||
|
||||
#define XR_API_LAYER_INFO_STRUCT_VERSION 1
|
||||
typedef struct XrNegotiateApiLayerRequest {
|
||||
XrLoaderInterfaceStructs structType; // XR_LOADER_INTERFACE_STRUCT_API_LAYER_REQUEST
|
||||
uint32_t structVersion; // XR_API_LAYER_INFO_STRUCT_VERSION
|
||||
size_t structSize; // sizeof(XrNegotiateApiLayerRequest)
|
||||
uint32_t layerInterfaceVersion; // CURRENT_LOADER_API_LAYER_VERSION
|
||||
XrVersion layerApiVersion;
|
||||
PFN_xrGetInstanceProcAddr getInstanceProcAddr;
|
||||
PFN_xrCreateApiLayerInstance createApiLayerInstance;
|
||||
} XrNegotiateApiLayerRequest;
|
||||
|
||||
#define XR_RUNTIME_INFO_STRUCT_VERSION 1
|
||||
typedef struct XrNegotiateRuntimeRequest {
|
||||
XrLoaderInterfaceStructs structType; // XR_LOADER_INTERFACE_STRUCT_RUNTIME_REQUEST
|
||||
uint32_t structVersion; // XR_RUNTIME_INFO_STRUCT_VERSION
|
||||
size_t structSize; // sizeof(XrNegotiateRuntimeRequest)
|
||||
uint32_t runtimeInterfaceVersion; // CURRENT_LOADER_RUNTIME_VERSION
|
||||
XrVersion runtimeApiVersion;
|
||||
PFN_xrGetInstanceProcAddr getInstanceProcAddr;
|
||||
} XrNegotiateRuntimeRequest;
|
||||
|
||||
// Function used to negotiate an interface betewen the loader and an API layer. Each library exposing one or
|
||||
// more API layers needs to expose at least this function.
|
||||
typedef XrResult(XRAPI_PTR *PFN_xrNegotiateLoaderApiLayerInterface)(const XrNegotiateLoaderInfo *loaderInfo,
|
||||
const char *apiLayerName,
|
||||
XrNegotiateApiLayerRequest *apiLayerRequest);
|
||||
|
||||
// Function used to negotiate an interface betewen the loader and a runtime. Each runtime should expose
|
||||
// at least this function.
|
||||
typedef XrResult(XRAPI_PTR *PFN_xrNegotiateLoaderRuntimeInterface)(const XrNegotiateLoaderInfo *loaderInfo,
|
||||
XrNegotiateRuntimeRequest *runtimeRequest);
|
||||
|
||||
// Forward declare.
|
||||
typedef struct XrApiLayerNextInfo XrApiLayerNextInfo;
|
||||
|
||||
#define XR_API_LAYER_NEXT_INFO_STRUCT_VERSION 1
|
||||
struct XrApiLayerNextInfo {
|
||||
XrLoaderInterfaceStructs structType; // XR_LOADER_INTERFACE_STRUCT_API_LAYER_NEXT_INFO
|
||||
uint32_t structVersion; // XR_API_LAYER_NEXT_INFO_STRUCT_VERSION
|
||||
size_t structSize; // sizeof(XrApiLayerNextInfo)
|
||||
char layerName[XR_MAX_API_LAYER_NAME_SIZE]; // Name of API layer which should receive this info
|
||||
PFN_xrGetInstanceProcAddr nextGetInstanceProcAddr; // Pointer to next API layer's xrGetInstanceProcAddr
|
||||
PFN_xrCreateApiLayerInstance nextCreateApiLayerInstance; // Pointer to next API layer's xrCreateApiLayerInstance
|
||||
XrApiLayerNextInfo *next; // Pointer to the next API layer info in the sequence
|
||||
};
|
||||
|
||||
#define XR_API_LAYER_MAX_SETTINGS_PATH_SIZE 512
|
||||
#define XR_API_LAYER_CREATE_INFO_STRUCT_VERSION 1
|
||||
typedef struct XrApiLayerCreateInfo {
|
||||
XrLoaderInterfaceStructs structType; // XR_LOADER_INTERFACE_STRUCT_API_LAYER_CREATE_INFO
|
||||
uint32_t structVersion; // XR_API_LAYER_CREATE_INFO_STRUCT_VERSION
|
||||
size_t structSize; // sizeof(XrApiLayerCreateInfo)
|
||||
void *loaderInstance; // Pointer to the LoaderInstance class
|
||||
char settings_file_location[XR_API_LAYER_MAX_SETTINGS_PATH_SIZE]; // Location to the found settings file (or empty '\0')
|
||||
XrApiLayerNextInfo *nextInfo; // Pointer to the next API layer's Info
|
||||
} XrApiLayerCreateInfo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
// Copyright (c) 2019 Collabora, Ltd.
|
||||
|
@ -6,7 +6,7 @@
|
|||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
// Initial Authors: Mark Young <marky@lunarg.com>
|
||||
// Ryan Pavlik <ryan.pavlik@collabora.com>
|
||||
// Rylie Pavlik <rylie.pavlik@collabora.com>
|
||||
// Dave Houlton <daveh@lunarg.com>
|
||||
//
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
// Copyright (c) 2019 Collabora, Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
// Initial Authors: Mark Young <marky@lunarg.com>, Ryan Pavlik <ryan.pavlik@collabora.com
|
||||
// Initial Authors: Mark Young <marky@lunarg.com>, Rylie Pavlik <rylie.pavlik@collabora.com
|
||||
//
|
||||
/*!
|
||||
* @file
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017 Valve Corporation
|
||||
// Copyright (c) 2017 LunarG, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
#pragma once
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2018-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2018-2024, The Khronos Group Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2016, Oculus VR, LLC.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright (c) 2020-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2020-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2020-2021, Collabora, Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
// Initial Author: Ryan Pavlik <ryan.pavlik@collabora.com>
|
||||
// Initial Author: Rylie Pavlik <rylie.pavlik@collabora.com>
|
||||
|
||||
#include "android_utilities.h"
|
||||
|
||||
|
@ -245,18 +245,38 @@ static int populateFunctions(wrap::android::content::Context const &context, boo
|
|||
return 0;
|
||||
}
|
||||
|
||||
// The current file relies on android-jni-wrappers and jnipp, which may throw on failure.
|
||||
// This is problematic when the loader is compiled with exception handling disabled - the consumers can reasonably
|
||||
// expect that the compilation with -fno-exceptions will succeed, but the compiler will not accept the code that
|
||||
// uses `try` & `catch` keywords. We cannot use the `exception_handling.hpp` here since we're not at an ABI boundary,
|
||||
// so we define helper macros here. This is fine for now since the only occurrence of exception-handling code is in this file.
|
||||
#ifdef XRLOADER_DISABLE_EXCEPTION_HANDLING
|
||||
|
||||
#define ANDROID_UTILITIES_TRY
|
||||
#define ANDROID_UTILITIES_CATCH_FALLBACK(...)
|
||||
|
||||
#else
|
||||
|
||||
#define ANDROID_UTILITIES_TRY try
|
||||
#define ANDROID_UTILITIES_CATCH_FALLBACK(...) \
|
||||
catch (const std::exception &e) { \
|
||||
__VA_ARGS__ \
|
||||
}
|
||||
|
||||
#endif // XRLOADER_DISABLE_EXCEPTION_HANDLING
|
||||
|
||||
/// Get cursor for active runtime, parameterized by whether or not we use the system broker
|
||||
static bool getActiveRuntimeCursor(wrap::android::content::Context const &context, jni::Array<std::string> const &projection,
|
||||
bool systemBroker, Cursor &cursor) {
|
||||
auto uri = active_runtime::makeContentUri(systemBroker, XR_VERSION_MAJOR(XR_CURRENT_API_VERSION), ABI);
|
||||
ALOGI("getActiveRuntimeCursor: Querying URI: %s", uri.toString().c_str());
|
||||
try {
|
||||
cursor = context.getContentResolver().query(uri, projection);
|
||||
} catch (const std::exception &e) {
|
||||
|
||||
ANDROID_UTILITIES_TRY { cursor = context.getContentResolver().query(uri, projection); }
|
||||
ANDROID_UTILITIES_CATCH_FALLBACK({
|
||||
ALOGW("Exception when querying %s content resolver: %s", getBrokerTypeName(systemBroker), e.what());
|
||||
cursor = {};
|
||||
return false;
|
||||
}
|
||||
})
|
||||
|
||||
if (cursor.isNull()) {
|
||||
ALOGW("Null cursor when querying %s content resolver.", getBrokerTypeName(systemBroker));
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright (c) 2020-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2020-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2020-2021, Collabora, Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
// Initial Author: Ryan Pavlik <ryan.pavlik@collabora.com>
|
||||
// Initial Author: Rylie Pavlik <rylie.pavlik@collabora.com>
|
||||
|
||||
#pragma once
|
||||
#ifdef __ANDROID__
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
@ -9,13 +9,14 @@
|
|||
|
||||
#include "api_layer_interface.hpp"
|
||||
|
||||
#include "loader_interfaces.h"
|
||||
#include "loader_init_data.hpp"
|
||||
#include "loader_logger.hpp"
|
||||
#include "loader_platform.hpp"
|
||||
#include "manifest_file.hpp"
|
||||
#include "platform_utils.hpp"
|
||||
|
||||
#include <openxr/openxr.h>
|
||||
#include <openxr/openxr_loader_negotiation.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
|
@ -282,6 +283,38 @@ XrResult ApiLayerInterface::LoadApiLayers(const std::string& openxr_command, uin
|
|||
LoaderLogger::LogWarningMessage(openxr_command, warning_message);
|
||||
continue;
|
||||
}
|
||||
#ifdef XR_KHR_LOADER_INIT_SUPPORT
|
||||
if (!LoaderInitData::instance().initialized()) {
|
||||
LoaderLogger::LogErrorMessage(openxr_command, "ApiLayerInterface::LoadApiLayers skipping manifest file " +
|
||||
manifest_file->Filename() +
|
||||
" because xrInitializeLoaderKHR was not yet called.");
|
||||
|
||||
LoaderPlatformLibraryClose(layer_library);
|
||||
return XR_ERROR_VALIDATION_FAILURE;
|
||||
}
|
||||
bool forwardedInitLoader = false;
|
||||
{
|
||||
// If we have xrInitializeLoaderKHR exposed as an export, forward call to it.
|
||||
const auto function_name = manifest_file->GetFunctionName("xrInitializeLoaderKHR");
|
||||
auto initLoader =
|
||||
reinterpret_cast<PFN_xrInitializeLoaderKHR>(LoaderPlatformLibraryGetProcAddr(layer_library, function_name));
|
||||
if (initLoader != nullptr) {
|
||||
// we found the entry point one way or another.
|
||||
LoaderLogger::LogInfoMessage(openxr_command,
|
||||
"ApiLayerInterface::LoadApiLayers forwarding xrInitializeLoaderKHR call to API layer "
|
||||
"before calling xrNegotiateLoaderApiLayerInterface.");
|
||||
XrResult res = initLoader(LoaderInitData::instance().getParam());
|
||||
if (!XR_SUCCEEDED(res)) {
|
||||
LoaderLogger::LogErrorMessage(
|
||||
openxr_command, "ApiLayerInterface::LoadApiLayers forwarded call to xrInitializeLoaderKHR failed.");
|
||||
|
||||
LoaderPlatformLibraryClose(layer_library);
|
||||
return res;
|
||||
}
|
||||
forwardedInitLoader = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Get and settle on an layer interface version (using any provided name if required).
|
||||
std::string function_name = manifest_file->GetFunctionName("xrNegotiateLoaderApiLayerInterface");
|
||||
|
@ -324,6 +357,38 @@ XrResult ApiLayerInterface::LoadApiLayers(const std::string& openxr_command, uin
|
|||
LoaderLogger::LogWarningMessage(openxr_command, warning_message);
|
||||
res = XR_ERROR_FILE_CONTENTS_INVALID;
|
||||
}
|
||||
|
||||
#ifdef XR_KHR_LOADER_INIT_SUPPORT
|
||||
if (XR_SUCCEEDED(res) && !forwardedInitLoader) {
|
||||
// Forward initialize loader call, where possible and if we did not do so before.
|
||||
PFN_xrVoidFunction initializeVoid = nullptr;
|
||||
PFN_xrInitializeLoaderKHR initialize = nullptr;
|
||||
|
||||
// Now we may try asking xrGetInstanceProcAddr on the API layer
|
||||
if (XR_SUCCEEDED(api_layer_info.getInstanceProcAddr(XR_NULL_HANDLE, "xrInitializeLoaderKHR", &initializeVoid))) {
|
||||
if (initializeVoid == nullptr) {
|
||||
LoaderLogger::LogErrorMessage(openxr_command,
|
||||
"ApiLayerInterface::LoadApiLayers got success from xrGetInstanceProcAddr "
|
||||
"for xrInitializeLoaderKHR, but output a null pointer.");
|
||||
res = XR_ERROR_RUNTIME_FAILURE;
|
||||
} else {
|
||||
initialize = reinterpret_cast<PFN_xrInitializeLoaderKHR>(initializeVoid);
|
||||
}
|
||||
}
|
||||
if (initialize != nullptr) {
|
||||
// we found the entry point one way or another.
|
||||
LoaderLogger::LogInfoMessage(openxr_command,
|
||||
"ApiLayerInterface::LoadApiLayers forwarding xrInitializeLoaderKHR call to API layer "
|
||||
"after calling xrNegotiateLoaderApiLayerInterface.");
|
||||
res = initialize(LoaderInitData::instance().getParam());
|
||||
if (!XR_SUCCEEDED(res)) {
|
||||
LoaderLogger::LogErrorMessage(
|
||||
openxr_command, "ApiLayerInterface::LoadApiLayers forwarded call to xrInitializeLoaderKHR failed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (XR_FAILED(res)) {
|
||||
if (!any_loaded) {
|
||||
last_error = res;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
@ -14,9 +14,9 @@
|
|||
#include <memory>
|
||||
|
||||
#include <openxr/openxr.h>
|
||||
#include <openxr/openxr_loader_negotiation.h>
|
||||
|
||||
#include "loader_platform.hpp"
|
||||
#include "loader_interfaces.h"
|
||||
|
||||
struct XrGeneratedDispatchTable;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (c) 2019-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2019-2024, The Khronos Group Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
// Initial Author: Ryan Pavlik <ryan.pavlik@collabora.com>
|
||||
// Initial Author: Rylie Pavlik <rylie.pavlik@collabora.com>
|
||||
//
|
||||
// Provides protection for C ABI functions if standard library functions may throw.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
@ -14,6 +14,7 @@
|
|||
#include "api_layer_interface.hpp"
|
||||
#include "exception_handling.hpp"
|
||||
#include "hex_and_handles.h"
|
||||
#include "loader_init_data.hpp"
|
||||
#include "loader_instance.hpp"
|
||||
#include "loader_logger_recorders.hpp"
|
||||
#include "loader_logger.hpp"
|
||||
|
@ -77,7 +78,7 @@ inline bool IsMissingNullTerminator(const char (&str)[max_length]) {
|
|||
#ifdef XR_KHR_LOADER_INIT_SUPPORT // platforms that support XR_KHR_loader_init.
|
||||
XRAPI_ATTR XrResult XRAPI_CALL LoaderXrInitializeLoaderKHR(const XrLoaderInitInfoBaseHeaderKHR *loaderInitInfo) XRLOADER_ABI_TRY {
|
||||
LoaderLogger::LogVerboseMessage("xrInitializeLoaderKHR", "Entering loader trampoline");
|
||||
return InitializeLoader(loaderInitInfo);
|
||||
return InitializeLoaderInitData(loaderInitInfo);
|
||||
}
|
||||
XRLOADER_ABI_CATCH_FALLBACK
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
// Initial Author: Mark Young <marky@lunarg.com>
|
||||
//
|
||||
|
||||
#include "loader_init_data.hpp"
|
||||
|
||||
#ifdef XR_KHR_LOADER_INIT_SUPPORT
|
||||
|
||||
#ifdef XR_USE_PLATFORM_ANDROID
|
||||
// Check and copy the Android-specific init data.
|
||||
XrResult LoaderInitData::initialize(const XrLoaderInitInfoBaseHeaderKHR* info) {
|
||||
if (info->type != XR_TYPE_LOADER_INIT_INFO_ANDROID_KHR) {
|
||||
return XR_ERROR_VALIDATION_FAILURE;
|
||||
}
|
||||
auto cast_info = reinterpret_cast<XrLoaderInitInfoAndroidKHR const*>(info);
|
||||
|
||||
if (cast_info->applicationVM == nullptr) {
|
||||
return XR_ERROR_VALIDATION_FAILURE;
|
||||
}
|
||||
if (cast_info->applicationContext == nullptr) {
|
||||
return XR_ERROR_VALIDATION_FAILURE;
|
||||
}
|
||||
|
||||
// Copy and store the JVM pointer and Android Context, ensuring the JVM is initialised.
|
||||
_data = *cast_info;
|
||||
_data.next = nullptr;
|
||||
jni::init(static_cast<jni::JavaVM*>(_data.applicationVM));
|
||||
const jni::Object context = jni::Object{static_cast<jni::jobject>(_data.applicationContext)};
|
||||
|
||||
// Retrieve a reference to the Android AssetManager.
|
||||
const auto assetManager = context.call<jni::Object>("getAssets()Landroid/content/res/AssetManager;");
|
||||
_android_asset_manager = AAssetManager_fromJava(jni::env(), assetManager.getHandle());
|
||||
|
||||
// Retrieve the path to the native libraries.
|
||||
const auto applicationContext = context.call<jni::Object>("getApplicationContext()Landroid/content/Context;");
|
||||
const auto applicationInfo = context.call<jni::Object>("getApplicationInfo()Landroid/content/pm/ApplicationInfo;");
|
||||
_native_library_path = applicationInfo.get<std::string>("nativeLibraryDir");
|
||||
|
||||
_initialized = true;
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
#endif // XR_USE_PLATFORM_ANDROID
|
||||
|
||||
XrResult InitializeLoaderInitData(const XrLoaderInitInfoBaseHeaderKHR* loaderInitInfo) {
|
||||
return LoaderInitData::instance().initialize(loaderInitInfo);
|
||||
}
|
||||
|
||||
#ifdef XR_USE_PLATFORM_ANDROID
|
||||
std::string GetAndroidNativeLibraryDir() { return LoaderInitData::instance()._native_library_path; }
|
||||
|
||||
void* Android_Get_Asset_Manager() { return LoaderInitData::instance()._android_asset_manager; }
|
||||
#endif // XR_USE_PLATFORM_ANDROID
|
||||
|
||||
#endif // XR_KHR_LOADER_INIT_SUPPORT
|
|
@ -0,0 +1,92 @@
|
|||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
// Initial Author: Mark Young <marky@lunarg.com>
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <xr_dependencies.h>
|
||||
#include <openxr/openxr_platform.h>
|
||||
|
||||
#ifdef XR_USE_PLATFORM_ANDROID
|
||||
#include <json/value.h>
|
||||
#include <android/asset_manager_jni.h>
|
||||
#include "android_utilities.h"
|
||||
#endif // XR_USE_PLATFORM_ANDROID
|
||||
|
||||
#ifdef XR_KHR_LOADER_INIT_SUPPORT
|
||||
|
||||
/*!
|
||||
* Stores a copy of the data passed to the xrInitializeLoaderKHR function in a singleton.
|
||||
*/
|
||||
class LoaderInitData {
|
||||
public:
|
||||
/*!
|
||||
* Singleton accessor.
|
||||
*/
|
||||
static LoaderInitData& instance() {
|
||||
static LoaderInitData obj;
|
||||
return obj;
|
||||
}
|
||||
|
||||
#ifdef XR_USE_PLATFORM_ANDROID
|
||||
/*!
|
||||
* Type alias for the platform-specific structure type.
|
||||
*/
|
||||
using StructType = XrLoaderInitInfoAndroidKHR;
|
||||
/*!
|
||||
* Native library path.
|
||||
*/
|
||||
std::string _native_library_path;
|
||||
/*!
|
||||
* Android asset manager.
|
||||
*/
|
||||
AAssetManager* _android_asset_manager;
|
||||
#else
|
||||
#error "Platform specific XR_KHR_loader_init structure is not defined for this platform."
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* Get our copy of the data, casted to pass to the runtime's matching method.
|
||||
*/
|
||||
const XrLoaderInitInfoBaseHeaderKHR* getParam() const { return reinterpret_cast<const XrLoaderInitInfoBaseHeaderKHR*>(&_data); }
|
||||
|
||||
/*!
|
||||
* Get the data via its real structure type.
|
||||
*/
|
||||
const StructType& getData() const { return _data; }
|
||||
|
||||
/*!
|
||||
* Has this been correctly initialized?
|
||||
*/
|
||||
bool initialized() const noexcept { return _initialized; }
|
||||
|
||||
/*!
|
||||
* Initialize loader data - called by InitializeLoaderInitData() and thus ultimately by the loader's xrInitializeLoaderKHR
|
||||
* implementation. Each platform that needs this extension will provide an implementation of this.
|
||||
*/
|
||||
XrResult initialize(const XrLoaderInitInfoBaseHeaderKHR* info);
|
||||
|
||||
private:
|
||||
//! Private constructor, forces use of singleton accessor.
|
||||
LoaderInitData() = default;
|
||||
//! Platform-specific init data
|
||||
StructType _data = {};
|
||||
//! Flag for indicating whether _data is valid.
|
||||
bool _initialized = false;
|
||||
};
|
||||
|
||||
//! Initialize loader init data, where required.
|
||||
XrResult InitializeLoaderInitData(const XrLoaderInitInfoBaseHeaderKHR* loaderInitInfo);
|
||||
|
||||
#ifdef XR_USE_PLATFORM_ANDROID
|
||||
XrResult GetPlatformRuntimeVirtualManifest(Json::Value& out_manifest);
|
||||
std::string GetAndroidNativeLibraryDir();
|
||||
void* Android_Get_Asset_Manager();
|
||||
#endif // XR_USE_PLATFORM_ANDROID
|
||||
|
||||
#endif // XR_KHR_LOADER_INIT_SUPPORT
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
@ -15,13 +15,13 @@
|
|||
|
||||
#include "api_layer_interface.hpp"
|
||||
#include "hex_and_handles.h"
|
||||
#include "loader_interfaces.h"
|
||||
#include "loader_logger.hpp"
|
||||
#include "runtime_interface.hpp"
|
||||
#include "xr_generated_dispatch_table_core.h"
|
||||
#include "xr_generated_loader.hpp"
|
||||
|
||||
#include <openxr/openxr.h>
|
||||
#include <openxr/openxr_loader_negotiation.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
|
@ -60,7 +60,7 @@ XrResult Get(LoaderInstance** loader_instance, const char* log_function_name) {
|
|||
|
||||
bool IsAvailable() { return GetSetCurrentLoaderInstance() != nullptr; }
|
||||
|
||||
void Remove() { GetSetCurrentLoaderInstance().release(); }
|
||||
void Remove() { GetSetCurrentLoaderInstance().reset(nullptr); }
|
||||
} // namespace ActiveLoaderInstance
|
||||
|
||||
// Extensions that are supported by the loader, but may not be supported
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
@ -10,9 +10,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "extra_algorithms.h"
|
||||
#include "loader_interfaces.h"
|
||||
|
||||
#include <openxr/openxr.h>
|
||||
#include <openxr/openxr_loader_negotiation.h>
|
||||
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
// Initial Author: Ryan Pavlik <ryan.pavlik@collabora.com>
|
||||
// Initial Author: Rylie Pavlik <rylie.pavlik@collabora.com>
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
@ -18,6 +18,7 @@
|
|||
#endif // OPENXR_HAVE_COMMON_CONFIG
|
||||
|
||||
#include "filesystem_utils.hpp"
|
||||
#include "loader_init_data.hpp"
|
||||
#include "loader_platform.hpp"
|
||||
#include "platform_utils.hpp"
|
||||
#include "loader_logger.hpp"
|
||||
|
@ -666,14 +667,14 @@ XrResult RuntimeManifestFile::FindManifestFiles(std::vector<std::unique_ptr<Runt
|
|||
}
|
||||
#else
|
||||
|
||||
#if defined(XR_KHR_LOADER_INIT_SUPPORT)
|
||||
#if defined(XR_USE_PLATFORM_ANDROID)
|
||||
Json::Value virtualManifest;
|
||||
result = GetPlatformRuntimeVirtualManifest(virtualManifest);
|
||||
if (XR_SUCCESS == result) {
|
||||
RuntimeManifestFile::CreateIfValid(virtualManifest, "", manifest_files);
|
||||
return result;
|
||||
}
|
||||
#endif // defined(XR_KHR_LOADER_INIT_SUPPORT)
|
||||
#endif // defined(XR_USE_PLATFORM_ANDROID)
|
||||
if (!PlatformGetGlobalRuntimeFileName(XR_VERSION_MAJOR(XR_CURRENT_API_VERSION), filename)) {
|
||||
LoaderLogger::LogErrorMessage(
|
||||
"", "RuntimeManifestFile::FindManifestFiles - failed to determine active runtime file path for this environment");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017 Valve Corporation
|
||||
// Copyright (c) 2017 LunarG, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
@ -9,14 +9,15 @@
|
|||
|
||||
#include "runtime_interface.hpp"
|
||||
|
||||
#include <openxr/openxr.h>
|
||||
#include <openxr/openxr_loader_negotiation.h>
|
||||
|
||||
#include "manifest_file.hpp"
|
||||
#include "loader_interfaces.h"
|
||||
#include "loader_init_data.hpp"
|
||||
#include "loader_logger.hpp"
|
||||
#include "loader_platform.hpp"
|
||||
#include "xr_generated_dispatch_table_core.h"
|
||||
|
||||
#include <openxr/openxr.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
@ -26,8 +27,6 @@
|
|||
#include <vector>
|
||||
|
||||
#ifdef XR_USE_PLATFORM_ANDROID
|
||||
#include "android_utilities.h"
|
||||
#include <android/asset_manager_jni.h>
|
||||
#include <json/value.h>
|
||||
|
||||
// Needed for the loader init struct
|
||||
|
@ -35,112 +34,6 @@
|
|||
#include <openxr/openxr_platform.h>
|
||||
#endif // XR_USE_PLATFORM_ANDROID
|
||||
|
||||
#ifdef XR_KHR_LOADER_INIT_SUPPORT
|
||||
namespace {
|
||||
/*!
|
||||
* Stores a copy of the data passed to the xrInitializeLoaderKHR function in a singleton.
|
||||
*/
|
||||
class LoaderInitData {
|
||||
public:
|
||||
/*!
|
||||
* Singleton accessor.
|
||||
*/
|
||||
static LoaderInitData& instance() {
|
||||
static LoaderInitData obj;
|
||||
return obj;
|
||||
}
|
||||
|
||||
#ifdef XR_USE_PLATFORM_ANDROID
|
||||
/*!
|
||||
* Type alias for the platform-specific structure type.
|
||||
*/
|
||||
using StructType = XrLoaderInitInfoAndroidKHR;
|
||||
/*!
|
||||
* Native library path.
|
||||
*/
|
||||
std::string _native_library_path;
|
||||
/*!
|
||||
* Android asset manager.
|
||||
*/
|
||||
AAssetManager* _android_asset_manager;
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* Get our copy of the data, casted to pass to the runtime's matching method.
|
||||
*/
|
||||
const XrLoaderInitInfoBaseHeaderKHR* getParam() const { return reinterpret_cast<const XrLoaderInitInfoBaseHeaderKHR*>(&_data); }
|
||||
|
||||
/*!
|
||||
* Get the data via its real structure type.
|
||||
*/
|
||||
const StructType& getData() const { return _data; }
|
||||
|
||||
/*!
|
||||
* Has this been correctly initialized?
|
||||
*/
|
||||
bool initialized() const noexcept { return _initialized; }
|
||||
|
||||
/*!
|
||||
* Initialize loader data - called by InitializeLoader() and thus ultimately by the loader's xrInitializeLoaderKHR
|
||||
* implementation. Each platform that needs this extension will provide an implementation of this.
|
||||
*/
|
||||
XrResult initialize(const XrLoaderInitInfoBaseHeaderKHR* info);
|
||||
|
||||
private:
|
||||
//! Private constructor, forces use of singleton accessor.
|
||||
LoaderInitData() = default;
|
||||
//! Platform-specific init data
|
||||
StructType _data = {};
|
||||
//! Flag for indicating whether _data is valid.
|
||||
bool _initialized = false;
|
||||
};
|
||||
|
||||
#ifdef XR_USE_PLATFORM_ANDROID
|
||||
// Check and copy the Android-specific init data.
|
||||
XrResult LoaderInitData::initialize(const XrLoaderInitInfoBaseHeaderKHR* info) {
|
||||
if (info->type != XR_TYPE_LOADER_INIT_INFO_ANDROID_KHR) {
|
||||
return XR_ERROR_VALIDATION_FAILURE;
|
||||
}
|
||||
auto cast_info = reinterpret_cast<XrLoaderInitInfoAndroidKHR const*>(info);
|
||||
|
||||
if (cast_info->applicationVM == nullptr) {
|
||||
return XR_ERROR_VALIDATION_FAILURE;
|
||||
}
|
||||
if (cast_info->applicationContext == nullptr) {
|
||||
return XR_ERROR_VALIDATION_FAILURE;
|
||||
}
|
||||
|
||||
// Copy and store the JVM pointer and Android Context, ensuring the JVM is initialised.
|
||||
_data = *cast_info;
|
||||
_data.next = nullptr;
|
||||
jni::init(static_cast<jni::JavaVM*>(_data.applicationVM));
|
||||
const jni::Object context = jni::Object{static_cast<jni::jobject>(_data.applicationContext)};
|
||||
|
||||
// Retrieve a reference to the Android AssetManager.
|
||||
const auto assetManager = context.call<jni::Object>("getAssets()Landroid/content/res/AssetManager;");
|
||||
_android_asset_manager = AAssetManager_fromJava(jni::env(), assetManager.getHandle());
|
||||
|
||||
// Retrieve the path to the native libraries.
|
||||
const auto applicationContext = context.call<jni::Object>("getApplicationContext()Landroid/content/Context;");
|
||||
const auto applicationInfo = context.call<jni::Object>("getApplicationInfo()Landroid/content/pm/ApplicationInfo;");
|
||||
_native_library_path = applicationInfo.get<std::string>("nativeLibraryDir");
|
||||
|
||||
_initialized = true;
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
#endif // XR_USE_PLATFORM_ANDROID
|
||||
} // namespace
|
||||
|
||||
XrResult InitializeLoader(const XrLoaderInitInfoBaseHeaderKHR* loaderInitInfo) {
|
||||
return LoaderInitData::instance().initialize(loaderInitInfo);
|
||||
}
|
||||
|
||||
std::string GetAndroidNativeLibraryDir() { return LoaderInitData::instance()._native_library_path; }
|
||||
|
||||
void* Android_Get_Asset_Manager() { return LoaderInitData::instance()._android_asset_manager; }
|
||||
|
||||
#endif // XR_KHR_LOADER_INIT_SUPPORT
|
||||
|
||||
#ifdef XR_USE_PLATFORM_ANDROID
|
||||
XrResult GetPlatformRuntimeVirtualManifest(Json::Value& out_manifest) {
|
||||
using wrap::android::content::Context;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
@ -19,22 +19,10 @@
|
|||
#include <mutex>
|
||||
#include <memory>
|
||||
|
||||
#ifdef XR_USE_PLATFORM_ANDROID
|
||||
#define XR_KHR_LOADER_INIT_SUPPORT
|
||||
#endif
|
||||
|
||||
namespace Json {
|
||||
class Value;
|
||||
}
|
||||
|
||||
#ifdef XR_KHR_LOADER_INIT_SUPPORT
|
||||
//! Initialize loader, where required.
|
||||
XrResult InitializeLoader(const XrLoaderInitInfoBaseHeaderKHR* loaderInitInfo);
|
||||
XrResult GetPlatformRuntimeVirtualManifest(Json::Value& out_manifest);
|
||||
std::string GetAndroidNativeLibraryDir();
|
||||
void* Android_Get_Asset_Manager();
|
||||
#endif
|
||||
|
||||
class RuntimeManifestFile;
|
||||
struct XrGeneratedDispatchTable;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
|
@ -6,7 +6,7 @@
|
|||
// See loader_source_generator.py for modifications
|
||||
// ************************************************************
|
||||
|
||||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
|
@ -6,7 +6,7 @@
|
|||
// See loader_source_generator.py for modifications
|
||||
// ************************************************************
|
||||
|
||||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
@ -34,10 +34,9 @@
|
|||
|
||||
#include "xr_dependencies.h"
|
||||
#include "openxr/openxr.h"
|
||||
#include "openxr/openxr_loader_negotiation.h"
|
||||
#include "openxr/openxr_platform.h"
|
||||
|
||||
#include "loader_interfaces.h"
|
||||
|
||||
#include "loader_instance.hpp"
|
||||
|
||||
#include "loader_platform.hpp"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019, Valve Corporation
|
||||
// Copyright (c) 2017-2019, LunarG, Inc.
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
|||
// See utility_source_generator.py for modifications
|
||||
// ************************************************************
|
||||
|
||||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019, Valve Corporation
|
||||
// Copyright (c) 2017-2019, LunarG, Inc.
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
|||
// See utility_source_generator.py for modifications
|
||||
// ************************************************************
|
||||
|
||||
// Copyright (c) 2017-2023, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2024, The Khronos Group Inc.
|
||||
// Copyright (c) 2017-2019 Valve Corporation
|
||||
// Copyright (c) 2017-2019 LunarG, Inc.
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue