From 1ca7bec6b531185530c9b4f1e7a50e1fd55e7641 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Thu, 23 Jun 2022 12:39:54 -0500 Subject: [PATCH] OpenXR SDK 1.0.24 (2022-06-23) - Registry - Add new XR_EXT_palm_pose multi-vendor extension. (internal MR 2112) - Add new XR_FB_scene vendor extension. (internal MR 2237) - Fix structure definition in XR_FB_spatial_entity_container. (internal MR 2278) - scripts: Teach xr_conventions that 2D, 3D, etc. are words for the purposes of structure type enum generation. (internal MR 2237) - SDK - Loader: Fix filename and native lib dir sequence for log (OpenXR-SDK-Source PR 311) - Loader: Fix loader building with Gradle and add CI checking for loader building with Gradle (OpenXR-SDK-Source PR 312) - hello_xr: Pick background clear color based on the selected environment blend mode. (internal MR 2275) - hello_xr: Defer Vulkan CPU sync until the next frame begins. (OpenXR-SDK-Source PR 277) - hello_xr: Fix shader compile on Mali driver (OpenXR-SDK-Source PR 310) - scripts: Delegate generating structure types to the conventions object as done elsewhere in the repo. (internal MR 2237) --- .gitignore | 1 + CHANGELOG.SDK.md | 29 ++++++++ include/openxr/openxr.h | 100 +++++++++++++++++++++++++- include/openxr/openxr_reflection.h | 49 +++++++++++++ specification/registry/xr.xml | 111 ++++++++++++++++++++++++++--- src/loader/android_utilities.cpp | 2 +- src/loader/build.gradle | 1 + src/xr_generated_dispatch_table.c | 7 ++ src/xr_generated_dispatch_table.h | 7 ++ 9 files changed, 294 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 0b77eda..da46cb1 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ local.properties # Don't ignore these things !.*.license +!.appveyor.yml !.azure-pipelines/ !.azure-pipelines/nuget/NugetTemplate/build !.clang-format diff --git a/CHANGELOG.SDK.md b/CHANGELOG.SDK.md index ff337f9..3133395 100644 --- a/CHANGELOG.SDK.md +++ b/CHANGELOG.SDK.md @@ -19,6 +19,35 @@ along with any public pull requests that have been accepted. In this repository in particular, since it is primarily software, pull requests may be integrated as they are accepted even between periodic updates. +## OpenXR SDK 1.0.24 (2022-06-23) + +- Registry + - Add new `XR_EXT_palm_pose` multi-vendor extension. + ([internal MR 2112](https://gitlab.khronos.org/openxr/openxr/merge_requests/2112)) + - Add new `XR_FB_scene` vendor extension. + ([internal MR 2237](https://gitlab.khronos.org/openxr/openxr/merge_requests/2237)) + - Fix structure definition in `XR_FB_spatial_entity_container`. + ([internal MR 2278](https://gitlab.khronos.org/openxr/openxr/merge_requests/2278)) + - scripts: Teach xr_conventions that 2D, 3D, etc. are words for the purposes of + structure type enum generation. + ([internal MR 2237](https://gitlab.khronos.org/openxr/openxr/merge_requests/2237)) +- SDK + - Loader: Fix filename and native lib dir sequence for log + ([OpenXR-SDK-Source PR 311](https://github.com/KhronosGroup/OpenXR-SDK-Source/pull/311)) + - Loader: Fix loader building with Gradle and add CI checking for loader building + with Gradle + ([OpenXR-SDK-Source PR 312](https://github.com/KhronosGroup/OpenXR-SDK-Source/pull/312)) + - hello_xr: Pick background clear color based on the selected environment blend + mode. + ([internal MR 2275](https://gitlab.khronos.org/openxr/openxr/merge_requests/2275)) + - hello_xr: Defer Vulkan CPU sync until the next frame begins. + ([OpenXR-SDK-Source PR 277](https://github.com/KhronosGroup/OpenXR-SDK-Source/pull/277)) + - hello_xr: Fix shader compile on Mali driver + ([OpenXR-SDK-Source PR 310](https://github.com/KhronosGroup/OpenXR-SDK-Source/pull/310)) + - scripts: Delegate generating structure types to the conventions object as done + elsewhere in the repo. + ([internal MR 2237](https://gitlab.khronos.org/openxr/openxr/merge_requests/2237)) + ## OpenXR SDK 1.0.23 (2022-05-27) This release primarily features a large number of new vendor and multi-vendor diff --git a/include/openxr/openxr.h b/include/openxr/openxr.h index 6c6a52d..88772f7 100644 --- a/include/openxr/openxr.h +++ b/include/openxr/openxr.h @@ -25,7 +25,7 @@ extern "C" { ((((major) & 0xffffULL) << 48) | (((minor) & 0xffffULL) << 32) | ((patch) & 0xffffffffULL)) // OpenXR current version number. -#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 0, 23) +#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 0, 24) #define XR_VERSION_MAJOR(version) (uint16_t)(((uint64_t)(version) >> 48)& 0xffffULL) #define XR_VERSION_MINOR(version) (uint16_t)(((uint64_t)(version) >> 32) & 0xffffULL) @@ -439,6 +439,9 @@ typedef enum XrStructureType { XR_TYPE_SWAPCHAIN_STATE_SAMPLER_VULKAN_FB = 1000163000, XR_TYPE_COMPOSITION_LAYER_SPACE_WARP_INFO_FB = 1000171000, XR_TYPE_SYSTEM_SPACE_WARP_PROPERTIES_FB = 1000171001, + XR_TYPE_SEMANTIC_LABELS_FB = 1000175000, + XR_TYPE_ROOM_LAYOUT_FB = 1000175001, + XR_TYPE_BOUNDARY_2D_FB = 1000175002, XR_TYPE_DIGITAL_LENS_CONTROL_ALMALENCE = 1000196000, XR_TYPE_SPACE_CONTAINER_FB = 1000199000, XR_TYPE_PASSTHROUGH_KEYBOARD_HANDS_INTENSITY_FB = 1000203002, @@ -3317,6 +3320,10 @@ XR_DEFINE_ATOM(XrAsyncRequestIdFB) typedef enum XrSpaceComponentTypeFB { XR_SPACE_COMPONENT_TYPE_LOCATABLE_FB = 0, XR_SPACE_COMPONENT_TYPE_STORABLE_FB = 1, + XR_SPACE_COMPONENT_TYPE_BOUNDED_2D_FB = 3, + XR_SPACE_COMPONENT_TYPE_BOUNDED_3D_FB = 4, + XR_SPACE_COMPONENT_TYPE_SEMANTIC_LABELS_FB = 5, + XR_SPACE_COMPONENT_TYPE_ROOM_LAYOUT_FB = 6, XR_SPACE_COMPONENT_TYPE_SPACE_CONTAINER_FB = 7, XR_SPACE_COMPONENT_TYPE_MAX_ENUM_FB = 0x7FFFFFFF } XrSpaceComponentTypeFB; @@ -4303,6 +4310,93 @@ typedef struct XrSystemSpaceWarpPropertiesFB { +#define XR_FB_scene 1 +#define XR_FB_scene_SPEC_VERSION 1 +#define XR_FB_SCENE_EXTENSION_NAME "XR_FB_scene" +typedef struct XrExtent3DfFB { + float width; + float height; + float depth; +} XrExtent3DfFB; + +typedef struct XrOffset3DfFB { + float x; + float y; + float z; +} XrOffset3DfFB; + +typedef struct XrRect3DfFB { + XrOffset3DfFB offset; + XrExtent3DfFB extent; +} XrRect3DfFB; + +typedef struct XrSemanticLabelsFB { + XrStructureType type; + const void* XR_MAY_ALIAS next; + uint32_t bufferCapacityInput; + uint32_t bufferCountOutput; + char* buffer; +} XrSemanticLabelsFB; + +typedef struct XrRoomLayoutFB { + XrStructureType type; + const void* XR_MAY_ALIAS next; + XrUuidEXT floorUuid; + XrUuidEXT ceilingUuid; + uint32_t wallUuidCapacityInput; + uint32_t wallUuidCountOutput; + XrUuidEXT* wallUuids; +} XrRoomLayoutFB; + +typedef struct XrBoundary2DFB { + XrStructureType type; + const void* XR_MAY_ALIAS next; + uint32_t vertexCapacityInput; + uint32_t vertexCountOutput; + XrVector2f* vertices; +} XrBoundary2DFB; + +typedef XrResult (XRAPI_PTR *PFN_xrGetSpaceBoundingBox2DFB)(XrSession session, XrSpace space, XrRect2Df* boundingBox2DOutput); +typedef XrResult (XRAPI_PTR *PFN_xrGetSpaceBoundingBox3DFB)(XrSession session, XrSpace space, XrRect3DfFB* boundingBox3DOutput); +typedef XrResult (XRAPI_PTR *PFN_xrGetSpaceSemanticLabelsFB)(XrSession session, XrSpace space, XrSemanticLabelsFB* semanticLabelsOutput); +typedef XrResult (XRAPI_PTR *PFN_xrGetSpaceBoundary2DFB)(XrSession session, XrSpace space, XrBoundary2DFB* boundary2DOutput); +typedef XrResult (XRAPI_PTR *PFN_xrGetSpaceRoomLayoutFB)(XrSession session, XrSpace space, XrRoomLayoutFB* roomLayoutOutput); + +#ifndef XR_NO_PROTOTYPES +#ifdef XR_EXTENSION_PROTOTYPES +XRAPI_ATTR XrResult XRAPI_CALL xrGetSpaceBoundingBox2DFB( + XrSession session, + XrSpace space, + XrRect2Df* boundingBox2DOutput); + +XRAPI_ATTR XrResult XRAPI_CALL xrGetSpaceBoundingBox3DFB( + XrSession session, + XrSpace space, + XrRect3DfFB* boundingBox3DOutput); + +XRAPI_ATTR XrResult XRAPI_CALL xrGetSpaceSemanticLabelsFB( + XrSession session, + XrSpace space, + XrSemanticLabelsFB* semanticLabelsOutput); + +XRAPI_ATTR XrResult XRAPI_CALL xrGetSpaceBoundary2DFB( + XrSession session, + XrSpace space, + XrBoundary2DFB* boundary2DOutput); + +XRAPI_ATTR XrResult XRAPI_CALL xrGetSpaceRoomLayoutFB( + XrSession session, + XrSpace space, + XrRoomLayoutFB* roomLayoutOutput); +#endif /* XR_EXTENSION_PROTOTYPES */ +#endif /* !XR_NO_PROTOTYPES */ + + +#define XR_EXT_palm_pose 1 +#define XR_EXT_palm_pose_SPEC_VERSION 2 +#define XR_EXT_PALM_POSE_EXTENSION_NAME "XR_EXT_palm_pose" + + #define XR_ALMALENCE_digital_lens_control 1 #define XR_ALMALENCE_digital_lens_control_SPEC_VERSION 1 #define XR_ALMALENCE_DIGITAL_LENS_CONTROL_EXTENSION_NAME "XR_ALMALENCE_digital_lens_control" @@ -4329,13 +4423,13 @@ XRAPI_ATTR XrResult XRAPI_CALL xrSetDigitalLensControlALMALENCE( #define XR_FB_spatial_entity_container 1 -#define XR_FB_spatial_entity_container_SPEC_VERSION 1 +#define XR_FB_spatial_entity_container_SPEC_VERSION 2 #define XR_FB_SPATIAL_ENTITY_CONTAINER_EXTENSION_NAME "XR_FB_spatial_entity_container" typedef struct XrSpaceContainerFB { XrStructureType type; const void* XR_MAY_ALIAS next; uint32_t uuidCapacityInput; - uint32_t* uuidCountOutput; + uint32_t uuidCountOutput; XrUuidEXT* uuids; } XrSpaceContainerFB; diff --git a/include/openxr/openxr_reflection.h b/include/openxr/openxr_reflection.h index 163b54e..31e2e40 100644 --- a/include/openxr/openxr_reflection.h +++ b/include/openxr/openxr_reflection.h @@ -340,6 +340,9 @@ XR_ENUM_STR(XrResult); _(XR_TYPE_SWAPCHAIN_STATE_SAMPLER_VULKAN_FB, 1000163000) \ _(XR_TYPE_COMPOSITION_LAYER_SPACE_WARP_INFO_FB, 1000171000) \ _(XR_TYPE_SYSTEM_SPACE_WARP_PROPERTIES_FB, 1000171001) \ + _(XR_TYPE_SEMANTIC_LABELS_FB, 1000175000) \ + _(XR_TYPE_ROOM_LAYOUT_FB, 1000175001) \ + _(XR_TYPE_BOUNDARY_2D_FB, 1000175002) \ _(XR_TYPE_DIGITAL_LENS_CONTROL_ALMALENCE, 1000196000) \ _(XR_TYPE_SPACE_CONTAINER_FB, 1000199000) \ _(XR_TYPE_PASSTHROUGH_KEYBOARD_HANDS_INTENSITY_FB, 1000203002) \ @@ -660,6 +663,10 @@ XR_ENUM_STR(XrResult); #define XR_LIST_ENUM_XrSpaceComponentTypeFB(_) \ _(XR_SPACE_COMPONENT_TYPE_LOCATABLE_FB, 0) \ _(XR_SPACE_COMPONENT_TYPE_STORABLE_FB, 1) \ + _(XR_SPACE_COMPONENT_TYPE_BOUNDED_2D_FB, 3) \ + _(XR_SPACE_COMPONENT_TYPE_BOUNDED_3D_FB, 4) \ + _(XR_SPACE_COMPONENT_TYPE_SEMANTIC_LABELS_FB, 5) \ + _(XR_SPACE_COMPONENT_TYPE_ROOM_LAYOUT_FB, 6) \ _(XR_SPACE_COMPONENT_TYPE_SPACE_CONTAINER_FB, 7) \ _(XR_SPACE_COMPONENT_TYPE_MAX_ENUM_FB, 0x7FFFFFFF) @@ -2589,6 +2596,43 @@ XR_ENUM_STR(XrResult); _(recommendedMotionVectorImageRectWidth) \ _(recommendedMotionVectorImageRectHeight) \ +#define XR_LIST_STRUCT_XrExtent3DfFB(_) \ + _(width) \ + _(height) \ + _(depth) \ + +#define XR_LIST_STRUCT_XrOffset3DfFB(_) \ + _(x) \ + _(y) \ + _(z) \ + +#define XR_LIST_STRUCT_XrRect3DfFB(_) \ + _(offset) \ + _(extent) \ + +#define XR_LIST_STRUCT_XrSemanticLabelsFB(_) \ + _(type) \ + _(next) \ + _(bufferCapacityInput) \ + _(bufferCountOutput) \ + _(buffer) \ + +#define XR_LIST_STRUCT_XrRoomLayoutFB(_) \ + _(type) \ + _(next) \ + _(floorUuid) \ + _(ceilingUuid) \ + _(wallUuidCapacityInput) \ + _(wallUuidCountOutput) \ + _(wallUuids) \ + +#define XR_LIST_STRUCT_XrBoundary2DFB(_) \ + _(type) \ + _(next) \ + _(vertexCapacityInput) \ + _(vertexCountOutput) \ + _(vertices) \ + #define XR_LIST_STRUCT_XrDigitalLensControlALMALENCE(_) \ _(type) \ _(next) \ @@ -2823,6 +2867,9 @@ XR_ENUM_STR(XrResult); _(XrEventDataSpaceEraseCompleteFB, XR_TYPE_EVENT_DATA_SPACE_ERASE_COMPLETE_FB) \ _(XrCompositionLayerSpaceWarpInfoFB, XR_TYPE_COMPOSITION_LAYER_SPACE_WARP_INFO_FB) \ _(XrSystemSpaceWarpPropertiesFB, XR_TYPE_SYSTEM_SPACE_WARP_PROPERTIES_FB) \ + _(XrSemanticLabelsFB, XR_TYPE_SEMANTIC_LABELS_FB) \ + _(XrRoomLayoutFB, XR_TYPE_ROOM_LAYOUT_FB) \ + _(XrBoundary2DFB, XR_TYPE_BOUNDARY_2D_FB) \ _(XrDigitalLensControlALMALENCE, XR_TYPE_DIGITAL_LENS_CONTROL_ALMALENCE) \ _(XrSpaceContainerFB, XR_TYPE_SPACE_CONTAINER_FB) \ _(XrPassthroughKeyboardHandsIntensityFB, XR_TYPE_PASSTHROUGH_KEYBOARD_HANDS_INTENSITY_FB) \ @@ -3082,6 +3129,8 @@ XR_ENUM_STR(XrResult); _(XR_FB_swapchain_update_state_vulkan, 164) \ _(XR_KHR_swapchain_usage_input_attachment_bit, 166) \ _(XR_FB_space_warp, 172) \ + _(XR_FB_scene, 176) \ + _(XR_EXT_palm_pose, 177) \ _(XR_ALMALENCE_digital_lens_control, 197) \ _(XR_FB_spatial_entity_container, 200) \ _(XR_FB_passthrough_keyboard_hands, 204) \ diff --git a/specification/registry/xr.xml b/specification/registry/xr.xml index a9149a2..e386af2 100644 --- a/specification/registry/xr.xml +++ b/specification/registry/xr.xml @@ -125,7 +125,7 @@ maintained in the default 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, 23) +#define XR_CURRENT_API_VERSION XR_MAKE_VERSION(1, 0, 24) + + float width + float height + float depth + + + float x + float y + float z + + + XrOffset3DfFB offset + XrExtent3DfFB extent + + + XrStructureType type + const void* next + uint32_t bufferCapacityInput + uint32_t bufferCountOutput + char* buffer + + + XrStructureType type + const void* next + XrUuidEXT floorUuid + XrUuidEXT ceilingUuid + uint32_t wallUuidCapacityInput + uint32_t wallUuidCountOutput + XrUuidEXT* wallUuids + + + XrStructureType type + const void* next + uint32_t vertexCapacityInput + uint32_t vertexCountOutput + XrVector2f* vertices + + XrStructureType type @@ -2925,6 +2964,10 @@ maintained in the default branch of the Khronos OpenXR GitHub project. + + + + @@ -4160,6 +4203,38 @@ maintained in the default branch of the Khronos OpenXR GitHub project. XrSpaceContainerFB* spaceContainerOutput + + + XrResult xrGetSpaceBoundingBox2DFB + XrSession session + XrSpace space + XrRect2Df* boundingBox2DOutput + + + XrResult xrGetSpaceBoundingBox3DFB + XrSession session + XrSpace space + XrRect3DfFB* boundingBox3DOutput + + + XrResult xrGetSpaceSemanticLabelsFB + XrSession session + XrSpace space + XrSemanticLabelsFB* semanticLabelsOutput + + + XrResult xrGetSpaceBoundary2DFB + XrSession session + XrSpace space + XrBoundary2DFB* boundary2DOutput + + + XrResult xrGetSpaceRoomLayoutFB + XrSession session + XrSpace space + XrRoomLayoutFB* roomLayoutOutput + + XrResult xrPassthroughLayerSetKeyboardHandsIntensityFB @@ -6372,17 +6447,35 @@ maintained in the default branch of the Khronos OpenXR GitHub project. - + - - + + + + + + + + + + + + + + + + + + + + - + - - + + @@ -6546,7 +6639,7 @@ maintained in the default branch of the Khronos OpenXR GitHub project. - + diff --git a/src/loader/android_utilities.cpp b/src/loader/android_utilities.cpp index 807a775..59d9a99 100644 --- a/src/loader/android_utilities.cpp +++ b/src/loader/android_utilities.cpp @@ -299,7 +299,7 @@ int getActiveRuntimeVirtualManifest(wrap::android::content::Context const &conte auto hasFunctions = cursor.getInt(cursor.getColumnIndex(active_runtime::Columns::HAS_FUNCTIONS)) == 1; __android_log_print(ANDROID_LOG_INFO, TAG, "Got runtime: package: %s, so filename: %s, native lib dir: %s, has functions: %s", - packageName.c_str(), libDir.c_str(), filename.c_str(), (hasFunctions ? "yes" : "no")); + packageName.c_str(), filename.c_str(), libDir.c_str(), (hasFunctions ? "yes" : "no")); auto lib_path = libDir + "/" + filename; cursor.close(); diff --git a/src/loader/build.gradle b/src/loader/build.gradle index befb38e..8bb2e1c 100644 --- a/src/loader/build.gradle +++ b/src/loader/build.gradle @@ -40,6 +40,7 @@ def registry = "${project.repoRoot}/specification/registry/xr.xml" // Python is used to generate header files python { pip "jinja2:2.10.3" + pip "MarkupSafe:2.0.1" minPythonVersion = "3.4" environment = ["PYTHONPATH": scriptDir] diff --git a/src/xr_generated_dispatch_table.c b/src/xr_generated_dispatch_table.c index 91fa0c3..9dbed49 100644 --- a/src/xr_generated_dispatch_table.c +++ b/src/xr_generated_dispatch_table.c @@ -354,6 +354,13 @@ void GeneratedXrPopulateDispatchTable(struct XrGeneratedDispatchTable *table, (get_inst_proc_addr(instance, "xrGetAudioInputDeviceGuidOculus", (PFN_xrVoidFunction*)&table->GetAudioInputDeviceGuidOculus)); #endif // defined(XR_USE_PLATFORM_WIN32) + // ---- XR_FB_scene extension commands + (get_inst_proc_addr(instance, "xrGetSpaceBoundingBox2DFB", (PFN_xrVoidFunction*)&table->GetSpaceBoundingBox2DFB)); + (get_inst_proc_addr(instance, "xrGetSpaceBoundingBox3DFB", (PFN_xrVoidFunction*)&table->GetSpaceBoundingBox3DFB)); + (get_inst_proc_addr(instance, "xrGetSpaceSemanticLabelsFB", (PFN_xrVoidFunction*)&table->GetSpaceSemanticLabelsFB)); + (get_inst_proc_addr(instance, "xrGetSpaceBoundary2DFB", (PFN_xrVoidFunction*)&table->GetSpaceBoundary2DFB)); + (get_inst_proc_addr(instance, "xrGetSpaceRoomLayoutFB", (PFN_xrVoidFunction*)&table->GetSpaceRoomLayoutFB)); + // ---- XR_ALMALENCE_digital_lens_control extension commands (get_inst_proc_addr(instance, "xrSetDigitalLensControlALMALENCE", (PFN_xrVoidFunction*)&table->SetDigitalLensControlALMALENCE)); diff --git a/src/xr_generated_dispatch_table.h b/src/xr_generated_dispatch_table.h index 51d48be..4c577ac 100644 --- a/src/xr_generated_dispatch_table.h +++ b/src/xr_generated_dispatch_table.h @@ -357,6 +357,13 @@ struct XrGeneratedDispatchTable { PFN_xrGetAudioInputDeviceGuidOculus GetAudioInputDeviceGuidOculus; #endif // defined(XR_USE_PLATFORM_WIN32) + // ---- XR_FB_scene extension commands + PFN_xrGetSpaceBoundingBox2DFB GetSpaceBoundingBox2DFB; + PFN_xrGetSpaceBoundingBox3DFB GetSpaceBoundingBox3DFB; + PFN_xrGetSpaceSemanticLabelsFB GetSpaceSemanticLabelsFB; + PFN_xrGetSpaceBoundary2DFB GetSpaceBoundary2DFB; + PFN_xrGetSpaceRoomLayoutFB GetSpaceRoomLayoutFB; + // ---- XR_ALMALENCE_digital_lens_control extension commands PFN_xrSetDigitalLensControlALMALENCE SetDigitalLensControlALMALENCE;