From f6cc330fc93be714d01bcc7d5db36a91bcfda9f3 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Fri, 2 Aug 2019 19:20:10 -0500 Subject: [PATCH] OpenXR 1.0.1 release (2-August-2019) Patch release for the 1.0 series. Updates version to 1.0.1. ### Public issues - #25 - Fix `make all` in the absence of styleguide and loader doc. - #26 - Proposal for unbounded space and spatial anchor extensions (vendor extensions) ### Internal issues - Replace remaining mentions of "app" with "application" (internal MR 1468) - Makefile cleanups (internal MR 1469, 1489) - Typographical fixes (internal MR 1490) - Reserve Oculus extension numbers (internal MR 1493) - Add Monado headless (vendor extension) (internal MR 1482) - Generated header files removed from `OpenXR-Docs` repo. ### New extensions - `XR_MND_headless` - `XR_MSFT_spatial_anchor` - `XR_MSFT_unbounded_reference_space` --- CHANGELOG.Docs.md | 28 +- README.adoc | 2 +- include/openxr/openxr.h | 1538 ----------------- include/openxr/openxr_platform.h | 383 ---- include/openxr/openxr_reflection.h | 1004 ----------- open-in-docker.sh | 24 +- specification/Makefile | 502 +++--- specification/current_version.ini | 2 +- specification/makeAllExts | 7 +- specification/makeExt | 9 +- specification/makeKHR | 8 +- specification/makeKHRAndKHX | 8 +- specification/registry/xr.xml | 23 +- specification/scripts/check_stamp.py | 47 + specification/scripts/extract_code.py | 27 +- .../khr/khr_composition_layer_depth.adoc | 6 +- .../chapters/extensions/mnd/mnd_headless.adoc | 71 + .../extensions/msft/msft_spatial_anchor.adoc | 103 +- .../msft/msft_unbounded_reference_space.adoc | 83 +- .../sources/chapters/fundamentals.adoc | 10 +- specification/sources/chapters/rendering.adoc | 25 +- specification/sources/chapters/session.adoc | 26 +- specification/sources/chapters/spaces.adoc | 33 +- specification/sources/chapters/system.adoc | 4 +- tox.ini | 82 + 25 files changed, 702 insertions(+), 3353 deletions(-) delete mode 100644 include/openxr/openxr.h delete mode 100644 include/openxr/openxr_platform.h delete mode 100644 include/openxr/openxr_reflection.h create mode 100755 specification/scripts/check_stamp.py create mode 100644 specification/sources/chapters/extensions/mnd/mnd_headless.adoc create mode 100644 tox.ini diff --git a/CHANGELOG.Docs.md b/CHANGELOG.Docs.md index 819fd15..d020c1d 100644 --- a/CHANGELOG.Docs.md +++ b/CHANGELOG.Docs.md @@ -9,7 +9,33 @@ collecting together the resolution of many Khronos internal issues, along with any public pull requests that have been accepted. This changelog only lists changes that affect the registry, -headers, and/or specification +headers, and/or specification text. + +## OpenXR 1.0.1 release (2-August-2019) + +Patch release for the 1.0 series. + +Updates version to 1.0.1. + +### Public issues + +- #25 - Fix `make all` in the absence of styleguide and loader doc. +- #26 - Proposal for unbounded space and spatial anchor extensions (vendor extensions) + +### Internal issues + +- Replace remaining mentions of "app" with "application" (internal MR 1468) +- Makefile cleanups (internal MR 1469, 1489) +- Typographical fixes (internal MR 1490) +- Reserve Oculus extension numbers (internal MR 1493) +- Add Monado headless (vendor extension) (internal MR 1482) +- Generated header files removed from `OpenXR-Docs` repo. + +### New extensions + +- `XR_MND_headless` +- `XR_MSFT_spatial_anchor` +- `XR_MSFT_unbounded_reference_space` ## OpenXR 1.0.0 release (29-July-2019) diff --git a/README.adoc b/README.adoc index 6e1a096..719db54 100644 --- a/README.adoc +++ b/README.adoc @@ -26,7 +26,7 @@ README.adoc This file COPYING.md Copyright and licensing information CODE_OF_CONDUCT.md Code of Conduct specification/ Specification - files to generate the spec -include/openxr/ OpenXR headers, generated from the Registry +include/openxr/ Static OpenXR header (not generated from the Registry) ``` == Building the Specification and Reference Pages, and Regenerating Headers diff --git a/include/openxr/openxr.h b/include/openxr/openxr.h deleted file mode 100644 index b776bab..0000000 --- a/include/openxr/openxr.h +++ /dev/null @@ -1,1538 +0,0 @@ -#ifndef OPENXR_H_ -#define OPENXR_H_ 1 - -/* -** Copyright (c) 2017-2019 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** This header is generated from the Khronos OpenXR XML API Registry. -** -*/ - - -#ifdef __cplusplus -extern "C" { -#endif - - - -#define XR_VERSION_1_0 1 -#include "openxr_platform_defines.h" -#define XR_MAKE_VERSION(major, minor, patch) \ - ((((major) & 0xffffULL) << 48) | (((minor) & 0xffffULL) << 32) | ((patch) & 0xffffffffULL)) - -// OpenXR current version number. -#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 0, 0) - -#define XR_VERSION_MAJOR(version) (uint16_t)(((uint64_t)(version) >> 48)& 0xffffULL) -#define XR_VERSION_MINOR(version) (uint16_t)(((uint64_t)(version) >> 32) & 0xffffULL) -#define XR_VERSION_PATCH(version) (uint32_t)((uint64_t)(version) & 0xffffffffULL) - -#if !defined(XR_NULL_HANDLE) -#if (XR_PTR_SIZE == 8) && XR_CPP_NULLPTR_SUPPORTED - #define XR_NULL_HANDLE nullptr -#else - #define XR_NULL_HANDLE 0 -#endif -#endif - - - -#define XR_NULL_SYSTEM_ID 0 - - -#define XR_NULL_PATH 0 - - -#define XR_SUCCEEDED(result) ((result) >= 0) - - -#define XR_FAILED(result) ((result) < 0) - - -#define XR_UNQUALIFIED_SUCCESS(result) ((result) == 0) - - -#define XR_NO_DURATION 0 - - -#define XR_INFINITE_DURATION 0x7fffffffffffffffLL - - -#define XR_MIN_HAPTIC_DURATION -1 - - -#define XR_FREQUENCY_UNSPECIFIED 0 - - -#define XR_MAX_EVENT_DATA_SIZE sizeof(XrEventDataBuffer) - - -#if !defined(XR_MAY_ALIAS) -#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4)) -#define XR_MAY_ALIAS __attribute__((__may_alias__)) -#else -#define XR_MAY_ALIAS -#endif -#endif - - -#if !defined(XR_DEFINE_HANDLE) -#if (XR_PTR_SIZE == 8) - #define XR_DEFINE_HANDLE(object) typedef struct object##_T* object; -#else - #define XR_DEFINE_HANDLE(object) typedef uint64_t object; -#endif -#endif - - - -#if !defined(XR_DEFINE_ATOM) - #define XR_DEFINE_ATOM(object) typedef uint64_t object; -#endif - - -typedef uint64_t XrVersion; -typedef uint64_t XrFlags64; -XR_DEFINE_ATOM(XrSystemId) -typedef uint32_t XrBool32; -XR_DEFINE_ATOM(XrPath) -typedef int64_t XrTime; -typedef int64_t XrDuration; -XR_DEFINE_HANDLE(XrInstance) -XR_DEFINE_HANDLE(XrSession) -XR_DEFINE_HANDLE(XrSpace) -XR_DEFINE_HANDLE(XrAction) -XR_DEFINE_HANDLE(XrSwapchain) -XR_DEFINE_HANDLE(XrActionSet) -#define XR_TRUE 1 -#define XR_FALSE 0 -#define XR_MAX_EXTENSION_NAME_SIZE 128 -#define XR_MAX_API_LAYER_NAME_SIZE 256 -#define XR_MAX_API_LAYER_DESCRIPTION_SIZE 256 -#define XR_MAX_SYSTEM_NAME_SIZE 256 -#define XR_MAX_APPLICATION_NAME_SIZE 128 -#define XR_MAX_ENGINE_NAME_SIZE 128 -#define XR_MAX_RUNTIME_NAME_SIZE 128 -#define XR_MAX_PATH_LENGTH 256 -#define XR_MAX_STRUCTURE_NAME_SIZE 64 -#define XR_MAX_RESULT_STRING_SIZE 64 -#define XR_MIN_COMPOSITION_LAYERS_SUPPORTED 16 -#define XR_MAX_ACTION_SET_NAME_SIZE 64 -#define XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE 128 -#define XR_MAX_ACTION_NAME_SIZE 64 -#define XR_MAX_LOCALIZED_ACTION_NAME_SIZE 128 - -typedef enum XrResult { - XR_SUCCESS = 0, - XR_TIMEOUT_EXPIRED = 1, - XR_SESSION_LOSS_PENDING = 3, - XR_EVENT_UNAVAILABLE = 4, - XR_SPACE_BOUNDS_UNAVAILABLE = 7, - XR_SESSION_NOT_FOCUSED = 8, - XR_FRAME_DISCARDED = 9, - XR_ERROR_VALIDATION_FAILURE = -1, - XR_ERROR_RUNTIME_FAILURE = -2, - XR_ERROR_OUT_OF_MEMORY = -3, - XR_ERROR_API_VERSION_UNSUPPORTED = -4, - XR_ERROR_INITIALIZATION_FAILED = -6, - XR_ERROR_FUNCTION_UNSUPPORTED = -7, - XR_ERROR_FEATURE_UNSUPPORTED = -8, - XR_ERROR_EXTENSION_NOT_PRESENT = -9, - XR_ERROR_LIMIT_REACHED = -10, - XR_ERROR_SIZE_INSUFFICIENT = -11, - XR_ERROR_HANDLE_INVALID = -12, - XR_ERROR_INSTANCE_LOST = -13, - XR_ERROR_SESSION_RUNNING = -14, - XR_ERROR_SESSION_NOT_RUNNING = -16, - XR_ERROR_SESSION_LOST = -17, - XR_ERROR_SYSTEM_INVALID = -18, - XR_ERROR_PATH_INVALID = -19, - XR_ERROR_PATH_COUNT_EXCEEDED = -20, - XR_ERROR_PATH_FORMAT_INVALID = -21, - XR_ERROR_PATH_UNSUPPORTED = -22, - XR_ERROR_LAYER_INVALID = -23, - XR_ERROR_LAYER_LIMIT_EXCEEDED = -24, - XR_ERROR_SWAPCHAIN_RECT_INVALID = -25, - XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED = -26, - XR_ERROR_ACTION_TYPE_MISMATCH = -27, - XR_ERROR_SESSION_NOT_READY = -28, - XR_ERROR_SESSION_NOT_STOPPING = -29, - XR_ERROR_TIME_INVALID = -30, - XR_ERROR_REFERENCE_SPACE_UNSUPPORTED = -31, - XR_ERROR_FILE_ACCESS_ERROR = -32, - XR_ERROR_FILE_CONTENTS_INVALID = -33, - XR_ERROR_FORM_FACTOR_UNSUPPORTED = -34, - XR_ERROR_FORM_FACTOR_UNAVAILABLE = -35, - XR_ERROR_API_LAYER_NOT_PRESENT = -36, - XR_ERROR_CALL_ORDER_INVALID = -37, - XR_ERROR_GRAPHICS_DEVICE_INVALID = -38, - XR_ERROR_POSE_INVALID = -39, - XR_ERROR_INDEX_OUT_OF_RANGE = -40, - XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED = -41, - XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED = -42, - XR_ERROR_NAME_DUPLICATED = -44, - XR_ERROR_NAME_INVALID = -45, - XR_ERROR_ACTIONSET_NOT_ATTACHED = -46, - XR_ERROR_ACTIONSETS_ALREADY_ATTACHED = -47, - XR_ERROR_LOCALIZED_NAME_DUPLICATED = -48, - XR_ERROR_LOCALIZED_NAME_INVALID = -49, - XR_ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR = -1000003000, - XR_ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR = -1000003001, - XR_RESULT_MAX_ENUM = 0x7FFFFFFF -} XrResult; - -typedef enum XrStructureType { - XR_TYPE_UNKNOWN = 0, - XR_TYPE_API_LAYER_PROPERTIES = 1, - XR_TYPE_EXTENSION_PROPERTIES = 2, - XR_TYPE_INSTANCE_CREATE_INFO = 3, - XR_TYPE_SYSTEM_GET_INFO = 4, - XR_TYPE_SYSTEM_PROPERTIES = 5, - XR_TYPE_VIEW_LOCATE_INFO = 6, - XR_TYPE_VIEW = 7, - XR_TYPE_SESSION_CREATE_INFO = 8, - XR_TYPE_SWAPCHAIN_CREATE_INFO = 9, - XR_TYPE_SESSION_BEGIN_INFO = 10, - XR_TYPE_VIEW_STATE = 11, - XR_TYPE_FRAME_END_INFO = 12, - XR_TYPE_HAPTIC_VIBRATION = 13, - XR_TYPE_EVENT_DATA_BUFFER = 16, - XR_TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING = 17, - XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED = 18, - XR_TYPE_ACTION_STATE_BOOLEAN = 23, - XR_TYPE_ACTION_STATE_FLOAT = 24, - XR_TYPE_ACTION_STATE_VECTOR2F = 25, - XR_TYPE_ACTION_STATE_POSE = 27, - XR_TYPE_ACTION_SET_CREATE_INFO = 28, - XR_TYPE_ACTION_CREATE_INFO = 29, - XR_TYPE_INSTANCE_PROPERTIES = 32, - XR_TYPE_FRAME_WAIT_INFO = 33, - XR_TYPE_COMPOSITION_LAYER_PROJECTION = 35, - XR_TYPE_COMPOSITION_LAYER_QUAD = 36, - XR_TYPE_REFERENCE_SPACE_CREATE_INFO = 37, - XR_TYPE_ACTION_SPACE_CREATE_INFO = 38, - XR_TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING = 40, - XR_TYPE_VIEW_CONFIGURATION_VIEW = 41, - XR_TYPE_SPACE_LOCATION = 42, - XR_TYPE_SPACE_VELOCITY = 43, - XR_TYPE_FRAME_STATE = 44, - XR_TYPE_VIEW_CONFIGURATION_PROPERTIES = 45, - XR_TYPE_FRAME_BEGIN_INFO = 46, - XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW = 48, - XR_TYPE_EVENT_DATA_EVENTS_LOST = 49, - XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING = 51, - XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED = 52, - XR_TYPE_INTERACTION_PROFILE_STATE = 53, - XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO = 55, - XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO = 56, - XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO = 57, - XR_TYPE_ACTION_STATE_GET_INFO = 58, - XR_TYPE_HAPTIC_ACTION_INFO = 59, - XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO = 60, - XR_TYPE_ACTIONS_SYNC_INFO = 61, - XR_TYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO = 62, - XR_TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO = 63, - XR_TYPE_COMPOSITION_LAYER_CUBE_KHR = 1000006000, - XR_TYPE_INSTANCE_CREATE_INFO_ANDROID_KHR = 1000008000, - XR_TYPE_COMPOSITION_LAYER_DEPTH_INFO_KHR = 1000010000, - XR_TYPE_VULKAN_SWAPCHAIN_FORMAT_LIST_CREATE_INFO_KHR = 1000014000, - XR_TYPE_EVENT_DATA_PERF_SETTINGS_EXT = 1000015000, - XR_TYPE_COMPOSITION_LAYER_CYLINDER_KHR = 1000017000, - XR_TYPE_COMPOSITION_LAYER_EQUIRECT_KHR = 1000018000, - XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT = 1000019000, - XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT = 1000019001, - XR_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT = 1000019002, - XR_TYPE_DEBUG_UTILS_LABEL_EXT = 1000019003, - XR_TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR = 1000023000, - XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR = 1000023001, - XR_TYPE_GRAPHICS_BINDING_OPENGL_XCB_KHR = 1000023002, - XR_TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR = 1000023003, - XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_KHR = 1000023004, - XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_KHR = 1000023005, - XR_TYPE_GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR = 1000024001, - XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR = 1000024002, - XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_ES_KHR = 1000024003, - XR_TYPE_GRAPHICS_BINDING_VULKAN_KHR = 1000025000, - XR_TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR = 1000025001, - XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN_KHR = 1000025002, - XR_TYPE_GRAPHICS_BINDING_D3D11_KHR = 1000027000, - XR_TYPE_SWAPCHAIN_IMAGE_D3D11_KHR = 1000027001, - XR_TYPE_GRAPHICS_REQUIREMENTS_D3D11_KHR = 1000027002, - XR_TYPE_GRAPHICS_BINDING_D3D12_KHR = 1000028000, - XR_TYPE_SWAPCHAIN_IMAGE_D3D12_KHR = 1000028001, - XR_TYPE_GRAPHICS_REQUIREMENTS_D3D12_KHR = 1000028002, - XR_TYPE_VISIBILITY_MASK_KHR = 1000031000, - XR_TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR = 1000031001, - XR_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF -} XrStructureType; - -typedef enum XrFormFactor { - XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY = 1, - XR_FORM_FACTOR_HANDHELD_DISPLAY = 2, - XR_FORM_FACTOR_MAX_ENUM = 0x7FFFFFFF -} XrFormFactor; - -typedef enum XrViewConfigurationType { - XR_VIEW_CONFIGURATION_TYPE_PRIMARY_MONO = 1, - XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO = 2, - XR_VIEW_CONFIGURATION_TYPE_PRIMARY_QUAD_VARJO = 1000037000, - XR_VIEW_CONFIGURATION_TYPE_MAX_ENUM = 0x7FFFFFFF -} XrViewConfigurationType; - -typedef enum XrEnvironmentBlendMode { - XR_ENVIRONMENT_BLEND_MODE_OPAQUE = 1, - XR_ENVIRONMENT_BLEND_MODE_ADDITIVE = 2, - XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND = 3, - XR_ENVIRONMENT_BLEND_MODE_MAX_ENUM = 0x7FFFFFFF -} XrEnvironmentBlendMode; - -typedef enum XrReferenceSpaceType { - XR_REFERENCE_SPACE_TYPE_VIEW = 1, - XR_REFERENCE_SPACE_TYPE_LOCAL = 2, - XR_REFERENCE_SPACE_TYPE_STAGE = 3, - XR_REFERENCE_SPACE_TYPE_MAX_ENUM = 0x7FFFFFFF -} XrReferenceSpaceType; - -typedef enum XrActionType { - XR_ACTION_TYPE_BOOLEAN_INPUT = 1, - XR_ACTION_TYPE_FLOAT_INPUT = 2, - XR_ACTION_TYPE_VECTOR2F_INPUT = 3, - XR_ACTION_TYPE_POSE_INPUT = 4, - XR_ACTION_TYPE_VIBRATION_OUTPUT = 100, - XR_ACTION_TYPE_MAX_ENUM = 0x7FFFFFFF -} XrActionType; - -typedef enum XrEyeVisibility { - XR_EYE_VISIBILITY_BOTH = 0, - XR_EYE_VISIBILITY_LEFT = 1, - XR_EYE_VISIBILITY_RIGHT = 2, - XR_EYE_VISIBILITY_MAX_ENUM = 0x7FFFFFFF -} XrEyeVisibility; - -typedef enum XrSessionState { - XR_SESSION_STATE_UNKNOWN = 0, - XR_SESSION_STATE_IDLE = 1, - XR_SESSION_STATE_READY = 2, - XR_SESSION_STATE_SYNCHRONIZED = 3, - XR_SESSION_STATE_VISIBLE = 4, - XR_SESSION_STATE_FOCUSED = 5, - XR_SESSION_STATE_STOPPING = 6, - XR_SESSION_STATE_LOSS_PENDING = 7, - XR_SESSION_STATE_EXITING = 8, - XR_SESSION_STATE_MAX_ENUM = 0x7FFFFFFF -} XrSessionState; - -typedef enum XrObjectType { - XR_OBJECT_TYPE_UNKNOWN = 0, - XR_OBJECT_TYPE_INSTANCE = 1, - XR_OBJECT_TYPE_SESSION = 2, - XR_OBJECT_TYPE_SWAPCHAIN = 3, - XR_OBJECT_TYPE_SPACE = 4, - XR_OBJECT_TYPE_ACTION_SET = 5, - XR_OBJECT_TYPE_ACTION = 6, - XR_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT = 1000019000, - XR_OBJECT_TYPE_MAX_ENUM = 0x7FFFFFFF -} XrObjectType; -typedef XrFlags64 XrInstanceCreateFlags; - -// Flag bits for XrInstanceCreateFlags - -typedef XrFlags64 XrSessionCreateFlags; - -// Flag bits for XrSessionCreateFlags - -typedef XrFlags64 XrSpaceVelocityFlags; - -// Flag bits for XrSpaceVelocityFlags -static const XrSpaceVelocityFlags XR_SPACE_VELOCITY_LINEAR_VALID_BIT = 0x00000001; -static const XrSpaceVelocityFlags XR_SPACE_VELOCITY_ANGULAR_VALID_BIT = 0x00000002; - -typedef XrFlags64 XrSpaceLocationFlags; - -// Flag bits for XrSpaceLocationFlags -static const XrSpaceLocationFlags XR_SPACE_LOCATION_ORIENTATION_VALID_BIT = 0x00000001; -static const XrSpaceLocationFlags XR_SPACE_LOCATION_POSITION_VALID_BIT = 0x00000002; -static const XrSpaceLocationFlags XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT = 0x00000004; -static const XrSpaceLocationFlags XR_SPACE_LOCATION_POSITION_TRACKED_BIT = 0x00000008; - -typedef XrFlags64 XrSwapchainCreateFlags; - -// Flag bits for XrSwapchainCreateFlags -static const XrSwapchainCreateFlags XR_SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT = 0x00000001; -static const XrSwapchainCreateFlags XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT = 0x00000002; - -typedef XrFlags64 XrSwapchainUsageFlags; - -// Flag bits for XrSwapchainUsageFlags -static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT = 0x00000001; -static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000002; -static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT = 0x00000004; -static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT = 0x00000008; -static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT = 0x00000010; -static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_SAMPLED_BIT = 0x00000020; -static const XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT = 0x00000040; - -typedef XrFlags64 XrCompositionLayerFlags; - -// Flag bits for XrCompositionLayerFlags -static const XrCompositionLayerFlags XR_COMPOSITION_LAYER_CORRECT_CHROMATIC_ABERRATION_BIT = 0x00000001; -static const XrCompositionLayerFlags XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT = 0x00000002; -static const XrCompositionLayerFlags XR_COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT = 0x00000004; - -typedef XrFlags64 XrViewStateFlags; - -// Flag bits for XrViewStateFlags -static const XrViewStateFlags XR_VIEW_STATE_ORIENTATION_VALID_BIT = 0x00000001; -static const XrViewStateFlags XR_VIEW_STATE_POSITION_VALID_BIT = 0x00000002; -static const XrViewStateFlags XR_VIEW_STATE_ORIENTATION_TRACKED_BIT = 0x00000004; -static const XrViewStateFlags XR_VIEW_STATE_POSITION_TRACKED_BIT = 0x00000008; - -typedef XrFlags64 XrInputSourceLocalizedNameFlags; - -// Flag bits for XrInputSourceLocalizedNameFlags -static const XrInputSourceLocalizedNameFlags XR_INPUT_SOURCE_LOCALIZED_NAME_USER_PATH_BIT = 0x00000001; -static const XrInputSourceLocalizedNameFlags XR_INPUT_SOURCE_LOCALIZED_NAME_INTERACTION_PROFILE_BIT = 0x00000002; -static const XrInputSourceLocalizedNameFlags XR_INPUT_SOURCE_LOCALIZED_NAME_COMPONENT_BIT = 0x00000004; - -typedef void (XRAPI_PTR *PFN_xrVoidFunction)(void); -typedef struct XrApiLayerProperties { - XrStructureType type; - void* XR_MAY_ALIAS next; - char layerName[XR_MAX_API_LAYER_NAME_SIZE]; - XrVersion specVersion; - uint32_t layerVersion; - char description[XR_MAX_API_LAYER_DESCRIPTION_SIZE]; -} XrApiLayerProperties; - -typedef struct XrExtensionProperties { - XrStructureType type; - void* XR_MAY_ALIAS next; - char extensionName[XR_MAX_EXTENSION_NAME_SIZE]; - uint32_t extensionVersion; -} XrExtensionProperties; - -typedef struct XrApplicationInfo { - char applicationName[XR_MAX_APPLICATION_NAME_SIZE]; - uint32_t applicationVersion; - char engineName[XR_MAX_ENGINE_NAME_SIZE]; - uint32_t engineVersion; - XrVersion apiVersion; -} XrApplicationInfo; - -typedef struct XrInstanceCreateInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrInstanceCreateFlags createFlags; - XrApplicationInfo applicationInfo; - uint32_t enabledApiLayerCount; - const char* const* enabledApiLayerNames; - uint32_t enabledExtensionCount; - const char* const* enabledExtensionNames; -} XrInstanceCreateInfo; - -typedef struct XrInstanceProperties { - XrStructureType type; - void* XR_MAY_ALIAS next; - XrVersion runtimeVersion; - char runtimeName[XR_MAX_RUNTIME_NAME_SIZE]; -} XrInstanceProperties; - -typedef struct XrEventDataBuffer { - XrStructureType type; - const void* XR_MAY_ALIAS next; - uint8_t varying[4000]; -} XrEventDataBuffer; - -typedef struct XrSystemGetInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrFormFactor formFactor; -} XrSystemGetInfo; - -typedef struct XrSystemGraphicsProperties { - uint32_t maxSwapchainImageHeight; - uint32_t maxSwapchainImageWidth; - uint32_t maxLayerCount; -} XrSystemGraphicsProperties; - -typedef struct XrSystemTrackingProperties { - XrBool32 orientationTracking; - XrBool32 positionTracking; -} XrSystemTrackingProperties; - -typedef struct XrSystemProperties { - XrStructureType type; - void* XR_MAY_ALIAS next; - XrSystemId systemId; - uint32_t vendorId; - char systemName[XR_MAX_SYSTEM_NAME_SIZE]; - XrSystemGraphicsProperties graphicsProperties; - XrSystemTrackingProperties trackingProperties; -} XrSystemProperties; - -typedef struct XrSessionCreateInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrSessionCreateFlags createFlags; - XrSystemId systemId; -} XrSessionCreateInfo; - -typedef struct XrVector3f { - float x; - float y; - float z; -} XrVector3f; - -typedef struct XrSpaceVelocity { - XrStructureType type; - void* XR_MAY_ALIAS next; - XrSpaceVelocityFlags velocityFlags; - XrVector3f linearVelocity; - XrVector3f angularVelocity; -} XrSpaceVelocity; - -typedef struct XrQuaternionf { - float x; - float y; - float z; - float w; -} XrQuaternionf; - -typedef struct XrPosef { - XrQuaternionf orientation; - XrVector3f position; -} XrPosef; - -typedef struct XrReferenceSpaceCreateInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrReferenceSpaceType referenceSpaceType; - XrPosef poseInReferenceSpace; -} XrReferenceSpaceCreateInfo; - -typedef struct XrExtent2Df { - float width; - float height; -} XrExtent2Df; - -typedef struct XrActionSpaceCreateInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrAction action; - XrPath subactionPath; - XrPosef poseInActionSpace; -} XrActionSpaceCreateInfo; - -typedef struct XrSpaceLocation { - XrStructureType type; - void* XR_MAY_ALIAS next; - XrSpaceLocationFlags locationFlags; - XrPosef pose; -} XrSpaceLocation; - -typedef struct XrViewConfigurationProperties { - XrStructureType type; - void* XR_MAY_ALIAS next; - XrViewConfigurationType viewConfigurationType; - XrBool32 fovMutable; -} XrViewConfigurationProperties; - -typedef struct XrViewConfigurationView { - XrStructureType type; - void* XR_MAY_ALIAS next; - uint32_t recommendedImageRectWidth; - uint32_t maxImageRectWidth; - uint32_t recommendedImageRectHeight; - uint32_t maxImageRectHeight; - uint32_t recommendedSwapchainSampleCount; - uint32_t maxSwapchainSampleCount; -} XrViewConfigurationView; - -typedef struct XrSwapchainCreateInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrSwapchainCreateFlags createFlags; - XrSwapchainUsageFlags usageFlags; - int64_t format; - uint32_t sampleCount; - uint32_t width; - uint32_t height; - uint32_t faceCount; - uint32_t arraySize; - uint32_t mipCount; -} XrSwapchainCreateInfo; - -typedef struct XR_MAY_ALIAS XrSwapchainImageBaseHeader { - XrStructureType type; - void* XR_MAY_ALIAS next; -} XrSwapchainImageBaseHeader; - -typedef struct XrSwapchainImageAcquireInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; -} XrSwapchainImageAcquireInfo; - -typedef struct XrSwapchainImageWaitInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrDuration timeout; -} XrSwapchainImageWaitInfo; - -typedef struct XrSwapchainImageReleaseInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; -} XrSwapchainImageReleaseInfo; - -typedef struct XrSessionBeginInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrViewConfigurationType primaryViewConfigurationType; -} XrSessionBeginInfo; - -typedef struct XrFrameWaitInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; -} XrFrameWaitInfo; - -typedef struct XrFrameState { - XrStructureType type; - void* XR_MAY_ALIAS next; - XrTime predictedDisplayTime; - XrDuration predictedDisplayPeriod; - XrBool32 shouldRender; -} XrFrameState; - -typedef struct XrFrameBeginInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; -} XrFrameBeginInfo; - -typedef struct XR_MAY_ALIAS XrCompositionLayerBaseHeader { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrCompositionLayerFlags layerFlags; - XrSpace space; -} XrCompositionLayerBaseHeader; - -typedef struct XrFrameEndInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrTime displayTime; - XrEnvironmentBlendMode environmentBlendMode; - uint32_t layerCount; - const XrCompositionLayerBaseHeader* const* layers; -} XrFrameEndInfo; - -typedef struct XrViewLocateInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrViewConfigurationType viewConfigurationType; - XrTime displayTime; - XrSpace space; -} XrViewLocateInfo; - -typedef struct XrViewState { - XrStructureType type; - void* XR_MAY_ALIAS next; - XrViewStateFlags viewStateFlags; -} XrViewState; - -typedef struct XrFovf { - float angleLeft; - float angleRight; - float angleUp; - float angleDown; -} XrFovf; - -typedef struct XrView { - XrStructureType type; - void* XR_MAY_ALIAS next; - XrPosef pose; - XrFovf fov; -} XrView; - -typedef struct XrActionSetCreateInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - char actionSetName[XR_MAX_ACTION_SET_NAME_SIZE]; - char localizedActionSetName[XR_MAX_LOCALIZED_ACTION_SET_NAME_SIZE]; - uint32_t priority; -} XrActionSetCreateInfo; - -typedef struct XrActionCreateInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - char actionName[XR_MAX_ACTION_NAME_SIZE]; - XrActionType actionType; - uint32_t countSubactionPaths; - const XrPath* subactionPaths; - char localizedActionName[XR_MAX_LOCALIZED_ACTION_NAME_SIZE]; -} XrActionCreateInfo; - -typedef struct XrActionSuggestedBinding { - XrAction action; - XrPath binding; -} XrActionSuggestedBinding; - -typedef struct XrInteractionProfileSuggestedBinding { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrPath interactionProfile; - uint32_t countSuggestedBindings; - const XrActionSuggestedBinding* suggestedBindings; -} XrInteractionProfileSuggestedBinding; - -typedef struct XrSessionActionSetsAttachInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - uint32_t countActionSets; - const XrActionSet* actionSets; -} XrSessionActionSetsAttachInfo; - -typedef struct XrInteractionProfileState { - XrStructureType type; - void* XR_MAY_ALIAS next; - XrPath interactionProfile; -} XrInteractionProfileState; - -typedef struct XrActionStateGetInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrAction action; - XrPath subactionPath; -} XrActionStateGetInfo; - -typedef struct XrActionStateBoolean { - XrStructureType type; - void* XR_MAY_ALIAS next; - XrBool32 currentState; - XrBool32 changedSinceLastSync; - XrTime lastChangeTime; - XrBool32 isActive; -} XrActionStateBoolean; - -typedef struct XrActionStateFloat { - XrStructureType type; - void* XR_MAY_ALIAS next; - float currentState; - XrBool32 changedSinceLastSync; - XrTime lastChangeTime; - XrBool32 isActive; -} XrActionStateFloat; - -typedef struct XrVector2f { - float x; - float y; -} XrVector2f; - -typedef struct XrActionStateVector2f { - XrStructureType type; - void* XR_MAY_ALIAS next; - XrVector2f currentState; - XrBool32 changedSinceLastSync; - XrTime lastChangeTime; - XrBool32 isActive; -} XrActionStateVector2f; - -typedef struct XrActionStatePose { - XrStructureType type; - void* XR_MAY_ALIAS next; - XrBool32 isActive; -} XrActionStatePose; - -typedef struct XrActiveActionSet { - XrActionSet actionSet; - XrPath subactionPath; -} XrActiveActionSet; - -typedef struct XrActionsSyncInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - uint32_t countActiveActionSets; - const XrActiveActionSet* activeActionSets; -} XrActionsSyncInfo; - -typedef struct XrBoundSourcesForActionEnumerateInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrAction action; -} XrBoundSourcesForActionEnumerateInfo; - -typedef struct XrInputSourceLocalizedNameGetInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrPath sourcePath; - XrInputSourceLocalizedNameFlags whichComponents; -} XrInputSourceLocalizedNameGetInfo; - -typedef struct XrHapticActionInfo { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrAction action; - XrPath subactionPath; -} XrHapticActionInfo; - -typedef struct XR_MAY_ALIAS XrHapticBaseHeader { - XrStructureType type; - const void* XR_MAY_ALIAS next; -} XrHapticBaseHeader; - -typedef struct XR_MAY_ALIAS XrBaseInStructure { - XrStructureType type; - const struct XrBaseInStructure* next; -} XrBaseInStructure; - -typedef struct XR_MAY_ALIAS XrBaseOutStructure { - XrStructureType type; - struct XrBaseOutStructure* next; -} XrBaseOutStructure; - -typedef struct XrOffset2Di { - int32_t x; - int32_t y; -} XrOffset2Di; - -typedef struct XrExtent2Di { - int32_t width; - int32_t height; -} XrExtent2Di; - -typedef struct XrRect2Di { - XrOffset2Di offset; - XrExtent2Di extent; -} XrRect2Di; - -typedef struct XrSwapchainSubImage { - XrSwapchain swapchain; - XrRect2Di imageRect; - uint32_t imageArrayIndex; -} XrSwapchainSubImage; - -typedef struct XrCompositionLayerProjectionView { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrPosef pose; - XrFovf fov; - XrSwapchainSubImage subImage; -} XrCompositionLayerProjectionView; - -typedef struct XrCompositionLayerProjection { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrCompositionLayerFlags layerFlags; - XrSpace space; - uint32_t viewCount; - const XrCompositionLayerProjectionView* views; -} XrCompositionLayerProjection; - -typedef struct XrCompositionLayerQuad { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrCompositionLayerFlags layerFlags; - XrSpace space; - XrEyeVisibility eyeVisibility; - XrSwapchainSubImage subImage; - XrPosef pose; - XrExtent2Df size; -} XrCompositionLayerQuad; - -typedef struct XR_MAY_ALIAS XrEventDataBaseHeader { - XrStructureType type; - const void* XR_MAY_ALIAS next; -} XrEventDataBaseHeader; - -typedef struct XrEventDataEventsLost { - XrStructureType type; - const void* XR_MAY_ALIAS next; - uint32_t lostEventCount; -} XrEventDataEventsLost; - -typedef struct XrEventDataInstanceLossPending { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrTime lossTime; -} XrEventDataInstanceLossPending; - -typedef struct XrEventDataSessionStateChanged { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrSession session; - XrSessionState state; - XrTime time; -} XrEventDataSessionStateChanged; - -typedef struct XrEventDataReferenceSpaceChangePending { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrSession session; - XrReferenceSpaceType referenceSpaceType; - XrTime changeTime; - XrBool32 poseValid; - XrPosef poseInPreviousSpace; -} XrEventDataReferenceSpaceChangePending; - -typedef struct XrEventDataInteractionProfileChanged { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrSession session; -} XrEventDataInteractionProfileChanged; - -typedef struct XrHapticVibration { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrDuration duration; - float frequency; - float amplitude; -} XrHapticVibration; - -typedef struct XrOffset2Df { - float x; - float y; -} XrOffset2Df; - -typedef struct XrRect2Df { - XrOffset2Df offset; - XrExtent2Df extent; -} XrRect2Df; - -typedef struct XrVector4f { - float x; - float y; - float z; - float w; -} XrVector4f; - -typedef struct XrColor4f { - float r; - float g; - float b; - float a; -} XrColor4f; - -typedef XrResult (XRAPI_PTR *PFN_xrGetInstanceProcAddr)(XrInstance instance, const char* name, PFN_xrVoidFunction* function); -typedef XrResult (XRAPI_PTR *PFN_xrEnumerateApiLayerProperties)(uint32_t propertyCapacityInput, uint32_t* propertyCountOutput, XrApiLayerProperties* properties); -typedef XrResult (XRAPI_PTR *PFN_xrEnumerateInstanceExtensionProperties)(const char* layerName, uint32_t propertyCapacityInput, uint32_t* propertyCountOutput, XrExtensionProperties* properties); -typedef XrResult (XRAPI_PTR *PFN_xrCreateInstance)(const XrInstanceCreateInfo* createInfo, XrInstance* instance); -typedef XrResult (XRAPI_PTR *PFN_xrDestroyInstance)(XrInstance instance); -typedef XrResult (XRAPI_PTR *PFN_xrGetInstanceProperties)(XrInstance instance, XrInstanceProperties* instanceProperties); -typedef XrResult (XRAPI_PTR *PFN_xrPollEvent)(XrInstance instance, XrEventDataBuffer* eventData); -typedef XrResult (XRAPI_PTR *PFN_xrResultToString)(XrInstance instance, XrResult value, char buffer[XR_MAX_RESULT_STRING_SIZE]); -typedef XrResult (XRAPI_PTR *PFN_xrStructureTypeToString)(XrInstance instance, XrStructureType value, char buffer[XR_MAX_STRUCTURE_NAME_SIZE]); -typedef XrResult (XRAPI_PTR *PFN_xrGetSystem)(XrInstance instance, const XrSystemGetInfo* getInfo, XrSystemId* systemId); -typedef XrResult (XRAPI_PTR *PFN_xrGetSystemProperties)(XrInstance instance, XrSystemId systemId, XrSystemProperties* properties); -typedef XrResult (XRAPI_PTR *PFN_xrEnumerateEnvironmentBlendModes)(XrInstance instance, XrSystemId systemId, XrViewConfigurationType viewConfigurationType, uint32_t environmentBlendModeCapacityInput, uint32_t* environmentBlendModeCountOutput, XrEnvironmentBlendMode* environmentBlendModes); -typedef XrResult (XRAPI_PTR *PFN_xrCreateSession)(XrInstance instance, const XrSessionCreateInfo* createInfo, XrSession* session); -typedef XrResult (XRAPI_PTR *PFN_xrDestroySession)(XrSession session); -typedef XrResult (XRAPI_PTR *PFN_xrEnumerateReferenceSpaces)(XrSession session, uint32_t spaceCapacityInput, uint32_t* spaceCountOutput, XrReferenceSpaceType* spaces); -typedef XrResult (XRAPI_PTR *PFN_xrCreateReferenceSpace)(XrSession session, const XrReferenceSpaceCreateInfo* createInfo, XrSpace* space); -typedef XrResult (XRAPI_PTR *PFN_xrGetReferenceSpaceBoundsRect)(XrSession session, XrReferenceSpaceType referenceSpaceType, XrExtent2Df* bounds); -typedef XrResult (XRAPI_PTR *PFN_xrCreateActionSpace)(XrSession session, const XrActionSpaceCreateInfo* createInfo, XrSpace* space); -typedef XrResult (XRAPI_PTR *PFN_xrLocateSpace)(XrSpace space, XrSpace baseSpace, XrTime time, XrSpaceLocation* location); -typedef XrResult (XRAPI_PTR *PFN_xrDestroySpace)(XrSpace space); -typedef XrResult (XRAPI_PTR *PFN_xrEnumerateViewConfigurations)(XrInstance instance, XrSystemId systemId, uint32_t viewConfigurationTypeCapacityInput, uint32_t* viewConfigurationTypeCountOutput, XrViewConfigurationType* viewConfigurationTypes); -typedef XrResult (XRAPI_PTR *PFN_xrGetViewConfigurationProperties)(XrInstance instance, XrSystemId systemId, XrViewConfigurationType viewConfigurationType, XrViewConfigurationProperties* configurationProperties); -typedef XrResult (XRAPI_PTR *PFN_xrEnumerateViewConfigurationViews)(XrInstance instance, XrSystemId systemId, XrViewConfigurationType viewConfigurationType, uint32_t viewCapacityInput, uint32_t* viewCountOutput, XrViewConfigurationView* views); -typedef XrResult (XRAPI_PTR *PFN_xrEnumerateSwapchainFormats)(XrSession session, uint32_t formatCapacityInput, uint32_t* formatCountOutput, int64_t* formats); -typedef XrResult (XRAPI_PTR *PFN_xrCreateSwapchain)(XrSession session, const XrSwapchainCreateInfo* createInfo, XrSwapchain* swapchain); -typedef XrResult (XRAPI_PTR *PFN_xrDestroySwapchain)(XrSwapchain swapchain); -typedef XrResult (XRAPI_PTR *PFN_xrEnumerateSwapchainImages)(XrSwapchain swapchain, uint32_t imageCapacityInput, uint32_t* imageCountOutput, XrSwapchainImageBaseHeader* images); -typedef XrResult (XRAPI_PTR *PFN_xrAcquireSwapchainImage)(XrSwapchain swapchain, const XrSwapchainImageAcquireInfo* acquireInfo, uint32_t* index); -typedef XrResult (XRAPI_PTR *PFN_xrWaitSwapchainImage)(XrSwapchain swapchain, const XrSwapchainImageWaitInfo* waitInfo); -typedef XrResult (XRAPI_PTR *PFN_xrReleaseSwapchainImage)(XrSwapchain swapchain, const XrSwapchainImageReleaseInfo* releaseInfo); -typedef XrResult (XRAPI_PTR *PFN_xrBeginSession)(XrSession session, const XrSessionBeginInfo* beginInfo); -typedef XrResult (XRAPI_PTR *PFN_xrEndSession)(XrSession session); -typedef XrResult (XRAPI_PTR *PFN_xrRequestExitSession)(XrSession session); -typedef XrResult (XRAPI_PTR *PFN_xrWaitFrame)(XrSession session, const XrFrameWaitInfo* frameWaitInfo, XrFrameState* frameState); -typedef XrResult (XRAPI_PTR *PFN_xrBeginFrame)(XrSession session, const XrFrameBeginInfo* frameBeginInfo); -typedef XrResult (XRAPI_PTR *PFN_xrEndFrame)(XrSession session, const XrFrameEndInfo* frameEndInfo); -typedef XrResult (XRAPI_PTR *PFN_xrLocateViews)(XrSession session, const XrViewLocateInfo* viewLocateInfo, XrViewState* viewState, uint32_t viewCapacityInput, uint32_t* viewCountOutput, XrView* views); -typedef XrResult (XRAPI_PTR *PFN_xrStringToPath)(XrInstance instance, const char* pathString, XrPath* path); -typedef XrResult (XRAPI_PTR *PFN_xrPathToString)(XrInstance instance, XrPath path, uint32_t bufferCapacityInput, uint32_t* bufferCountOutput, char* buffer); -typedef XrResult (XRAPI_PTR *PFN_xrCreateActionSet)(XrInstance instance, const XrActionSetCreateInfo* createInfo, XrActionSet* actionSet); -typedef XrResult (XRAPI_PTR *PFN_xrDestroyActionSet)(XrActionSet actionSet); -typedef XrResult (XRAPI_PTR *PFN_xrCreateAction)(XrActionSet actionSet, const XrActionCreateInfo* createInfo, XrAction* action); -typedef XrResult (XRAPI_PTR *PFN_xrDestroyAction)(XrAction action); -typedef XrResult (XRAPI_PTR *PFN_xrSuggestInteractionProfileBindings)(XrInstance instance, const XrInteractionProfileSuggestedBinding* suggestedBindings); -typedef XrResult (XRAPI_PTR *PFN_xrAttachSessionActionSets)(XrSession session, const XrSessionActionSetsAttachInfo* attachInfo); -typedef XrResult (XRAPI_PTR *PFN_xrGetCurrentInteractionProfile)(XrSession session, XrPath topLevelUserPath, XrInteractionProfileState* interactionProfile); -typedef XrResult (XRAPI_PTR *PFN_xrGetActionStateBoolean)(XrSession session, const XrActionStateGetInfo* getInfo, XrActionStateBoolean* state); -typedef XrResult (XRAPI_PTR *PFN_xrGetActionStateFloat)(XrSession session, const XrActionStateGetInfo* getInfo, XrActionStateFloat* state); -typedef XrResult (XRAPI_PTR *PFN_xrGetActionStateVector2f)(XrSession session, const XrActionStateGetInfo* getInfo, XrActionStateVector2f* state); -typedef XrResult (XRAPI_PTR *PFN_xrGetActionStatePose)(XrSession session, const XrActionStateGetInfo* getInfo, XrActionStatePose* state); -typedef XrResult (XRAPI_PTR *PFN_xrSyncActions)(XrSession session, const XrActionsSyncInfo* syncInfo); -typedef XrResult (XRAPI_PTR *PFN_xrEnumerateBoundSourcesForAction)(XrSession session, const XrBoundSourcesForActionEnumerateInfo* enumerateInfo, uint32_t sourceCapacityInput, uint32_t* sourceCountOutput, XrPath* sources); -typedef XrResult (XRAPI_PTR *PFN_xrGetInputSourceLocalizedName)(XrSession session, const XrInputSourceLocalizedNameGetInfo* getInfo, uint32_t bufferCapacityInput, uint32_t* bufferCountOutput, char* buffer); -typedef XrResult (XRAPI_PTR *PFN_xrApplyHapticFeedback)(XrSession session, const XrHapticActionInfo* hapticActionInfo, const XrHapticBaseHeader* hapticFeedback); -typedef XrResult (XRAPI_PTR *PFN_xrStopHapticFeedback)(XrSession session, const XrHapticActionInfo* hapticActionInfo); - -#ifndef XR_NO_PROTOTYPES -XRAPI_ATTR XrResult XRAPI_CALL xrGetInstanceProcAddr( - XrInstance instance, - const char* name, - PFN_xrVoidFunction* function); - -XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateApiLayerProperties( - uint32_t propertyCapacityInput, - uint32_t* propertyCountOutput, - XrApiLayerProperties* properties); - -XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateInstanceExtensionProperties( - const char* layerName, - uint32_t propertyCapacityInput, - uint32_t* propertyCountOutput, - XrExtensionProperties* properties); - -XRAPI_ATTR XrResult XRAPI_CALL xrCreateInstance( - const XrInstanceCreateInfo* createInfo, - XrInstance* instance); - -XRAPI_ATTR XrResult XRAPI_CALL xrDestroyInstance( - XrInstance instance); - -XRAPI_ATTR XrResult XRAPI_CALL xrGetInstanceProperties( - XrInstance instance, - XrInstanceProperties* instanceProperties); - -XRAPI_ATTR XrResult XRAPI_CALL xrPollEvent( - XrInstance instance, - XrEventDataBuffer* eventData); - -XRAPI_ATTR XrResult XRAPI_CALL xrResultToString( - XrInstance instance, - XrResult value, - char buffer[XR_MAX_RESULT_STRING_SIZE]); - -XRAPI_ATTR XrResult XRAPI_CALL xrStructureTypeToString( - XrInstance instance, - XrStructureType value, - char buffer[XR_MAX_STRUCTURE_NAME_SIZE]); - -XRAPI_ATTR XrResult XRAPI_CALL xrGetSystem( - XrInstance instance, - const XrSystemGetInfo* getInfo, - XrSystemId* systemId); - -XRAPI_ATTR XrResult XRAPI_CALL xrGetSystemProperties( - XrInstance instance, - XrSystemId systemId, - XrSystemProperties* properties); - -XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateEnvironmentBlendModes( - XrInstance instance, - XrSystemId systemId, - XrViewConfigurationType viewConfigurationType, - uint32_t environmentBlendModeCapacityInput, - uint32_t* environmentBlendModeCountOutput, - XrEnvironmentBlendMode* environmentBlendModes); - -XRAPI_ATTR XrResult XRAPI_CALL xrCreateSession( - XrInstance instance, - const XrSessionCreateInfo* createInfo, - XrSession* session); - -XRAPI_ATTR XrResult XRAPI_CALL xrDestroySession( - XrSession session); - -XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateReferenceSpaces( - XrSession session, - uint32_t spaceCapacityInput, - uint32_t* spaceCountOutput, - XrReferenceSpaceType* spaces); - -XRAPI_ATTR XrResult XRAPI_CALL xrCreateReferenceSpace( - XrSession session, - const XrReferenceSpaceCreateInfo* createInfo, - XrSpace* space); - -XRAPI_ATTR XrResult XRAPI_CALL xrGetReferenceSpaceBoundsRect( - XrSession session, - XrReferenceSpaceType referenceSpaceType, - XrExtent2Df* bounds); - -XRAPI_ATTR XrResult XRAPI_CALL xrCreateActionSpace( - XrSession session, - const XrActionSpaceCreateInfo* createInfo, - XrSpace* space); - -XRAPI_ATTR XrResult XRAPI_CALL xrLocateSpace( - XrSpace space, - XrSpace baseSpace, - XrTime time, - XrSpaceLocation* location); - -XRAPI_ATTR XrResult XRAPI_CALL xrDestroySpace( - XrSpace space); - -XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateViewConfigurations( - XrInstance instance, - XrSystemId systemId, - uint32_t viewConfigurationTypeCapacityInput, - uint32_t* viewConfigurationTypeCountOutput, - XrViewConfigurationType* viewConfigurationTypes); - -XRAPI_ATTR XrResult XRAPI_CALL xrGetViewConfigurationProperties( - XrInstance instance, - XrSystemId systemId, - XrViewConfigurationType viewConfigurationType, - XrViewConfigurationProperties* configurationProperties); - -XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateViewConfigurationViews( - XrInstance instance, - XrSystemId systemId, - XrViewConfigurationType viewConfigurationType, - uint32_t viewCapacityInput, - uint32_t* viewCountOutput, - XrViewConfigurationView* views); - -XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateSwapchainFormats( - XrSession session, - uint32_t formatCapacityInput, - uint32_t* formatCountOutput, - int64_t* formats); - -XRAPI_ATTR XrResult XRAPI_CALL xrCreateSwapchain( - XrSession session, - const XrSwapchainCreateInfo* createInfo, - XrSwapchain* swapchain); - -XRAPI_ATTR XrResult XRAPI_CALL xrDestroySwapchain( - XrSwapchain swapchain); - -XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateSwapchainImages( - XrSwapchain swapchain, - uint32_t imageCapacityInput, - uint32_t* imageCountOutput, - XrSwapchainImageBaseHeader* images); - -XRAPI_ATTR XrResult XRAPI_CALL xrAcquireSwapchainImage( - XrSwapchain swapchain, - const XrSwapchainImageAcquireInfo* acquireInfo, - uint32_t* index); - -XRAPI_ATTR XrResult XRAPI_CALL xrWaitSwapchainImage( - XrSwapchain swapchain, - const XrSwapchainImageWaitInfo* waitInfo); - -XRAPI_ATTR XrResult XRAPI_CALL xrReleaseSwapchainImage( - XrSwapchain swapchain, - const XrSwapchainImageReleaseInfo* releaseInfo); - -XRAPI_ATTR XrResult XRAPI_CALL xrBeginSession( - XrSession session, - const XrSessionBeginInfo* beginInfo); - -XRAPI_ATTR XrResult XRAPI_CALL xrEndSession( - XrSession session); - -XRAPI_ATTR XrResult XRAPI_CALL xrRequestExitSession( - XrSession session); - -XRAPI_ATTR XrResult XRAPI_CALL xrWaitFrame( - XrSession session, - const XrFrameWaitInfo* frameWaitInfo, - XrFrameState* frameState); - -XRAPI_ATTR XrResult XRAPI_CALL xrBeginFrame( - XrSession session, - const XrFrameBeginInfo* frameBeginInfo); - -XRAPI_ATTR XrResult XRAPI_CALL xrEndFrame( - XrSession session, - const XrFrameEndInfo* frameEndInfo); - -XRAPI_ATTR XrResult XRAPI_CALL xrLocateViews( - XrSession session, - const XrViewLocateInfo* viewLocateInfo, - XrViewState* viewState, - uint32_t viewCapacityInput, - uint32_t* viewCountOutput, - XrView* views); - -XRAPI_ATTR XrResult XRAPI_CALL xrStringToPath( - XrInstance instance, - const char* pathString, - XrPath* path); - -XRAPI_ATTR XrResult XRAPI_CALL xrPathToString( - XrInstance instance, - XrPath path, - uint32_t bufferCapacityInput, - uint32_t* bufferCountOutput, - char* buffer); - -XRAPI_ATTR XrResult XRAPI_CALL xrCreateActionSet( - XrInstance instance, - const XrActionSetCreateInfo* createInfo, - XrActionSet* actionSet); - -XRAPI_ATTR XrResult XRAPI_CALL xrDestroyActionSet( - XrActionSet actionSet); - -XRAPI_ATTR XrResult XRAPI_CALL xrCreateAction( - XrActionSet actionSet, - const XrActionCreateInfo* createInfo, - XrAction* action); - -XRAPI_ATTR XrResult XRAPI_CALL xrDestroyAction( - XrAction action); - -XRAPI_ATTR XrResult XRAPI_CALL xrSuggestInteractionProfileBindings( - XrInstance instance, - const XrInteractionProfileSuggestedBinding* suggestedBindings); - -XRAPI_ATTR XrResult XRAPI_CALL xrAttachSessionActionSets( - XrSession session, - const XrSessionActionSetsAttachInfo* attachInfo); - -XRAPI_ATTR XrResult XRAPI_CALL xrGetCurrentInteractionProfile( - XrSession session, - XrPath topLevelUserPath, - XrInteractionProfileState* interactionProfile); - -XRAPI_ATTR XrResult XRAPI_CALL xrGetActionStateBoolean( - XrSession session, - const XrActionStateGetInfo* getInfo, - XrActionStateBoolean* state); - -XRAPI_ATTR XrResult XRAPI_CALL xrGetActionStateFloat( - XrSession session, - const XrActionStateGetInfo* getInfo, - XrActionStateFloat* state); - -XRAPI_ATTR XrResult XRAPI_CALL xrGetActionStateVector2f( - XrSession session, - const XrActionStateGetInfo* getInfo, - XrActionStateVector2f* state); - -XRAPI_ATTR XrResult XRAPI_CALL xrGetActionStatePose( - XrSession session, - const XrActionStateGetInfo* getInfo, - XrActionStatePose* state); - -XRAPI_ATTR XrResult XRAPI_CALL xrSyncActions( - XrSession session, - const XrActionsSyncInfo* syncInfo); - -XRAPI_ATTR XrResult XRAPI_CALL xrEnumerateBoundSourcesForAction( - XrSession session, - const XrBoundSourcesForActionEnumerateInfo* enumerateInfo, - uint32_t sourceCapacityInput, - uint32_t* sourceCountOutput, - XrPath* sources); - -XRAPI_ATTR XrResult XRAPI_CALL xrGetInputSourceLocalizedName( - XrSession session, - const XrInputSourceLocalizedNameGetInfo* getInfo, - uint32_t bufferCapacityInput, - uint32_t* bufferCountOutput, - char* buffer); - -XRAPI_ATTR XrResult XRAPI_CALL xrApplyHapticFeedback( - XrSession session, - const XrHapticActionInfo* hapticActionInfo, - const XrHapticBaseHeader* hapticFeedback); - -XRAPI_ATTR XrResult XRAPI_CALL xrStopHapticFeedback( - XrSession session, - const XrHapticActionInfo* hapticActionInfo); -#endif - - -#define XR_KHR_composition_layer_cube 1 -#define XR_KHR_composition_layer_cube_SPEC_VERSION 8 -#define XR_KHR_COMPOSITION_LAYER_CUBE_EXTENSION_NAME "XR_KHR_composition_layer_cube" -typedef struct XrCompositionLayerCubeKHR { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrCompositionLayerFlags layerFlags; - XrSpace space; - XrEyeVisibility eyeVisibility; - XrSwapchain swapchain; - uint32_t imageArrayIndex; - XrQuaternionf orientation; -} XrCompositionLayerCubeKHR; - - - -#define XR_KHR_composition_layer_depth 1 -#define XR_KHR_composition_layer_depth_SPEC_VERSION 5 -#define XR_KHR_COMPOSITION_LAYER_DEPTH_EXTENSION_NAME "XR_KHR_composition_layer_depth" -typedef struct XrCompositionLayerDepthInfoKHR { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrSwapchainSubImage subImage; - float minDepth; - float maxDepth; - float nearZ; - float farZ; -} XrCompositionLayerDepthInfoKHR; - - - -#define XR_KHR_composition_layer_cylinder 1 -#define XR_KHR_composition_layer_cylinder_SPEC_VERSION 4 -#define XR_KHR_COMPOSITION_LAYER_CYLINDER_EXTENSION_NAME "XR_KHR_composition_layer_cylinder" -typedef struct XrCompositionLayerCylinderKHR { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrCompositionLayerFlags layerFlags; - XrSpace space; - XrEyeVisibility eyeVisibility; - XrSwapchainSubImage subImage; - XrPosef pose; - float radius; - float centralAngle; - float aspectRatio; -} XrCompositionLayerCylinderKHR; - - - -#define XR_KHR_composition_layer_equirect 1 -#define XR_KHR_composition_layer_equirect_SPEC_VERSION 3 -#define XR_KHR_COMPOSITION_LAYER_EQUIRECT_EXTENSION_NAME "XR_KHR_composition_layer_equirect" -typedef struct XrCompositionLayerEquirectKHR { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrCompositionLayerFlags layerFlags; - XrSpace space; - XrEyeVisibility eyeVisibility; - XrSwapchainSubImage subImage; - XrPosef pose; - float radius; - XrVector2f scale; - XrVector2f bias; -} XrCompositionLayerEquirectKHR; - - - -#define XR_KHR_visibility_mask 1 -#define XR_KHR_visibility_mask_SPEC_VERSION 2 -#define XR_KHR_VISIBILITY_MASK_EXTENSION_NAME "XR_KHR_visibility_mask" - -typedef enum XrVisibilityMaskTypeKHR { - XR_VISIBILITY_MASK_TYPE_HIDDEN_TRIANGLE_MESH_KHR = 1, - XR_VISIBILITY_MASK_TYPE_VISIBLE_TRIANGLE_MESH_KHR = 2, - XR_VISIBILITY_MASK_TYPE_LINE_LOOP_KHR = 3, - XR_VISIBILITY_MASK_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF -} XrVisibilityMaskTypeKHR; -typedef struct XrVisibilityMaskKHR { - XrStructureType type; - void* XR_MAY_ALIAS next; - uint32_t vertexCapacityInput; - uint32_t vertexCountOutput; - XrVector2f* vertices; - uint32_t indexCapacityInput; - uint32_t indexCountOutput; - uint32_t* indices; -} XrVisibilityMaskKHR; - -typedef struct XrEventDataVisibilityMaskChangedKHR { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrSession session; - XrViewConfigurationType viewConfigurationType; - uint32_t viewIndex; -} XrEventDataVisibilityMaskChangedKHR; - -typedef XrResult (XRAPI_PTR *PFN_xrGetVisibilityMaskKHR)(XrSession session, XrViewConfigurationType viewConfigurationType, uint32_t viewIndex, XrVisibilityMaskTypeKHR visibilityMaskType, XrVisibilityMaskKHR* visibilityMask); - -#ifndef XR_NO_PROTOTYPES -XRAPI_ATTR XrResult XRAPI_CALL xrGetVisibilityMaskKHR( - XrSession session, - XrViewConfigurationType viewConfigurationType, - uint32_t viewIndex, - XrVisibilityMaskTypeKHR visibilityMaskType, - XrVisibilityMaskKHR* visibilityMask); -#endif - - -#define XR_EXT_performance_settings 1 -#define XR_EXT_performance_settings_SPEC_VERSION 1 -#define XR_EXT_PERFORMANCE_SETTINGS_EXTENSION_NAME "XR_EXT_performance_settings" - -typedef enum XrPerfSettingsDomainEXT { - XR_PERF_SETTINGS_DOMAIN_CPU_EXT = 1, - XR_PERF_SETTINGS_DOMAIN_GPU_EXT = 2, - XR_PERF_SETTINGS_DOMAIN_MAX_ENUM_EXT = 0x7FFFFFFF -} XrPerfSettingsDomainEXT; - -typedef enum XrPerfSettingsSubDomainEXT { - XR_PERF_SETTINGS_SUB_DOMAIN_COMPOSITING_EXT = 1, - XR_PERF_SETTINGS_SUB_DOMAIN_RENDERING_EXT = 2, - XR_PERF_SETTINGS_SUB_DOMAIN_THERMAL_EXT = 3, - XR_PERF_SETTINGS_SUB_DOMAIN_MAX_ENUM_EXT = 0x7FFFFFFF -} XrPerfSettingsSubDomainEXT; - -typedef enum XrPerfSettingsLevelEXT { - XR_PERF_SETTINGS_LEVEL_POWER_SAVINGS_EXT = 0, - XR_PERF_SETTINGS_LEVEL_SUSTAINED_LOW_EXT = 25, - XR_PERF_SETTINGS_LEVEL_SUSTAINED_HIGH_EXT = 50, - XR_PERF_SETTINGS_LEVEL_BOOST_EXT = 75, - XR_PERF_SETTINGS_LEVEL_MAX_ENUM_EXT = 0x7FFFFFFF -} XrPerfSettingsLevelEXT; - -typedef enum XrPerfSettingsNotificationLevelEXT { - XR_PERF_SETTINGS_NOTIF_LEVEL_NORMAL_EXT = 0, - XR_PERF_SETTINGS_NOTIF_LEVEL_WARNING_EXT = 25, - XR_PERF_SETTINGS_NOTIF_LEVEL_IMPAIRED_EXT = 75, - XR_PERF_SETTINGS_NOTIFICATION_LEVEL_MAX_ENUM_EXT = 0x7FFFFFFF -} XrPerfSettingsNotificationLevelEXT; -typedef struct XrEventDataPerfSettingsEXT { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrPerfSettingsDomainEXT domain; - XrPerfSettingsSubDomainEXT subDomain; - XrPerfSettingsNotificationLevelEXT fromLevel; - XrPerfSettingsNotificationLevelEXT toLevel; -} XrEventDataPerfSettingsEXT; - -typedef XrResult (XRAPI_PTR *PFN_xrPerfSettingsSetPerformanceLevelEXT)(XrSession session, XrPerfSettingsDomainEXT domain, XrPerfSettingsLevelEXT level); - -#ifndef XR_NO_PROTOTYPES -XRAPI_ATTR XrResult XRAPI_CALL xrPerfSettingsSetPerformanceLevelEXT( - XrSession session, - XrPerfSettingsDomainEXT domain, - XrPerfSettingsLevelEXT level); -#endif - - -#define XR_EXT_thermal_query 1 -#define XR_EXT_thermal_query_SPEC_VERSION 1 -#define XR_EXT_THERMAL_QUERY_EXTENSION_NAME "XR_EXT_thermal_query" -typedef XrResult (XRAPI_PTR *PFN_xrThermalGetTemperatureTrendEXT)(XrSession session, XrPerfSettingsDomainEXT domain, XrPerfSettingsNotificationLevelEXT* notificationLevel, float* tempHeadroom, float* tempSlope); - -#ifndef XR_NO_PROTOTYPES -XRAPI_ATTR XrResult XRAPI_CALL xrThermalGetTemperatureTrendEXT( - XrSession session, - XrPerfSettingsDomainEXT domain, - XrPerfSettingsNotificationLevelEXT* notificationLevel, - float* tempHeadroom, - float* tempSlope); -#endif - - -#define XR_EXT_debug_utils 1 -XR_DEFINE_HANDLE(XrDebugUtilsMessengerEXT) -#define XR_EXT_debug_utils_SPEC_VERSION 3 -#define XR_EXT_DEBUG_UTILS_EXTENSION_NAME "XR_EXT_debug_utils" -typedef XrFlags64 XrDebugUtilsMessageSeverityFlagsEXT; - -// Flag bits for XrDebugUtilsMessageSeverityFlagsEXT -static const XrDebugUtilsMessageSeverityFlagsEXT XR_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT = 0x00000001; -static const XrDebugUtilsMessageSeverityFlagsEXT XR_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT = 0x00000010; -static const XrDebugUtilsMessageSeverityFlagsEXT XR_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT = 0x00000100; -static const XrDebugUtilsMessageSeverityFlagsEXT XR_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT = 0x00001000; - -typedef XrFlags64 XrDebugUtilsMessageTypeFlagsEXT; - -// Flag bits for XrDebugUtilsMessageTypeFlagsEXT -static const XrDebugUtilsMessageTypeFlagsEXT XR_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT = 0x00000001; -static const XrDebugUtilsMessageTypeFlagsEXT XR_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT = 0x00000002; -static const XrDebugUtilsMessageTypeFlagsEXT XR_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT = 0x00000004; -static const XrDebugUtilsMessageTypeFlagsEXT XR_DEBUG_UTILS_MESSAGE_TYPE_CONFORMANCE_BIT_EXT = 0x00000008; - -typedef struct XrDebugUtilsObjectNameInfoEXT { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrObjectType objectType; - uint64_t objectHandle; - const char* objectName; -} XrDebugUtilsObjectNameInfoEXT; - -typedef struct XrDebugUtilsLabelEXT { - XrStructureType type; - const void* XR_MAY_ALIAS next; - const char* labelName; -} XrDebugUtilsLabelEXT; - -typedef struct XrDebugUtilsMessengerCallbackDataEXT { - XrStructureType type; - const void* XR_MAY_ALIAS next; - const char* messageId; - const char* functionName; - const char* message; - uint32_t objectCount; - XrDebugUtilsObjectNameInfoEXT* objects; - uint32_t sessionLabelCount; - XrDebugUtilsLabelEXT* sessionLabels; -} XrDebugUtilsMessengerCallbackDataEXT; - -typedef XrBool32 (XRAPI_PTR *PFN_xrDebugUtilsMessengerCallbackEXT)( - XrDebugUtilsMessageSeverityFlagsEXT messageSeverity, - XrDebugUtilsMessageTypeFlagsEXT messageTypes, - const XrDebugUtilsMessengerCallbackDataEXT* callbackData, - void* userData); - - -typedef struct XrDebugUtilsMessengerCreateInfoEXT { - XrStructureType type; - const void* XR_MAY_ALIAS next; - XrDebugUtilsMessageSeverityFlagsEXT messageSeverities; - XrDebugUtilsMessageTypeFlagsEXT messageTypes; - PFN_xrDebugUtilsMessengerCallbackEXT userCallback; - void* XR_MAY_ALIAS userData; -} XrDebugUtilsMessengerCreateInfoEXT; - -typedef XrResult (XRAPI_PTR *PFN_xrSetDebugUtilsObjectNameEXT)(XrInstance instance, const XrDebugUtilsObjectNameInfoEXT* nameInfo); -typedef XrResult (XRAPI_PTR *PFN_xrCreateDebugUtilsMessengerEXT)(XrInstance instance, const XrDebugUtilsMessengerCreateInfoEXT* createInfo, XrDebugUtilsMessengerEXT* messenger); -typedef XrResult (XRAPI_PTR *PFN_xrDestroyDebugUtilsMessengerEXT)(XrDebugUtilsMessengerEXT messenger); -typedef XrResult (XRAPI_PTR *PFN_xrSubmitDebugUtilsMessageEXT)(XrInstance instance, XrDebugUtilsMessageSeverityFlagsEXT messageSeverity, XrDebugUtilsMessageTypeFlagsEXT messageTypes, const XrDebugUtilsMessengerCallbackDataEXT* callbackData); -typedef XrResult (XRAPI_PTR *PFN_xrSessionBeginDebugUtilsLabelRegionEXT)(XrSession session, const XrDebugUtilsLabelEXT* labelInfo); -typedef XrResult (XRAPI_PTR *PFN_xrSessionEndDebugUtilsLabelRegionEXT)(XrSession session); -typedef XrResult (XRAPI_PTR *PFN_xrSessionInsertDebugUtilsLabelEXT)(XrSession session, const XrDebugUtilsLabelEXT* labelInfo); - -#ifndef XR_NO_PROTOTYPES -XRAPI_ATTR XrResult XRAPI_CALL xrSetDebugUtilsObjectNameEXT( - XrInstance instance, - const XrDebugUtilsObjectNameInfoEXT* nameInfo); - -XRAPI_ATTR XrResult XRAPI_CALL xrCreateDebugUtilsMessengerEXT( - XrInstance instance, - const XrDebugUtilsMessengerCreateInfoEXT* createInfo, - XrDebugUtilsMessengerEXT* messenger); - -XRAPI_ATTR XrResult XRAPI_CALL xrDestroyDebugUtilsMessengerEXT( - XrDebugUtilsMessengerEXT messenger); - -XRAPI_ATTR XrResult XRAPI_CALL xrSubmitDebugUtilsMessageEXT( - XrInstance instance, - XrDebugUtilsMessageSeverityFlagsEXT messageSeverity, - XrDebugUtilsMessageTypeFlagsEXT messageTypes, - const XrDebugUtilsMessengerCallbackDataEXT* callbackData); - -XRAPI_ATTR XrResult XRAPI_CALL xrSessionBeginDebugUtilsLabelRegionEXT( - XrSession session, - const XrDebugUtilsLabelEXT* labelInfo); - -XRAPI_ATTR XrResult XRAPI_CALL xrSessionEndDebugUtilsLabelRegionEXT( - XrSession session); - -XRAPI_ATTR XrResult XRAPI_CALL xrSessionInsertDebugUtilsLabelEXT( - XrSession session, - const XrDebugUtilsLabelEXT* labelInfo); -#endif - - -#define XR_VARJO_quad_views 1 -#define XR_VARJO_quad_views_SPEC_VERSION 1 -#define XR_VARJO_QUAD_VIEWS_EXTENSION_NAME "XR_VARJO_quad_views" - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/openxr/openxr_platform.h b/include/openxr/openxr_platform.h deleted file mode 100644 index f84dd8d..0000000 --- a/include/openxr/openxr_platform.h +++ /dev/null @@ -1,383 +0,0 @@ -#ifndef OPENXR_PLATFORM_H_ -#define OPENXR_PLATFORM_H_ 1 - -/* -** Copyright (c) 2017-2019 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** This header is generated from the Khronos OpenXR XML API Registry. -** -*/ - -#include "openxr.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifdef XR_USE_PLATFORM_ANDROID - -#define XR_KHR_android_thread_settings 1 -#define XR_KHR_android_thread_settings_SPEC_VERSION 5 -#define XR_KHR_ANDROID_THREAD_SETTINGS_EXTENSION_NAME "XR_KHR_android_thread_settings" - -typedef enum XrAndroidThreadTypeKHR { - XR_ANDROID_THREAD_TYPE_APPLICATION_MAIN_KHR = 1, - XR_ANDROID_THREAD_TYPE_APPLICATION_WORKER_KHR = 2, - XR_ANDROID_THREAD_TYPE_RENDERER_MAIN_KHR = 3, - XR_ANDROID_THREAD_TYPE_RENDERER_WORKER_KHR = 4, - XR_ANDROID_THREAD_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF -} XrAndroidThreadTypeKHR; -typedef XrResult (XRAPI_PTR *PFN_xrSetAndroidApplicationThreadKHR)(XrSession session, XrAndroidThreadTypeKHR threadType, uint32_t threadId); - -#ifndef XR_NO_PROTOTYPES -XRAPI_ATTR XrResult XRAPI_CALL xrSetAndroidApplicationThreadKHR( - XrSession session, - XrAndroidThreadTypeKHR threadType, - uint32_t threadId); -#endif -#endif /* XR_USE_PLATFORM_ANDROID */ - -#ifdef XR_USE_PLATFORM_ANDROID - -#define XR_KHR_android_surface_swapchain 1 -#define XR_KHR_android_surface_swapchain_SPEC_VERSION 4 -#define XR_KHR_ANDROID_SURFACE_SWAPCHAIN_EXTENSION_NAME "XR_KHR_android_surface_swapchain" -typedef XrResult (XRAPI_PTR *PFN_xrCreateSwapchainAndroidSurfaceKHR)(XrSession session, const XrSwapchainCreateInfo* info, XrSwapchain* swapchain, jobject* surface); - -#ifndef XR_NO_PROTOTYPES -XRAPI_ATTR XrResult XRAPI_CALL xrCreateSwapchainAndroidSurfaceKHR( - XrSession session, - const XrSwapchainCreateInfo* info, - XrSwapchain* swapchain, - jobject* surface); -#endif -#endif /* XR_USE_PLATFORM_ANDROID */ - -#ifdef XR_USE_PLATFORM_ANDROID - -#define XR_KHR_android_create_instance 1 -#define XR_KHR_android_create_instance_SPEC_VERSION 3 -#define XR_KHR_ANDROID_CREATE_INSTANCE_EXTENSION_NAME "XR_KHR_android_create_instance" -typedef struct XrInstanceCreateInfoAndroidKHR { - XrStructureType type; - const void* XR_MAY_ALIAS next; - void* XR_MAY_ALIAS applicationVM; - void* XR_MAY_ALIAS applicationActivity; -} XrInstanceCreateInfoAndroidKHR; - -#endif /* XR_USE_PLATFORM_ANDROID */ - -#ifdef XR_USE_GRAPHICS_API_VULKAN - -#define XR_KHR_vulkan_swapchain_format_list 1 -#define XR_KHR_vulkan_swapchain_format_list_SPEC_VERSION 2 -#define XR_KHR_VULKAN_SWAPCHAIN_FORMAT_LIST_EXTENSION_NAME "XR_KHR_vulkan_swapchain_format_list" -typedef struct XrVulkanSwapchainFormatListCreateInfoKHR { - XrStructureType type; - const void* XR_MAY_ALIAS next; - uint32_t viewFormatCount; - const VkFormat* viewFormats; -} XrVulkanSwapchainFormatListCreateInfoKHR; - -#endif /* XR_USE_GRAPHICS_API_VULKAN */ - -#ifdef XR_USE_GRAPHICS_API_OPENGL - -#define XR_KHR_opengl_enable 1 -#define XR_KHR_opengl_enable_SPEC_VERSION 7 -#define XR_KHR_OPENGL_ENABLE_EXTENSION_NAME "XR_KHR_opengl_enable" -#ifdef XR_USE_PLATFORM_WIN32 -typedef struct XrGraphicsBindingOpenGLWin32KHR { - XrStructureType type; - const void* XR_MAY_ALIAS next; - HDC hDC; - HGLRC hGLRC; -} XrGraphicsBindingOpenGLWin32KHR; -#endif // XR_USE_PLATFORM_WIN32 - -#ifdef XR_USE_PLATFORM_XLIB -typedef struct XrGraphicsBindingOpenGLXlibKHR { - XrStructureType type; - const void* XR_MAY_ALIAS next; - Display* xDisplay; - uint32_t visualid; - GLXFBConfig glxFBConfig; - GLXDrawable glxDrawable; - GLXContext glxContext; -} XrGraphicsBindingOpenGLXlibKHR; -#endif // XR_USE_PLATFORM_XLIB - -#ifdef XR_USE_PLATFORM_XCB -typedef struct XrGraphicsBindingOpenGLXcbKHR { - XrStructureType type; - const void* XR_MAY_ALIAS next; - xcb_connection_t* connection; - uint32_t screenNumber; - xcb_glx_fbconfig_t fbconfigid; - xcb_visualid_t visualid; - xcb_glx_drawable_t glxDrawable; - xcb_glx_context_t glxContext; -} XrGraphicsBindingOpenGLXcbKHR; -#endif // XR_USE_PLATFORM_XCB - -#ifdef XR_USE_PLATFORM_WAYLAND -typedef struct XrGraphicsBindingOpenGLWaylandKHR { - XrStructureType type; - const void* XR_MAY_ALIAS next; - struct wl_display* display; -} XrGraphicsBindingOpenGLWaylandKHR; -#endif // XR_USE_PLATFORM_WAYLAND - -typedef struct XrSwapchainImageOpenGLKHR { - XrStructureType type; - void* XR_MAY_ALIAS next; - uint32_t image; -} XrSwapchainImageOpenGLKHR; - -typedef struct XrGraphicsRequirementsOpenGLKHR { - XrStructureType type; - void* XR_MAY_ALIAS next; - XrVersion minApiVersionSupported; - XrVersion maxApiVersionSupported; -} XrGraphicsRequirementsOpenGLKHR; - -typedef XrResult (XRAPI_PTR *PFN_xrGetOpenGLGraphicsRequirementsKHR)(XrInstance instance, XrSystemId systemId, XrGraphicsRequirementsOpenGLKHR* graphicsRequirements); - -#ifndef XR_NO_PROTOTYPES -XRAPI_ATTR XrResult XRAPI_CALL xrGetOpenGLGraphicsRequirementsKHR( - XrInstance instance, - XrSystemId systemId, - XrGraphicsRequirementsOpenGLKHR* graphicsRequirements); -#endif -#endif /* XR_USE_GRAPHICS_API_OPENGL */ - -#ifdef XR_USE_GRAPHICS_API_OPENGL_ES - -#define XR_KHR_opengl_es_enable 1 -#define XR_KHR_opengl_es_enable_SPEC_VERSION 6 -#define XR_KHR_OPENGL_ES_ENABLE_EXTENSION_NAME "XR_KHR_opengl_es_enable" -#ifdef XR_USE_PLATFORM_ANDROID -typedef struct XrGraphicsBindingOpenGLESAndroidKHR { - XrStructureType type; - const void* XR_MAY_ALIAS next; - EGLDisplay display; - EGLConfig config; - EGLContext context; -} XrGraphicsBindingOpenGLESAndroidKHR; -#endif // XR_USE_PLATFORM_ANDROID - -typedef struct XrSwapchainImageOpenGLESKHR { - XrStructureType type; - void* XR_MAY_ALIAS next; - uint32_t image; -} XrSwapchainImageOpenGLESKHR; - -typedef struct XrGraphicsRequirementsOpenGLESKHR { - XrStructureType type; - void* XR_MAY_ALIAS next; - XrVersion minApiVersionSupported; - XrVersion maxApiVersionSupported; -} XrGraphicsRequirementsOpenGLESKHR; - -typedef XrResult (XRAPI_PTR *PFN_xrGetOpenGLESGraphicsRequirementsKHR)(XrInstance instance, XrSystemId systemId, XrGraphicsRequirementsOpenGLESKHR* graphicsRequirements); - -#ifndef XR_NO_PROTOTYPES -XRAPI_ATTR XrResult XRAPI_CALL xrGetOpenGLESGraphicsRequirementsKHR( - XrInstance instance, - XrSystemId systemId, - XrGraphicsRequirementsOpenGLESKHR* graphicsRequirements); -#endif -#endif /* XR_USE_GRAPHICS_API_OPENGL_ES */ - -#ifdef XR_USE_GRAPHICS_API_VULKAN - -#define XR_KHR_vulkan_enable 1 -#define XR_KHR_vulkan_enable_SPEC_VERSION 6 -#define XR_KHR_VULKAN_ENABLE_EXTENSION_NAME "XR_KHR_vulkan_enable" -typedef struct XrGraphicsBindingVulkanKHR { - XrStructureType type; - const void* XR_MAY_ALIAS next; - VkInstance instance; - VkPhysicalDevice physicalDevice; - VkDevice device; - uint32_t queueFamilyIndex; - uint32_t queueIndex; -} XrGraphicsBindingVulkanKHR; - -typedef struct XrSwapchainImageVulkanKHR { - XrStructureType type; - void* XR_MAY_ALIAS next; - VkImage image; -} XrSwapchainImageVulkanKHR; - -typedef struct XrGraphicsRequirementsVulkanKHR { - XrStructureType type; - void* XR_MAY_ALIAS next; - XrVersion minApiVersionSupported; - XrVersion maxApiVersionSupported; -} XrGraphicsRequirementsVulkanKHR; - -typedef XrResult (XRAPI_PTR *PFN_xrGetVulkanInstanceExtensionsKHR)(XrInstance instance, XrSystemId systemId, uint32_t bufferCapacityInput, uint32_t* bufferCountOutput, char* buffer); -typedef XrResult (XRAPI_PTR *PFN_xrGetVulkanDeviceExtensionsKHR)(XrInstance instance, XrSystemId systemId, uint32_t bufferCapacityInput, uint32_t* bufferCountOutput, char* buffer); -typedef XrResult (XRAPI_PTR *PFN_xrGetVulkanGraphicsDeviceKHR)(XrInstance instance, XrSystemId systemId, VkInstance vkInstance, VkPhysicalDevice* vkPhysicalDevice); -typedef XrResult (XRAPI_PTR *PFN_xrGetVulkanGraphicsRequirementsKHR)(XrInstance instance, XrSystemId systemId, XrGraphicsRequirementsVulkanKHR* graphicsRequirements); - -#ifndef XR_NO_PROTOTYPES -XRAPI_ATTR XrResult XRAPI_CALL xrGetVulkanInstanceExtensionsKHR( - XrInstance instance, - XrSystemId systemId, - uint32_t bufferCapacityInput, - uint32_t* bufferCountOutput, - char* buffer); - -XRAPI_ATTR XrResult XRAPI_CALL xrGetVulkanDeviceExtensionsKHR( - XrInstance instance, - XrSystemId systemId, - uint32_t bufferCapacityInput, - uint32_t* bufferCountOutput, - char* buffer); - -XRAPI_ATTR XrResult XRAPI_CALL xrGetVulkanGraphicsDeviceKHR( - XrInstance instance, - XrSystemId systemId, - VkInstance vkInstance, - VkPhysicalDevice* vkPhysicalDevice); - -XRAPI_ATTR XrResult XRAPI_CALL xrGetVulkanGraphicsRequirementsKHR( - XrInstance instance, - XrSystemId systemId, - XrGraphicsRequirementsVulkanKHR* graphicsRequirements); -#endif -#endif /* XR_USE_GRAPHICS_API_VULKAN */ - -#ifdef XR_USE_GRAPHICS_API_D3D11 - -#define XR_KHR_D3D11_enable 1 -#define XR_KHR_D3D11_enable_SPEC_VERSION 4 -#define XR_KHR_D3D11_ENABLE_EXTENSION_NAME "XR_KHR_D3D11_enable" -typedef struct XrGraphicsBindingD3D11KHR { - XrStructureType type; - const void* XR_MAY_ALIAS next; - ID3D11Device* device; -} XrGraphicsBindingD3D11KHR; - -typedef struct XrSwapchainImageD3D11KHR { - XrStructureType type; - void* XR_MAY_ALIAS next; - ID3D11Texture2D* texture; -} XrSwapchainImageD3D11KHR; - -typedef struct XrGraphicsRequirementsD3D11KHR { - XrStructureType type; - void* XR_MAY_ALIAS next; - LUID adapterLuid; - D3D_FEATURE_LEVEL minFeatureLevel; -} XrGraphicsRequirementsD3D11KHR; - -typedef XrResult (XRAPI_PTR *PFN_xrGetD3D11GraphicsRequirementsKHR)(XrInstance instance, XrSystemId systemId, XrGraphicsRequirementsD3D11KHR* graphicsRequirements); - -#ifndef XR_NO_PROTOTYPES -XRAPI_ATTR XrResult XRAPI_CALL xrGetD3D11GraphicsRequirementsKHR( - XrInstance instance, - XrSystemId systemId, - XrGraphicsRequirementsD3D11KHR* graphicsRequirements); -#endif -#endif /* XR_USE_GRAPHICS_API_D3D11 */ - -#ifdef XR_USE_GRAPHICS_API_D3D12 - -#define XR_KHR_D3D12_enable 1 -#define XR_KHR_D3D12_enable_SPEC_VERSION 5 -#define XR_KHR_D3D12_ENABLE_EXTENSION_NAME "XR_KHR_D3D12_enable" -typedef struct XrGraphicsBindingD3D12KHR { - XrStructureType type; - const void* XR_MAY_ALIAS next; - ID3D12Device* device; - ID3D12CommandQueue* queue; -} XrGraphicsBindingD3D12KHR; - -typedef struct XrSwapchainImageD3D12KHR { - XrStructureType type; - void* XR_MAY_ALIAS next; - ID3D12Resource* texture; -} XrSwapchainImageD3D12KHR; - -typedef struct XrGraphicsRequirementsD3D12KHR { - XrStructureType type; - void* XR_MAY_ALIAS next; - LUID adapterLuid; - D3D_FEATURE_LEVEL minFeatureLevel; -} XrGraphicsRequirementsD3D12KHR; - -typedef XrResult (XRAPI_PTR *PFN_xrGetD3D12GraphicsRequirementsKHR)(XrInstance instance, XrSystemId systemId, XrGraphicsRequirementsD3D12KHR* graphicsRequirements); - -#ifndef XR_NO_PROTOTYPES -XRAPI_ATTR XrResult XRAPI_CALL xrGetD3D12GraphicsRequirementsKHR( - XrInstance instance, - XrSystemId systemId, - XrGraphicsRequirementsD3D12KHR* graphicsRequirements); -#endif -#endif /* XR_USE_GRAPHICS_API_D3D12 */ - -#ifdef XR_USE_PLATFORM_WIN32 - -#define XR_KHR_win32_convert_performance_counter_time 1 -#define XR_KHR_win32_convert_performance_counter_time_SPEC_VERSION 1 -#define XR_KHR_WIN32_CONVERT_PERFORMANCE_COUNTER_TIME_EXTENSION_NAME "XR_KHR_win32_convert_performance_counter_time" -typedef XrResult (XRAPI_PTR *PFN_xrConvertWin32PerformanceCounterToTimeKHR)(XrInstance instance, const LARGE_INTEGER* performanceCounter, XrTime* time); -typedef XrResult (XRAPI_PTR *PFN_xrConvertTimeToWin32PerformanceCounterKHR)(XrInstance instance, XrTime time, LARGE_INTEGER* performanceCounter); - -#ifndef XR_NO_PROTOTYPES -XRAPI_ATTR XrResult XRAPI_CALL xrConvertWin32PerformanceCounterToTimeKHR( - XrInstance instance, - const LARGE_INTEGER* performanceCounter, - XrTime* time); - -XRAPI_ATTR XrResult XRAPI_CALL xrConvertTimeToWin32PerformanceCounterKHR( - XrInstance instance, - XrTime time, - LARGE_INTEGER* performanceCounter); -#endif -#endif /* XR_USE_PLATFORM_WIN32 */ - -#ifdef XR_USE_TIMESPEC - -#define XR_KHR_convert_timespec_time 1 -#define XR_KHR_convert_timespec_time_SPEC_VERSION 1 -#define XR_KHR_CONVERT_TIMESPEC_TIME_EXTENSION_NAME "XR_KHR_convert_timespec_time" -typedef XrResult (XRAPI_PTR *PFN_xrConvertTimespecTimeToTimeKHR)(XrInstance instance, const struct timespec* timespecTime, XrTime* time); -typedef XrResult (XRAPI_PTR *PFN_xrConvertTimeToTimespecTimeKHR)(XrInstance instance, XrTime time, struct timespec* timespecTime); - -#ifndef XR_NO_PROTOTYPES -XRAPI_ATTR XrResult XRAPI_CALL xrConvertTimespecTimeToTimeKHR( - XrInstance instance, - const struct timespec* timespecTime, - XrTime* time); - -XRAPI_ATTR XrResult XRAPI_CALL xrConvertTimeToTimespecTimeKHR( - XrInstance instance, - XrTime time, - struct timespec* timespecTime); -#endif -#endif /* XR_USE_TIMESPEC */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/openxr/openxr_reflection.h b/include/openxr/openxr_reflection.h deleted file mode 100644 index 0589daa..0000000 --- a/include/openxr/openxr_reflection.h +++ /dev/null @@ -1,1004 +0,0 @@ -#ifndef OPENXR_REFLECTION_H_ -#define OPENXR_REFLECTION_H_ 1 - -/* -** Copyright (c) 2017-2019 The Khronos Group Inc. -** -** Licensed under the Apache License, Version 2.0 (the "License"); -** you may not use this file except in compliance with the License. -** You may obtain a copy of the License at -** -** http://www.apache.org/licenses/LICENSE-2.0 -** -** Unless required by applicable law or agreed to in writing, software -** distributed under the License is distributed on an "AS IS" BASIS, -** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -** See the License for the specific language governing permissions and -** limitations under the License. -*/ - -/* -** This header is generated from the Khronos OpenXR XML API Registry. -** -*/ - -#include "openxr.h" - -/* -This file contains expansion macros (X Macros) for OpenXR enumerations and structures. -Example of how to use expansion macros to make an enum-to-string function: - -#define XR_ENUM_CASE_STR(name, val) case name: return #name; -#define XR_ENUM_STR(enumType) \ - constexpr const char* XrEnumStr(enumType e) { \ - switch (e) { \ - XR_LIST_ENUM_##enumType(XR_ENUM_CASE_STR) \ - default: return "Unknown"; \ - } \ - } \ - -XR_ENUM_STR(XrResult); -*/ - -#define XR_LIST_ENUM_XrResult(_) \ - _(XR_SUCCESS, 0) \ - _(XR_TIMEOUT_EXPIRED, 1) \ - _(XR_SESSION_LOSS_PENDING, 3) \ - _(XR_EVENT_UNAVAILABLE, 4) \ - _(XR_SPACE_BOUNDS_UNAVAILABLE, 7) \ - _(XR_SESSION_NOT_FOCUSED, 8) \ - _(XR_FRAME_DISCARDED, 9) \ - _(XR_ERROR_VALIDATION_FAILURE, -1) \ - _(XR_ERROR_RUNTIME_FAILURE, -2) \ - _(XR_ERROR_OUT_OF_MEMORY, -3) \ - _(XR_ERROR_API_VERSION_UNSUPPORTED, -4) \ - _(XR_ERROR_INITIALIZATION_FAILED, -6) \ - _(XR_ERROR_FUNCTION_UNSUPPORTED, -7) \ - _(XR_ERROR_FEATURE_UNSUPPORTED, -8) \ - _(XR_ERROR_EXTENSION_NOT_PRESENT, -9) \ - _(XR_ERROR_LIMIT_REACHED, -10) \ - _(XR_ERROR_SIZE_INSUFFICIENT, -11) \ - _(XR_ERROR_HANDLE_INVALID, -12) \ - _(XR_ERROR_INSTANCE_LOST, -13) \ - _(XR_ERROR_SESSION_RUNNING, -14) \ - _(XR_ERROR_SESSION_NOT_RUNNING, -16) \ - _(XR_ERROR_SESSION_LOST, -17) \ - _(XR_ERROR_SYSTEM_INVALID, -18) \ - _(XR_ERROR_PATH_INVALID, -19) \ - _(XR_ERROR_PATH_COUNT_EXCEEDED, -20) \ - _(XR_ERROR_PATH_FORMAT_INVALID, -21) \ - _(XR_ERROR_PATH_UNSUPPORTED, -22) \ - _(XR_ERROR_LAYER_INVALID, -23) \ - _(XR_ERROR_LAYER_LIMIT_EXCEEDED, -24) \ - _(XR_ERROR_SWAPCHAIN_RECT_INVALID, -25) \ - _(XR_ERROR_SWAPCHAIN_FORMAT_UNSUPPORTED, -26) \ - _(XR_ERROR_ACTION_TYPE_MISMATCH, -27) \ - _(XR_ERROR_SESSION_NOT_READY, -28) \ - _(XR_ERROR_SESSION_NOT_STOPPING, -29) \ - _(XR_ERROR_TIME_INVALID, -30) \ - _(XR_ERROR_REFERENCE_SPACE_UNSUPPORTED, -31) \ - _(XR_ERROR_FILE_ACCESS_ERROR, -32) \ - _(XR_ERROR_FILE_CONTENTS_INVALID, -33) \ - _(XR_ERROR_FORM_FACTOR_UNSUPPORTED, -34) \ - _(XR_ERROR_FORM_FACTOR_UNAVAILABLE, -35) \ - _(XR_ERROR_API_LAYER_NOT_PRESENT, -36) \ - _(XR_ERROR_CALL_ORDER_INVALID, -37) \ - _(XR_ERROR_GRAPHICS_DEVICE_INVALID, -38) \ - _(XR_ERROR_POSE_INVALID, -39) \ - _(XR_ERROR_INDEX_OUT_OF_RANGE, -40) \ - _(XR_ERROR_VIEW_CONFIGURATION_TYPE_UNSUPPORTED, -41) \ - _(XR_ERROR_ENVIRONMENT_BLEND_MODE_UNSUPPORTED, -42) \ - _(XR_ERROR_NAME_DUPLICATED, -44) \ - _(XR_ERROR_NAME_INVALID, -45) \ - _(XR_ERROR_ACTIONSET_NOT_ATTACHED, -46) \ - _(XR_ERROR_ACTIONSETS_ALREADY_ATTACHED, -47) \ - _(XR_ERROR_LOCALIZED_NAME_DUPLICATED, -48) \ - _(XR_ERROR_LOCALIZED_NAME_INVALID, -49) \ - _(XR_ERROR_ANDROID_THREAD_SETTINGS_ID_INVALID_KHR, -1000003000) \ - _(XR_ERROR_ANDROID_THREAD_SETTINGS_FAILURE_KHR, -1000003001) \ - _(XR_RESULT_MAX_ENUM, 0x7FFFFFFF) - -#define XR_LIST_ENUM_XrStructureType(_) \ - _(XR_TYPE_UNKNOWN, 0) \ - _(XR_TYPE_API_LAYER_PROPERTIES, 1) \ - _(XR_TYPE_EXTENSION_PROPERTIES, 2) \ - _(XR_TYPE_INSTANCE_CREATE_INFO, 3) \ - _(XR_TYPE_SYSTEM_GET_INFO, 4) \ - _(XR_TYPE_SYSTEM_PROPERTIES, 5) \ - _(XR_TYPE_VIEW_LOCATE_INFO, 6) \ - _(XR_TYPE_VIEW, 7) \ - _(XR_TYPE_SESSION_CREATE_INFO, 8) \ - _(XR_TYPE_SWAPCHAIN_CREATE_INFO, 9) \ - _(XR_TYPE_SESSION_BEGIN_INFO, 10) \ - _(XR_TYPE_VIEW_STATE, 11) \ - _(XR_TYPE_FRAME_END_INFO, 12) \ - _(XR_TYPE_HAPTIC_VIBRATION, 13) \ - _(XR_TYPE_EVENT_DATA_BUFFER, 16) \ - _(XR_TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING, 17) \ - _(XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED, 18) \ - _(XR_TYPE_ACTION_STATE_BOOLEAN, 23) \ - _(XR_TYPE_ACTION_STATE_FLOAT, 24) \ - _(XR_TYPE_ACTION_STATE_VECTOR2F, 25) \ - _(XR_TYPE_ACTION_STATE_POSE, 27) \ - _(XR_TYPE_ACTION_SET_CREATE_INFO, 28) \ - _(XR_TYPE_ACTION_CREATE_INFO, 29) \ - _(XR_TYPE_INSTANCE_PROPERTIES, 32) \ - _(XR_TYPE_FRAME_WAIT_INFO, 33) \ - _(XR_TYPE_COMPOSITION_LAYER_PROJECTION, 35) \ - _(XR_TYPE_COMPOSITION_LAYER_QUAD, 36) \ - _(XR_TYPE_REFERENCE_SPACE_CREATE_INFO, 37) \ - _(XR_TYPE_ACTION_SPACE_CREATE_INFO, 38) \ - _(XR_TYPE_EVENT_DATA_REFERENCE_SPACE_CHANGE_PENDING, 40) \ - _(XR_TYPE_VIEW_CONFIGURATION_VIEW, 41) \ - _(XR_TYPE_SPACE_LOCATION, 42) \ - _(XR_TYPE_SPACE_VELOCITY, 43) \ - _(XR_TYPE_FRAME_STATE, 44) \ - _(XR_TYPE_VIEW_CONFIGURATION_PROPERTIES, 45) \ - _(XR_TYPE_FRAME_BEGIN_INFO, 46) \ - _(XR_TYPE_COMPOSITION_LAYER_PROJECTION_VIEW, 48) \ - _(XR_TYPE_EVENT_DATA_EVENTS_LOST, 49) \ - _(XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING, 51) \ - _(XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED, 52) \ - _(XR_TYPE_INTERACTION_PROFILE_STATE, 53) \ - _(XR_TYPE_SWAPCHAIN_IMAGE_ACQUIRE_INFO, 55) \ - _(XR_TYPE_SWAPCHAIN_IMAGE_WAIT_INFO, 56) \ - _(XR_TYPE_SWAPCHAIN_IMAGE_RELEASE_INFO, 57) \ - _(XR_TYPE_ACTION_STATE_GET_INFO, 58) \ - _(XR_TYPE_HAPTIC_ACTION_INFO, 59) \ - _(XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO, 60) \ - _(XR_TYPE_ACTIONS_SYNC_INFO, 61) \ - _(XR_TYPE_BOUND_SOURCES_FOR_ACTION_ENUMERATE_INFO, 62) \ - _(XR_TYPE_INPUT_SOURCE_LOCALIZED_NAME_GET_INFO, 63) \ - _(XR_TYPE_COMPOSITION_LAYER_CUBE_KHR, 1000006000) \ - _(XR_TYPE_INSTANCE_CREATE_INFO_ANDROID_KHR, 1000008000) \ - _(XR_TYPE_COMPOSITION_LAYER_DEPTH_INFO_KHR, 1000010000) \ - _(XR_TYPE_VULKAN_SWAPCHAIN_FORMAT_LIST_CREATE_INFO_KHR, 1000014000) \ - _(XR_TYPE_EVENT_DATA_PERF_SETTINGS_EXT, 1000015000) \ - _(XR_TYPE_COMPOSITION_LAYER_CYLINDER_KHR, 1000017000) \ - _(XR_TYPE_COMPOSITION_LAYER_EQUIRECT_KHR, 1000018000) \ - _(XR_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT, 1000019000) \ - _(XR_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT, 1000019001) \ - _(XR_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT, 1000019002) \ - _(XR_TYPE_DEBUG_UTILS_LABEL_EXT, 1000019003) \ - _(XR_TYPE_GRAPHICS_BINDING_OPENGL_WIN32_KHR, 1000023000) \ - _(XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR, 1000023001) \ - _(XR_TYPE_GRAPHICS_BINDING_OPENGL_XCB_KHR, 1000023002) \ - _(XR_TYPE_GRAPHICS_BINDING_OPENGL_WAYLAND_KHR, 1000023003) \ - _(XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_KHR, 1000023004) \ - _(XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_KHR, 1000023005) \ - _(XR_TYPE_GRAPHICS_BINDING_OPENGL_ES_ANDROID_KHR, 1000024001) \ - _(XR_TYPE_SWAPCHAIN_IMAGE_OPENGL_ES_KHR, 1000024002) \ - _(XR_TYPE_GRAPHICS_REQUIREMENTS_OPENGL_ES_KHR, 1000024003) \ - _(XR_TYPE_GRAPHICS_BINDING_VULKAN_KHR, 1000025000) \ - _(XR_TYPE_SWAPCHAIN_IMAGE_VULKAN_KHR, 1000025001) \ - _(XR_TYPE_GRAPHICS_REQUIREMENTS_VULKAN_KHR, 1000025002) \ - _(XR_TYPE_GRAPHICS_BINDING_D3D11_KHR, 1000027000) \ - _(XR_TYPE_SWAPCHAIN_IMAGE_D3D11_KHR, 1000027001) \ - _(XR_TYPE_GRAPHICS_REQUIREMENTS_D3D11_KHR, 1000027002) \ - _(XR_TYPE_GRAPHICS_BINDING_D3D12_KHR, 1000028000) \ - _(XR_TYPE_SWAPCHAIN_IMAGE_D3D12_KHR, 1000028001) \ - _(XR_TYPE_GRAPHICS_REQUIREMENTS_D3D12_KHR, 1000028002) \ - _(XR_TYPE_VISIBILITY_MASK_KHR, 1000031000) \ - _(XR_TYPE_EVENT_DATA_VISIBILITY_MASK_CHANGED_KHR, 1000031001) \ - _(XR_STRUCTURE_TYPE_MAX_ENUM, 0x7FFFFFFF) - -#define XR_LIST_ENUM_XrFormFactor(_) \ - _(XR_FORM_FACTOR_HEAD_MOUNTED_DISPLAY, 1) \ - _(XR_FORM_FACTOR_HANDHELD_DISPLAY, 2) \ - _(XR_FORM_FACTOR_MAX_ENUM, 0x7FFFFFFF) - -#define XR_LIST_ENUM_XrViewConfigurationType(_) \ - _(XR_VIEW_CONFIGURATION_TYPE_PRIMARY_MONO, 1) \ - _(XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO, 2) \ - _(XR_VIEW_CONFIGURATION_TYPE_PRIMARY_QUAD_VARJO, 1000037000) \ - _(XR_VIEW_CONFIGURATION_TYPE_MAX_ENUM, 0x7FFFFFFF) - -#define XR_LIST_ENUM_XrEnvironmentBlendMode(_) \ - _(XR_ENVIRONMENT_BLEND_MODE_OPAQUE, 1) \ - _(XR_ENVIRONMENT_BLEND_MODE_ADDITIVE, 2) \ - _(XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND, 3) \ - _(XR_ENVIRONMENT_BLEND_MODE_MAX_ENUM, 0x7FFFFFFF) - -#define XR_LIST_ENUM_XrReferenceSpaceType(_) \ - _(XR_REFERENCE_SPACE_TYPE_VIEW, 1) \ - _(XR_REFERENCE_SPACE_TYPE_LOCAL, 2) \ - _(XR_REFERENCE_SPACE_TYPE_STAGE, 3) \ - _(XR_REFERENCE_SPACE_TYPE_MAX_ENUM, 0x7FFFFFFF) - -#define XR_LIST_ENUM_XrActionType(_) \ - _(XR_ACTION_TYPE_BOOLEAN_INPUT, 1) \ - _(XR_ACTION_TYPE_FLOAT_INPUT, 2) \ - _(XR_ACTION_TYPE_VECTOR2F_INPUT, 3) \ - _(XR_ACTION_TYPE_POSE_INPUT, 4) \ - _(XR_ACTION_TYPE_VIBRATION_OUTPUT, 100) \ - _(XR_ACTION_TYPE_MAX_ENUM, 0x7FFFFFFF) - -#define XR_LIST_ENUM_XrEyeVisibility(_) \ - _(XR_EYE_VISIBILITY_BOTH, 0) \ - _(XR_EYE_VISIBILITY_LEFT, 1) \ - _(XR_EYE_VISIBILITY_RIGHT, 2) \ - _(XR_EYE_VISIBILITY_MAX_ENUM, 0x7FFFFFFF) - -#define XR_LIST_ENUM_XrSessionState(_) \ - _(XR_SESSION_STATE_UNKNOWN, 0) \ - _(XR_SESSION_STATE_IDLE, 1) \ - _(XR_SESSION_STATE_READY, 2) \ - _(XR_SESSION_STATE_SYNCHRONIZED, 3) \ - _(XR_SESSION_STATE_VISIBLE, 4) \ - _(XR_SESSION_STATE_FOCUSED, 5) \ - _(XR_SESSION_STATE_STOPPING, 6) \ - _(XR_SESSION_STATE_LOSS_PENDING, 7) \ - _(XR_SESSION_STATE_EXITING, 8) \ - _(XR_SESSION_STATE_MAX_ENUM, 0x7FFFFFFF) - -#define XR_LIST_ENUM_XrObjectType(_) \ - _(XR_OBJECT_TYPE_UNKNOWN, 0) \ - _(XR_OBJECT_TYPE_INSTANCE, 1) \ - _(XR_OBJECT_TYPE_SESSION, 2) \ - _(XR_OBJECT_TYPE_SWAPCHAIN, 3) \ - _(XR_OBJECT_TYPE_SPACE, 4) \ - _(XR_OBJECT_TYPE_ACTION_SET, 5) \ - _(XR_OBJECT_TYPE_ACTION, 6) \ - _(XR_OBJECT_TYPE_DEBUG_UTILS_MESSENGER_EXT, 1000019000) \ - _(XR_OBJECT_TYPE_MAX_ENUM, 0x7FFFFFFF) - -#define XR_LIST_ENUM_XrAndroidThreadTypeKHR(_) \ - _(XR_ANDROID_THREAD_TYPE_APPLICATION_MAIN_KHR, 1) \ - _(XR_ANDROID_THREAD_TYPE_APPLICATION_WORKER_KHR, 2) \ - _(XR_ANDROID_THREAD_TYPE_RENDERER_MAIN_KHR, 3) \ - _(XR_ANDROID_THREAD_TYPE_RENDERER_WORKER_KHR, 4) \ - _(XR_ANDROID_THREAD_TYPE_MAX_ENUM_KHR, 0x7FFFFFFF) - -#define XR_LIST_ENUM_XrVisibilityMaskTypeKHR(_) \ - _(XR_VISIBILITY_MASK_TYPE_HIDDEN_TRIANGLE_MESH_KHR, 1) \ - _(XR_VISIBILITY_MASK_TYPE_VISIBLE_TRIANGLE_MESH_KHR, 2) \ - _(XR_VISIBILITY_MASK_TYPE_LINE_LOOP_KHR, 3) \ - _(XR_VISIBILITY_MASK_TYPE_MAX_ENUM_KHR, 0x7FFFFFFF) - -#define XR_LIST_ENUM_XrPerfSettingsDomainEXT(_) \ - _(XR_PERF_SETTINGS_DOMAIN_CPU_EXT, 1) \ - _(XR_PERF_SETTINGS_DOMAIN_GPU_EXT, 2) \ - _(XR_PERF_SETTINGS_DOMAIN_MAX_ENUM_EXT, 0x7FFFFFFF) - -#define XR_LIST_ENUM_XrPerfSettingsSubDomainEXT(_) \ - _(XR_PERF_SETTINGS_SUB_DOMAIN_COMPOSITING_EXT, 1) \ - _(XR_PERF_SETTINGS_SUB_DOMAIN_RENDERING_EXT, 2) \ - _(XR_PERF_SETTINGS_SUB_DOMAIN_THERMAL_EXT, 3) \ - _(XR_PERF_SETTINGS_SUB_DOMAIN_MAX_ENUM_EXT, 0x7FFFFFFF) - -#define XR_LIST_ENUM_XrPerfSettingsLevelEXT(_) \ - _(XR_PERF_SETTINGS_LEVEL_POWER_SAVINGS_EXT, 0) \ - _(XR_PERF_SETTINGS_LEVEL_SUSTAINED_LOW_EXT, 25) \ - _(XR_PERF_SETTINGS_LEVEL_SUSTAINED_HIGH_EXT, 50) \ - _(XR_PERF_SETTINGS_LEVEL_BOOST_EXT, 75) \ - _(XR_PERF_SETTINGS_LEVEL_MAX_ENUM_EXT, 0x7FFFFFFF) - -#define XR_LIST_ENUM_XrPerfSettingsNotificationLevelEXT(_) \ - _(XR_PERF_SETTINGS_NOTIF_LEVEL_NORMAL_EXT, 0) \ - _(XR_PERF_SETTINGS_NOTIF_LEVEL_WARNING_EXT, 25) \ - _(XR_PERF_SETTINGS_NOTIF_LEVEL_IMPAIRED_EXT, 75) \ - _(XR_PERF_SETTINGS_NOTIFICATION_LEVEL_MAX_ENUM_EXT, 0x7FFFFFFF) - -#define XR_LIST_BITS_XrInstanceCreateFlags(_) - -#define XR_LIST_BITS_XrSessionCreateFlags(_) - -#define XR_LIST_BITS_XrSpaceVelocityFlags(_) \ - _(XR_SPACE_VELOCITY_LINEAR_VALID_BIT, 0x00000001) \ - _(XR_SPACE_VELOCITY_ANGULAR_VALID_BIT, 0x00000002) - -#define XR_LIST_BITS_XrSpaceLocationFlags(_) \ - _(XR_SPACE_LOCATION_ORIENTATION_VALID_BIT, 0x00000001) \ - _(XR_SPACE_LOCATION_POSITION_VALID_BIT, 0x00000002) \ - _(XR_SPACE_LOCATION_ORIENTATION_TRACKED_BIT, 0x00000004) \ - _(XR_SPACE_LOCATION_POSITION_TRACKED_BIT, 0x00000008) - -#define XR_LIST_BITS_XrSwapchainCreateFlags(_) \ - _(XR_SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT, 0x00000001) \ - _(XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT, 0x00000002) - -#define XR_LIST_BITS_XrSwapchainUsageFlags(_) \ - _(XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT, 0x00000001) \ - _(XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, 0x00000002) \ - _(XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT, 0x00000004) \ - _(XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT, 0x00000008) \ - _(XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT, 0x00000010) \ - _(XR_SWAPCHAIN_USAGE_SAMPLED_BIT, 0x00000020) \ - _(XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT, 0x00000040) - -#define XR_LIST_BITS_XrCompositionLayerFlags(_) \ - _(XR_COMPOSITION_LAYER_CORRECT_CHROMATIC_ABERRATION_BIT, 0x00000001) \ - _(XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT, 0x00000002) \ - _(XR_COMPOSITION_LAYER_UNPREMULTIPLIED_ALPHA_BIT, 0x00000004) - -#define XR_LIST_BITS_XrViewStateFlags(_) \ - _(XR_VIEW_STATE_ORIENTATION_VALID_BIT, 0x00000001) \ - _(XR_VIEW_STATE_POSITION_VALID_BIT, 0x00000002) \ - _(XR_VIEW_STATE_ORIENTATION_TRACKED_BIT, 0x00000004) \ - _(XR_VIEW_STATE_POSITION_TRACKED_BIT, 0x00000008) - -#define XR_LIST_BITS_XrInputSourceLocalizedNameFlags(_) \ - _(XR_INPUT_SOURCE_LOCALIZED_NAME_USER_PATH_BIT, 0x00000001) \ - _(XR_INPUT_SOURCE_LOCALIZED_NAME_INTERACTION_PROFILE_BIT, 0x00000002) \ - _(XR_INPUT_SOURCE_LOCALIZED_NAME_COMPONENT_BIT, 0x00000004) - -#define XR_LIST_BITS_XrDebugUtilsMessageSeverityFlagsEXT(_) \ - _(XR_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT, 0x00000001) \ - _(XR_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT, 0x00000010) \ - _(XR_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT, 0x00000100) \ - _(XR_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT, 0x00001000) - -#define XR_LIST_BITS_XrDebugUtilsMessageTypeFlagsEXT(_) \ - _(XR_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT, 0x00000001) \ - _(XR_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT, 0x00000002) \ - _(XR_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT, 0x00000004) \ - _(XR_DEBUG_UTILS_MESSAGE_TYPE_CONFORMANCE_BIT_EXT, 0x00000008) - -#define XR_LIST_STRUCT_XrApiLayerProperties(_) \ - _(type) \ - _(next) \ - _(layerName) \ - _(specVersion) \ - _(layerVersion) \ - _(description) - -#define XR_LIST_STRUCT_XrExtensionProperties(_) \ - _(type) \ - _(next) \ - _(extensionName) \ - _(extensionVersion) - -#define XR_LIST_STRUCT_XrApplicationInfo(_) \ - _(applicationName) \ - _(applicationVersion) \ - _(engineName) \ - _(engineVersion) \ - _(apiVersion) - -#define XR_LIST_STRUCT_XrInstanceCreateInfo(_) \ - _(type) \ - _(next) \ - _(createFlags) \ - _(applicationInfo) \ - _(enabledApiLayerCount) \ - _(enabledApiLayerNames) \ - _(enabledExtensionCount) \ - _(enabledExtensionNames) - -#define XR_LIST_STRUCT_XrInstanceProperties(_) \ - _(type) \ - _(next) \ - _(runtimeVersion) \ - _(runtimeName) - -#define XR_LIST_STRUCT_XrEventDataBuffer(_) \ - _(type) \ - _(next) \ - _(varying) - -#define XR_LIST_STRUCT_XrSystemGetInfo(_) \ - _(type) \ - _(next) \ - _(formFactor) - -#define XR_LIST_STRUCT_XrSystemGraphicsProperties(_) \ - _(maxSwapchainImageHeight) \ - _(maxSwapchainImageWidth) \ - _(maxLayerCount) - -#define XR_LIST_STRUCT_XrSystemTrackingProperties(_) \ - _(orientationTracking) \ - _(positionTracking) - -#define XR_LIST_STRUCT_XrSystemProperties(_) \ - _(type) \ - _(next) \ - _(systemId) \ - _(vendorId) \ - _(systemName) \ - _(graphicsProperties) \ - _(trackingProperties) - -#define XR_LIST_STRUCT_XrSessionCreateInfo(_) \ - _(type) \ - _(next) \ - _(createFlags) \ - _(systemId) - -#define XR_LIST_STRUCT_XrVector3f(_) \ - _(x) \ - _(y) \ - _(z) - -#define XR_LIST_STRUCT_XrSpaceVelocity(_) \ - _(type) \ - _(next) \ - _(velocityFlags) \ - _(linearVelocity) \ - _(angularVelocity) - -#define XR_LIST_STRUCT_XrQuaternionf(_) \ - _(x) \ - _(y) \ - _(z) \ - _(w) - -#define XR_LIST_STRUCT_XrPosef(_) \ - _(orientation) \ - _(position) - -#define XR_LIST_STRUCT_XrReferenceSpaceCreateInfo(_) \ - _(type) \ - _(next) \ - _(referenceSpaceType) \ - _(poseInReferenceSpace) - -#define XR_LIST_STRUCT_XrExtent2Df(_) \ - _(width) \ - _(height) - -#define XR_LIST_STRUCT_XrActionSpaceCreateInfo(_) \ - _(type) \ - _(next) \ - _(action) \ - _(subactionPath) \ - _(poseInActionSpace) - -#define XR_LIST_STRUCT_XrSpaceLocation(_) \ - _(type) \ - _(next) \ - _(locationFlags) \ - _(pose) - -#define XR_LIST_STRUCT_XrViewConfigurationProperties(_) \ - _(type) \ - _(next) \ - _(viewConfigurationType) \ - _(fovMutable) - -#define XR_LIST_STRUCT_XrViewConfigurationView(_) \ - _(type) \ - _(next) \ - _(recommendedImageRectWidth) \ - _(maxImageRectWidth) \ - _(recommendedImageRectHeight) \ - _(maxImageRectHeight) \ - _(recommendedSwapchainSampleCount) \ - _(maxSwapchainSampleCount) - -#define XR_LIST_STRUCT_XrSwapchainCreateInfo(_) \ - _(type) \ - _(next) \ - _(createFlags) \ - _(usageFlags) \ - _(format) \ - _(sampleCount) \ - _(width) \ - _(height) \ - _(faceCount) \ - _(arraySize) \ - _(mipCount) - -#define XR_LIST_STRUCT_XrSwapchainImageBaseHeader(_) \ - _(type) \ - _(next) - -#define XR_LIST_STRUCT_XrSwapchainImageAcquireInfo(_) \ - _(type) \ - _(next) - -#define XR_LIST_STRUCT_XrSwapchainImageWaitInfo(_) \ - _(type) \ - _(next) \ - _(timeout) - -#define XR_LIST_STRUCT_XrSwapchainImageReleaseInfo(_) \ - _(type) \ - _(next) - -#define XR_LIST_STRUCT_XrSessionBeginInfo(_) \ - _(type) \ - _(next) \ - _(primaryViewConfigurationType) - -#define XR_LIST_STRUCT_XrFrameWaitInfo(_) \ - _(type) \ - _(next) - -#define XR_LIST_STRUCT_XrFrameState(_) \ - _(type) \ - _(next) \ - _(predictedDisplayTime) \ - _(predictedDisplayPeriod) \ - _(shouldRender) - -#define XR_LIST_STRUCT_XrFrameBeginInfo(_) \ - _(type) \ - _(next) - -#define XR_LIST_STRUCT_XrCompositionLayerBaseHeader(_) \ - _(type) \ - _(next) \ - _(layerFlags) \ - _(space) - -#define XR_LIST_STRUCT_XrFrameEndInfo(_) \ - _(type) \ - _(next) \ - _(displayTime) \ - _(environmentBlendMode) \ - _(layerCount) \ - _(layers) - -#define XR_LIST_STRUCT_XrViewLocateInfo(_) \ - _(type) \ - _(next) \ - _(viewConfigurationType) \ - _(displayTime) \ - _(space) - -#define XR_LIST_STRUCT_XrViewState(_) \ - _(type) \ - _(next) \ - _(viewStateFlags) - -#define XR_LIST_STRUCT_XrFovf(_) \ - _(angleLeft) \ - _(angleRight) \ - _(angleUp) \ - _(angleDown) - -#define XR_LIST_STRUCT_XrView(_) \ - _(type) \ - _(next) \ - _(pose) \ - _(fov) - -#define XR_LIST_STRUCT_XrActionSetCreateInfo(_) \ - _(type) \ - _(next) \ - _(actionSetName) \ - _(localizedActionSetName) \ - _(priority) - -#define XR_LIST_STRUCT_XrActionCreateInfo(_) \ - _(type) \ - _(next) \ - _(actionName) \ - _(actionType) \ - _(countSubactionPaths) \ - _(subactionPaths) \ - _(localizedActionName) - -#define XR_LIST_STRUCT_XrActionSuggestedBinding(_) \ - _(action) \ - _(binding) - -#define XR_LIST_STRUCT_XrInteractionProfileSuggestedBinding(_) \ - _(type) \ - _(next) \ - _(interactionProfile) \ - _(countSuggestedBindings) \ - _(suggestedBindings) - -#define XR_LIST_STRUCT_XrSessionActionSetsAttachInfo(_) \ - _(type) \ - _(next) \ - _(countActionSets) \ - _(actionSets) - -#define XR_LIST_STRUCT_XrInteractionProfileState(_) \ - _(type) \ - _(next) \ - _(interactionProfile) - -#define XR_LIST_STRUCT_XrActionStateGetInfo(_) \ - _(type) \ - _(next) \ - _(action) \ - _(subactionPath) - -#define XR_LIST_STRUCT_XrActionStateBoolean(_) \ - _(type) \ - _(next) \ - _(currentState) \ - _(changedSinceLastSync) \ - _(lastChangeTime) \ - _(isActive) - -#define XR_LIST_STRUCT_XrActionStateFloat(_) \ - _(type) \ - _(next) \ - _(currentState) \ - _(changedSinceLastSync) \ - _(lastChangeTime) \ - _(isActive) - -#define XR_LIST_STRUCT_XrVector2f(_) \ - _(x) \ - _(y) - -#define XR_LIST_STRUCT_XrActionStateVector2f(_) \ - _(type) \ - _(next) \ - _(currentState) \ - _(changedSinceLastSync) \ - _(lastChangeTime) \ - _(isActive) - -#define XR_LIST_STRUCT_XrActionStatePose(_) \ - _(type) \ - _(next) \ - _(isActive) - -#define XR_LIST_STRUCT_XrActiveActionSet(_) \ - _(actionSet) \ - _(subactionPath) - -#define XR_LIST_STRUCT_XrActionsSyncInfo(_) \ - _(type) \ - _(next) \ - _(countActiveActionSets) \ - _(activeActionSets) - -#define XR_LIST_STRUCT_XrBoundSourcesForActionEnumerateInfo(_) \ - _(type) \ - _(next) \ - _(action) - -#define XR_LIST_STRUCT_XrInputSourceLocalizedNameGetInfo(_) \ - _(type) \ - _(next) \ - _(sourcePath) \ - _(whichComponents) - -#define XR_LIST_STRUCT_XrHapticActionInfo(_) \ - _(type) \ - _(next) \ - _(action) \ - _(subactionPath) - -#define XR_LIST_STRUCT_XrHapticBaseHeader(_) \ - _(type) \ - _(next) - -#define XR_LIST_STRUCT_XrBaseInStructure(_) \ - _(type) \ - _(next) - -#define XR_LIST_STRUCT_XrBaseOutStructure(_) \ - _(type) \ - _(next) - -#define XR_LIST_STRUCT_XrOffset2Di(_) \ - _(x) \ - _(y) - -#define XR_LIST_STRUCT_XrExtent2Di(_) \ - _(width) \ - _(height) - -#define XR_LIST_STRUCT_XrRect2Di(_) \ - _(offset) \ - _(extent) - -#define XR_LIST_STRUCT_XrSwapchainSubImage(_) \ - _(swapchain) \ - _(imageRect) \ - _(imageArrayIndex) - -#define XR_LIST_STRUCT_XrCompositionLayerProjectionView(_) \ - _(type) \ - _(next) \ - _(pose) \ - _(fov) \ - _(subImage) - -#define XR_LIST_STRUCT_XrCompositionLayerProjection(_) \ - _(type) \ - _(next) \ - _(layerFlags) \ - _(space) \ - _(viewCount) \ - _(views) - -#define XR_LIST_STRUCT_XrCompositionLayerQuad(_) \ - _(type) \ - _(next) \ - _(layerFlags) \ - _(space) \ - _(eyeVisibility) \ - _(subImage) \ - _(pose) \ - _(size) - -#define XR_LIST_STRUCT_XrEventDataBaseHeader(_) \ - _(type) \ - _(next) - -#define XR_LIST_STRUCT_XrEventDataEventsLost(_) \ - _(type) \ - _(next) \ - _(lostEventCount) - -#define XR_LIST_STRUCT_XrEventDataInstanceLossPending(_) \ - _(type) \ - _(next) \ - _(lossTime) - -#define XR_LIST_STRUCT_XrEventDataSessionStateChanged(_) \ - _(type) \ - _(next) \ - _(session) \ - _(state) \ - _(time) - -#define XR_LIST_STRUCT_XrEventDataReferenceSpaceChangePending(_) \ - _(type) \ - _(next) \ - _(session) \ - _(referenceSpaceType) \ - _(changeTime) \ - _(poseValid) \ - _(poseInPreviousSpace) - -#define XR_LIST_STRUCT_XrEventDataInteractionProfileChanged(_) \ - _(type) \ - _(next) \ - _(session) - -#define XR_LIST_STRUCT_XrHapticVibration(_) \ - _(type) \ - _(next) \ - _(duration) \ - _(frequency) \ - _(amplitude) - -#define XR_LIST_STRUCT_XrOffset2Df(_) \ - _(x) \ - _(y) - -#define XR_LIST_STRUCT_XrRect2Df(_) \ - _(offset) \ - _(extent) - -#define XR_LIST_STRUCT_XrVector4f(_) \ - _(x) \ - _(y) \ - _(z) \ - _(w) - -#define XR_LIST_STRUCT_XrColor4f(_) \ - _(r) \ - _(g) \ - _(b) \ - _(a) - -#define XR_LIST_STRUCT_XrCompositionLayerCubeKHR(_) \ - _(type) \ - _(next) \ - _(layerFlags) \ - _(space) \ - _(eyeVisibility) \ - _(swapchain) \ - _(imageArrayIndex) \ - _(orientation) - -#define XR_LIST_STRUCT_XrInstanceCreateInfoAndroidKHR(_) \ - _(type) \ - _(next) \ - _(applicationVM) \ - _(applicationActivity) - -#define XR_LIST_STRUCT_XrCompositionLayerDepthInfoKHR(_) \ - _(type) \ - _(next) \ - _(subImage) \ - _(minDepth) \ - _(maxDepth) \ - _(nearZ) \ - _(farZ) - -#define XR_LIST_STRUCT_XrVulkanSwapchainFormatListCreateInfoKHR(_) \ - _(type) \ - _(next) \ - _(viewFormatCount) \ - _(viewFormats) - -#define XR_LIST_STRUCT_XrCompositionLayerCylinderKHR(_) \ - _(type) \ - _(next) \ - _(layerFlags) \ - _(space) \ - _(eyeVisibility) \ - _(subImage) \ - _(pose) \ - _(radius) \ - _(centralAngle) \ - _(aspectRatio) - -#define XR_LIST_STRUCT_XrCompositionLayerEquirectKHR(_) \ - _(type) \ - _(next) \ - _(layerFlags) \ - _(space) \ - _(eyeVisibility) \ - _(subImage) \ - _(pose) \ - _(radius) \ - _(scale) \ - _(bias) - -#define XR_LIST_STRUCT_XrGraphicsBindingOpenGLWin32KHR(_) \ - _(type) \ - _(next) \ - _(hDC) \ - _(hGLRC) - -#define XR_LIST_STRUCT_XrGraphicsBindingOpenGLXlibKHR(_) \ - _(type) \ - _(next) \ - _(xDisplay) \ - _(visualid) \ - _(glxFBConfig) \ - _(glxDrawable) \ - _(glxContext) - -#define XR_LIST_STRUCT_XrGraphicsBindingOpenGLXcbKHR(_) \ - _(type) \ - _(next) \ - _(connection) \ - _(screenNumber) \ - _(fbconfigid) \ - _(visualid) \ - _(glxDrawable) \ - _(glxContext) - -#define XR_LIST_STRUCT_XrGraphicsBindingOpenGLWaylandKHR(_) \ - _(type) \ - _(next) \ - _(display) - -#define XR_LIST_STRUCT_XrSwapchainImageOpenGLKHR(_) \ - _(type) \ - _(next) \ - _(image) - -#define XR_LIST_STRUCT_XrGraphicsRequirementsOpenGLKHR(_) \ - _(type) \ - _(next) \ - _(minApiVersionSupported) \ - _(maxApiVersionSupported) - -#define XR_LIST_STRUCT_XrGraphicsBindingOpenGLESAndroidKHR(_) \ - _(type) \ - _(next) \ - _(display) \ - _(config) \ - _(context) - -#define XR_LIST_STRUCT_XrSwapchainImageOpenGLESKHR(_) \ - _(type) \ - _(next) \ - _(image) - -#define XR_LIST_STRUCT_XrGraphicsRequirementsOpenGLESKHR(_) \ - _(type) \ - _(next) \ - _(minApiVersionSupported) \ - _(maxApiVersionSupported) - -#define XR_LIST_STRUCT_XrGraphicsBindingVulkanKHR(_) \ - _(type) \ - _(next) \ - _(instance) \ - _(physicalDevice) \ - _(device) \ - _(queueFamilyIndex) \ - _(queueIndex) - -#define XR_LIST_STRUCT_XrSwapchainImageVulkanKHR(_) \ - _(type) \ - _(next) \ - _(image) - -#define XR_LIST_STRUCT_XrGraphicsRequirementsVulkanKHR(_) \ - _(type) \ - _(next) \ - _(minApiVersionSupported) \ - _(maxApiVersionSupported) - -#define XR_LIST_STRUCT_XrGraphicsBindingD3D11KHR(_) \ - _(type) \ - _(next) \ - _(device) - -#define XR_LIST_STRUCT_XrSwapchainImageD3D11KHR(_) \ - _(type) \ - _(next) \ - _(texture) - -#define XR_LIST_STRUCT_XrGraphicsRequirementsD3D11KHR(_) \ - _(type) \ - _(next) \ - _(adapterLuid) \ - _(minFeatureLevel) - -#define XR_LIST_STRUCT_XrGraphicsBindingD3D12KHR(_) \ - _(type) \ - _(next) \ - _(device) \ - _(queue) - -#define XR_LIST_STRUCT_XrSwapchainImageD3D12KHR(_) \ - _(type) \ - _(next) \ - _(texture) - -#define XR_LIST_STRUCT_XrGraphicsRequirementsD3D12KHR(_) \ - _(type) \ - _(next) \ - _(adapterLuid) \ - _(minFeatureLevel) - -#define XR_LIST_STRUCT_XrVisibilityMaskKHR(_) \ - _(type) \ - _(next) \ - _(vertexCapacityInput) \ - _(vertexCountOutput) \ - _(vertices) \ - _(indexCapacityInput) \ - _(indexCountOutput) \ - _(indices) - -#define XR_LIST_STRUCT_XrEventDataVisibilityMaskChangedKHR(_) \ - _(type) \ - _(next) \ - _(session) \ - _(viewConfigurationType) \ - _(viewIndex) - -#define XR_LIST_STRUCT_XrEventDataPerfSettingsEXT(_) \ - _(type) \ - _(next) \ - _(domain) \ - _(subDomain) \ - _(fromLevel) \ - _(toLevel) - -#define XR_LIST_STRUCT_XrDebugUtilsObjectNameInfoEXT(_) \ - _(type) \ - _(next) \ - _(objectType) \ - _(objectHandle) \ - _(objectName) - -#define XR_LIST_STRUCT_XrDebugUtilsLabelEXT(_) \ - _(type) \ - _(next) \ - _(labelName) - -#define XR_LIST_STRUCT_XrDebugUtilsMessengerCallbackDataEXT(_) \ - _(type) \ - _(next) \ - _(messageId) \ - _(functionName) \ - _(message) \ - _(objectCount) \ - _(objects) \ - _(sessionLabelCount) \ - _(sessionLabels) - -#define XR_LIST_STRUCT_XrDebugUtilsMessengerCreateInfoEXT(_) \ - _(type) \ - _(next) \ - _(messageSeverities) \ - _(messageTypes) \ - _(userCallback) \ - _(userData) - - - - -#endif - diff --git a/open-in-docker.sh b/open-in-docker.sh index 766565f..8c0d4eb 100755 --- a/open-in-docker.sh +++ b/open-in-docker.sh @@ -16,19 +16,17 @@ # https://github.com/KhronosGroup/DockerContainers # This image/tag is generated from https://github.com/KhronosGroup/DockerContainers/blob/master/Dockerfile.openxr +# Purpose: Spec (pdf/html) generation IMAGE_NAME=khronosgroup/docker-images:openxr -MOUNTPOINT=/openxr +MOUNTPOINT=$(pwd) set -e -( - cd $(dirname $0) - # docker pull $IMAGE_NAME - uid=$(id -u) - gid=$(id -g) - USER_ID_ARGS="-e USER_ID=$uid -e GROUP_ID=$gid" - docker run -it --rm \ - ${USER_ID_ARGS} \ - -e CONTAINER_CWD=$MOUNTPOINT \ - --mount type=bind,source=$(pwd),target=$MOUNTPOINT \ - $IMAGE_NAME -) +# docker pull $IMAGE_NAME +uid=$(id -u) +gid=$(id -g) +USER_ID_ARGS="-e USER_ID=$uid -e GROUP_ID=$gid" +docker run -it --rm \ + ${USER_ID_ARGS} \ + -e CONTAINER_CWD=$MOUNTPOINT \ + --mount type=bind,source=$MOUNTPOINT,target=$MOUNTPOINT \ + $IMAGE_NAME "$@" diff --git a/specification/Makefile b/specification/Makefile index d091b93..7ff07aa 100644 --- a/specification/Makefile +++ b/specification/Makefile @@ -30,6 +30,8 @@ GENXR_ARGS += $(GENXR_OPTIONS) -registry $(REGISTRY) ifneq (,$(strip $(VERBOSE))) ASCIIDOC := $(ASCIIDOC) --verbose +else +GENXR_ARGS += -q endif ifneq (,$(strip $(STRICT))) @@ -41,121 +43,255 @@ ifneq (,$(strip $(VERY_STRICT))) ASCIIDOC := $(ASCIIDOC) --failure-level WARN endif -SPECREVISION = 1.0.0 +SPECREVISION = 1.0.1 REVISION_COMPONENTS = $(subst ., ,$(SPECREVISION)) MAJORMINORVER = $(word 1,$(REVISION_COMPONENTS)).$(word 2,$(REVISION_COMPONENTS)) # Target directory for output files. -OUTDIR ?= $(CURDIR)/out/$(MAJORMINORVER) +OUTDIR ?= out/$(MAJORMINORVER) # Target directory for generated files. # This is shorthand; can't be moved because the spec source # files expect to find these here. -GENDIR = $(CURDIR)/generated +GENDIR = generated # Generator scripts and options # GENOPTS can be e.g. '-noprotect' GENOPTS = -HEADER_DIR = $(OUTDIR)/openxr -HEADER = $(HEADER_DIR)/openxr.h -PLATHEAD = $(HEADER_DIR)/openxr_platform.h -REFLECTHEAD = $(HEADER_DIR)/openxr_reflection.h -HTMLSPEC = $(OUTDIR)/openxr.html -PDFSPEC = $(OUTDIR)/openxr.pdf -REGISTRYOUTDIR = $(OUTDIR)/../registry-release/specs/$(MAJORMINORVER) -METADIR = sources/chapters/extensions/meta -MANDIR := man +SCRIPTS := ./scripts +SPECTOOLS := $(SCRIPTS)/spec_tools +XRAPI := scripts/xrapi.py +METADIR := sources/chapters/extensions/meta + +# Gets built automatically +ASCIIDOCTOR_TARGETS := default: $(ECHO) "Makefile help - targets:" $(ECHO) "header: build OpenXR header" - $(ECHO) "header-test: test-compile the OpenXR header" - $(ECHO) "html: HTML version of OpenXR spec" - $(ECHO) "pdf: PDF version of OpenXR spec (Letter [8.5 x 11] paper size)" - $(ECHO) "pdfA4: PDF version of OpenXR spec (A4 paper size)" -# $(ECHO) "manhtml: HTML version of OpenXR man pages" -# $(ECHO) "manpdf: PDF version of OpenXR man pages" - $(ECHO) "manhtmlpages: HTML separate per-feature reference pages" - $(ECHO) "styleguide: HTML version of styleguide" - $(ECHO) "loader: HTML version of the loader doc" - $(ECHO) "build-examples: try compiling all examples" - $(ECHO) "check-spec-links: run the checkMarkup and checkSpecLinks scripts" - $(ECHO) "all: build header header-test html pdf styleguide loader build-examples check-spec-links" - $(ECHO) "release: build header html pdf manhtmlpages and copy output to an OpenXR-Registry-like layout" + @if [ -d sources/chapters ]; then \ + echo "html: HTML version of OpenXR spec"; \ + echo "pdf: PDF version of OpenXR spec (Letter [8.5 x 11] paper size)"; \ + echo "pdfA4: PDF version of OpenXR spec (A4 paper size)"; \ + echo "manhtmlpages: HTML separate per-feature reference pages"; \ + echo "build-examples: try compiling all examples"; \ + echo "check-spec-links: run the checkMarkup and checkSpecLinks scripts"; \ + fi + + @if [ -f sources/test.c ]; then \ + echo "header-test: test-compile the OpenXR header"; fi + + @if [ -d sources/styleguide ]; then \ + echo "styleguide: HTML version of styleguide"; fi + + @if [ -d loader ]; then \ + echo "loader: HTML version of the loader doc"; fi + + $(ECHO) "all: build as many of these as possible: header header-test html pdf styleguide loader build-examples check-spec-links" + + @if [ -d sources/chapters ] && [ -d loader ]; then \ + echo "release: build header html pdf manhtmlpages and copy output to an OpenXR-Registry-like layout"; fi + $(ECHO) "clean_dirt: remove intermediate files" $(ECHO) "clean: remove targets and intermediate files" $(ECHO) "" $(ECHO) "Variables controlling options:" $(ECHO) "Pass QUIET= to disable quiet mode (echos all commands)" - $(ECHO) "Pass VERBOSE=1 to invoke asciidoctor with the --verbose option" + $(ECHO) "Pass VERBOSE=1 to invoke asciidoctor with the --verbose option and genxr.py without the -q option" $(ECHO) "Pass STRICT=1 to invoke asciidoctor with the --failure-level ERROR option" $(ECHO) "Pass VERY_STRICT=1 to invoke asciidoctor with the --failure-level WARN option" +################################################ +# Store our build configuration in a file, and force re-generation if it changes. +# Most common thing that changes is the extension list. + +APITITLE ?= OpenXR +EXTS := $(sort $(EXTENSIONS)) + +CONFIG_STAMP_FN := $(OUTDIR)/config-stamp + +# This is the stuff stored/checked +STAMP_DATA := $(EXTS) "$(APITITLE)" + +# Depend on this target to force checking the config for changes. +config_stamp: + $(QUIET)$(MKDIR) $(dir $(CONFIG_STAMP_FN)) + $(QUIET)if ! $(PYTHON) $(SCRIPTS)/check_stamp.py $(CONFIG_STAMP_FN) $(STAMP_DATA); then $(MAKE) clean_generated; fi +.PHONY: config_stamp + ################################################ ## OpenXR header file targets -# Autogenerate openxr header from XML API description -# Python and XML files on which openxr.h depends -header: $(HEADER) -# Directory to build headers into -$(OUTDIR)/openxr: - $(QUIET)$(MKDIR) $@ - -REGISTRY = ./registry/xr.xml -GENXR = ./scripts/genxr.py -XRH_DEPENDS = $(REGISTRY) $(GENXR) ./scripts/reg.py ./scripts/generator.py $(OUTDIR)/openxr - - -# OpenXR header target -$(HEADER): $(XRH_DEPENDS) $(PLATHEAD) - $(QUIET)$(PYTHON) $(GENXR) $(GENXR_ARGS) -o $(HEADER_DIR) openxr.h - $(QUIET)$(PYTHON) $(GENXR) $(GENXR_ARGS) -o $(HEADER_DIR) openxr_platform.h - $(QUIET)$(PYTHON) $(GENXR) $(GENXR_ARGS) -o $(HEADER_DIR) openxr_reflection.h +HEADER_DIR := $(OUTDIR)/openxr +HEADER := $(HEADER_DIR)/openxr.h +PLATHEAD := $(HEADER_DIR)/openxr_platform.h +REFLECTHEAD := $(HEADER_DIR)/openxr_reflection.h +GENHEADERS := $(HEADER) $(PLATHEAD) $(REFLECTHEAD) +DEFINESHEAD := $(HEADER_DIR)/openxr_platform_defines.h # Platform header (just copy) -$(PLATHEAD): $(OUTDIR)/openxr - $(QUIET)$(CP) ../include/openxr/openxr_platform_defines.h $(HEADER_DIR) +$(DEFINESHEAD): ../include/openxr/openxr_platform_defines.h + $(QUIET)$(MKDIR) $(@D) + $(QUIET)$(CP) $< $@ +# Named target to geneate all headers +header: $(GENHEADERS) $(DEFINESHEAD) +.PHONY: header + +TESTSRC := sources/test.c # Test that openxr.h compiles -header-test: $(HEADER) - $(CC) -Wall -pedantic -std=c99 -c -I$(OUTDIR) sources/test.c - $(CXX) -Wall -c -std=c++98 -I$(OUTDIR) sources/test.c - $(CXX) -Wall -c -std=c++11 -I$(OUTDIR) sources/test.c +header-test: header $(TESTSRC) + $(CC) -Wall -pedantic -std=c99 -c -I$(OUTDIR) $(TESTSRC) + $(CXX) -Wall -c -std=c++98 -I$(OUTDIR) $(TESTSRC) + $(CXX) -Wall -c -std=c++11 -I$(OUTDIR) $(TESTSRC) rm test.o +.PHONY: header-test + +################################################ +# Generated files: headers or includes referenced in spec. +# Some nominal targets are just "stamp" files generated. + +REGISTRY := registry/xr.xml +GENXR := $(SCRIPTS)/genxr.py +BASIC_GENERATED_DEPENDS := \ + $(REGISTRY) \ + $(GENXR) \ + $(SCRIPTS)/reg.py \ + $(SCRIPTS)/generator.py \ + $(SPECTOOLS)/util.py \ + $(SCRIPTS)/conventions.py \ + $(SCRIPTS)/xrconventions.py \ + config_stamp \ + Makefile + +# Stamp files for the generated includes +GENSTAMPS := \ + $(GENDIR)/api/apiinc \ + $(GENDIR)/validity/validinc \ + $(GENDIR)/hostsynctable/hostsyncinc \ + $(METADIR)/extinc \ + +# The actual generated index +GENDEPENDS := $(GENSTAMPS) $(GENDIR)/index.adoc + +# The rule for every genxr-generated file +$(GENDEPENDS) $(GENHEADERS) $(XRAPI): $(BASIC_GENERATED_DEPENDS) + $(ECHO) "[genxr] $(REGISTRY) -> $@" + @if [ "x$(STAMP_NOTE)" != "x" ]; then echo " $(STAMP_NOTE)"; fi + $(QUIET)$(MKDIR) $(@D) + $(QUIET)$(PYTHON) $(GENXR) $(GENXR_ARGS) $(EXTOPTIONS) -o $(@D) $(@F) + +# Print an extra note for stamp files +$(GENSTAMPS): STAMP_NOTE = (and additional files in $(@D)) + +# Extra deps +$(GENDIR)/api/apiinc: $(SCRIPTS)/docgenerator.py +$(GENDIR)/validity/validinc: $(SCRIPTS)/validitygenerator.py $(SPECTOOLS)/validity.py $(SPECTOOLS)/attributes.py $(SPECTOOLS)/data_structures.py +$(XRAPI): $(SCRIPTS)/pygenerator.py $(SCRIPTS)/docgenerator.py +$(GENHEADERS): $(SCRIPTS)/cgenerator.py +$(REFLECTHEAD): $(SCRIPTS)/creflectiongenerator.py $(SCRIPTS)/jinja_helpers.py + +# The actual generated files depend on their stamp file. +GENAPI = $(wildcard $(GENDIR)/api/*/[A-Za-z]*.txt) +$(GENAPI): $(GENDIR)/api/apiinc + +GENVALIDITY = $(wildcard $(GENDIR)/validity/*/[A-Za-z]*.txt) +$(GENVALIDITY): $(GENDIR)/validity/validinc + +GENSYNC := \ + $(GENDIR)/hostsynctable/implicit.txt \ + $(GENDIR)/hostsynctable/parameterlists.txt \ + $(GENDIR)/hostsynctable/parameters.txt +$(GENSYNC): $(GENDIR)/hostsynctable/hostsyncinc + +GENMETA = $(wildcard $(METADIR)/extinc/[A-Za-z]*.adoc) +$(GENMETA): $(METADIR)/extinc + +# The actual generated include files +GENINCLUDE = $(GENAPI) $(GENVALIDITY) $(GENSYNC) $(GENMETA) +.PHONY: generated +generated: $(GENDEPENDS) + +################################################ +# OpenXR Style Guide + +SPECSRC = sources/openxr.adoc +SPECFILES = $(wildcard sources/chapters/[A-Za-z]*.adoc) +STYLEGUIDE = $(OUTDIR)/styleguide.html +STYLESRC = sources/styleguide/styleguide.txt +STYLEFILES = $(wildcard sources/styleguide/[A-Za-z]*.txt) + +styleguide: $(STYLEGUIDE) + +# Use the AsciiDoctor rule +ASCIIDOCTOR_TARGETS += $(STYLEGUIDE) + +# Target-specific variables and deps customizing the AsciiDoctor rule +$(STYLEGUIDE): SPECSRC=$(STYLESRC) +$(STYLEGUIDE): LOGFILE=$(OUTDIR)/adoc_styleguide_stderr.txt +$(STYLEGUIDE): $(STYLESRC) $(STYLEFILES) $(GENDIR)/api/apiinc + + +################################################ +# OpenXR Loader Guide + +LOADERGUIDE = $(OUTDIR)/loader.html +LOADERSRC = loader/loader.adoc +LOADERFILES = $(wildcard loader/[A-Za-z]*.adoc) + +loader: $(LOADERGUIDE) + +# Use the AsciiDoctor rule +ASCIIDOCTOR_TARGETS += $(LOADERGUIDE) + +# Target-specific variables and deps customizing the AsciiDoctor rule +$(LOADERGUIDE): SPECSRC=$(LOADERSRC) +$(LOADERGUIDE): LOGFILE=$(OUTDIR)/adoc_loader_stderr.txt +$(LOADERGUIDE): $(LOADERSRC) $(LOADERFILES) ################################################ ## Specification targets +COMMONDOCS = $(SPECSRC) $(SPECFILES) $(GENINCLUDE) $(GENDEPENDS) + +## HTML +HTMLSPEC := $(OUTDIR)/openxr.html html: $(HTMLSPEC) -pdf pdfLetter: - $(MAKE) PAGESIZE=LETTER $(PDFSPEC) -pdfA4: - $(MAKE) PAGESIZE=A4 $(PDFSPEC) -manhtml: $(HTMLMAN) -manpdf: $(PDFMAN) -SPECSRC = sources/openxr.adoc -SPECFILES = $(wildcard sources/chapters/[A-Za-z]*.adoc) +# Use the AsciiDoctor rule +ASCIIDOCTOR_TARGETS += $(LOADERGUIDE) -HOSTSYNCPATH = $(GENDIR)/hostsynctable -HOSTSYNCDEPEND = $(HOSTSYNCPATH)/hostsyncinc -INDEXDEPEND = $(GENDIR) -INDEXNAME = index.adoc -GENDEPENDS = $(GENDIR)/api/apiinc $(GENDIR)/validity/validinc $(METADIR)/extinc $(INDEXDEPEND)/$(INDEXNAME) $(HOSTSYNCDEPEND) -GENINCLUDE = $(wildcard $(GENDIR)/api/*/[A-Za-z]*.txt $(GENDIR)/validity/*/[A-Za-z]*.txt $(HOSTSYNCPATH)/*/[A-Za-z]*.txt) -COMMONDOCS = $(SPECSRC) $(SPECFILES) $(GENINCLUDE) $(GENDEPENDS) $(OUTDIR) +# Target-specific variables and deps customizing the AsciiDoctor rule +$(HTMLSPEC): LOGFILE=$(OUTDIR)/adoc_html_stderr.txt +$(HTMLSPEC): EXTRA_ARGS=--backend html5 +$(HTMLSPEC): $(COMMONDOCS) -.PHONY: generated -generated: $(COMMONDOCS) +## PDF +PDFSPEC := $(OUTDIR)/openxr.pdf +PDFA4SPEC := $(OUTDIR)/openxr.a4.pdf + +pdf pdfLetter: $(PDFSPEC) +pdfA4: $(PDFA4SPEC) + +# Use the AsciiDoctor rule +ASCIIDOCTOR_TARGETS += $(PDFSPEC) $(PDFA4SPEC) + +# Target-specific variables and deps customizing the AsciiDoctor rule +$(PDFSPEC) $(PDFA4SPEC): LOGFILE=$(OUTDIR)/adoc_pdf_stderr.txt +$(PDFSPEC) $(PDFA4SPEC): BACKEND_ARGS=--backend pdf --require asciidoctor-pdf +$(PDFSPEC): PAGESIZE=LETTER +$(PDFA4SPEC): PAGESIZE=A4 +$(PDFSPEC) $(PDFA4SPEC): $(COMMONDOCS) + +################################################ +## Shared asciidoctor rule -EXTS := $(sort $(EXTENSIONS)) EXTATTRIBS := $(foreach ext,$(EXTS),-a $(ext)) EXTOPTIONS := $(foreach ext,$(EXTS),-extension $(ext)) - # Generate Asciidoc attributes for spec revision remark. -APITITLE ?= OpenXR + # Spell out RFC2822 format as not all date commands support -R SPECDATE = $(shell echo `date -u "+%a, %d %b %Y %T %z"`) @@ -182,48 +318,35 @@ ATTRIBOPTS = -a revnumber="$(SPECREVISION)" \ ADOCOPTS = --doctype book -a data-uri -r $(CURDIR)/scripts/openxr-macros.rb $(ATTRIBOPTS) -$(HTMLSPEC): $(COMMONDOCS) +# Default to html5 +BACKEND_ARGS=--backend html5 + +# AsciiDoctor rule - customized by the places where these are described +$(HTMLSPEC) $(PDFSPEC) $(PDFA4SPEC) $(STYLEGUIDE) $(LOADERGUIDE): + $(ECHO) "[asciidoctor] $(SPECSRC) -> $@" + $(QUIET)$(MKDIR) $(@D) $(QUIET)if [ $$(uname -s | cut -c 1-6) == "CYGWIN" ]; then \ - HTMLSPEC_DOS=$$(cygpath -w $@) ;\ + OUTSPEC_DOS=$$(cygpath -w $@) ;\ SPECSRC_DOS=$$(cygpath -w $(SPECSRC)) ;\ ATTRIBOPTS_DOS='$(ATTRIBOPTS)' ;\ ADOCOPTS_DOS="--doctype book -a data-uri -r $$(cygpath -w $(CURDIR)/scripts/openxr-macros.rb) $$ATTRIBOPTS_DOS" ;\ - HTML_BATCH_FILE=$$(cygpath -w $$(mktemp)).bat ;\ - echo $(ASCIIDOC) $$ADOCOPTS_DOS --backend html5 --out-file $$HTMLSPEC_DOS $$SPECSRC_DOS > $$HTML_BATCH_FILE ;\ - CMD /C $$HTML_BATCH_FILE ;\ - rm -f $$HTML_BATCH_FILE ;\ + BATCH_FILE=$$(cygpath -w $$(mktemp)).bat ;\ + echo $(ASCIIDOC) $$ADOCOPTS_DOS $(BACKEND_ARGS) --out-file $$OUTSPEC_DOS $$SPECSRC_DOS > $$BATCH_FILE ;\ + CMD /C $$BATCH_FILE ;\ + rm -f $$BATCH_FILE ;\ else \ - $(ASCIIDOC) $(ADOCOPTS) --backend html5 --out-file $@ $(SPECSRC) 2>&1 | tee $(OUTDIR)/adoc_html_stderr.txt ;\ - if [ -s $(OUTDIR)/adoc_html_stderr.txt ]; then \ + $(ASCIIDOC) $(ADOCOPTS) $(BACKEND_ARGS) --out-file $@ $(SPECSRC) 2>&1 | tee $(LOGFILE) ;\ + if [ -s $(LOGFILE) ]; then \ false; \ else \ - rm $(OUTDIR)/adoc_html_stderr.txt; \ + rm $(LOGFILE); \ fi; \ fi -$(PDFSPEC): $(COMMONDOCS) - $(QUIET)if [ $$(uname -s | cut -c 1-6) == "CYGWIN" ]; then \ - PDFSPEC_DOS=$$(cygpath -w $@) ;\ - SPECSRC_DOS=$$(cygpath -w $(SPECSRC)) ;\ - ATTRIBOPTS_DOS='$(ATTRIBOPTS)' ;\ - ADOCOPTS_DOS="--doctype book -a data-uri -r $$(cygpath -w $(CURDIR)/scripts/openxr-macros.rb) $$ATTRIBOPTS_DOS" ;\ - PDF_BATCH_FILE=$$(cygpath -w $$(mktemp)).bat ;\ - echo $(ASCIIDOC) $$ADOCOPTS_DOS --backend pdf --require asciidoctor-pdf --out-file $$PDFSPEC_DOS $$SPECSRC_DOS > $$PDF_BATCH_FILE ;\ - CMD /C $$PDF_BATCH_FILE ;\ - rm -f $$PDF_BATCH_FILE ;\ - else \ - $(ASCIIDOC) $(ADOCOPTS) --backend pdf --require asciidoctor-pdf --out-file $@ $(SPECSRC) 2>&1 | tee $(OUTDIR)/adoc_pdf_stderr.txt ;\ - if [ -s $(OUTDIR)/adoc_pdf_stderr.txt ]; then \ - false; \ - else \ - rm $(OUTDIR)/adoc_pdf_stderr.txt; \ - fi; \ - fi - - ################################################ # Reference "man" pages extracted from spec +MANDIR := man MANHTMLDIR = $(OUTDIR)/man/html KHRSOURCES = $(wildcard $(MANDIR)/*KHR.txt) MACROSOURCES = $(wildcard $(MANDIR)/XR_*[A-Z][A-Z].txt) @@ -232,9 +355,9 @@ CORESOURCES = $(filter-out $(KHRSOURCES) $(VENSOURCES),$(wildcard $(MANDIR)/[Xx MANSOURCES = $(CORESOURCES) $(VENSOURCES) $(KHRSOURCES) MANCOPYRIGHT = $(MANDIR)/copyright-ccby.txt $(MANDIR)/footer.txt MANGENERATED = $(filter-out $(MANCOPYRIGHT),$(wildcard $(MANDIR)/*)) -MANHTML = $(MANSOURCES:$(MANDIR)/%.txt=$(MANHTMLDIR)/%.html) -MANDEPS = $(MANCOPYRIGHT) $(GENINCLUDE) $(GENDEPENDS) -MANATTRIBOPTS = -a stylesheet=khronos.css \ +MANHTML = $(MANSOURCES:$(MANDIR)/%.txt=$(MANHTMLDIR)/%.html) +MANDEPS = $(MANCOPYRIGHT) $(GENINCLUDE) $(GENDEPENDS) +MANATTRIBOPTS := -a stylesheet=khronos.css \ -a stylesdir=$(CURDIR)/config \ -a html_spec_relative='../../openxr.html' \ @@ -248,172 +371,57 @@ make_extension_source = sources/chapters/extensions/$(word 1,$(subst _, ,$(1)))/ # Call make_extension_source on every enabled extension, after lowercasing and stripping the leading XR prefix. EXTENSION_SOURCES := $(foreach ext,$(patsubst xr_%,%,$(EXTENSIONS_LOWER)),$(call make_extension_source,$(ext))) -# This is a generated python script used by genRef -# in the process of extracting man page sources. -# So, it must be generated before we can run genRef -scripts/xrapi.py: $(XRH_DEPENDS) - $(QUIET)$(PYTHON) $(GENXR) $(GENXR_ARGS) $(EXTOPTIONS) -o scripts xrapi.py - # Generation of ref page asciidoctor sources by extraction from the # specification. # -# Should have a proper dependency causing the man page sources to be -# generated by running genRef (once), but adding $(MANSOURCES) to the -# targets causes genRef to run once/target. -# -# So, we treat the apispec.txt file as the "stamp" for genRef. -# -# Should pass in $(EXTOPTIONS) to determine which pages to generate, -# which requires a matching update to genRef. -# For now, all core and extension ref pages are extracted by genRef.py. -LOGFILE = man/logfile -man/apispec.txt: $(SPECFILES) $(EXTENSION_SOURCES) ./scripts/genRef.py ./scripts/reflib.py ./scripts/xrapi.py - $(QUIET)$(PYTHON) ./scripts/genRef.py -log $(LOGFILE) -registry $(REGISTRY) $(EXTOPTIONS) $(SPECFILES) $(EXTENSION_SOURCES) +# Treating the all-in-one ref page source apispec.txt as the "stamp" for genRef. +LOGFILE := man/logfile +man/apispec.txt: $(SPECFILES) $(EXTENSION_SOURCES) $(SCRIPTS)/genRef.py $(SCRIPTS)/reflib.py $(SCRIPTS)/xrapi.py + $(ECHO) "[genRef.py] $(REGISTRY) and spec -> $@" + $(ECHO) " (and additional files in $(@D))" + $(QUIET)$(PYTHON) $(SCRIPTS)/genRef.py -log $(LOGFILE) -registry $(REGISTRY) $(EXTOPTIONS) $(SPECFILES) $(EXTENSION_SOURCES) $(QUIET)grep "ERROR:" $(LOGFILE) # The recursive $(MAKE) is an apparently unavoidable hack, since the # actual list of man page sources isn't known until after # man/apispec.txt is generated. manhtmlpages: man/apispec.txt - $(MAKE) buildmanpages + $(QUIET)$(MAKE) buildmanpages buildmanpages: $(MANHTML) $(MANHTMLDIR)/openxr.html # This is the single-page ref page. # Manually defining doctype-manpage so that we can use "book" style but still enable the refpage-only portions. $(MANHTMLDIR)/openxr.html: man/apispec.txt $(MANDEPS) + $(ECHO) "[asciidoctor] $< -> $@" + $(QUIET)$(MKDIR) $(@D) $(QUIET)$(ASCIIDOC) -b html5 $(MANATTRIBOPTS) $(ADOCOPTS) -a doctype-manpage -d book -o $@ $< # This is all the individual-page ref pages. $(MANHTML): $(MANHTMLDIR)/%.html: $(MANDIR)/%.txt $(MANDEPS) - $(QUIET)$(MKDIR) $(MANHTMLDIR) + $(ECHO) "[asciidoctor] $< -> $@" + $(QUIET)$(MKDIR) $(@D) $(QUIET)$(ASCIIDOC) -b html5 $(MANATTRIBOPTS) $(ADOCOPTS) -a cross-file-links -d manpage -o $@ $< - -#manpdf: $(OUTDIR)/apispec.pdf -#$(OUTDIR)/apispec.pdf: $(SPECVERSION) man/apispec.txt $(MANCOPYRIGHT) $(SVGFILES) $(GENINCLUDE) $(GENDEPENDS) -# $(QUIET)$(MKDIR) $(OUTDIR) -# $(QUIET)$(MKDIR) $(PDFMATHDIR) -# $(QUIET)$(ASCIIDOC) -b pdf -a html_spec_relative='html/vkspec.html' $(ADOCOPTS) $(ADOCPDFOPTS) -o $@ man/apispec.txt -#ifndef GS_EXISTS -# $(QUIET) echo "Warning: Ghostscript not installed, skipping pdf optimization" -#else -# $(QUIET)$(CURDIR)/config/optimize-pdf $@ -# $(QUIET)rm $@ -# $(QUIET)mv $(OUTDIR)/apispec-optimized.pdf $@ -#endif - -#manhtml: $(OUTDIR)/apispec.html -#$(OUTDIR)/apispec.html: KATEXDIR = katex -#$(OUTDIR)/apispec.html: $(SPECVERSION) man/apispec.txt $(MANCOPYRIGHT) $(SVGFILES) $(GENINCLUDE) $(GENDEPENDS) katexinst -# $(QUIET)$(MKDIR) $(OUTDIR) -# $(QUIET)$(ASCIIDOC) -b html5 -a html_spec_relative='html/vkspec.html' $(ADOCOPTS) $(ADOCHTMLOPTS) -o $@ man/apispec.txt - ################################################ -# Generated include files referenced in spec +# Extension dependency script -# The nominal targets here are just "stamp" files generated -# at the same time as the real outputs of these commands. - -# Generated files for spec -$(GENDIR)/api/apiinc: $(XRH_DEPENDS) +DEPSCRIPT = $(SCRIPTS)/make_ext_dependency.py +DEPSCRIPTOUT := out/extDependency.sh +$(DEPSCRIPTOUT): $(REGISTRY) $(DEPSCRIPT) + $(ECHO) "[mk_ext_dep] $(REGISTRY) -> $@" $(QUIET)$(MKDIR) $(@D) - $(QUIET)$(PYTHON) $(GENXR) $(GENXR_ARGS) $(EXTOPTIONS) -o $(GENDIR)/api apiinc - -$(GENDIR)/validity/validinc: $(XRH_DEPENDS) - $(QUIET)$(MKDIR) $(@D) - $(QUIET)$(PYTHON) $(GENXR) $(GENXR_ARGS) $(EXTOPTIONS) -o $(GENDIR)/validity validinc - -$(HOSTSYNCDEPEND): $(XRH_DEPENDS) - $(QUIET)$(MKDIR) $(@D) - $(QUIET)$(PYTHON) $(GENXR) $(GENXR_ARGS) $(EXTOPTIONS) -o $(HOSTSYNCPATH) hostsyncinc - -$(INDEXDEPEND)/$(INDEXNAME): $(XRH_DEPENDS) - $(QUIET)$(MKDIR) $(@D) - $(QUIET)$(PYTHON) $(GENXR) $(GENXR_ARGS) $(EXTOPTIONS) -o $(INDEXDEPEND) $(INDEXNAME) - -XRM_DEPENDS = $(REGISTRY) $(GENXR) ./scripts/reg.py ./scripts/generator.py - -$(METADIR)/extinc: $(XRM_DEPENDS) - $(QUIET)$(MKDIR) $(@D) - $(QUIET)$(PYTHON) $(GENXR) $(GENXR_ARGS) $(EXTOPTIONS) -o $(METADIR) extinc - -# Every generated include snippet depends on registry and scripts. -$(GENINCLUDE): $(XRH_DEPENDS) - -DEPSCRIPT = ./scripts/make_ext_dependency.py -generated/extDependency.sh: $(REGISTRY) $(DEPSCRIPT) - $(QUIET)$(PYTHON) $(DEPSCRIPT) -registry $(REGISTRY) \ - -outscript $@ - -################################################ -# OpenXR Style Guide - -STYLEGUIDE = $(OUTDIR)/styleguide.html -STYLESRC = sources/styleguide/styleguide.txt -STYLEFILES = $(wildcard sources/styleguide/[A-Za-z]*.txt) - -styleguide: $(STYLEGUIDE) - -$(STYLEGUIDE): $(STYLESRC) $(STYLEFILES) $(GENDIR)/api/apiinc - $(QUIET)$(MKDIR) $(OUTDIR) - $(QUIET)if [ $$(uname -s | cut -c 1-6) == "CYGWIN" ]; then \ - STYLESPEC_DOS=$$(cygpath -w $@) ;\ - STYLESRC_DOS=$$(cygpath -w $(SPECSRC)) ;\ - ATTRIBOPTS_DOS='$(ATTRIBOPTS)' ;\ - ADOCOPTS_DOS="--doctype book -a data-uri -r $$(cygpath -w $(CURDIR)/scripts/openxr-macros.rb) $$ATTRIBOPTS_DOS" ;\ - STYLE_BATCH_FILE=$$(cygpath -w $$(mktemp)).bat ;\ - echo $(ASCIIDOC) -b html5 $$ADOCOPTS_DOS -o $$STYLESPEC_DOS $$STYLESRC_DOS > $$STYLE_BATCH_FILE ;\ - CMD /C $$STYLE_BATCH_FILE ;\ - rm -f $$STYLE_BATCH_FILE ;\ - else \ - $(ASCIIDOC) -b html5 $(ADOCOPTS) -o $@ $(STYLESRC) ;\ - fi - -################################################ -# OpenXR Loader Guide - -LOADERGUIDE = $(OUTDIR)/loader.html -LOADERSRC = loader/loader.adoc -LOADERFILES = $(wildcard loader/[A-Za-z]*.adoc) - -loader: $(LOADERGUIDE) - -$(LOADERGUIDE): $(LOADERSRC) $(LOADERFILES) - $(QUIET)$(MKDIR) $(OUTDIR) - $(QUIET)if [ $$(uname -s | cut -c 1-6) == "CYGWIN" ]; then \ - SPEC_DOS=$$(cygpath -w $@) ;\ - SRC_DOS=$$(cygpath -w $(LOADERSRC)) ;\ - ATTRIBOPTS_DOS='$(ATTRIBOPTS)' ;\ - ADOCOPTS_DOS="--doctype book -a data-uri -r $$(cygpath -w $(CURDIR)/scripts/openxr-macros.rb) $$ATTRIBOPTS_DOS" ;\ - BATCH_FILE=$$(cygpath -w $$(mktemp)).bat ;\ - echo $(ASCIIDOC) -b html5 $$ADOCOPTS_DOS -o $$SPEC_DOS $$SRC_DOS > $$BATCH_FILE ;\ - CMD /C $$BATCH_FILE ;\ - rm -f $$BATCH_FILE ;\ - else \ - $(ASCIIDOC) -b html5 $(ADOCOPTS) -o $@ $(LOADERSRC) ;\ - fi + $(QUIET)$(PYTHON) $(DEPSCRIPT) -registry $< -outscript $@ ################################################ # Embedded example code # Script that extracts code to .cpp and .c files, and # generates an associated makefile -EXAMPLES_SCRIPT = $(CURDIR)/scripts/extract_code.py +EXAMPLES_SCRIPT = $(SCRIPTS)/extract_code.py # The makefile generated by extract_code.py -EXAMPLES_MAKEFILE = $(CURDIR)/examples.mk - -# Only include the generated makefile if we are building neither clean nor default -ifneq ($(MAKECMDGOALS),clean) -ifneq ($(MAKECMDGOALS),) --include $(EXAMPLES_MAKEFILE) -endif -endif - -ifeq (,$(GENERATED_CPP)) -# If we didn't include the generated makefile (on purpose or because it hasn't been generated), -# just add dummy rules to generate it. +EXAMPLES_MAKEFILE = examples.mk ifeq ($(strip $(QUIET)),@) EXTRACT_QUIET := --quiet @@ -422,11 +430,10 @@ endif $(EXAMPLES_MAKEFILE): $(EXAMPLES_SCRIPT) $(QUIET)$(PYTHON) $< --makefile=$@ --line_numbers $(EXTRACT_QUIET) -build-examples: $(EXAMPLES_MAKEFILE) +build-examples: $(EXAMPLES_MAKEFILE) $(HEADER) + $(QUIET)$(MAKE) -f $(EXAMPLES_MAKEFILE) .PHONY: build-examples -endif - ################################################ # Check Markup, Check Spec Links, check XML schema CHECK_MARKUP_SCRIPT = $(CURDIR)/checkMarkup @@ -442,21 +449,28 @@ check-spec-links: $(QUIET)$(CHECK_MARKUP_SCRIPT) -Werror $(QUIET)$(PYTHON) $(CHECK_SPEC_LINKS_SCRIPT) $(QUIET)env FAIL_IF_COULD_NOT_VALIDATE=false ./checkXml.sh - $(QUIET)$(PYTHON) $(CURDIR)/scripts/xml_consistency.py + $(QUIET)$(PYTHON) $(SCRIPTS)/xml_consistency.py .PHONY: check-spec-links ################################################ # Meta "build approximately everything spec-specific required to pass CI" target + +# recursive to cause csl to run first for better errors messages, without adding bogus depends. all: - $(QUIET)$(MAKE) check-spec-links # recursive to cause csl to run first for better errors messages, without adding bogus depends. - $(QUIET)$(MAKE) header header-test html pdf styleguide loader build-examples + $(QUIET)if [ -f $(SPECSRC) ]; then $(MAKE) check-spec-links; fi + $(QUIET)$(MAKE) header + $(QUIET)if [ -f $(TESTSRC) ]; then $(MAKE) header-test; fi + $(QUIET)if [ -f $(SPECSRC) ]; then $(MAKE) html pdf build-examples; fi + $(QUIET)if [ -f $(STYLESRC) ]; then $(MAKE) styleguide; fi + $(QUIET)if [ -f $(LOADERSRC) ]; then $(MAKE) loader; fi $(ECHO) "" $(ECHO) "Target 'all': Completed specification build and basic checks successfully." .PHONY: all ################################################ # Meta build for releases. Also copies into approximately the right layout for the OpenXR-Registry repo. +REGISTRYOUTDIR = $(OUTDIR)/../registry-release/specs/$(MAJORMINORVER) release: header html pdf manhtmlpages loader $(QUIET)$(MKDIR) $(REGISTRYOUTDIR)/pdf $(QUIET)$(CP) $(PDFSPEC) $(REGISTRYOUTDIR)/pdf/xrspec.pdf @@ -483,9 +497,9 @@ clean_generated: # Clean generated targets as well as intermediates. clean clobber: clean_dirt clean_generated - $(RM) $(HEADER) $(PLATHEAD) $(HTMLSPEC) $(PDFSPEC) $(STYLEGUIDE) $(LOADERGUIDE) + $(RM) $(HEADER) $(PLATHEAD) $(REFLECTHEAD) $(DEFINESHEAD) $(HTMLSPEC) $(PDFSPEC) $(PDFA4SPEC) $(STYLEGUIDE) $(LOADERGUIDE) $(DEPSCRIPTOUT) config_stamp # Clean up extracted code - $(RM) $(EXAMPLES_MAKEFILE) $(GENERATED_C) $(C_OBJECTS) $(GENERATED_CPP) $(CPP_OBJECTS) + if [ -f $(EXAMPLES_MAKEFILE) ]; then $(MAKE) -f $(EXAMPLES_MAKEFILE) clean-examples; fi + $(RM) $(EXAMPLES_MAKEFILE) # Clean up man pages $(RMRF) $(MANHTMLDIR) - find $(CURDIR)/sources/chapters/ -name "*.cpp" -o -name "*.c" -o -name "*.o" | xargs $(RM) diff --git a/specification/current_version.ini b/specification/current_version.ini index 1ee57a6..25d26ae 100644 --- a/specification/current_version.ini +++ b/specification/current_version.ini @@ -6,4 +6,4 @@ # Similarly, update specification/scripts/extensionmetadocgenerator.py as well. MAJOR=1 MINOR=0 -PATCH=0 +PATCH=1 diff --git a/specification/makeAllExts b/specification/makeAllExts index 3b53b9e..fceacec 100755 --- a/specification/makeAllExts +++ b/specification/makeAllExts @@ -26,14 +26,11 @@ set -e ( cd $(dirname $0) # Generate extension lists from xr.xml - python3 scripts/make_ext_dependency.py -outscript=generated/extDependency.sh - # make generated/extDependency.sh || exit + make out/extDependency.sh || exit # Load extension lists - source generated/extDependency.sh - rm generated/extDependency.sh + source out/extDependency.sh - make clean_generated make EXTENSIONS="$allExts" APITITLE="(with all published extensions)" $* ) diff --git a/specification/makeExt b/specification/makeExt index 51e92ed..3b0dc8f 100755 --- a/specification/makeExt +++ b/specification/makeExt @@ -31,12 +31,10 @@ set -e ( cd $(dirname $0) # Generate extension lists from xr.xml - python3 scripts/make_ext_dependency.py -outscript=generated/extDependency.sh - # make generated/extDependency.sh || exit + make out/extDependency.sh || exit # Load extension lists - source generated/extDependency.sh - rm generated/extDependency.sh + source out/extDependency.sh extension=$1 shift @@ -58,9 +56,6 @@ set -e fi done - # There have been requests for this to be optional. - make clean_generated - # Something weird in bash quoting requires this two-step process to define # EXTENSIONS to make. args="${!required[@]}" diff --git a/specification/makeKHR b/specification/makeKHR index 97b3713..e23c2ac 100755 --- a/specification/makeKHR +++ b/specification/makeKHR @@ -26,14 +26,10 @@ set -e ( cd $(dirname $0) # Generate extension lists from xr.xml - python3 scripts/make_ext_dependency.py -outscript=generated/extDependency.sh - # make generated/extDependency.sh || exit + make out/extDependency.sh || exit # Load extension lists - source generated/extDependency.sh - rm generated/extDependency.sh + source out/extDependency.sh - - make clean_generated make EXTENSIONS="$khrExts" APITITLE="(with all KHR extensions)" $* ) diff --git a/specification/makeKHRAndKHX b/specification/makeKHRAndKHX index 62609bd..24d5e61 100755 --- a/specification/makeKHRAndKHX +++ b/specification/makeKHRAndKHX @@ -26,14 +26,10 @@ set -e ( cd $(dirname $0) # Generate extension lists from xr.xml - python3 scripts/make_ext_dependency.py -outscript=generated/extDependency.sh - # make generated/extDependency.sh || exit + make out/extDependency.sh || exit # Load extension lists - source generated/extDependency.sh - rm generated/extDependency.sh + source out/extDependency.sh - - make clean_generated make EXTENSIONS="$khrExts $khxExts" APITITLE="(with all KHR and KHX extensions)" $* ) diff --git a/specification/registry/xr.xml b/specification/registry/xr.xml index 1e51585..34d03e1 100644 --- a/specification/registry/xr.xml +++ b/specification/registry/xr.xml @@ -49,6 +49,7 @@ maintained in the master branch of the Khronos OpenXR GitHub project. + @@ -111,7 +112,7 @@ maintained in the master branch of the Khronos OpenXR GitHub project. updates them automatically by processing a line at a time. --> // OpenXR current version number. -#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 0, 0) +#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 0, 1)