From 29f7f08261e086a6879d7d3cb4ca51195fbfe9f8 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sun, 24 May 2026 18:40:50 +0300
Subject: [PATCH] pdate openxr headers from khronos.
---
src/video/khronos/openxr/openxr.h | 82 ++++++++++++++++++-
src/video/khronos/openxr/openxr_reflection.h | 62 ++++++++++++++
.../openxr/openxr_reflection_parent_structs.h | 1 +
.../openxr/openxr_reflection_structs.h | 3 +
4 files changed, 147 insertions(+), 1 deletion(-)
diff --git a/src/video/khronos/openxr/openxr.h b/src/video/khronos/openxr/openxr.h
index 44aba6287c3df..5b3c5424cd4af 100644
--- a/src/video/khronos/openxr/openxr.h
+++ b/src/video/khronos/openxr/openxr.h
@@ -26,7 +26,7 @@ extern "C" {
((((major) & 0xffffULL) << 48) | (((minor) & 0xffffULL) << 32) | ((patch) & 0xffffffffULL))
// OpenXR current version number.
-#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 1, 59)
+#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 1, 60)
// OpenXR 1.0 version number
#define XR_API_VERSION_1_0 XR_MAKE_VERSION(1, 0, XR_VERSION_PATCH(XR_CURRENT_API_VERSION))
@@ -948,6 +948,9 @@ typedef enum XrStructureType {
XR_TYPE_SPATIAL_CONTEXT_PERSISTENCE_CONFIG_EXT = 1000763002,
XR_TYPE_SPATIAL_DISCOVERY_PERSISTENCE_UUID_FILTER_EXT = 1000763003,
XR_TYPE_SPATIAL_COMPONENT_PERSISTENCE_LIST_EXT = 1000763004,
+ XR_TYPE_HAPTIC_PARAMETRIC_VIBRATION_EXT = 1000775000,
+ XR_TYPE_HAPTIC_PARAMETRIC_PROPERTIES_EXT = 1000775001,
+ XR_TYPE_SYSTEM_HAPTIC_PARAMETRIC_PROPERTIES_EXT = 1000775002,
XR_TYPE_SPATIAL_ENTITY_PERSIST_INFO_EXT = 1000781000,
XR_TYPE_PERSIST_SPATIAL_ENTITY_COMPLETION_EXT = 1000781001,
XR_TYPE_SPATIAL_ENTITY_UNPERSIST_INFO_EXT = 1000781002,
@@ -12871,6 +12874,83 @@ XRAPI_ATTR XrResult XRAPI_CALL xrDestroySpatialPersistenceContextEXT(
#endif /* !XR_NO_PROTOTYPES */
+// XR_EXT_haptic_parametric is a preprocessor guard. Do not pass it to API calls.
+#define XR_EXT_haptic_parametric 1
+
+#define XR_HAPTIC_PARAMETRIC_MAX_POINTS_TRANSIENTS_EXT 500
+
+
+#define XR_HAPTIC_PARAMETRIC_VIBRATION_EXTEND_DURATION_EXT 50000000
+
+
+#define XR_HAPTIC_PARAMETRIC_FREQUENCY_MIN_HZ_EXT 1
+
+
+#define XR_HAPTIC_PARAMETRIC_FREQUENCY_MAX_HZ_EXT 1000
+
+#define XR_EXT_haptic_parametric_SPEC_VERSION 1
+#define XR_EXT_HAPTIC_PARAMETRIC_EXTENSION_NAME "XR_EXT_haptic_parametric"
+
+typedef enum XrHapticParametricStreamFrameTypeEXT {
+ XR_HAPTIC_PARAMETRIC_STREAM_FRAME_TYPE_NONE_EXT = 0,
+ XR_HAPTIC_PARAMETRIC_STREAM_FRAME_TYPE_FIRST_FRAME_EXT = 1,
+ XR_HAPTIC_PARAMETRIC_STREAM_FRAME_TYPE_INTERMEDIATE_FRAME_EXT = 2,
+ XR_HAPTIC_PARAMETRIC_STREAM_FRAME_TYPE_LAST_FRAME_EXT = 3,
+ XR_HAPTIC_PARAMETRIC_STREAM_FRAME_TYPE_MAX_ENUM_EXT = 0x7FFFFFFF
+} XrHapticParametricStreamFrameTypeEXT;
+typedef struct XrHapticParametricPropertiesEXT {
+ XrStructureType type;
+ void* XR_MAY_ALIAS next;
+ XrDuration idealFrameSubmissionRate;
+ XrDuration minimumFirstFrameDuration;
+ float minFrequencyHz;
+ float maxFrequencyHz;
+} XrHapticParametricPropertiesEXT;
+
+typedef struct XrHapticParametricPointEXT {
+ XrDuration time;
+ float value;
+} XrHapticParametricPointEXT;
+
+typedef struct XrHapticParametricTransientEXT {
+ XrDuration time;
+ float amplitude;
+ float frequency;
+} XrHapticParametricTransientEXT;
+
+typedef struct XrHapticParametricVibrationEXT {
+ XrStructureType type;
+ const void* XR_MAY_ALIAS next;
+ uint32_t amplitudePointCount;
+ const XrHapticParametricPointEXT* amplitudePoints;
+ uint32_t frequencyPointCount;
+ const XrHapticParametricPointEXT* frequencyPoints;
+ uint32_t transientCount;
+ const XrHapticParametricTransientEXT* transients;
+ float minFrequencyHz;
+ float maxFrequencyHz;
+ XrHapticParametricStreamFrameTypeEXT streamFrameType;
+} XrHapticParametricVibrationEXT;
+
+// XrSystemHapticParametricPropertiesEXT extends XrSystemProperties
+typedef struct XrSystemHapticParametricPropertiesEXT {
+ XrStructureType type;
+ void* XR_MAY_ALIAS next;
+ XrBool32 supportsParametricHaptics;
+} XrSystemHapticParametricPropertiesEXT;
+
+typedef XrResult (XRAPI_PTR *PFN_xrHapticParametricGetPropertiesEXT)(XrSession session, const XrHapticActionInfo* hapticActionInfo, XrHapticParametricPropertiesEXT* parametricProperties);
+
+#ifndef XR_NO_PROTOTYPES
+#ifdef XR_EXTENSION_PROTOTYPES
+XRAPI_ATTR XrResult XRAPI_CALL xrHapticParametricGetPropertiesEXT(
+ XrSession session,
+ const XrHapticActionInfo* hapticActionInfo,
+ XrHapticParametricPropertiesEXT* parametricProperties);
+#endif /* XR_EXTENSION_PROTOTYPES */
+#endif /* !XR_NO_PROTOTYPES */
+
+
// XR_EXT_spatial_persistence_operations is a preprocessor guard. Do not pass it to API calls.
#define XR_EXT_spatial_persistence_operations 1
#define XR_EXT_spatial_persistence_operations_SPEC_VERSION 1
diff --git a/src/video/khronos/openxr/openxr_reflection.h b/src/video/khronos/openxr/openxr_reflection.h
index f8752f063cda0..4c0010e089d1b 100644
--- a/src/video/khronos/openxr/openxr_reflection.h
+++ b/src/video/khronos/openxr/openxr_reflection.h
@@ -831,6 +831,9 @@ XR_ENUM_STR(XrResult);
_(XR_TYPE_SPATIAL_CONTEXT_PERSISTENCE_CONFIG_EXT, 1000763002) \
_(XR_TYPE_SPATIAL_DISCOVERY_PERSISTENCE_UUID_FILTER_EXT, 1000763003) \
_(XR_TYPE_SPATIAL_COMPONENT_PERSISTENCE_LIST_EXT, 1000763004) \
+ _(XR_TYPE_HAPTIC_PARAMETRIC_VIBRATION_EXT, 1000775000) \
+ _(XR_TYPE_HAPTIC_PARAMETRIC_PROPERTIES_EXT, 1000775001) \
+ _(XR_TYPE_SYSTEM_HAPTIC_PARAMETRIC_PROPERTIES_EXT, 1000775002) \
_(XR_TYPE_SPATIAL_ENTITY_PERSIST_INFO_EXT, 1000781000) \
_(XR_TYPE_PERSIST_SPATIAL_ENTITY_COMPLETION_EXT, 1000781001) \
_(XR_TYPE_SPATIAL_ENTITY_UNPERSIST_INFO_EXT, 1000781002) \
@@ -2703,6 +2706,13 @@ XR_ENUM_STR(XrResult);
_(XR_SPATIAL_PERSISTENCE_STATE_NOT_FOUND_EXT, 2) \
_(XR_SPATIAL_PERSISTENCE_STATE_MAX_ENUM_EXT, 0x7FFFFFFF)
+#define XR_LIST_ENUM_XrHapticParametricStreamFrameTypeEXT(_) \
+ _(XR_HAPTIC_PARAMETRIC_STREAM_FRAME_TYPE_NONE_EXT, 0) \
+ _(XR_HAPTIC_PARAMETRIC_STREAM_FRAME_TYPE_FIRST_FRAME_EXT, 1) \
+ _(XR_HAPTIC_PARAMETRIC_STREAM_FRAME_TYPE_INTERMEDIATE_FRAME_EXT, 2) \
+ _(XR_HAPTIC_PARAMETRIC_STREAM_FRAME_TYPE_LAST_FRAME_EXT, 3) \
+ _(XR_HAPTIC_PARAMETRIC_STREAM_FRAME_TYPE_MAX_ENUM_EXT, 0x7FFFFFFF)
+
#define XR_LIST_ENUM_XrSpatialObjectSemanticLabelANDROID(_) \
_(XR_SPATIAL_OBJECT_SEMANTIC_LABEL_UNCATEGORIZED_ANDROID, 0) \
_(XR_SPATIAL_OBJECT_SEMANTIC_LABEL_KEYBOARD_ANDROID, 1) \
@@ -8203,6 +8213,46 @@ XR_ENUM_STR(XrResult);
_(persistDataCount) \
_(persistData) \
+/// Calls your macro with the name of each member of XrHapticParametricPropertiesEXT, in order.
+#define XR_LIST_STRUCT_XrHapticParametricPropertiesEXT(_) \
+ _(type) \
+ _(next) \
+ _(idealFrameSubmissionRate) \
+ _(minimumFirstFrameDuration) \
+ _(minFrequencyHz) \
+ _(maxFrequencyHz) \
+
+/// Calls your macro with the name of each member of XrHapticParametricPointEXT, in order.
+#define XR_LIST_STRUCT_XrHapticParametricPointEXT(_) \
+ _(time) \
+ _(value) \
+
+/// Calls your macro with the name of each member of XrHapticParametricTransientEXT, in order.
+#define XR_LIST_STRUCT_XrHapticParametricTransientEXT(_) \
+ _(time) \
+ _(amplitude) \
+ _(frequency) \
+
+/// Calls your macro with the name of each member of XrHapticParametricVibrationEXT, in order.
+#define XR_LIST_STRUCT_XrHapticParametricVibrationEXT(_) \
+ _(type) \
+ _(next) \
+ _(amplitudePointCount) \
+ _(amplitudePoints) \
+ _(frequencyPointCount) \
+ _(frequencyPoints) \
+ _(transientCount) \
+ _(transients) \
+ _(minFrequencyHz) \
+ _(maxFrequencyHz) \
+ _(streamFrameType) \
+
+/// Calls your macro with the name of each member of XrSystemHapticParametricPropertiesEXT, in order.
+#define XR_LIST_STRUCT_XrSystemHapticParametricPropertiesEXT(_) \
+ _(type) \
+ _(next) \
+ _(supportsParametricHaptics) \
+
/// Calls your macro with the name of each member of XrSpatialEntityPersistInfoEXT, in order.
#define XR_LIST_STRUCT_XrSpatialEntityPersistInfoEXT(_) \
_(type) \
@@ -8947,6 +8997,9 @@ XR_ENUM_STR(XrResult);
_(XrSpatialContextPersistenceConfigEXT, XR_TYPE_SPATIAL_CONTEXT_PERSISTENCE_CONFIG_EXT) \
_(XrSpatialDiscoveryPersistenceUuidFilterEXT, XR_TYPE_SPATIAL_DISCOVERY_PERSISTENCE_UUID_FILTER_EXT) \
_(XrSpatialComponentPersistenceListEXT, XR_TYPE_SPATIAL_COMPONENT_PERSISTENCE_LIST_EXT) \
+ _(XrHapticParametricPropertiesEXT, XR_TYPE_HAPTIC_PARAMETRIC_PROPERTIES_EXT) \
+ _(XrHapticParametricVibrationEXT, XR_TYPE_HAPTIC_PARAMETRIC_VIBRATION_EXT) \
+ _(XrSystemHapticParametricPropertiesEXT, XR_TYPE_SYSTEM_HAPTIC_PARAMETRIC_PROPERTIES_EXT) \
_(XrSpatialEntityPersistInfoEXT, XR_TYPE_SPATIAL_ENTITY_PERSIST_INFO_EXT) \
_(XrPersistSpatialEntityCompletionEXT, XR_TYPE_PERSIST_SPATIAL_ENTITY_COMPLETION_EXT) \
_(XrSpatialEntityUnpersistInfoEXT, XR_TYPE_SPATIAL_ENTITY_UNPERSIST_INFO_EXT) \
@@ -9369,6 +9422,7 @@ XR_ENUM_STR(XrResult);
_(XR_LOGITECH_mx_ink_stylus_interaction, 746) \
_(XR_EXT_spatial_anchor, 763) \
_(XR_EXT_spatial_persistence, 764) \
+ _(XR_EXT_haptic_parametric, 776) \
_(XR_EXT_spatial_persistence_operations, 782) \
_(XR_ANDROID_spatial_object_tracking, 786) \
_(XR_ANDROID_spatial_discovery_raycast, 787) \
@@ -10782,6 +10836,14 @@ XR_ENUM_STR(XrResult);
_(DestroySpatialPersistenceContextEXT, EXT_spatial_persistence) \
+/// For every function defined by XR_EXT_haptic_parametric in this version of the spec,
+/// calls your macro with the function name and extension name.
+/// Trims the leading `xr` from the function name and the leading `XR_` from the feature name,
+/// because it is easy to add back but impossible to remove with the preprocessor.
+#define XR_LIST_FUNCTIONS_XR_EXT_haptic_parametric(_) \
+ _(HapticParametricGetPropertiesEXT, EXT_haptic_parametric) \
+
+
/// For every function defined by XR_EXT_spatial_persistence_operations in this version of the spec,
/// calls your macro with the function name and extension name.
/// Trims the leading `xr` from the function name and the leading `XR_` from the feature name,
diff --git a/src/video/khronos/openxr/openxr_reflection_parent_structs.h b/src/video/khronos/openxr/openxr_reflection_parent_structs.h
index f970b32f3a8f1..2b372dd213620 100644
--- a/src/video/khronos/openxr/openxr_reflection_parent_structs.h
+++ b/src/video/khronos/openxr/openxr_reflection_parent_structs.h
@@ -113,6 +113,7 @@ This file contains expansion macros (X Macros) for OpenXR structures that have a
_avail(XrHapticVibration, XR_TYPE_HAPTIC_VIBRATION) \
_avail(XrHapticAmplitudeEnvelopeVibrationFB, XR_TYPE_HAPTIC_AMPLITUDE_ENVELOPE_VIBRATION_FB) \
_avail(XrHapticPcmVibrationFB, XR_TYPE_HAPTIC_PCM_VIBRATION_FB) \
+ _avail(XrHapticParametricVibrationEXT, XR_TYPE_HAPTIC_PARAMETRIC_VIBRATION_EXT) \
diff --git a/src/video/khronos/openxr/openxr_reflection_structs.h b/src/video/khronos/openxr/openxr_reflection_structs.h
index 4e6b592393934..683beef091354 100644
--- a/src/video/khronos/openxr/openxr_reflection_structs.h
+++ b/src/video/khronos/openxr/openxr_reflection_structs.h
@@ -630,6 +630,9 @@ This file contains expansion macros (X Macros) for OpenXR structures.
_avail(XrSpatialContextPersistenceConfigEXT, XR_TYPE_SPATIAL_CONTEXT_PERSISTENCE_CONFIG_EXT) \
_avail(XrSpatialDiscoveryPersistenceUuidFilterEXT, XR_TYPE_SPATIAL_DISCOVERY_PERSISTENCE_UUID_FILTER_EXT) \
_avail(XrSpatialComponentPersistenceListEXT, XR_TYPE_SPATIAL_COMPONENT_PERSISTENCE_LIST_EXT) \
+ _avail(XrHapticParametricPropertiesEXT, XR_TYPE_HAPTIC_PARAMETRIC_PROPERTIES_EXT) \
+ _avail(XrHapticParametricVibrationEXT, XR_TYPE_HAPTIC_PARAMETRIC_VIBRATION_EXT) \
+ _avail(XrSystemHapticParametricPropertiesEXT, XR_TYPE_SYSTEM_HAPTIC_PARAMETRIC_PROPERTIES_EXT) \
_avail(XrSpatialEntityPersistInfoEXT, XR_TYPE_SPATIAL_ENTITY_PERSIST_INFO_EXT) \
_avail(XrPersistSpatialEntityCompletionEXT, XR_TYPE_PERSIST_SPATIAL_ENTITY_COMPLETION_EXT) \
_avail(XrSpatialEntityUnpersistInfoEXT, XR_TYPE_SPATIAL_ENTITY_UNPERSIST_INFO_EXT) \