OpenXR: Update to version 1.0.34

This commit is contained in:
Malcolm Nixon 2024-02-19 18:41:58 -05:00
parent fb10e67fef
commit 3e8a794832
11 changed files with 1360 additions and 60 deletions

View file

@ -722,7 +722,7 @@ with the provided patch.
## openxr
- Upstream: https://github.com/KhronosGroup/OpenXR-SDK
- Version: 1.0.33 (dc1e23937fe45eabcce80f6588cf47449edb29d1, 2024)
- Version: 1.0.34 (288d3a7ebc1ad959f62d51da75baa3d27438c499, 2024)
- License: Apache 2.0
Files extracted from upstream source:

View file

@ -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, 33)
#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 0, 34)
#define XR_VERSION_MAJOR(version) (uint16_t)(((uint64_t)(version) >> 48)& 0xffffULL)
#define XR_VERSION_MINOR(version) (uint16_t)(((uint64_t)(version) >> 32) & 0xffffULL)
@ -549,11 +549,19 @@ typedef enum XrStructureType {
XR_TYPE_EVENT_DATA_SPACE_LIST_SAVE_COMPLETE_FB = 1000238001,
XR_TYPE_SPACE_USER_CREATE_INFO_FB = 1000241001,
XR_TYPE_SYSTEM_HEADSET_ID_PROPERTIES_META = 1000245000,
XR_TYPE_RECOMMENDED_LAYER_RESOLUTION_META = 1000254000,
XR_TYPE_RECOMMENDED_LAYER_RESOLUTION_GET_INFO_META = 1000254001,
XR_TYPE_SYSTEM_PASSTHROUGH_COLOR_LUT_PROPERTIES_META = 1000266000,
XR_TYPE_PASSTHROUGH_COLOR_LUT_CREATE_INFO_META = 1000266001,
XR_TYPE_PASSTHROUGH_COLOR_LUT_UPDATE_INFO_META = 1000266002,
XR_TYPE_PASSTHROUGH_COLOR_MAP_LUT_META = 1000266100,
XR_TYPE_PASSTHROUGH_COLOR_MAP_INTERPOLATED_LUT_META = 1000266101,
XR_TYPE_SPACE_TRIANGLE_MESH_GET_INFO_META = 1000269001,
XR_TYPE_SPACE_TRIANGLE_MESH_META = 1000269002,
XR_TYPE_SYSTEM_FACE_TRACKING_PROPERTIES2_FB = 1000287013,
XR_TYPE_FACE_TRACKER_CREATE_INFO2_FB = 1000287014,
XR_TYPE_FACE_EXPRESSION_INFO2_FB = 1000287015,
XR_TYPE_FACE_EXPRESSION_WEIGHTS2_FB = 1000287016,
XR_TYPE_PASSTHROUGH_CREATE_INFO_HTC = 1000317001,
XR_TYPE_PASSTHROUGH_COLOR_HTC = 1000317002,
XR_TYPE_PASSTHROUGH_MESH_TRANSFORM_INFO_HTC = 1000317003,
@ -575,6 +583,8 @@ typedef enum XrStructureType {
XR_TYPE_PLANE_DETECTOR_LOCATION_EXT = 1000429005,
XR_TYPE_PLANE_DETECTOR_POLYGON_BUFFER_EXT = 1000429006,
XR_TYPE_SYSTEM_PLANE_DETECTION_PROPERTIES_EXT = 1000429007,
XR_TYPE_EVENT_DATA_USER_PRESENCE_CHANGED_EXT = 1000470000,
XR_TYPE_SYSTEM_USER_PRESENCE_PROPERTIES_EXT = 1000470001,
XR_TYPE_GRAPHICS_BINDING_VULKAN2_KHR = XR_TYPE_GRAPHICS_BINDING_VULKAN_KHR,
XR_TYPE_SWAPCHAIN_IMAGE_VULKAN2_KHR = XR_TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR,
XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN2_KHR = XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN_KHR,
@ -672,6 +682,7 @@ typedef enum XrObjectType {
XR_OBJECT_TYPE_VIRTUAL_KEYBOARD_META = 1000219000,
XR_OBJECT_TYPE_SPACE_USER_FB = 1000241000,
XR_OBJECT_TYPE_PASSTHROUGH_COLOR_LUT_META = 1000266000,
XR_OBJECT_TYPE_FACE_TRACKER2_FB = 1000287012,
XR_OBJECT_TYPE_PASSTHROUGH_HTC = 1000317000,
XR_OBJECT_TYPE_PLANE_DETECTOR_EXT = 1000429000,
XR_OBJECT_TYPE_MAX_ENUM = 0x7FFFFFFF
@ -3616,7 +3627,7 @@ typedef struct XrHandTrackingCapsulesStateFB {
#define XR_FB_spatial_entity 1
XR_DEFINE_ATOM(XrAsyncRequestIdFB)
#define XR_UUID_SIZE_EXT 16
#define XR_FB_spatial_entity_SPEC_VERSION 2
#define XR_FB_spatial_entity_SPEC_VERSION 3
#define XR_FB_SPATIAL_ENTITY_EXTENSION_NAME "XR_FB_spatial_entity"
typedef enum XrSpaceComponentTypeFB {
@ -3628,6 +3639,7 @@ typedef enum XrSpaceComponentTypeFB {
XR_SPACE_COMPONENT_TYPE_SEMANTIC_LABELS_FB = 5,
XR_SPACE_COMPONENT_TYPE_ROOM_LAYOUT_FB = 6,
XR_SPACE_COMPONENT_TYPE_SPACE_CONTAINER_FB = 7,
XR_SPACE_COMPONENT_TYPE_TRIANGLE_MESH_META = 1000269000,
XR_SPACE_COMPONENT_TYPE_MAX_ENUM_FB = 0x7FFFFFFF
} XrSpaceComponentTypeFB;
// XrSystemSpatialEntityPropertiesFB extends XrSystemProperties
@ -4332,6 +4344,11 @@ XRAPI_ATTR XrResult XRAPI_CALL xrSetViewOffsetVARJO(
#endif /* !XR_NO_PROTOTYPES */
#define XR_VARJO_xr4_controller_interaction 1
#define XR_VARJO_xr4_controller_interaction_SPEC_VERSION 1
#define XR_VARJO_XR4_CONTROLLER_INTERACTION_EXTENSION_NAME "XR_VARJO_xr4_controller_interaction"
#define XR_ML_ml2_controller_interaction 1
#define XR_ML_ml2_controller_interaction_SPEC_VERSION 1
#define XR_ML_ML2_CONTROLLER_INTERACTION_EXTENSION_NAME "XR_ML_ml2_controller_interaction"
@ -5151,13 +5168,14 @@ typedef struct XrHapticAmplitudeEnvelopeVibrationFB {
#define XR_FB_scene 1
#define XR_FB_scene_SPEC_VERSION 3
#define XR_FB_scene_SPEC_VERSION 4
#define XR_FB_SCENE_EXTENSION_NAME "XR_FB_scene"
typedef XrFlags64 XrSemanticLabelsSupportFlagsFB;
// Flag bits for XrSemanticLabelsSupportFlagsFB
static const XrSemanticLabelsSupportFlagsFB XR_SEMANTIC_LABELS_SUPPORT_MULTIPLE_SEMANTIC_LABELS_BIT_FB = 0x00000001;
static const XrSemanticLabelsSupportFlagsFB XR_SEMANTIC_LABELS_SUPPORT_ACCEPT_DESK_TO_TABLE_MIGRATION_BIT_FB = 0x00000002;
static const XrSemanticLabelsSupportFlagsFB XR_SEMANTIC_LABELS_SUPPORT_ACCEPT_INVISIBLE_WALL_FACE_BIT_FB = 0x00000004;
typedef struct XrExtent3DfFB {
float width;
@ -5612,6 +5630,7 @@ static const XrCompositionLayerSettingsFlagsFB XR_COMPOSITION_LAYER_SETTINGS_NOR
static const XrCompositionLayerSettingsFlagsFB XR_COMPOSITION_LAYER_SETTINGS_QUALITY_SUPER_SAMPLING_BIT_FB = 0x00000002;
static const XrCompositionLayerSettingsFlagsFB XR_COMPOSITION_LAYER_SETTINGS_NORMAL_SHARPENING_BIT_FB = 0x00000004;
static const XrCompositionLayerSettingsFlagsFB XR_COMPOSITION_LAYER_SETTINGS_QUALITY_SHARPENING_BIT_FB = 0x00000008;
static const XrCompositionLayerSettingsFlagsFB XR_COMPOSITION_LAYER_SETTINGS_AUTO_LAYER_FILTER_BIT_META = 0x00000020;
// XrCompositionLayerSettingsFB extends XrCompositionLayerBaseHeader
typedef struct XrCompositionLayerSettingsFB {
@ -6115,7 +6134,7 @@ XRAPI_ATTR XrResult XRAPI_CALL xrDestroySpaceUserFB(
#define XR_META_headset_id 1
#define XR_META_headset_id_SPEC_VERSION 1
#define XR_META_headset_id_SPEC_VERSION 2
#define XR_META_HEADSET_ID_EXTENSION_NAME "XR_META_headset_id"
// XrSystemHeadsetIdPropertiesMETA extends XrSystemProperties
typedef struct XrSystemHeadsetIdPropertiesMETA {
@ -6126,6 +6145,35 @@ typedef struct XrSystemHeadsetIdPropertiesMETA {
#define XR_META_recommended_layer_resolution 1
#define XR_META_recommended_layer_resolution_SPEC_VERSION 1
#define XR_META_RECOMMENDED_LAYER_RESOLUTION_EXTENSION_NAME "XR_META_recommended_layer_resolution"
typedef struct XrRecommendedLayerResolutionMETA {
XrStructureType type;
void* XR_MAY_ALIAS next;
XrExtent2Di recommendedImageDimensions;
XrBool32 isValid;
} XrRecommendedLayerResolutionMETA;
typedef struct XrRecommendedLayerResolutionGetInfoMETA {
XrStructureType type;
const void* XR_MAY_ALIAS next;
const XrCompositionLayerBaseHeader* layer;
XrTime predictedDisplayTime;
} XrRecommendedLayerResolutionGetInfoMETA;
typedef XrResult (XRAPI_PTR *PFN_xrGetRecommendedLayerResolutionMETA)(XrSession session, const XrRecommendedLayerResolutionGetInfoMETA* info, XrRecommendedLayerResolutionMETA* resolution);
#ifndef XR_NO_PROTOTYPES
#ifdef XR_EXTENSION_PROTOTYPES
XRAPI_ATTR XrResult XRAPI_CALL xrGetRecommendedLayerResolutionMETA(
XrSession session,
const XrRecommendedLayerResolutionGetInfoMETA* info,
XrRecommendedLayerResolutionMETA* resolution);
#endif /* XR_EXTENSION_PROTOTYPES */
#endif /* !XR_NO_PROTOTYPES */
#define XR_META_passthrough_color_lut 1
XR_DEFINE_HANDLE(XrPassthroughColorLutMETA)
#define XR_META_passthrough_color_lut_SPEC_VERSION 1
@ -6200,11 +6248,201 @@ XRAPI_ATTR XrResult XRAPI_CALL xrUpdatePassthroughColorLutMETA(
#endif /* !XR_NO_PROTOTYPES */
#define XR_META_spatial_entity_mesh 1
#define XR_META_spatial_entity_mesh_SPEC_VERSION 1
#define XR_META_SPATIAL_ENTITY_MESH_EXTENSION_NAME "XR_META_spatial_entity_mesh"
typedef struct XrSpaceTriangleMeshGetInfoMETA {
XrStructureType type;
const void* XR_MAY_ALIAS next;
} XrSpaceTriangleMeshGetInfoMETA;
typedef struct XrSpaceTriangleMeshMETA {
XrStructureType type;
void* XR_MAY_ALIAS next;
uint32_t vertexCapacityInput;
uint32_t vertexCountOutput;
XrVector3f* vertices;
uint32_t indexCapacityInput;
uint32_t indexCountOutput;
uint32_t* indices;
} XrSpaceTriangleMeshMETA;
typedef XrResult (XRAPI_PTR *PFN_xrGetSpaceTriangleMeshMETA)(XrSpace space, const XrSpaceTriangleMeshGetInfoMETA* getInfo, XrSpaceTriangleMeshMETA* triangleMeshOutput);
#ifndef XR_NO_PROTOTYPES
#ifdef XR_EXTENSION_PROTOTYPES
XRAPI_ATTR XrResult XRAPI_CALL xrGetSpaceTriangleMeshMETA(
XrSpace space,
const XrSpaceTriangleMeshGetInfoMETA* getInfo,
XrSpaceTriangleMeshMETA* triangleMeshOutput);
#endif /* XR_EXTENSION_PROTOTYPES */
#endif /* !XR_NO_PROTOTYPES */
#define XR_META_automatic_layer_filter 1
#define XR_META_automatic_layer_filter_SPEC_VERSION 1
#define XR_META_AUTOMATIC_LAYER_FILTER_EXTENSION_NAME "XR_META_automatic_layer_filter"
#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_FB_face_tracking2 1
XR_DEFINE_HANDLE(XrFaceTracker2FB)
#define XR_FB_face_tracking2_SPEC_VERSION 1
#define XR_FB_FACE_TRACKING2_EXTENSION_NAME "XR_FB_face_tracking2"
typedef enum XrFaceExpression2FB {
XR_FACE_EXPRESSION2_BROW_LOWERER_L_FB = 0,
XR_FACE_EXPRESSION2_BROW_LOWERER_R_FB = 1,
XR_FACE_EXPRESSION2_CHEEK_PUFF_L_FB = 2,
XR_FACE_EXPRESSION2_CHEEK_PUFF_R_FB = 3,
XR_FACE_EXPRESSION2_CHEEK_RAISER_L_FB = 4,
XR_FACE_EXPRESSION2_CHEEK_RAISER_R_FB = 5,
XR_FACE_EXPRESSION2_CHEEK_SUCK_L_FB = 6,
XR_FACE_EXPRESSION2_CHEEK_SUCK_R_FB = 7,
XR_FACE_EXPRESSION2_CHIN_RAISER_B_FB = 8,
XR_FACE_EXPRESSION2_CHIN_RAISER_T_FB = 9,
XR_FACE_EXPRESSION2_DIMPLER_L_FB = 10,
XR_FACE_EXPRESSION2_DIMPLER_R_FB = 11,
XR_FACE_EXPRESSION2_EYES_CLOSED_L_FB = 12,
XR_FACE_EXPRESSION2_EYES_CLOSED_R_FB = 13,
XR_FACE_EXPRESSION2_EYES_LOOK_DOWN_L_FB = 14,
XR_FACE_EXPRESSION2_EYES_LOOK_DOWN_R_FB = 15,
XR_FACE_EXPRESSION2_EYES_LOOK_LEFT_L_FB = 16,
XR_FACE_EXPRESSION2_EYES_LOOK_LEFT_R_FB = 17,
XR_FACE_EXPRESSION2_EYES_LOOK_RIGHT_L_FB = 18,
XR_FACE_EXPRESSION2_EYES_LOOK_RIGHT_R_FB = 19,
XR_FACE_EXPRESSION2_EYES_LOOK_UP_L_FB = 20,
XR_FACE_EXPRESSION2_EYES_LOOK_UP_R_FB = 21,
XR_FACE_EXPRESSION2_INNER_BROW_RAISER_L_FB = 22,
XR_FACE_EXPRESSION2_INNER_BROW_RAISER_R_FB = 23,
XR_FACE_EXPRESSION2_JAW_DROP_FB = 24,
XR_FACE_EXPRESSION2_JAW_SIDEWAYS_LEFT_FB = 25,
XR_FACE_EXPRESSION2_JAW_SIDEWAYS_RIGHT_FB = 26,
XR_FACE_EXPRESSION2_JAW_THRUST_FB = 27,
XR_FACE_EXPRESSION2_LID_TIGHTENER_L_FB = 28,
XR_FACE_EXPRESSION2_LID_TIGHTENER_R_FB = 29,
XR_FACE_EXPRESSION2_LIP_CORNER_DEPRESSOR_L_FB = 30,
XR_FACE_EXPRESSION2_LIP_CORNER_DEPRESSOR_R_FB = 31,
XR_FACE_EXPRESSION2_LIP_CORNER_PULLER_L_FB = 32,
XR_FACE_EXPRESSION2_LIP_CORNER_PULLER_R_FB = 33,
XR_FACE_EXPRESSION2_LIP_FUNNELER_LB_FB = 34,
XR_FACE_EXPRESSION2_LIP_FUNNELER_LT_FB = 35,
XR_FACE_EXPRESSION2_LIP_FUNNELER_RB_FB = 36,
XR_FACE_EXPRESSION2_LIP_FUNNELER_RT_FB = 37,
XR_FACE_EXPRESSION2_LIP_PRESSOR_L_FB = 38,
XR_FACE_EXPRESSION2_LIP_PRESSOR_R_FB = 39,
XR_FACE_EXPRESSION2_LIP_PUCKER_L_FB = 40,
XR_FACE_EXPRESSION2_LIP_PUCKER_R_FB = 41,
XR_FACE_EXPRESSION2_LIP_STRETCHER_L_FB = 42,
XR_FACE_EXPRESSION2_LIP_STRETCHER_R_FB = 43,
XR_FACE_EXPRESSION2_LIP_SUCK_LB_FB = 44,
XR_FACE_EXPRESSION2_LIP_SUCK_LT_FB = 45,
XR_FACE_EXPRESSION2_LIP_SUCK_RB_FB = 46,
XR_FACE_EXPRESSION2_LIP_SUCK_RT_FB = 47,
XR_FACE_EXPRESSION2_LIP_TIGHTENER_L_FB = 48,
XR_FACE_EXPRESSION2_LIP_TIGHTENER_R_FB = 49,
XR_FACE_EXPRESSION2_LIPS_TOWARD_FB = 50,
XR_FACE_EXPRESSION2_LOWER_LIP_DEPRESSOR_L_FB = 51,
XR_FACE_EXPRESSION2_LOWER_LIP_DEPRESSOR_R_FB = 52,
XR_FACE_EXPRESSION2_MOUTH_LEFT_FB = 53,
XR_FACE_EXPRESSION2_MOUTH_RIGHT_FB = 54,
XR_FACE_EXPRESSION2_NOSE_WRINKLER_L_FB = 55,
XR_FACE_EXPRESSION2_NOSE_WRINKLER_R_FB = 56,
XR_FACE_EXPRESSION2_OUTER_BROW_RAISER_L_FB = 57,
XR_FACE_EXPRESSION2_OUTER_BROW_RAISER_R_FB = 58,
XR_FACE_EXPRESSION2_UPPER_LID_RAISER_L_FB = 59,
XR_FACE_EXPRESSION2_UPPER_LID_RAISER_R_FB = 60,
XR_FACE_EXPRESSION2_UPPER_LIP_RAISER_L_FB = 61,
XR_FACE_EXPRESSION2_UPPER_LIP_RAISER_R_FB = 62,
XR_FACE_EXPRESSION2_TONGUE_TIP_INTERDENTAL_FB = 63,
XR_FACE_EXPRESSION2_TONGUE_TIP_ALVEOLAR_FB = 64,
XR_FACE_EXPRESSION2_TONGUE_FRONT_DORSAL_PALATE_FB = 65,
XR_FACE_EXPRESSION2_TONGUE_MID_DORSAL_PALATE_FB = 66,
XR_FACE_EXPRESSION2_TONGUE_BACK_DORSAL_VELAR_FB = 67,
XR_FACE_EXPRESSION2_TONGUE_OUT_FB = 68,
XR_FACE_EXPRESSION2_TONGUE_RETREAT_FB = 69,
XR_FACE_EXPRESSION2_COUNT_FB = 70,
XR_FACE_EXPRESSION_2FB_MAX_ENUM_FB = 0x7FFFFFFF
} XrFaceExpression2FB;
typedef enum XrFaceExpressionSet2FB {
XR_FACE_EXPRESSION_SET2_DEFAULT_FB = 0,
XR_FACE_EXPRESSION_SET_2FB_MAX_ENUM_FB = 0x7FFFFFFF
} XrFaceExpressionSet2FB;
typedef enum XrFaceTrackingDataSource2FB {
XR_FACE_TRACKING_DATA_SOURCE2_VISUAL_FB = 0,
XR_FACE_TRACKING_DATA_SOURCE2_AUDIO_FB = 1,
XR_FACE_TRACKING_DATA_SOURCE_2FB_MAX_ENUM_FB = 0x7FFFFFFF
} XrFaceTrackingDataSource2FB;
typedef enum XrFaceConfidence2FB {
XR_FACE_CONFIDENCE2_LOWER_FACE_FB = 0,
XR_FACE_CONFIDENCE2_UPPER_FACE_FB = 1,
XR_FACE_CONFIDENCE2_COUNT_FB = 2,
XR_FACE_CONFIDENCE_2FB_MAX_ENUM_FB = 0x7FFFFFFF
} XrFaceConfidence2FB;
// XrSystemFaceTrackingProperties2FB extends XrSystemProperties
typedef struct XrSystemFaceTrackingProperties2FB {
XrStructureType type;
void* XR_MAY_ALIAS next;
XrBool32 supportsVisualFaceTracking;
XrBool32 supportsAudioFaceTracking;
} XrSystemFaceTrackingProperties2FB;
typedef struct XrFaceTrackerCreateInfo2FB {
XrStructureType type;
const void* XR_MAY_ALIAS next;
XrFaceExpressionSet2FB faceExpressionSet;
uint32_t requestedDataSourceCount;
XrFaceTrackingDataSource2FB* requestedDataSources;
} XrFaceTrackerCreateInfo2FB;
typedef struct XrFaceExpressionInfo2FB {
XrStructureType type;
const void* XR_MAY_ALIAS next;
XrTime time;
} XrFaceExpressionInfo2FB;
typedef struct XrFaceExpressionWeights2FB {
XrStructureType type;
void* XR_MAY_ALIAS next;
uint32_t weightCount;
float* weights;
uint32_t confidenceCount;
float* confidences;
XrBool32 isValid;
XrBool32 isEyeFollowingBlendshapesValid;
XrFaceTrackingDataSource2FB dataSource;
XrTime time;
} XrFaceExpressionWeights2FB;
typedef XrResult (XRAPI_PTR *PFN_xrCreateFaceTracker2FB)(XrSession session, const XrFaceTrackerCreateInfo2FB* createInfo, XrFaceTracker2FB* faceTracker);
typedef XrResult (XRAPI_PTR *PFN_xrDestroyFaceTracker2FB)(XrFaceTracker2FB faceTracker);
typedef XrResult (XRAPI_PTR *PFN_xrGetFaceExpressionWeights2FB)(XrFaceTracker2FB faceTracker, const XrFaceExpressionInfo2FB* expressionInfo, XrFaceExpressionWeights2FB* expressionWeights);
#ifndef XR_NO_PROTOTYPES
#ifdef XR_EXTENSION_PROTOTYPES
XRAPI_ATTR XrResult XRAPI_CALL xrCreateFaceTracker2FB(
XrSession session,
const XrFaceTrackerCreateInfo2FB* createInfo,
XrFaceTracker2FB* faceTracker);
XRAPI_ATTR XrResult XRAPI_CALL xrDestroyFaceTracker2FB(
XrFaceTracker2FB faceTracker);
XRAPI_ATTR XrResult XRAPI_CALL xrGetFaceExpressionWeights2FB(
XrFaceTracker2FB faceTracker,
const XrFaceExpressionInfo2FB* expressionInfo,
XrFaceExpressionWeights2FB* expressionWeights);
#endif /* XR_EXTENSION_PROTOTYPES */
#endif /* !XR_NO_PROTOTYPES */
#define XR_EXT_uuid 1
#define XR_EXT_uuid_SPEC_VERSION 1
#define XR_EXT_UUID_EXTENSION_NAME "XR_EXT_uuid"
@ -6667,6 +6905,25 @@ XRAPI_ATTR XrResult XRAPI_CALL xrGetPlanePolygonBufferEXT(
#define XR_OPPO_CONTROLLER_INTERACTION_EXTENSION_NAME "XR_OPPO_controller_interaction"
#define XR_EXT_user_presence 1
#define XR_EXT_user_presence_SPEC_VERSION 1
#define XR_EXT_USER_PRESENCE_EXTENSION_NAME "XR_EXT_user_presence"
typedef struct XrEventDataUserPresenceChangedEXT {
XrStructureType type;
const void* XR_MAY_ALIAS next;
XrSession session;
XrBool32 isUserPresent;
} XrEventDataUserPresenceChangedEXT;
// XrSystemUserPresencePropertiesEXT extends XrSystemProperties
typedef struct XrSystemUserPresencePropertiesEXT {
XrStructureType type;
void* XR_MAY_ALIAS next;
XrBool32 supportsUserPresence;
} XrSystemUserPresencePropertiesEXT;
#define XR_ML_user_calibration 1
#define XR_ML_user_calibration_SPEC_VERSION 1
#define XR_ML_USER_CALIBRATION_EXTENSION_NAME "XR_ML_user_calibration"

File diff suppressed because it is too large Load diff

View file

@ -308,11 +308,19 @@ This file contains expansion macros (X Macros) for OpenXR structures.
_avail(XrEventDataSpaceListSaveCompleteFB, XR_TYPE_EVENT_DATA_SPACE_LIST_SAVE_COMPLETE_FB) \
_avail(XrSpaceUserCreateInfoFB, XR_TYPE_SPACE_USER_CREATE_INFO_FB) \
_avail(XrSystemHeadsetIdPropertiesMETA, XR_TYPE_SYSTEM_HEADSET_ID_PROPERTIES_META) \
_avail(XrRecommendedLayerResolutionMETA, XR_TYPE_RECOMMENDED_LAYER_RESOLUTION_META) \
_avail(XrRecommendedLayerResolutionGetInfoMETA, XR_TYPE_RECOMMENDED_LAYER_RESOLUTION_GET_INFO_META) \
_avail(XrPassthroughColorLutCreateInfoMETA, XR_TYPE_PASSTHROUGH_COLOR_LUT_CREATE_INFO_META) \
_avail(XrPassthroughColorLutUpdateInfoMETA, XR_TYPE_PASSTHROUGH_COLOR_LUT_UPDATE_INFO_META) \
_avail(XrPassthroughColorMapLutMETA, XR_TYPE_PASSTHROUGH_COLOR_MAP_LUT_META) \
_avail(XrPassthroughColorMapInterpolatedLutMETA, XR_TYPE_PASSTHROUGH_COLOR_MAP_INTERPOLATED_LUT_META) \
_avail(XrSystemPassthroughColorLutPropertiesMETA, XR_TYPE_SYSTEM_PASSTHROUGH_COLOR_LUT_PROPERTIES_META) \
_avail(XrSpaceTriangleMeshGetInfoMETA, XR_TYPE_SPACE_TRIANGLE_MESH_GET_INFO_META) \
_avail(XrSpaceTriangleMeshMETA, XR_TYPE_SPACE_TRIANGLE_MESH_META) \
_avail(XrSystemFaceTrackingProperties2FB, XR_TYPE_SYSTEM_FACE_TRACKING_PROPERTIES2_FB) \
_avail(XrFaceTrackerCreateInfo2FB, XR_TYPE_FACE_TRACKER_CREATE_INFO2_FB) \
_avail(XrFaceExpressionInfo2FB, XR_TYPE_FACE_EXPRESSION_INFO2_FB) \
_avail(XrFaceExpressionWeights2FB, XR_TYPE_FACE_EXPRESSION_WEIGHTS2_FB) \
_avail(XrPassthroughCreateInfoHTC, XR_TYPE_PASSTHROUGH_CREATE_INFO_HTC) \
_avail(XrPassthroughColorHTC, XR_TYPE_PASSTHROUGH_COLOR_HTC) \
_avail(XrPassthroughMeshTransformInfoHTC, XR_TYPE_PASSTHROUGH_MESH_TRANSFORM_INFO_HTC) \
@ -334,6 +342,8 @@ This file contains expansion macros (X Macros) for OpenXR structures.
_avail(XrPlaneDetectorLocationEXT, XR_TYPE_PLANE_DETECTOR_LOCATION_EXT) \
_avail(XrPlaneDetectorLocationsEXT, XR_TYPE_PLANE_DETECTOR_LOCATIONS_EXT) \
_avail(XrPlaneDetectorPolygonBufferEXT, XR_TYPE_PLANE_DETECTOR_POLYGON_BUFFER_EXT) \
_avail(XrEventDataUserPresenceChangedEXT, XR_TYPE_EVENT_DATA_USER_PRESENCE_CHANGED_EXT) \
_avail(XrSystemUserPresencePropertiesEXT, XR_TYPE_SYSTEM_USER_PRESENCE_PROPERTIES_EXT) \
_avail(XrEventDataHeadsetFitChangedML, XR_TYPE_EVENT_DATA_HEADSET_FIT_CHANGED_ML) \
_avail(XrEventDataEyeCalibrationChangedML, XR_TYPE_EVENT_DATA_EYE_CALIBRATION_CHANGED_ML) \
_avail(XrUserCalibrationEnableEventsInfoML, XR_TYPE_USER_CALIBRATION_ENABLE_EVENTS_INFO_ML) \

View file

@ -323,6 +323,8 @@ static inline std::string PlatformUtilsGetSecureEnv(const char* name) {
const std::string envValue = PlatformUtilsGetEnv(name);
// Do not allow high integrity processes to act on data that can be controlled by medium integrity processes.
// Specifically, medium integrity processes can set environment variables which could then
// be read by high integrity processes.
if (IsHighIntegrityLevel()) {
if (!envValue.empty()) {
LogPlatformUtilsError(std::string("!!! WARNING !!! Environment variable ") + name +

View file

@ -72,10 +72,10 @@ XrResult ApiLayerInterface::GetApiLayerProperties(const std::string& openxr_comm
}
// Find any implicit layers which we may need to report information for.
XrResult result = ApiLayerManifestFile::FindManifestFiles(MANIFEST_TYPE_IMPLICIT_API_LAYER, manifest_files);
XrResult result = ApiLayerManifestFile::FindManifestFiles(openxr_command, MANIFEST_TYPE_IMPLICIT_API_LAYER, manifest_files);
if (XR_SUCCEEDED(result)) {
// Find any explicit layers which we may need to report information for.
result = ApiLayerManifestFile::FindManifestFiles(MANIFEST_TYPE_EXPLICIT_API_LAYER, manifest_files);
result = ApiLayerManifestFile::FindManifestFiles(openxr_command, MANIFEST_TYPE_EXPLICIT_API_LAYER, manifest_files);
}
if (XR_FAILED(result)) {
LoaderLogger::LogErrorMessage(openxr_command,
@ -126,10 +126,10 @@ XrResult ApiLayerInterface::GetInstanceExtensionProperties(const std::string& op
// If a layer name is supplied, only use the information out of that one layer
if (nullptr != layer_name && 0 != strlen(layer_name)) {
XrResult result = ApiLayerManifestFile::FindManifestFiles(MANIFEST_TYPE_IMPLICIT_API_LAYER, manifest_files);
XrResult result = ApiLayerManifestFile::FindManifestFiles(openxr_command, MANIFEST_TYPE_IMPLICIT_API_LAYER, manifest_files);
if (XR_SUCCEEDED(result)) {
// Find any explicit layers which we may need to report information for.
result = ApiLayerManifestFile::FindManifestFiles(MANIFEST_TYPE_EXPLICIT_API_LAYER, manifest_files);
result = ApiLayerManifestFile::FindManifestFiles(openxr_command, MANIFEST_TYPE_EXPLICIT_API_LAYER, manifest_files);
if (XR_FAILED(result)) {
LoaderLogger::LogErrorMessage(
openxr_command,
@ -155,7 +155,7 @@ XrResult ApiLayerInterface::GetInstanceExtensionProperties(const std::string& op
}
// Otherwise, we want to add only implicit API layers and explicit API layers enabled using the environment variables
} else {
XrResult result = ApiLayerManifestFile::FindManifestFiles(MANIFEST_TYPE_IMPLICIT_API_LAYER, manifest_files);
XrResult result = ApiLayerManifestFile::FindManifestFiles(openxr_command, MANIFEST_TYPE_IMPLICIT_API_LAYER, manifest_files);
if (XR_SUCCEEDED(result)) {
// Find any environmentally enabled explicit layers. If they're present, treat them like implicit layers
// since we know that they're going to be enabled.
@ -163,7 +163,8 @@ XrResult ApiLayerInterface::GetInstanceExtensionProperties(const std::string& op
AddEnvironmentApiLayers(env_enabled_layers);
if (!env_enabled_layers.empty()) {
std::vector<std::unique_ptr<ApiLayerManifestFile>> exp_layer_man_files = {};
result = ApiLayerManifestFile::FindManifestFiles(MANIFEST_TYPE_EXPLICIT_API_LAYER, exp_layer_man_files);
result =
ApiLayerManifestFile::FindManifestFiles(openxr_command, MANIFEST_TYPE_EXPLICIT_API_LAYER, exp_layer_man_files);
if (XR_SUCCEEDED(result)) {
for (auto& exp_layer_man_file : exp_layer_man_files) {
for (std::string& enabled_layer : env_enabled_layers) {
@ -197,8 +198,8 @@ XrResult ApiLayerInterface::LoadApiLayers(const std::string& openxr_command, uin
std::vector<std::unique_ptr<ApiLayerManifestFile>> enabled_layer_manifest_files_in_init_order = {};
// Find any implicit layers.
XrResult result =
ApiLayerManifestFile::FindManifestFiles(MANIFEST_TYPE_IMPLICIT_API_LAYER, enabled_layer_manifest_files_in_init_order);
XrResult result = ApiLayerManifestFile::FindManifestFiles(openxr_command, MANIFEST_TYPE_IMPLICIT_API_LAYER,
enabled_layer_manifest_files_in_init_order);
for (const auto& enabled_layer_manifest_file : enabled_layer_manifest_files_in_init_order) {
layers_already_found.insert(enabled_layer_manifest_file->LayerName());
@ -208,7 +209,8 @@ XrResult ApiLayerInterface::LoadApiLayers(const std::string& openxr_command, uin
std::vector<std::unique_ptr<ApiLayerManifestFile>> explicit_layer_manifest_files = {};
if (XR_SUCCEEDED(result)) {
result = ApiLayerManifestFile::FindManifestFiles(MANIFEST_TYPE_EXPLICIT_API_LAYER, explicit_layer_manifest_files);
result = ApiLayerManifestFile::FindManifestFiles(openxr_command, MANIFEST_TYPE_EXPLICIT_API_LAYER,
explicit_layer_manifest_files);
}
bool found_all_layers = true;

View file

@ -11,9 +11,9 @@
#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 defined(XR_USE_PLATFORM_ANDROID)
if (info->type != XR_TYPE_LOADER_INIT_INFO_ANDROID_KHR) {
return XR_ERROR_VALIDATION_FAILURE;
}
@ -40,11 +40,13 @@ XrResult LoaderInitData::initialize(const XrLoaderInitInfoBaseHeaderKHR* info) {
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");
#else
#error "Platform specific XR_KHR_loader_init structure is not defined for this platform."
#endif // XR_USE_PLATFORM_ANDROID
_initialized = true;
return XR_SUCCESS;
}
#endif // XR_USE_PLATFORM_ANDROID
XrResult InitializeLoaderInitData(const XrLoaderInitInfoBaseHeaderKHR* loaderInitInfo) {
return LoaderInitData::instance().initialize(loaderInitInfo);

View file

@ -33,7 +33,7 @@ class LoaderInitData {
return obj;
}
#ifdef XR_USE_PLATFORM_ANDROID
#if defined(XR_USE_PLATFORM_ANDROID)
/*!
* Type alias for the platform-specific structure type.
*/

View file

@ -600,14 +600,8 @@ void RuntimeManifestFile::CreateIfValid(const Json::Value &root_node, const std:
// If the library_path variable has no directory symbol, it's just a file name and should be accessible on the
// global library path.
if (lib_path.find('\\') != std::string::npos || lib_path.find('/') != std::string::npos) {
// If the library_path is an absolute path, just use that if it exists
if (FileSysUtilsIsAbsolutePath(lib_path)) {
if (!FileSysUtilsPathExists(lib_path)) {
error_ss << filename << " library " << lib_path << " does not appear to exist";
LoaderLogger::LogErrorMessage("", error_ss.str());
return;
}
} else {
// If the library_path is an absolute path, just use that as-is.
if (!FileSysUtilsIsAbsolutePath(lib_path)) {
// Otherwise, treat the library path as a relative path based on the JSON file.
std::string canonical_path;
std::string combined_path;
@ -618,8 +612,8 @@ void RuntimeManifestFile::CreateIfValid(const Json::Value &root_node, const std:
canonical_path = filename;
}
if (!FileSysUtilsGetParentPath(canonical_path, file_parent) ||
!FileSysUtilsCombinePaths(file_parent, lib_path, combined_path) || !FileSysUtilsPathExists(combined_path)) {
error_ss << filename << " library " << combined_path << " does not appear to exist";
!FileSysUtilsCombinePaths(file_parent, lib_path, combined_path)) {
error_ss << filename << " filesystem operations failed for path " << canonical_path;
LoaderLogger::LogErrorMessage("", error_ss.str());
return;
}
@ -636,53 +630,58 @@ void RuntimeManifestFile::CreateIfValid(const Json::Value &root_node, const std:
}
// Find all manifest files in the appropriate search paths/registries for the given type.
XrResult RuntimeManifestFile::FindManifestFiles(std::vector<std::unique_ptr<RuntimeManifestFile>> &manifest_files) {
XrResult RuntimeManifestFile::FindManifestFiles(const std::string &openxr_command,
std::vector<std::unique_ptr<RuntimeManifestFile>> &manifest_files) {
XrResult result = XR_SUCCESS;
std::string filename = PlatformUtilsGetSecureEnv(OPENXR_RUNTIME_JSON_ENV_VAR);
if (!filename.empty()) {
LoaderLogger::LogInfoMessage(
"", "RuntimeManifestFile::FindManifestFiles - using environment variable override runtime file " + filename);
openxr_command,
"RuntimeManifestFile::FindManifestFiles - using environment variable override runtime file " + filename);
} else {
#ifdef XR_OS_WINDOWS
std::vector<std::string> filenames;
ReadRuntimeDataFilesInRegistry("", "ActiveRuntime", filenames);
if (filenames.size() == 0) {
LoaderLogger::LogErrorMessage(
"", "RuntimeManifestFile::FindManifestFiles - failed to find active runtime file in registry");
openxr_command, "RuntimeManifestFile::FindManifestFiles - failed to find active runtime file in registry");
return XR_ERROR_RUNTIME_UNAVAILABLE;
}
if (filenames.size() > 1) {
LoaderLogger::LogWarningMessage(
"", "RuntimeManifestFile::FindManifestFiles - found too many default runtime files in registry");
openxr_command, "RuntimeManifestFile::FindManifestFiles - found too many default runtime files in registry");
}
filename = filenames[0];
LoaderLogger::LogInfoMessage("",
LoaderLogger::LogInfoMessage(openxr_command,
"RuntimeManifestFile::FindManifestFiles - using registry-specified runtime file " + filename);
#elif defined(XR_OS_LINUX)
if (!FindXDGConfigFile("openxr/", XR_VERSION_MAJOR(XR_CURRENT_API_VERSION), filename)) {
LoaderLogger::LogErrorMessage(
"", "RuntimeManifestFile::FindManifestFiles - failed to determine active runtime file path for this environment");
openxr_command,
"RuntimeManifestFile::FindManifestFiles - failed to determine active runtime file path for this environment");
return XR_ERROR_RUNTIME_UNAVAILABLE;
}
#else
#else // !defined(XR_OS_WINDOWS) && !defined(XR_OS_LINUX)
#if defined(XR_USE_PLATFORM_ANDROID)
#if defined(XR_KHR_LOADER_INIT_SUPPORT) && 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_USE_PLATFORM_ANDROID)
#endif // defined(XR_USE_PLATFORM_ANDROID) && defined(XR_KHR_LOADER_INIT_SUPPORT)
if (!PlatformGetGlobalRuntimeFileName(XR_VERSION_MAJOR(XR_CURRENT_API_VERSION), filename)) {
LoaderLogger::LogErrorMessage(
"", "RuntimeManifestFile::FindManifestFiles - failed to determine active runtime file path for this environment");
openxr_command,
"RuntimeManifestFile::FindManifestFiles - failed to determine active runtime file path for this environment");
return XR_ERROR_RUNTIME_UNAVAILABLE;
}
result = XR_SUCCESS;
LoaderLogger::LogInfoMessage("", "RuntimeManifestFile::FindManifestFiles - using global runtime file " + filename);
#endif
LoaderLogger::LogInfoMessage(openxr_command,
"RuntimeManifestFile::FindManifestFiles - using global runtime file " + filename);
#endif // !defined(XR_OS_WINDOWS) && !defined(XR_OS_LINUX)
}
RuntimeManifestFile::CreateIfValid(filename, manifest_files);
@ -698,9 +697,17 @@ ApiLayerManifestFile::ApiLayerManifestFile(ManifestFileType type, const std::str
_description(description),
_implementation_version(implementation_version) {}
#ifdef XR_USE_PLATFORM_ANDROID
void ApiLayerManifestFile::AddManifestFilesAndroid(ManifestFileType type,
#if defined(XR_KHR_LOADER_INIT_SUPPORT) && defined(XR_USE_PLATFORM_ANDROID)
void ApiLayerManifestFile::AddManifestFilesAndroid(const std::string &openxr_command, ManifestFileType type,
std::vector<std::unique_ptr<ApiLayerManifestFile>> &manifest_files) {
if (!LoaderInitData::instance().initialized()) {
// This will happen for applications that do not call xrInitializeLoaderKHR
LoaderLogger::LogWarningMessage(
openxr_command,
"ApiLayerManifestFile::AddManifestFilesAndroid unable to add manifest files LoaderInitData not initialized.");
return;
}
AAssetManager *assetManager = (AAssetManager *)Android_Get_Asset_Manager();
std::vector<std::string> filenames;
{
@ -736,7 +743,7 @@ void ApiLayerManifestFile::AddManifestFilesAndroid(ManifestFileType type,
UniqueAsset asset{AAssetManager_open(assetManager, filename.c_str(), AASSET_MODE_BUFFER)};
if (!asset) {
LoaderLogger::LogWarningMessage(
"", "ApiLayerManifestFile::AddManifestFilesAndroid unable to open asset " + filename + ", skipping");
openxr_command, "ApiLayerManifestFile::AddManifestFilesAndroid unable to open asset " + filename + ", skipping");
continue;
}
@ -744,7 +751,7 @@ void ApiLayerManifestFile::AddManifestFilesAndroid(ManifestFileType type,
const char *buf = reinterpret_cast<const char *>(AAsset_getBuffer(asset.get()));
if (!buf) {
LoaderLogger::LogWarningMessage(
"", "ApiLayerManifestFile::AddManifestFilesAndroid unable to access asset" + filename + ", skipping");
openxr_command, "ApiLayerManifestFile::AddManifestFilesAndroid unable to access asset" + filename + ", skipping");
continue;
}
@ -754,7 +761,7 @@ void ApiLayerManifestFile::AddManifestFilesAndroid(ManifestFileType type,
&ApiLayerManifestFile::LocateLibraryInAssets, manifest_files);
}
}
#endif // XR_USE_PLATFORM_ANDROID
#endif // defined(XR_USE_PLATFORM_ANDROID) && defined(XR_KHR_LOADER_INIT_SUPPORT)
void ApiLayerManifestFile::CreateIfValid(ManifestFileType type, const std::string &filename, std::istream &json_stream,
LibraryLocator locate_library,
@ -898,7 +905,7 @@ bool ApiLayerManifestFile::LocateLibraryRelativeToJson(
return true;
}
#ifdef XR_USE_PLATFORM_ANDROID
#if defined(XR_KHR_LOADER_INIT_SUPPORT) && defined(XR_USE_PLATFORM_ANDROID)
bool ApiLayerManifestFile::LocateLibraryInAssets(const std::string & /* json_filename */, const std::string &library_path,
std::string &out_combined_path) {
std::string combined_path;
@ -910,7 +917,7 @@ bool ApiLayerManifestFile::LocateLibraryInAssets(const std::string & /* json_fil
out_combined_path = combined_path;
return true;
}
#endif
#endif // defined(XR_USE_PLATFORM_ANDROID) && defined(XR_KHR_LOADER_INIT_SUPPORT)
void ApiLayerManifestFile::PopulateApiLayerProperties(XrApiLayerProperties &props) const {
props.layerVersion = _implementation_version;
@ -926,7 +933,7 @@ void ApiLayerManifestFile::PopulateApiLayerProperties(XrApiLayerProperties &prop
}
// Find all layer manifest files in the appropriate search paths/registries for the given type.
XrResult ApiLayerManifestFile::FindManifestFiles(ManifestFileType type,
XrResult ApiLayerManifestFile::FindManifestFiles(const std::string &openxr_command, ManifestFileType type,
std::vector<std::unique_ptr<ApiLayerManifestFile>> &manifest_files) {
std::string relative_path;
std::string override_env_var;
@ -953,7 +960,8 @@ XrResult ApiLayerManifestFile::FindManifestFiles(ManifestFileType type,
#endif
break;
default:
LoaderLogger::LogErrorMessage("", "ApiLayerManifestFile::FindManifestFiles - unknown manifest file requested");
LoaderLogger::LogErrorMessage(openxr_command,
"ApiLayerManifestFile::FindManifestFiles - unknown manifest file requested");
return XR_ERROR_FILE_ACCESS_ERROR;
}
@ -972,9 +980,9 @@ XrResult ApiLayerManifestFile::FindManifestFiles(ManifestFileType type,
ApiLayerManifestFile::CreateIfValid(type, cur_file, manifest_files);
}
#ifdef XR_USE_PLATFORM_ANDROID
ApiLayerManifestFile::AddManifestFilesAndroid(type, manifest_files);
#endif // XR_USE_PLATFORM_ANDROID
#if defined(XR_KHR_LOADER_INIT_SUPPORT) && defined(XR_USE_PLATFORM_ANDROID)
ApiLayerManifestFile::AddManifestFilesAndroid(openxr_command, type, manifest_files);
#endif // defined(XR_USE_PLATFORM_ANDROID) && defined(XR_KHR_LOADER_INIT_SUPPORT)
return XR_SUCCESS;
}

View file

@ -71,7 +71,8 @@ class ManifestFile {
class RuntimeManifestFile : public ManifestFile {
public:
// Factory method
static XrResult FindManifestFiles(std::vector<std::unique_ptr<RuntimeManifestFile>> &manifest_files);
static XrResult FindManifestFiles(const std::string &openxr_command,
std::vector<std::unique_ptr<RuntimeManifestFile>> &manifest_files);
private:
RuntimeManifestFile(const std::string &filename, const std::string &library_path);
@ -87,7 +88,8 @@ using LibraryLocator = bool (*)(const std::string &json_filename, const std::str
class ApiLayerManifestFile : public ManifestFile {
public:
// Factory method
static XrResult FindManifestFiles(ManifestFileType type, std::vector<std::unique_ptr<ApiLayerManifestFile>> &manifest_files);
static XrResult FindManifestFiles(const std::string &openxr_command, ManifestFileType type,
std::vector<std::unique_ptr<ApiLayerManifestFile>> &manifest_files);
const std::string &LayerName() const { return _layer_name; }
void PopulateApiLayerProperties(XrApiLayerProperties &props) const;
@ -104,11 +106,13 @@ class ApiLayerManifestFile : public ManifestFile {
/// @return false if we could not find the library.
static bool LocateLibraryRelativeToJson(const std::string &json_filename, const std::string &library_path,
std::string &out_combined_path);
#ifdef XR_USE_PLATFORM_ANDROID
#if defined(XR_KHR_LOADER_INIT_SUPPORT) && defined(XR_USE_PLATFORM_ANDROID)
static bool LocateLibraryInAssets(const std::string &json_filename, const std::string &library_path,
std::string &out_combined_path);
static void AddManifestFilesAndroid(ManifestFileType type, std::vector<std::unique_ptr<ApiLayerManifestFile>> &manifest_files);
#endif
static void AddManifestFilesAndroid(const std::string &openxr_command, ManifestFileType type,
std::vector<std::unique_ptr<ApiLayerManifestFile>> &manifest_files);
#endif // defined(XR_USE_PLATFORM_ANDROID) && defined(XR_KHR_LOADER_INIT_SUPPORT)
JsonVersion _api_version;
std::string _layer_name;

View file

@ -34,7 +34,7 @@
#include <openxr/openxr_platform.h>
#endif // XR_USE_PLATFORM_ANDROID
#ifdef XR_USE_PLATFORM_ANDROID
#if defined(XR_KHR_LOADER_INIT_SUPPORT) && defined(XR_USE_PLATFORM_ANDROID)
XrResult GetPlatformRuntimeVirtualManifest(Json::Value& out_manifest) {
using wrap::android::content::Context;
auto& initData = LoaderInitData::instance();
@ -52,7 +52,7 @@ XrResult GetPlatformRuntimeVirtualManifest(Json::Value& out_manifest) {
out_manifest = virtualManifest;
return XR_SUCCESS;
}
#endif // XR_USE_PLATFORM_ANDROID
#endif // defined(XR_USE_PLATFORM_ANDROID) && defined(XR_KHR_LOADER_INIT_SUPPORT)
XrResult RuntimeInterface::TryLoadingSingleRuntime(const std::string& openxr_command,
std::unique_ptr<RuntimeManifestFile>& manifest_file) {
@ -227,7 +227,6 @@ XrResult RuntimeInterface::LoadRuntime(const std::string& openxr_command) {
return XR_SUCCESS;
}
#ifdef XR_KHR_LOADER_INIT_SUPPORT
if (!LoaderInitData::instance().initialized()) {
LoaderLogger::LogErrorMessage(
openxr_command, "RuntimeInterface::LoadRuntime cannot run because xrInitializeLoaderKHR was not successfully called.");
@ -238,7 +237,7 @@ XrResult RuntimeInterface::LoadRuntime(const std::string& openxr_command) {
std::vector<std::unique_ptr<RuntimeManifestFile>> runtime_manifest_files = {};
// Find the available runtimes which we may need to report information for.
XrResult last_error = RuntimeManifestFile::FindManifestFiles(runtime_manifest_files);
XrResult last_error = RuntimeManifestFile::FindManifestFiles(openxr_command, runtime_manifest_files);
if (XR_FAILED(last_error)) {
LoaderLogger::LogErrorMessage(openxr_command, "RuntimeInterface::LoadRuntimes - unknown error");
} else {