diff --git a/generator/src/main.rs b/generator/src/main.rs index 337eea44..e290cfa4 100644 --- a/generator/src/main.rs +++ b/generator/src/main.rs @@ -78,6 +78,7 @@ impl Parser { extensions: IndexMap::new(), // TODO: Handle these extensions disabled_exts: [ + "XR_MSFT_scene_marker", "XR_MSFT_scene_understanding", "XR_MSFT_scene_understanding_serialization", ] diff --git a/openxr/src/generated.rs b/openxr/src/generated.rs index d79f2e27..3b058aac 100644 --- a/openxr/src/generated.rs +++ b/openxr/src/generated.rs @@ -15,8 +15,8 @@ pub use sys::{ DebugUtilsMessageTypeFlagsEXT, DigitalLensControlFlagsALMALENCE, EnvironmentBlendMode, Extent2Df, Extent2Di, Extent3DfEXT, Extent3DfFB, ExternalCameraAttachedToDeviceOCULUS, ExternalCameraExtrinsicsOCULUS, ExternalCameraIntrinsicsOCULUS, - ExternalCameraStatusFlagsOCULUS, EyeExpressionHTC, EyePositionFB, EyeVisibility, - FaceConfidenceFB, FaceExpressionFB, FaceExpressionSetFB, FacialTrackingTypeHTC, + ExternalCameraStatusFlagsOCULUS, EyeCalibrationStatusML, EyeExpressionHTC, EyePositionFB, + EyeVisibility, FaceConfidenceFB, FaceExpressionFB, FaceExpressionSetFB, FacialTrackingTypeHTC, ForceFeedbackCurlApplyLocationMNDX, ForceFeedbackCurlLocationMNDX, FormFactor, FoveationConfigurationHTC, FoveationDynamicFB, FoveationDynamicFlagsHTC, FoveationEyeTrackedProfileCreateFlagsMETA, FoveationEyeTrackedStateFlagsMETA, FoveationLevelFB, @@ -24,9 +24,9 @@ pub use sys::{ GlobalDimmerFrameEndInfoFlagsML, HandEXT, HandForearmJointULTRALEAP, HandJointEXT, HandJointLocationEXT, HandJointSetEXT, HandJointVelocityEXT, HandJointsMotionRangeEXT, HandMeshVertexMSFT, HandPoseTypeMSFT, HandTrackingAimFlagsFB, HandTrackingDataSourceEXT, - InputSourceLocalizedNameFlags, InstanceCreateFlags, KeyboardTrackingFlagsFB, - KeyboardTrackingQueryFlagsFB, LipExpressionHTC, LocalDimmingModeMETA, MeshComputeLodMSFT, - ObjectType, Offset2Df, Offset2Di, Offset3DfFB, OverlayMainSessionFlagsEXTX, + HeadsetFitStatusML, InputSourceLocalizedNameFlags, InstanceCreateFlags, + KeyboardTrackingFlagsFB, KeyboardTrackingQueryFlagsFB, LipExpressionHTC, LocalDimmingModeMETA, + MeshComputeLodMSFT, ObjectType, Offset2Df, Offset2Di, Offset3DfFB, OverlayMainSessionFlagsEXTX, OverlaySessionCreateFlagsEXTX, PassthroughCapabilityFlagsFB, PassthroughColorLutChannelsMETA, PassthroughFlagsFB, PassthroughFormHTC, PassthroughLayerPurposeFB, PassthroughPreferenceFlagsMETA, PassthroughStateChangedFlagsFB, PerfSettingsDomainEXT, @@ -36,16 +36,17 @@ pub use sys::{ PlaneDetectorOrientationEXT, PlaneDetectorSemanticTypeEXT, Posef, Quaternionf, Rect2Df, Rect2Di, Rect3DfFB, ReferenceSpaceType, RenderModelFlagsFB, ReprojectionModeMSFT, SceneComponentTypeMSFT, SceneComputeConsistencyMSFT, SceneComputeFeatureMSFT, - SceneComputeStateMSFT, SceneObjectTypeMSFT, ScenePlaneAlignmentTypeMSFT, - SemanticLabelsSupportFlagsFB, SessionCreateFlags, SessionState, SpaceComponentTypeFB, - SpaceLocationFlags, SpacePersistenceModeFB, SpaceQueryActionFB, SpaceStorageLocationFB, - SpaceVelocityFlags, SpatialGraphNodeTypeMSFT, StructureType, SwapchainCreateFlags, - SwapchainCreateFoveationFlagsFB, SwapchainStateFoveationFlagsFB, SwapchainUsageFlags, - SystemGraphicsProperties, TrackingOptimizationSettingsDomainQCOM, - TrackingOptimizationSettingsHintQCOM, TriangleMeshFlagsFB, Vector2f, Vector3f, Vector4f, - Vector4sFB, ViewConfigurationType, ViewStateFlags, VirtualKeyboardInputSourceMETA, - VirtualKeyboardInputStateFlagsMETA, VirtualKeyboardLocationTypeMETA, VisibilityMaskTypeKHR, - VulkanDeviceCreateFlagsKHR, VulkanInstanceCreateFlagsKHR, WindingOrderFB, + SceneComputeStateMSFT, SceneMarkerQRCodeSymbolTypeMSFT, SceneMarkerTypeMSFT, + SceneObjectTypeMSFT, ScenePlaneAlignmentTypeMSFT, SemanticLabelsSupportFlagsFB, + SessionCreateFlags, SessionState, SpaceComponentTypeFB, SpaceLocationFlags, + SpacePersistenceModeFB, SpaceQueryActionFB, SpaceStorageLocationFB, SpaceVelocityFlags, + SpatialGraphNodeTypeMSFT, StructureType, SwapchainCreateFlags, SwapchainCreateFoveationFlagsFB, + SwapchainStateFoveationFlagsFB, SwapchainUsageFlags, SystemGraphicsProperties, + TrackingOptimizationSettingsDomainQCOM, TrackingOptimizationSettingsHintQCOM, + TriangleMeshFlagsFB, Vector2f, Vector3f, Vector4f, Vector4sFB, ViewConfigurationType, + ViewStateFlags, VirtualKeyboardInputSourceMETA, VirtualKeyboardInputStateFlagsMETA, + VirtualKeyboardLocationTypeMETA, VisibilityMaskTypeKHR, VulkanDeviceCreateFlagsKHR, + VulkanInstanceCreateFlagsKHR, WindingOrderFB, }; #[doc = r" A subset of known extensions"] #[derive(Debug, Clone, Eq, PartialEq, Default)] @@ -166,6 +167,7 @@ pub struct ExtensionSet { pub ml_frame_end_info: bool, pub ml_global_dimmer: bool, pub ml_compat: bool, + pub ml_user_calibration: bool, pub mnd_headless: bool, pub mnd_swapchain_usage_input_attachment_bit: bool, pub msft_unbounded_reference_space: bool, @@ -196,6 +198,7 @@ pub struct ExtensionSet { pub varjo_environment_depth_estimation: bool, pub varjo_marker_tracking: bool, pub varjo_view_offset: bool, + pub yvr_controller_interaction: bool, #[doc = r" Extensions unknown to the high-level bindings"] pub other: Vec, } @@ -529,6 +532,9 @@ impl ExtensionSet { raw::CompatML::NAME => { out.ml_compat = true; } + raw::UserCalibrationML::NAME => { + out.ml_user_calibration = true; + } raw::HeadlessMND::NAME => { out.mnd_headless = true; } @@ -613,6 +619,9 @@ impl ExtensionSet { raw::ViewOffsetVARJO::NAME => { out.varjo_view_offset = true; } + raw::ControllerInteractionYVR::NAME => { + out.yvr_controller_interaction = true; + } bytes => { if let Ok(name) = std::str::from_utf8(bytes) { out.other.push(name.into()); @@ -1159,6 +1168,11 @@ impl ExtensionSet { out.push(raw::CompatML::NAME.into()); } } + { + if self.ml_user_calibration { + out.push(raw::UserCalibrationML::NAME.into()); + } + } { if self.mnd_headless { out.push(raw::HeadlessMND::NAME.into()); @@ -1297,6 +1311,11 @@ impl ExtensionSet { out.push(raw::ViewOffsetVARJO::NAME.into()); } } + { + if self.yvr_controller_interaction { + out.push(raw::ControllerInteractionYVR::NAME.into()); + } + } for name in &self.other { let mut bytes = Vec::with_capacity(name.len() + 1); bytes.extend_from_slice(name.as_bytes()); @@ -1426,6 +1445,7 @@ pub struct InstanceExtensions { pub ml_frame_end_info: Option, pub ml_global_dimmer: Option, pub ml_compat: Option, + pub ml_user_calibration: Option, pub mnd_headless: Option, pub mnd_swapchain_usage_input_attachment_bit: Option, pub msft_unbounded_reference_space: Option, @@ -1456,6 +1476,7 @@ pub struct InstanceExtensions { pub varjo_environment_depth_estimation: Option, pub varjo_marker_tracking: Option, pub varjo_view_offset: Option, + pub yvr_controller_interaction: Option, } impl InstanceExtensions { #[doc = r" Load extension function pointer tables"] @@ -2018,6 +2039,11 @@ impl InstanceExtensions { } else { None }, + ml_user_calibration: if required.ml_user_calibration { + Some(raw::UserCalibrationML::load(entry, instance)?) + } else { + None + }, mnd_headless: if required.mnd_headless { Some(raw::HeadlessMND {}) } else { @@ -2162,6 +2188,11 @@ impl InstanceExtensions { } else { None }, + yvr_controller_interaction: if required.yvr_controller_interaction { + Some(raw::ControllerInteractionYVR {}) + } else { + None + }, }) } } @@ -2194,6 +2225,8 @@ pub enum Event<'a> { VirtualKeyboardEnterMETA(VirtualKeyboardEnterMETA<'a>), VirtualKeyboardShownMETA(VirtualKeyboardShownMETA<'a>), VirtualKeyboardHiddenMETA(VirtualKeyboardHiddenMETA<'a>), + HeadsetFitChangedML(HeadsetFitChangedML<'a>), + EyeCalibrationChangedML(EyeCalibrationChangedML<'a>), } impl<'a> Event<'a> { #[doc = r" Decode an event"] @@ -2313,6 +2346,14 @@ impl<'a> Event<'a> { let typed = &*(raw as *const sys::EventDataVirtualKeyboardHiddenMETA); Event::VirtualKeyboardHiddenMETA(VirtualKeyboardHiddenMETA::new(typed)) } + sys::StructureType::EVENT_DATA_HEADSET_FIT_CHANGED_ML => { + let typed = &*(raw as *const sys::EventDataHeadsetFitChangedML); + Event::HeadsetFitChangedML(HeadsetFitChangedML::new(typed)) + } + sys::StructureType::EVENT_DATA_EYE_CALIBRATION_CHANGED_ML => { + let typed = &*(raw as *const sys::EventDataEyeCalibrationChangedML); + Event::EyeCalibrationChangedML(EyeCalibrationChangedML::new(typed)) + } _ => { return None; } @@ -2883,6 +2924,42 @@ impl<'a> VirtualKeyboardHiddenMETA<'a> { (self.0).keyboard } } +#[derive(Copy, Clone)] +pub struct HeadsetFitChangedML<'a>(&'a sys::EventDataHeadsetFitChangedML); +impl<'a> HeadsetFitChangedML<'a> { + #[inline] + #[doc = r" # Safety"] + #[doc = r" `inner` must be valid event data according to the OpenXR spec. Refer to"] + #[doc = "[sys::EventDataHeadsetFitChangedML]"] + #[doc = r" for more information."] + pub unsafe fn new(inner: &'a sys::EventDataHeadsetFitChangedML) -> Self { + Self(inner) + } + #[inline] + pub fn status(self) -> HeadsetFitStatusML { + (self.0).status + } + #[inline] + pub fn time(self) -> Time { + (self.0).time + } +} +#[derive(Copy, Clone)] +pub struct EyeCalibrationChangedML<'a>(&'a sys::EventDataEyeCalibrationChangedML); +impl<'a> EyeCalibrationChangedML<'a> { + #[inline] + #[doc = r" # Safety"] + #[doc = r" `inner` must be valid event data according to the OpenXR spec. Refer to"] + #[doc = "[sys::EventDataEyeCalibrationChangedML]"] + #[doc = r" for more information."] + pub unsafe fn new(inner: &'a sys::EventDataEyeCalibrationChangedML) -> Self { + Self(inner) + } + #[inline] + pub fn status(self) -> EyeCalibrationStatusML { + (self.0).status + } +} pub mod raw { use crate::{Entry, Result}; use std::{ffi::CStr, mem}; @@ -5098,6 +5175,27 @@ pub mod raw { } } #[derive(Copy, Clone)] + pub struct UserCalibrationML { + pub enable_user_calibration_events: pfn::EnableUserCalibrationEventsML, + } + impl UserCalibrationML { + pub const VERSION: u32 = sys::ML_user_calibration_SPEC_VERSION; + pub const NAME: &'static [u8] = sys::ML_USER_CALIBRATION_EXTENSION_NAME; + #[doc = r" Load the extension's function pointer table"] + #[doc = r""] + #[doc = r" # Safety"] + #[doc = r""] + #[doc = r" `instance` must be a valid instance handle."] + pub unsafe fn load(entry: &Entry, instance: sys::Instance) -> Result { + Ok(Self { + enable_user_calibration_events: mem::transmute(entry.get_instance_proc_addr( + instance, + CStr::from_bytes_with_nul_unchecked(b"xrEnableUserCalibrationEventsML\0"), + )?), + }) + } + } + #[derive(Copy, Clone)] pub struct HeadlessMND {} impl HeadlessMND { pub const VERSION: u32 = sys::MND_headless_SPEC_VERSION; @@ -5607,6 +5705,12 @@ pub mod raw { }) } } + #[derive(Copy, Clone)] + pub struct ControllerInteractionYVR {} + impl ControllerInteractionYVR { + pub const VERSION: u32 = sys::YVR_controller_interaction_SPEC_VERSION; + pub const NAME: &'static [u8] = sys::YVR_CONTROLLER_INTERACTION_EXTENSION_NAME; + } } #[allow(unused)] pub(crate) mod builder { diff --git a/sys/OpenXR-SDK b/sys/OpenXR-SDK index 90734c5b..95fe35ff 160000 --- a/sys/OpenXR-SDK +++ b/sys/OpenXR-SDK @@ -1 +1 @@ -Subproject commit 90734c5b713bfde15eeb95a767e22a29dcbbd312 +Subproject commit 95fe35ffb383710a6e0567e958ead9a3b66e930c diff --git a/sys/src/generated.rs b/sys/src/generated.rs index f8ba18f0..69322535 100644 --- a/sys/src/generated.rs +++ b/sys/src/generated.rs @@ -13,7 +13,7 @@ use libc::{timespec, wchar_t}; use std::fmt; use std::mem::MaybeUninit; use std::os::raw::{c_char, c_void}; -pub const CURRENT_API_VERSION: Version = Version::new(1u16, 0u16, 29u32); +pub const CURRENT_API_VERSION: Version = Version::new(1u16, 0u16, 31u32); pub const EXTENSION_ENUM_BASE: usize = 1000000000usize; pub const EXTENSION_ENUM_STRIDE: usize = 1000usize; pub const NULL_PATH: usize = 0usize; @@ -281,9 +281,15 @@ impl StructureType { pub const FRAME_END_INFO_ML: StructureType = Self(1000135000i32); pub const GLOBAL_DIMMER_FRAME_END_INFO_ML: StructureType = Self(1000136000i32); pub const COORDINATE_SPACE_CREATE_INFO_ML: StructureType = Self(1000137000i32); + pub const EVENT_DATA_HEADSET_FIT_CHANGED_ML: StructureType = Self(1000472000i32); + pub const EVENT_DATA_EYE_CALIBRATION_CHANGED_ML: StructureType = Self(1000472001i32); + pub const USER_CALIBRATION_ENABLE_EVENTS_INFO_ML: StructureType = Self(1000472002i32); pub const SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT: StructureType = Self(1000142000i32); pub const SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT: StructureType = Self(1000142001i32); + pub const SCENE_MARKERS_MSFT: StructureType = Self(1000147000i32); + pub const SCENE_MARKER_TYPE_FILTER_MSFT: StructureType = Self(1000147001i32); + pub const SCENE_MARKER_QR_CODES_MSFT: StructureType = Self(1000147002i32); pub const SPACE_QUERY_INFO_FB: StructureType = Self(1000156001i32); pub const SPACE_QUERY_RESULTS_FB: StructureType = Self(1000156002i32); pub const SPACE_STORAGE_LOCATION_FILTER_INFO_FB: StructureType = Self(1000156003i32); @@ -716,12 +722,22 @@ impl fmt::Debug for StructureType { Self::FRAME_END_INFO_ML => Some("FRAME_END_INFO_ML"), Self::GLOBAL_DIMMER_FRAME_END_INFO_ML => Some("GLOBAL_DIMMER_FRAME_END_INFO_ML"), Self::COORDINATE_SPACE_CREATE_INFO_ML => Some("COORDINATE_SPACE_CREATE_INFO_ML"), + Self::EVENT_DATA_HEADSET_FIT_CHANGED_ML => Some("EVENT_DATA_HEADSET_FIT_CHANGED_ML"), + Self::EVENT_DATA_EYE_CALIBRATION_CHANGED_ML => { + Some("EVENT_DATA_EYE_CALIBRATION_CHANGED_ML") + } + Self::USER_CALIBRATION_ENABLE_EVENTS_INFO_ML => { + Some("USER_CALIBRATION_ENABLE_EVENTS_INFO_ML") + } Self::SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT => { Some("SPATIAL_ANCHOR_PERSISTENCE_INFO_MSFT") } Self::SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT => { Some("SPATIAL_ANCHOR_FROM_PERSISTED_ANCHOR_CREATE_INFO_MSFT") } + Self::SCENE_MARKERS_MSFT => Some("SCENE_MARKERS_MSFT"), + Self::SCENE_MARKER_TYPE_FILTER_MSFT => Some("SCENE_MARKER_TYPE_FILTER_MSFT"), + Self::SCENE_MARKER_QR_CODES_MSFT => Some("SCENE_MARKER_QR_CODES_MSFT"), Self::SPACE_QUERY_INFO_FB => Some("SPACE_QUERY_INFO_FB"), Self::SPACE_QUERY_RESULTS_FB => Some("SPACE_QUERY_RESULTS_FB"), Self::SPACE_STORAGE_LOCATION_FILTER_INFO_FB => { @@ -1062,6 +1078,8 @@ impl Result { pub const ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT: Result = Self(-1000142001i32); #[doc = "The spatial anchor name provided was not valid"] pub const ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT: Result = Self(-1000142002i32); + #[doc = "Marker does not encode a string."] + pub const SCENE_MARKER_DATA_NOT_STRING_MSFT: Result = Self(1000147000i32); #[doc = "Anchor import from cloud or export from device failed."] pub const ERROR_SPACE_MAPPING_INSUFFICIENT_FB: Result = Self(-1000169000i32); #[doc = "Anchors were downloaded from the cloud but failed to be imported/aligned on the device."] @@ -1227,6 +1245,7 @@ impl fmt::Debug for Result { Self::ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT => { Some("ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT") } + Self::SCENE_MARKER_DATA_NOT_STRING_MSFT => Some("SCENE_MARKER_DATA_NOT_STRING_MSFT"), Self::ERROR_SPACE_MAPPING_INSUFFICIENT_FB => { Some("ERROR_SPACE_MAPPING_INSUFFICIENT_FB") } @@ -1253,7 +1272,7 @@ impl fmt::Debug for Result { } impl fmt::Display for Result { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - let reason = match * self { Self :: SUCCESS => Some ("function successfully completed") , Self :: TIMEOUT_EXPIRED => Some ("the specified timeout time occurred before the operation could complete") , Self :: SESSION_LOSS_PENDING => Some ("the session will be lost soon") , Self :: EVENT_UNAVAILABLE => Some ("no event was available") , Self :: SPACE_BOUNDS_UNAVAILABLE => Some ("the space's bounds are not known at the moment") , Self :: SESSION_NOT_FOCUSED => Some ("the session is not in the focused state") , Self :: FRAME_DISCARDED => Some ("a frame has been discarded from composition") , Self :: ERROR_VALIDATION_FAILURE => Some ("the function usage was invalid in some way") , Self :: ERROR_RUNTIME_FAILURE => Some ("the runtime failed to handle the function in an unexpected way that is not covered by another error result") , Self :: ERROR_OUT_OF_MEMORY => Some ("a memory allocation has failed") , Self :: ERROR_API_VERSION_UNSUPPORTED => Some ("the runtime does not support the requested API version") , Self :: ERROR_INITIALIZATION_FAILED => Some ("initialization of object could not be completed") , Self :: ERROR_FUNCTION_UNSUPPORTED => Some ("the requested function was not found or is otherwise unsupported") , Self :: ERROR_FEATURE_UNSUPPORTED => Some ("the requested feature is not supported") , Self :: ERROR_EXTENSION_NOT_PRESENT => Some ("a requested extension is not supported") , Self :: ERROR_LIMIT_REACHED => Some ("the runtime supports no more of the requested resource") , Self :: ERROR_SIZE_INSUFFICIENT => Some ("the supplied size was smaller than required") , Self :: ERROR_HANDLE_INVALID => Some ("a supplied object handle was invalid") , Self :: ERROR_INSTANCE_LOST => Some ("the XrInstance was lost or could not be found. It will need to be destroyed and optionally recreated") , Self :: ERROR_SESSION_RUNNING => Some ("the session is already running") , Self :: ERROR_SESSION_NOT_RUNNING => Some ("the session is not yet running") , Self :: ERROR_SESSION_LOST => Some ("the XrSession was lost. It will need to be destroyed and optionally recreated") , Self :: ERROR_SYSTEM_INVALID => Some ("the provided XrSystemId was invalid") , Self :: ERROR_PATH_INVALID => Some ("the provided XrPath was not valid") , Self :: ERROR_PATH_COUNT_EXCEEDED => Some ("the maximum number of supported semantic paths has been reached") , Self :: ERROR_PATH_FORMAT_INVALID => Some ("the semantic path character format is invalid") , Self :: ERROR_PATH_UNSUPPORTED => Some ("the semantic path is unsupported") , Self :: ERROR_LAYER_INVALID => Some ("the layer was NULL or otherwise invalid") , Self :: ERROR_LAYER_LIMIT_EXCEEDED => Some ("the number of specified layers is greater than the supported number") , Self :: ERROR_SWAPCHAIN_RECT_INVALID => Some ("the image rect was negatively sized or otherwise invalid") , Self :: ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED => Some ("the image format is not supported by the runtime or platform") , Self :: ERROR_ACTION_TYPE_MISMATCH => Some ("the API used to retrieve an action's state does not match the action's type") , Self :: ERROR_SESSION_NOT_READY => Some ("the session is not in the ready state") , Self :: ERROR_SESSION_NOT_STOPPING => Some ("the session is not in the stopping state") , Self :: ERROR_TIME_INVALID => Some ("the provided XrTime was zero, negative, or out of range") , Self :: ERROR_REFERENCE_SPACE_UNSUPPORTED => Some ("the specified reference space is not supported by the runtime or system") , Self :: ERROR_FILE_ACCESS_ERROR => Some ("the file could not be accessed") , Self :: ERROR_FILE_CONTENTS_INVALID => Some ("the file's contents were invalid") , Self :: ERROR_FORM_FACTOR_UNSUPPORTED => Some ("the specified form factor is not supported by the current runtime or platform") , Self :: ERROR_FORM_FACTOR_UNAVAILABLE => Some ("the specified form factor is supported, but the device is currently not available, e.g. not plugged in or powered off") , Self :: ERROR_API_LAYER_NOT_PRESENT => Some ("a requested API layer is not present or could not be loaded") , Self :: ERROR_CALL_ORDER_INVALID => Some ("the call was made without having made a previously required call") , Self :: ERROR_GRAPHICS_DEVICE_INVALID => Some ("the given graphics device is not in a valid state. The graphics device could be lost or initialized without meeting graphics requirements") , Self :: ERROR_POSE_INVALID => Some ("the supplied pose was invalid with respect to the requirements") , Self :: ERROR_INDEX_OUT_OF_RANGE => Some ("the supplied index was outside the range of valid indices") , Self :: ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED => Some ("the specified view configuration type is not supported by the runtime or platform") , Self :: ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED => Some ("the specified environment blend mode is not supported by the runtime or platform") , Self :: ERROR_NAME_DUPLICATED => Some ("the name provided was a duplicate of an already-existing resource") , Self :: ERROR_NAME_INVALID => Some ("the name provided was invalid") , Self :: ERROR_ACTIONSET_NOT_ATTACHED => Some ("a referenced action set is not attached to the session") , Self :: ERROR_ACTIONSETS_ALREADY_ATTACHED => Some ("the session already has attached action sets") , Self :: ERROR_LOCALIZED_NAME_DUPLICATED => Some ("the localized name provided was a duplicate of an already-existing resource") , Self :: ERROR_LOCALIZED_NAME_INVALID => Some ("the localized name provided was invalid") , Self :: ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING => Some ("the xrGetGraphicsRequirements* call was not made before calling xrCreateSession") , Self :: ERROR_RUNTIME_UNAVAILABLE => Some ("the loader was unable to find or load a runtime") , Self :: ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR => Some ("xrSetAndroidApplicationThreadKHR failed as thread id is invalid") , Self :: ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR => Some ("xrSetAndroidApplicationThreadKHR failed setting the thread attributes/priority") , Self :: ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT => Some ("spatial anchor could not be created at that location") , Self :: ERROR_SECONDARY_VIEW_CONFIGURATION_TYPE_NOT_ENABLED_MSFT => Some ("the secondary view configuration was not enabled when creating the session") , Self :: ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT => Some ("the controller model key is invalid") , Self :: ERROR_REPROJECTION_MODE_UNSUPPORTED_MSFT => Some ("the reprojection mode is not supported") , Self :: ERROR_COMPUTE_NEW_SCENE_NOT_COMPLETED_MSFT => Some ("compute new scene not completed") , Self :: ERROR_SCENE_COMPONENT_ID_INVALID_MSFT => Some ("scene component id invalid") , Self :: ERROR_SCENE_COMPONENT_TYPE_MISMATCH_MSFT => Some ("scene component type mismatch") , Self :: ERROR_SCENE_MESH_BUFFER_ID_INVALID_MSFT => Some ("scene mesh buffer id invalid") , Self :: ERROR_SCENE_COMPUTE_FEATURE_INCOMPATIBLE_MSFT => Some ("scene compute feature incompatible") , Self :: ERROR_SCENE_COMPUTE_CONSISTENCY_MISMATCH_MSFT => Some ("scene compute consistency mismatch") , Self :: ERROR_DISPLAY_REFRESH_RATE_UNSUPPORTED_FB => Some ("the display refresh rate is not supported by the platform") , Self :: ERROR_COLOR_SPACE_UNSUPPORTED_FB => Some ("the color space is not supported by the runtime") , Self :: ERROR_SPACE_COMPONENT_NOT_SUPPORTED_FB => Some ("the component type is not supported for this space") , Self :: ERROR_SPACE_COMPONENT_NOT_ENABLED_FB => Some ("the required component is not enabled for this space") , Self :: ERROR_SPACE_COMPONENT_STATUS_PENDING_FB => Some ("a request to set the component's status is currently pending") , Self :: ERROR_SPACE_COMPONENT_STATUS_ALREADY_SET_FB => Some ("the component is already set to the requested value") , Self :: ERROR_UNEXPECTED_STATE_PASSTHROUGH_FB => Some ("the object state is unexpected for the issued command") , Self :: ERROR_FEATURE_ALREADY_CREATED_PASSTHROUGH_FB => Some ("trying to create an MR feature when one was already created and only one instance is allowed") , Self :: ERROR_FEATURE_REQUIRED_PASSTHROUGH_FB => Some ("requested functionality requires a feature to be created first") , Self :: ERROR_NOT_PERMITTED_PASSTHROUGH_FB => Some ("requested functionality is not permitted - application is not allowed to perform the requested operation") , Self :: ERROR_INSUFFICIENT_RESOURCES_PASSTHROUGH_FB => Some ("there weren't sufficient resources available to perform an operation") , Self :: ERROR_UNKNOWN_PASSTHROUGH_FB => Some ("unknown Passthrough error (no further details provided)") , Self :: ERROR_RENDER_MODEL_KEY_INVALID_FB => Some ("the model key is invalid") , Self :: RENDER_MODEL_UNAVAILABLE_FB => Some ("the model is unavailable") , Self :: ERROR_MARKER_NOT_TRACKED_VARJO => Some ("marker tracking is disabled or the specified marker is not currently tracked") , Self :: ERROR_MARKER_ID_INVALID_VARJO => Some ("the specified marker ID is not valid") , Self :: ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT => Some ("a spatial anchor was not found associated with the spatial anchor name provided") , Self :: ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT => Some ("the spatial anchor name provided was not valid") , Self :: ERROR_SPACE_MAPPING_INSUFFICIENT_FB => Some ("anchor import from cloud or export from device failed") , Self :: ERROR_SPACE_LOCALIZATION_FAILED_FB => Some ("anchors were downloaded from the cloud but failed to be imported/aligned on the device") , Self :: ERROR_SPACE_NETWORK_TIMEOUT_FB => Some ("timeout occurred while waiting for network request to complete") , Self :: ERROR_SPACE_NETWORK_REQUEST_FAILED_FB => Some ("the network request failed") , Self :: ERROR_SPACE_CLOUD_STORAGE_DISABLED_FB => Some ("cloud storage is required for this operation but is currently disabled") , Self :: ERROR_PASSTHROUGH_COLOR_LUT_BUFFER_SIZE_MISMATCH_META => Some ("the provided data buffer did not match the required size") , Self :: ERROR_HINT_ALREADY_SET_QCOM => Some ("tracking optimization hint is already set for the domain") , Self :: ERROR_SPACE_NOT_LOCATABLE_EXT => Some ("the space passed to the function was not locatable") , Self :: ERROR_PLANE_DETECTION_PERMISSION_DENIED_EXT => Some ("the permission for this resource was not granted") , _ => None , } ; + let reason = match * self { Self :: SUCCESS => Some ("function successfully completed") , Self :: TIMEOUT_EXPIRED => Some ("the specified timeout time occurred before the operation could complete") , Self :: SESSION_LOSS_PENDING => Some ("the session will be lost soon") , Self :: EVENT_UNAVAILABLE => Some ("no event was available") , Self :: SPACE_BOUNDS_UNAVAILABLE => Some ("the space's bounds are not known at the moment") , Self :: SESSION_NOT_FOCUSED => Some ("the session is not in the focused state") , Self :: FRAME_DISCARDED => Some ("a frame has been discarded from composition") , Self :: ERROR_VALIDATION_FAILURE => Some ("the function usage was invalid in some way") , Self :: ERROR_RUNTIME_FAILURE => Some ("the runtime failed to handle the function in an unexpected way that is not covered by another error result") , Self :: ERROR_OUT_OF_MEMORY => Some ("a memory allocation has failed") , Self :: ERROR_API_VERSION_UNSUPPORTED => Some ("the runtime does not support the requested API version") , Self :: ERROR_INITIALIZATION_FAILED => Some ("initialization of object could not be completed") , Self :: ERROR_FUNCTION_UNSUPPORTED => Some ("the requested function was not found or is otherwise unsupported") , Self :: ERROR_FEATURE_UNSUPPORTED => Some ("the requested feature is not supported") , Self :: ERROR_EXTENSION_NOT_PRESENT => Some ("a requested extension is not supported") , Self :: ERROR_LIMIT_REACHED => Some ("the runtime supports no more of the requested resource") , Self :: ERROR_SIZE_INSUFFICIENT => Some ("the supplied size was smaller than required") , Self :: ERROR_HANDLE_INVALID => Some ("a supplied object handle was invalid") , Self :: ERROR_INSTANCE_LOST => Some ("the XrInstance was lost or could not be found. It will need to be destroyed and optionally recreated") , Self :: ERROR_SESSION_RUNNING => Some ("the session is already running") , Self :: ERROR_SESSION_NOT_RUNNING => Some ("the session is not yet running") , Self :: ERROR_SESSION_LOST => Some ("the XrSession was lost. It will need to be destroyed and optionally recreated") , Self :: ERROR_SYSTEM_INVALID => Some ("the provided XrSystemId was invalid") , Self :: ERROR_PATH_INVALID => Some ("the provided XrPath was not valid") , Self :: ERROR_PATH_COUNT_EXCEEDED => Some ("the maximum number of supported semantic paths has been reached") , Self :: ERROR_PATH_FORMAT_INVALID => Some ("the semantic path character format is invalid") , Self :: ERROR_PATH_UNSUPPORTED => Some ("the semantic path is unsupported") , Self :: ERROR_LAYER_INVALID => Some ("the layer was NULL or otherwise invalid") , Self :: ERROR_LAYER_LIMIT_EXCEEDED => Some ("the number of specified layers is greater than the supported number") , Self :: ERROR_SWAPCHAIN_RECT_INVALID => Some ("the image rect was negatively sized or otherwise invalid") , Self :: ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED => Some ("the image format is not supported by the runtime or platform") , Self :: ERROR_ACTION_TYPE_MISMATCH => Some ("the API used to retrieve an action's state does not match the action's type") , Self :: ERROR_SESSION_NOT_READY => Some ("the session is not in the ready state") , Self :: ERROR_SESSION_NOT_STOPPING => Some ("the session is not in the stopping state") , Self :: ERROR_TIME_INVALID => Some ("the provided XrTime was zero, negative, or out of range") , Self :: ERROR_REFERENCE_SPACE_UNSUPPORTED => Some ("the specified reference space is not supported by the runtime or system") , Self :: ERROR_FILE_ACCESS_ERROR => Some ("the file could not be accessed") , Self :: ERROR_FILE_CONTENTS_INVALID => Some ("the file's contents were invalid") , Self :: ERROR_FORM_FACTOR_UNSUPPORTED => Some ("the specified form factor is not supported by the current runtime or platform") , Self :: ERROR_FORM_FACTOR_UNAVAILABLE => Some ("the specified form factor is supported, but the device is currently not available, e.g. not plugged in or powered off") , Self :: ERROR_API_LAYER_NOT_PRESENT => Some ("a requested API layer is not present or could not be loaded") , Self :: ERROR_CALL_ORDER_INVALID => Some ("the call was made without having made a previously required call") , Self :: ERROR_GRAPHICS_DEVICE_INVALID => Some ("the given graphics device is not in a valid state. The graphics device could be lost or initialized without meeting graphics requirements") , Self :: ERROR_POSE_INVALID => Some ("the supplied pose was invalid with respect to the requirements") , Self :: ERROR_INDEX_OUT_OF_RANGE => Some ("the supplied index was outside the range of valid indices") , Self :: ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED => Some ("the specified view configuration type is not supported by the runtime or platform") , Self :: ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED => Some ("the specified environment blend mode is not supported by the runtime or platform") , Self :: ERROR_NAME_DUPLICATED => Some ("the name provided was a duplicate of an already-existing resource") , Self :: ERROR_NAME_INVALID => Some ("the name provided was invalid") , Self :: ERROR_ACTIONSET_NOT_ATTACHED => Some ("a referenced action set is not attached to the session") , Self :: ERROR_ACTIONSETS_ALREADY_ATTACHED => Some ("the session already has attached action sets") , Self :: ERROR_LOCALIZED_NAME_DUPLICATED => Some ("the localized name provided was a duplicate of an already-existing resource") , Self :: ERROR_LOCALIZED_NAME_INVALID => Some ("the localized name provided was invalid") , Self :: ERROR_GRAPHICS_REQUIREMENTS_CALL_MISSING => Some ("the xrGetGraphicsRequirements* call was not made before calling xrCreateSession") , Self :: ERROR_RUNTIME_UNAVAILABLE => Some ("the loader was unable to find or load a runtime") , Self :: ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR => Some ("xrSetAndroidApplicationThreadKHR failed as thread id is invalid") , Self :: ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR => Some ("xrSetAndroidApplicationThreadKHR failed setting the thread attributes/priority") , Self :: ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT => Some ("spatial anchor could not be created at that location") , Self :: ERROR_SECONDARY_VIEW_CONFIGURATION_TYPE_NOT_ENABLED_MSFT => Some ("the secondary view configuration was not enabled when creating the session") , Self :: ERROR_CONTROLLER_MODEL_KEY_INVALID_MSFT => Some ("the controller model key is invalid") , Self :: ERROR_REPROJECTION_MODE_UNSUPPORTED_MSFT => Some ("the reprojection mode is not supported") , Self :: ERROR_COMPUTE_NEW_SCENE_NOT_COMPLETED_MSFT => Some ("compute new scene not completed") , Self :: ERROR_SCENE_COMPONENT_ID_INVALID_MSFT => Some ("scene component id invalid") , Self :: ERROR_SCENE_COMPONENT_TYPE_MISMATCH_MSFT => Some ("scene component type mismatch") , Self :: ERROR_SCENE_MESH_BUFFER_ID_INVALID_MSFT => Some ("scene mesh buffer id invalid") , Self :: ERROR_SCENE_COMPUTE_FEATURE_INCOMPATIBLE_MSFT => Some ("scene compute feature incompatible") , Self :: ERROR_SCENE_COMPUTE_CONSISTENCY_MISMATCH_MSFT => Some ("scene compute consistency mismatch") , Self :: ERROR_DISPLAY_REFRESH_RATE_UNSUPPORTED_FB => Some ("the display refresh rate is not supported by the platform") , Self :: ERROR_COLOR_SPACE_UNSUPPORTED_FB => Some ("the color space is not supported by the runtime") , Self :: ERROR_SPACE_COMPONENT_NOT_SUPPORTED_FB => Some ("the component type is not supported for this space") , Self :: ERROR_SPACE_COMPONENT_NOT_ENABLED_FB => Some ("the required component is not enabled for this space") , Self :: ERROR_SPACE_COMPONENT_STATUS_PENDING_FB => Some ("a request to set the component's status is currently pending") , Self :: ERROR_SPACE_COMPONENT_STATUS_ALREADY_SET_FB => Some ("the component is already set to the requested value") , Self :: ERROR_UNEXPECTED_STATE_PASSTHROUGH_FB => Some ("the object state is unexpected for the issued command") , Self :: ERROR_FEATURE_ALREADY_CREATED_PASSTHROUGH_FB => Some ("trying to create an MR feature when one was already created and only one instance is allowed") , Self :: ERROR_FEATURE_REQUIRED_PASSTHROUGH_FB => Some ("requested functionality requires a feature to be created first") , Self :: ERROR_NOT_PERMITTED_PASSTHROUGH_FB => Some ("requested functionality is not permitted - application is not allowed to perform the requested operation") , Self :: ERROR_INSUFFICIENT_RESOURCES_PASSTHROUGH_FB => Some ("there weren't sufficient resources available to perform an operation") , Self :: ERROR_UNKNOWN_PASSTHROUGH_FB => Some ("unknown Passthrough error (no further details provided)") , Self :: ERROR_RENDER_MODEL_KEY_INVALID_FB => Some ("the model key is invalid") , Self :: RENDER_MODEL_UNAVAILABLE_FB => Some ("the model is unavailable") , Self :: ERROR_MARKER_NOT_TRACKED_VARJO => Some ("marker tracking is disabled or the specified marker is not currently tracked") , Self :: ERROR_MARKER_ID_INVALID_VARJO => Some ("the specified marker ID is not valid") , Self :: ERROR_SPATIAL_ANCHOR_NAME_NOT_FOUND_MSFT => Some ("a spatial anchor was not found associated with the spatial anchor name provided") , Self :: ERROR_SPATIAL_ANCHOR_NAME_INVALID_MSFT => Some ("the spatial anchor name provided was not valid") , Self :: SCENE_MARKER_DATA_NOT_STRING_MSFT => Some ("marker does not encode a string") , Self :: ERROR_SPACE_MAPPING_INSUFFICIENT_FB => Some ("anchor import from cloud or export from device failed") , Self :: ERROR_SPACE_LOCALIZATION_FAILED_FB => Some ("anchors were downloaded from the cloud but failed to be imported/aligned on the device") , Self :: ERROR_SPACE_NETWORK_TIMEOUT_FB => Some ("timeout occurred while waiting for network request to complete") , Self :: ERROR_SPACE_NETWORK_REQUEST_FAILED_FB => Some ("the network request failed") , Self :: ERROR_SPACE_CLOUD_STORAGE_DISABLED_FB => Some ("cloud storage is required for this operation but is currently disabled") , Self :: ERROR_PASSTHROUGH_COLOR_LUT_BUFFER_SIZE_MISMATCH_META => Some ("the provided data buffer did not match the required size") , Self :: ERROR_HINT_ALREADY_SET_QCOM => Some ("tracking optimization hint is already set for the domain") , Self :: ERROR_SPACE_NOT_LOCATABLE_EXT => Some ("the space passed to the function was not locatable") , Self :: ERROR_PLANE_DETECTION_PERMISSION_DENIED_EXT => Some ("the permission for this resource was not granted") , _ => None , } ; if let Some(reason) = reason { fmt.pad(reason) } else { @@ -3039,6 +3058,70 @@ impl fmt::Debug for VirtualKeyboardInputSourceMETA { fmt_enum(fmt, self.0, name) } } +#[doc = "See [XrHeadsetFitStatusML](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrHeadsetFitStatusML)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct HeadsetFitStatusML(i32); +impl HeadsetFitStatusML { + #[doc = "Headset fit status not available for unknown reason."] + pub const UNKNOWN: HeadsetFitStatusML = Self(0i32); + #[doc = "Headset not worn."] + pub const NOT_WORN: HeadsetFitStatusML = Self(1i32); + #[doc = "Good fit."] + pub const GOOD_FIT: HeadsetFitStatusML = Self(2i32); + #[doc = "Bad fit."] + pub const BAD_FIT: HeadsetFitStatusML = Self(3i32); + pub fn from_raw(x: i32) -> Self { + Self(x) + } + pub fn into_raw(self) -> i32 { + self.0 + } +} +impl fmt::Debug for HeadsetFitStatusML { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::UNKNOWN => Some("UNKNOWN"), + Self::NOT_WORN => Some("NOT_WORN"), + Self::GOOD_FIT => Some("GOOD_FIT"), + Self::BAD_FIT => Some("BAD_FIT"), + _ => None, + }; + fmt_enum(fmt, self.0, name) + } +} +#[doc = "See [XrEyeCalibrationStatusML](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrEyeCalibrationStatusML)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct EyeCalibrationStatusML(i32); +impl EyeCalibrationStatusML { + #[doc = "Eye calibration status not available for unknown reason."] + pub const UNKNOWN: EyeCalibrationStatusML = Self(0i32); + #[doc = "User has not performed the eye calibration step. Use system provided app to perform eye calibration."] + pub const NONE: EyeCalibrationStatusML = Self(1i32); + #[doc = "Eye calibration is of lower accuracy."] + pub const COARSE: EyeCalibrationStatusML = Self(2i32); + #[doc = "Eye calibration is of higher accuracy."] + pub const FINE: EyeCalibrationStatusML = Self(3i32); + pub fn from_raw(x: i32) -> Self { + Self(x) + } + pub fn into_raw(self) -> i32 { + self.0 + } +} +impl fmt::Debug for EyeCalibrationStatusML { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::UNKNOWN => Some("UNKNOWN"), + Self::NONE => Some("NONE"), + Self::COARSE => Some("COARSE"), + Self::FINE => Some("FINE"), + _ => None, + }; + fmt_enum(fmt, self.0, name) + } +} #[doc = "See [XrHandEXT](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrHandEXT)"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] @@ -3331,6 +3414,7 @@ impl SceneComputeFeatureMSFT { pub const VISUAL_MESH: SceneComputeFeatureMSFT = Self(3i32); pub const COLLIDER_MESH: SceneComputeFeatureMSFT = Self(4i32); pub const SERIALIZE_SCENE: SceneComputeFeatureMSFT = Self(1000098000i32); + pub const MARKER: SceneComputeFeatureMSFT = Self(1000147000i32); pub fn from_raw(x: i32) -> Self { Self(x) } @@ -3346,6 +3430,7 @@ impl fmt::Debug for SceneComputeFeatureMSFT { Self::VISUAL_MESH => Some("VISUAL_MESH"), Self::COLLIDER_MESH => Some("COLLIDER_MESH"), Self::SERIALIZE_SCENE => Some("SERIALIZE_SCENE"), + Self::MARKER => Some("MARKER"), _ => None, }; fmt_enum(fmt, self.0, name) @@ -3388,6 +3473,7 @@ impl SceneComponentTypeMSFT { pub const VISUAL_MESH: SceneComponentTypeMSFT = Self(3i32); pub const COLLIDER_MESH: SceneComponentTypeMSFT = Self(4i32); pub const SERIALIZED_SCENE_FRAGMENT: SceneComponentTypeMSFT = Self(1000098000i32); + pub const MARKER: SceneComponentTypeMSFT = Self(1000147000i32); pub fn from_raw(x: i32) -> Self { Self(x) } @@ -3404,6 +3490,7 @@ impl fmt::Debug for SceneComponentTypeMSFT { Self::VISUAL_MESH => Some("VISUAL_MESH"), Self::COLLIDER_MESH => Some("COLLIDER_MESH"), Self::SERIALIZED_SCENE_FRAGMENT => Some("SERIALIZED_SCENE_FRAGMENT"), + Self::MARKER => Some("MARKER"), _ => None, }; fmt_enum(fmt, self.0, name) @@ -3437,6 +3524,52 @@ impl fmt::Debug for MeshComputeLodMSFT { fmt_enum(fmt, self.0, name) } } +#[doc = "See [XrSceneMarkerTypeMSFT](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSceneMarkerTypeMSFT)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SceneMarkerTypeMSFT(i32); +impl SceneMarkerTypeMSFT { + pub const QR_CODE: SceneMarkerTypeMSFT = Self(1i32); + pub fn from_raw(x: i32) -> Self { + Self(x) + } + pub fn into_raw(self) -> i32 { + self.0 + } +} +impl fmt::Debug for SceneMarkerTypeMSFT { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::QR_CODE => Some("QR_CODE"), + _ => None, + }; + fmt_enum(fmt, self.0, name) + } +} +#[doc = "See [XrSceneMarkerQRCodeSymbolTypeMSFT](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSceneMarkerQRCodeSymbolTypeMSFT)"] +#[repr(transparent)] +#[derive(Copy, Clone, Eq, PartialEq)] +pub struct SceneMarkerQRCodeSymbolTypeMSFT(i32); +impl SceneMarkerQRCodeSymbolTypeMSFT { + pub const QR_CODE: SceneMarkerQRCodeSymbolTypeMSFT = Self(1i32); + pub const MICRO_QR_CODE: SceneMarkerQRCodeSymbolTypeMSFT = Self(2i32); + pub fn from_raw(x: i32) -> Self { + Self(x) + } + pub fn into_raw(self) -> i32 { + self.0 + } +} +impl fmt::Debug for SceneMarkerQRCodeSymbolTypeMSFT { + fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + let name = match *self { + Self::QR_CODE => Some("QR_CODE"), + Self::MICRO_QR_CODE => Some("MICRO_QR_CODE"), + _ => None, + }; + fmt_enum(fmt, self.0, name) + } +} #[doc = "See [XrColorSpaceFB](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrColorSpaceFB)"] #[repr(transparent)] #[derive(Copy, Clone, Eq, PartialEq)] @@ -7679,16 +7812,14 @@ impl RenderModelPropertiesFB { } #[repr(C)] #[derive(Copy, Clone, Debug)] -#[doc = "See [XrRenderModelBufferFB](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrRenderModelBufferFB) - defined by [XR_FB_render_model](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_FB_render_model)"] -pub struct RenderModelBufferFB { +#[doc = "See [XrRenderModelCapabilitiesRequestFB](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrRenderModelCapabilitiesRequestFB) - defined by [XR_FB_render_model](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_FB_render_model)"] +pub struct RenderModelCapabilitiesRequestFB { pub ty: StructureType, pub next: *mut c_void, - pub buffer_capacity_input: u32, - pub buffer_count_output: u32, - pub buffer: *mut u8, + pub flags: RenderModelFlagsFB, } -impl RenderModelBufferFB { - pub const TYPE: StructureType = StructureType::RENDER_MODEL_BUFFER_FB; +impl RenderModelCapabilitiesRequestFB { + pub const TYPE: StructureType = StructureType::RENDER_MODEL_CAPABILITIES_REQUEST_FB; #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -7704,14 +7835,16 @@ impl RenderModelBufferFB { } #[repr(C)] #[derive(Copy, Clone, Debug)] -#[doc = "See [XrRenderModelLoadInfoFB](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrRenderModelLoadInfoFB) - defined by [XR_FB_render_model](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_FB_render_model)"] -pub struct RenderModelLoadInfoFB { +#[doc = "See [XrRenderModelBufferFB](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrRenderModelBufferFB) - defined by [XR_FB_render_model](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_FB_render_model)"] +pub struct RenderModelBufferFB { pub ty: StructureType, pub next: *mut c_void, - pub model_key: RenderModelKeyFB, + pub buffer_capacity_input: u32, + pub buffer_count_output: u32, + pub buffer: *mut u8, } -impl RenderModelLoadInfoFB { - pub const TYPE: StructureType = StructureType::RENDER_MODEL_LOAD_INFO_FB; +impl RenderModelBufferFB { + pub const TYPE: StructureType = StructureType::RENDER_MODEL_BUFFER_FB; #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -7727,14 +7860,14 @@ impl RenderModelLoadInfoFB { } #[repr(C)] #[derive(Copy, Clone, Debug)] -#[doc = "See [XrSystemRenderModelPropertiesFB](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemRenderModelPropertiesFB) - defined by [XR_FB_render_model](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_FB_render_model)"] -pub struct SystemRenderModelPropertiesFB { +#[doc = "See [XrRenderModelLoadInfoFB](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrRenderModelLoadInfoFB) - defined by [XR_FB_render_model](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_FB_render_model)"] +pub struct RenderModelLoadInfoFB { pub ty: StructureType, pub next: *mut c_void, - pub supports_render_model_loading: Bool32, + pub model_key: RenderModelKeyFB, } -impl SystemRenderModelPropertiesFB { - pub const TYPE: StructureType = StructureType::SYSTEM_RENDER_MODEL_PROPERTIES_FB; +impl RenderModelLoadInfoFB { + pub const TYPE: StructureType = StructureType::RENDER_MODEL_LOAD_INFO_FB; #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -7750,14 +7883,14 @@ impl SystemRenderModelPropertiesFB { } #[repr(C)] #[derive(Copy, Clone, Debug)] -#[doc = "See [XrRenderModelCapabilitiesRequestFB](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrRenderModelCapabilitiesRequestFB) - defined by [XR_FB_render_model](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_FB_render_model)"] -pub struct RenderModelCapabilitiesRequestFB { +#[doc = "See [XrSystemRenderModelPropertiesFB](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrSystemRenderModelPropertiesFB) - defined by [XR_FB_render_model](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_FB_render_model)"] +pub struct SystemRenderModelPropertiesFB { pub ty: StructureType, pub next: *mut c_void, - pub flags: RenderModelFlagsFB, + pub supports_render_model_loading: Bool32, } -impl RenderModelCapabilitiesRequestFB { - pub const TYPE: StructureType = StructureType::RENDER_MODEL_CAPABILITIES_REQUEST_FB; +impl SystemRenderModelPropertiesFB { + pub const TYPE: StructureType = StructureType::SYSTEM_RENDER_MODEL_PROPERTIES_FB; #[doc = r" Construct a partially-initialized value suitable for passing to OpenXR"] #[inline] pub fn out(next: *mut BaseOutStructure) -> MaybeUninit { @@ -9499,6 +9632,40 @@ pub struct EventDataVirtualKeyboardHiddenMETA { impl EventDataVirtualKeyboardHiddenMETA { pub const TYPE: StructureType = StructureType::EVENT_DATA_VIRTUAL_KEYBOARD_HIDDEN_META; } +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = "See [XrUserCalibrationEnableEventsInfoML](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrUserCalibrationEnableEventsInfoML) - defined by [XR_ML_user_calibration](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_ML_user_calibration)"] +pub struct UserCalibrationEnableEventsInfoML { + pub ty: StructureType, + pub next: *const c_void, + pub enabled: Bool32, +} +impl UserCalibrationEnableEventsInfoML { + pub const TYPE: StructureType = StructureType::USER_CALIBRATION_ENABLE_EVENTS_INFO_ML; +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = "See [XrEventDataHeadsetFitChangedML](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrEventDataHeadsetFitChangedML) - defined by [XR_ML_user_calibration](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_ML_user_calibration)"] +pub struct EventDataHeadsetFitChangedML { + pub ty: StructureType, + pub next: *const c_void, + pub status: HeadsetFitStatusML, + pub time: Time, +} +impl EventDataHeadsetFitChangedML { + pub const TYPE: StructureType = StructureType::EVENT_DATA_HEADSET_FIT_CHANGED_ML; +} +#[repr(C)] +#[derive(Copy, Clone, Debug)] +#[doc = "See [XrEventDataEyeCalibrationChangedML](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XrEventDataEyeCalibrationChangedML) - defined by [XR_ML_user_calibration](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_ML_user_calibration)"] +pub struct EventDataEyeCalibrationChangedML { + pub ty: StructureType, + pub next: *const c_void, + pub status: EyeCalibrationStatusML, +} +impl EventDataEyeCalibrationChangedML { + pub const TYPE: StructureType = StructureType::EVENT_DATA_EYE_CALIBRATION_CHANGED_ML; +} #[doc = r" Function pointer prototypes"] pub mod pfn { use super::*; @@ -10203,7 +10370,7 @@ pub mod pfn { ) -> Result; #[doc = "See [xrSetColorSpaceFB](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#xrSetColorSpaceFB) - defined by [XR_FB_color_space](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_FB_color_space)"] pub type SetColorSpaceFB = - unsafe extern "system" fn(session: Session, colorspace: ColorSpaceFB) -> Result; + unsafe extern "system" fn(session: Session, color_space: ColorSpaceFB) -> Result; #[doc = "See [xrCreateFoveationProfileFB](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#xrCreateFoveationProfileFB) - defined by [XR_FB_foveation](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_FB_foveation)"] pub type CreateFoveationProfileFB = unsafe extern "system" fn( session: Session, @@ -10474,9 +10641,9 @@ pub mod pfn { #[doc = "See [xrEnumeratePersistedSpatialAnchorNamesMSFT](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#xrEnumeratePersistedSpatialAnchorNamesMSFT) - defined by [XR_MSFT_spatial_anchor_persistence](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_MSFT_spatial_anchor_persistence)"] pub type EnumeratePersistedSpatialAnchorNamesMSFT = unsafe extern "system" fn( spatial_anchor_store: SpatialAnchorStoreConnectionMSFT, - spatial_anchor_names_capacity_input: u32, - spatial_anchor_names_count_output: *mut u32, - persisted_anchor_names: *mut SpatialAnchorPersistenceNameMSFT, + spatial_anchor_name_capacity_input: u32, + spatial_anchor_name_count_output: *mut u32, + spatial_anchor_names: *mut SpatialAnchorPersistenceNameMSFT, ) -> Result; #[doc = "See [xrCreateSpatialAnchorFromPersistedNameMSFT](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#xrCreateSpatialAnchorFromPersistedNameMSFT) - defined by [XR_MSFT_spatial_anchor_persistence](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_MSFT_spatial_anchor_persistence)"] pub type CreateSpatialAnchorFromPersistedNameMSFT = unsafe extern "system" fn( @@ -10530,7 +10697,7 @@ pub mod pfn { unsafe extern "system" fn(session: Session, marker_id: u64, timeout: Duration) -> Result; #[doc = "See [xrSetMarkerTrackingPredictionVARJO](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#xrSetMarkerTrackingPredictionVARJO) - defined by [XR_VARJO_marker_tracking](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_VARJO_marker_tracking)"] pub type SetMarkerTrackingPredictionVARJO = - unsafe extern "system" fn(session: Session, marker_id: u64, enabled: Bool32) -> Result; + unsafe extern "system" fn(session: Session, marker_id: u64, enable: Bool32) -> Result; #[doc = "See [xrGetMarkerSizeVARJO](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#xrGetMarkerSizeVARJO) - defined by [XR_VARJO_marker_tracking](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_VARJO_marker_tracking)"] pub type GetMarkerSizeVARJO = unsafe extern "system" fn(session: Session, marker_id: u64, size: *mut Extent2Df) -> Result; @@ -10726,6 +10893,11 @@ pub mod pfn { keyboard: VirtualKeyboardMETA, change_info: *const VirtualKeyboardTextContextChangeInfoMETA, ) -> Result; + #[doc = "See [xrEnableUserCalibrationEventsML](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#xrEnableUserCalibrationEventsML) - defined by [XR_ML_user_calibration](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_ML_user_calibration)"] + pub type EnableUserCalibrationEventsML = unsafe extern "system" fn( + instance: Instance, + enable_info: *const UserCalibrationEnableEventsInfoML, + ) -> Result; #[doc = "See [xrGetVulkanGraphicsRequirements2KHR](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#xrGetVulkanGraphicsRequirements2KHR) - defined by [XR_KHR_vulkan_enable](https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_KHR_vulkan_enable)"] pub type GetVulkanGraphicsRequirements2KHR = unsafe extern "system" fn( instance: Instance, @@ -10736,7 +10908,7 @@ pub mod pfn { pub const ALMALENCE_digital_lens_control_SPEC_VERSION: u32 = 1u32; pub const ALMALENCE_DIGITAL_LENS_CONTROL_EXTENSION_NAME: &[u8] = b"XR_ALMALENCE_digital_lens_control\0"; -pub const BD_controller_interaction_SPEC_VERSION: u32 = 1u32; +pub const BD_controller_interaction_SPEC_VERSION: u32 = 2u32; pub const BD_CONTROLLER_INTERACTION_EXTENSION_NAME: &[u8] = b"XR_BD_controller_interaction\0"; pub const EPIC_view_configuration_fov_SPEC_VERSION: u32 = 2u32; pub const EPIC_VIEW_CONFIGURATION_FOV_EXTENSION_NAME: &[u8] = b"XR_EPIC_view_configuration_fov\0"; @@ -10744,7 +10916,7 @@ pub const EXT_performance_settings_SPEC_VERSION: u32 = 4u32; pub const EXT_PERFORMANCE_SETTINGS_EXTENSION_NAME: &[u8] = b"XR_EXT_performance_settings\0"; pub const EXT_thermal_query_SPEC_VERSION: u32 = 2u32; pub const EXT_THERMAL_QUERY_EXTENSION_NAME: &[u8] = b"XR_EXT_thermal_query\0"; -pub const EXT_debug_utils_SPEC_VERSION: u32 = 4u32; +pub const EXT_debug_utils_SPEC_VERSION: u32 = 5u32; pub const EXT_DEBUG_UTILS_EXTENSION_NAME: &[u8] = b"XR_EXT_debug_utils\0"; pub const EXT_eye_gaze_interaction_SPEC_VERSION: u32 = 2u32; pub const EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME: &[u8] = b"XR_EXT_eye_gaze_interaction\0"; @@ -10996,6 +11168,8 @@ pub const ML_global_dimmer_SPEC_VERSION: u32 = 1u32; pub const ML_GLOBAL_DIMMER_EXTENSION_NAME: &[u8] = b"XR_ML_global_dimmer\0"; pub const ML_compat_SPEC_VERSION: u32 = 1u32; pub const ML_COMPAT_EXTENSION_NAME: &[u8] = b"XR_ML_compat\0"; +pub const ML_user_calibration_SPEC_VERSION: u32 = 1u32; +pub const ML_USER_CALIBRATION_EXTENSION_NAME: &[u8] = b"XR_ML_user_calibration\0"; pub const MND_headless_SPEC_VERSION: u32 = 2u32; pub const MND_HEADLESS_EXTENSION_NAME: &[u8] = b"XR_MND_headless\0"; pub const MND_swapchain_usage_input_attachment_bit_SPEC_VERSION: u32 = 2u32; @@ -11040,6 +11214,8 @@ pub const MSFT_SCENE_UNDERSTANDING_SERIALIZATION_EXTENSION_NAME: &[u8] = pub const MSFT_spatial_anchor_persistence_SPEC_VERSION: u32 = 2u32; pub const MSFT_SPATIAL_ANCHOR_PERSISTENCE_EXTENSION_NAME: &[u8] = b"XR_MSFT_spatial_anchor_persistence\0"; +pub const MSFT_scene_marker_SPEC_VERSION: u32 = 1u32; +pub const MSFT_SCENE_MARKER_EXTENSION_NAME: &[u8] = b"XR_MSFT_scene_marker\0"; #[cfg(target_os = "android")] pub const OCULUS_android_session_state_enable_SPEC_VERSION: u32 = 1u32; #[cfg(target_os = "android")] @@ -11073,6 +11249,8 @@ pub const VARJO_marker_tracking_SPEC_VERSION: u32 = 1u32; pub const VARJO_MARKER_TRACKING_EXTENSION_NAME: &[u8] = b"XR_VARJO_marker_tracking\0"; pub const VARJO_view_offset_SPEC_VERSION: u32 = 1u32; pub const VARJO_VIEW_OFFSET_EXTENSION_NAME: &[u8] = b"XR_VARJO_view_offset\0"; +pub const YVR_controller_interaction_SPEC_VERSION: u32 = 1u32; +pub const YVR_CONTROLLER_INTERACTION_EXTENSION_NAME: &[u8] = b"XR_YVR_controller_interaction\0"; #[cfg(feature = "linked")] extern "system" { #[link_name = "xrGetInstanceProcAddr"]