The open source OpenXR runtime

st/oxr: Add XR_MNDX_xdev_space extension header

authored by

Jakob Bornecrantz and committed by
Christoph Haag
158f4207 889dc32f

+100 -1
+80
src/external/openxr_includes/openxr/XR_MNDX_xdev_space.h
··· 1 + // Copyright 2023-2024, Collabora, Ltd. 2 + // SPDX-License-Identifier: BSL-1.0 3 + /*! 4 + * @file 5 + * @brief Preview header for XR_MNDX_xdev_space extension. 6 + * @author Jakob Bornecrantz <jakob@collabora.com> 7 + * @ingroup external_openxr 8 + */ 9 + #ifndef XR_MNDX_XDEV_SPACE_H 10 + #define XR_MNDX_XDEV_SPACE_H 1 11 + 12 + #include "openxr_extension_helpers.h" 13 + 14 + #ifdef __cplusplus 15 + extern "C" { 16 + #endif 17 + 18 + // Extension number 445 (444 prefix) 19 + #define XR_MNDX_xdev_space 1 20 + #define XR_MNDX_xdev_space_SPEC_VERSION 1 21 + #define XR_MNDX_XDEV_SPACE_EXTENSION_NAME "XR_MNDX_xdev_space" 22 + 23 + 24 + XR_DEFINE_ATOM(XrXDevIdMNDX) 25 + XR_DEFINE_HANDLE(XrXDevListMNDX) 26 + 27 + 28 + XR_STRUCT_ENUM(XR_TYPE_SYSTEM_XDEV_SPACE_PROPERTIES_MNDX, 1000444001); 29 + // XrSystemXDevSpacePropertiesMNDX extends XrSystemProperties 30 + typedef struct XrSystemXDevSpacePropertiesMNDX { 31 + XrStructureType type; 32 + void* XR_MAY_ALIAS next; 33 + XrBool32 supportsXDevSpace; 34 + } XrSystemXDevSpacePropertiesMNDX; 35 + 36 + XR_STRUCT_ENUM(XR_TYPE_CREATE_XDEV_LIST_INFO_MNDX, 1000444002); 37 + typedef struct XrCreateXDevListInfoMNDX { 38 + XrStructureType type; 39 + const void* XR_MAY_ALIAS next; 40 + } XrCreateXDevListInfoMNDX; 41 + 42 + XR_STRUCT_ENUM(XR_TYPE_GET_XDEV_INFO_MNDX, 1000444003); 43 + typedef struct XrGetXDevInfoMNDX { 44 + XrStructureType type; 45 + const void* XR_MAY_ALIAS next; 46 + XrXDevIdMNDX id; 47 + } XrGetXDevInfoMNDX; 48 + 49 + XR_STRUCT_ENUM(XR_TYPE_XDEV_PROPERTIES_MNDX, 1000444004); 50 + typedef struct XrXDevPropertiesMNDX { 51 + XrStructureType type; 52 + void* XR_MAY_ALIAS next; 53 + char name[256]; 54 + char serial[256]; 55 + XrBool32 canCreateSpace; 56 + } XrXDevPropertiesMNDX; 57 + 58 + XR_STRUCT_ENUM(XR_TYPE_CREATE_XDEV_SPACE_INFO_MNDX, 1000444005); 59 + typedef struct XrCreateXDevSpaceInfoMNDX { 60 + XrStructureType type; 61 + const void* XR_MAY_ALIAS next; 62 + XrXDevListMNDX xdevList; 63 + XrXDevIdMNDX id; 64 + XrPosef offset; 65 + } XrCreateXDevSpaceInfoMNDX; 66 + 67 + 68 + typedef XrResult (XRAPI_PTR *PFN_xrCreateXDevListMNDX)(XrSession session, const XrCreateXDevListInfoMNDX *info, XrXDevListMNDX *xdevList); 69 + typedef XrResult (XRAPI_PTR *PFN_xrGetXDevListGenerationNumberMNDX)(XrXDevListMNDX xdevList, uint64_t *outGeneration); 70 + typedef XrResult (XRAPI_PTR *PFN_xrEnumerateXDevsMNDX)(XrXDevListMNDX xdevList, uint32_t xdevCapacityInput, uint32_t* xdevCountOutput, XrXDevIdMNDX* xdevs); 71 + typedef XrResult (XRAPI_PTR *PFN_xrGetXDevPropertiesMNDX)(XrXDevListMNDX xdevList, const XrGetXDevInfoMNDX *info, XrXDevPropertiesMNDX *properties); 72 + typedef XrResult (XRAPI_PTR *PFN_xrDestroyXDevListMNDX)(XrXDevListMNDX xdevList); 73 + typedef XrResult (XRAPI_PTR *PFN_xrCreateXDevSpaceMNDX)(XrSession session, const XrCreateXDevSpaceInfoMNDX *createInfo, XrSpace *space); 74 + 75 + 76 + #ifdef __cplusplus 77 + } 78 + #endif 79 + 80 + #endif
+18
src/external/openxr_includes/openxr/openxr_extension_helpers.h
··· 1 + /* 2 + ** Copyright (c) 2017-2022, The Khronos Group Inc. 3 + ** 4 + ** SPDX-License-Identifier: Apache-2.0 5 + */ 6 + 7 + #pragma once 8 + 9 + #include <openxr/openxr.h> 10 + 11 + // These are just convenience macros for defining enums that would 12 + // normally be declared in the body of the enum, but can't be declared 13 + // that way easily for experimental extensions. 14 + 15 + #define XR_ENUM(type, enm, constant) static const type enm = (type)constant 16 + #define XR_STRUCT_ENUM(enm, constant) XR_ENUM(XrStructureType, enm, constant) 17 + #define XR_RESULT_ENUM(enm, constant) XR_ENUM(XrResult, enm, constant) 18 + #define XR_REFSPACE_ENUM(enm, constant) XR_ENUM(XrReferenceSpaceType, enm, constant)
+2 -1
src/xrt/include/xrt/xrt_openxr_includes.h
··· 1 - // Copyright 2018-2023, Collabora, Ltd. 1 + // Copyright 2018-2024, Collabora, Ltd. 2 2 // SPDX-License-Identifier: BSL-1.0 3 3 /*! 4 4 * @file ··· 62 62 #include "openxr/openxr_loader_negotiation.h" // IWYU pragma: export 63 63 64 64 #include "openxr/XR_MNDX_hydra.h" 65 + #include "openxr/XR_MNDX_xdev_space.h" 65 66 #include "openxr/XR_MNDX_system_buttons.h" 66 67 #include "openxr/XR_MNDX_ball_on_a_stick_controller.h"