Skip to content

Commit 367284a

Browse files
committed
OpenXR 1.0.2 release (27-August-2019)
Patch release for the 1.0 series. Note that the loader on Windows has a **security fix**: All developers incorporating the OpenXR loader should update immediately. ### GitHub Pull Requests These had been integrated into the public repo incrementally. - General, Build, Other - #112 - Update active runtime search documentation - #106 - List app changes - #114 - Support for building WindowsStore loader and layers, and simplified filename - #96 - Misc cleanup: build simplification, install hello_xr, allow building as subproject, fix null deref in validation layer. - Loader - #102 - Default to catching exceptions, since not being able to catch (and having a non-throwing standard library) is less common - #109 - Factor out some debug-utils related code from the loader, and migrate validation layer to that shared code. - #108 - Update json_stream initialization to improve compatibility - #118 - Fix logic error in Linux active runtime search - #115, #117 - Simplification and refactoring. - Layers - #111 - Some fixes to Validation Layer (as found applying to the UE4 OpenXR plugin) - #110 - Fix cleaning up session labels in validation layer - From OpenXR-Docs: - #26 - Proposal for unbounded space and spatial anchor extensions (vendor extensions) ### Internal issues - General, Build, Other - Allow project to be included in a parent project. (Internal MR 1512) - hello_xr - Fix OpenGL version number to be XrVersion. (Internal MR 1515) - Make D3D11 debug device handling more friendly. (Internal MR 1504) - Registry - Fix error in extension-added function. (Internal MR 1510) - Add Oculus Android extension. (Internal MR 1518) - Reserve additional extension number for Oculus. (Internal MR 1517) - Loader - **Security fix**: Do not use HKEY_CURRENT_USER or environment variables when running as a medium-integrity process or higher on Windows. (Internal issue 1205, internal MR 1511) - Small updates to the loader documentation. ### New extension - `XR_OCULUS_android_session_state_enable`
1 parent 1e14cc0 commit 367284a

32 files changed

Lines changed: 625 additions & 340 deletions

CHANGELOG.SDK.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,58 @@ along with any public pull requests that have been accepted.
1212
In this repository in particular, since it is primarily software,
1313
pull requests may be integrated as they are accepted even between periodic updates.
1414

15+
## OpenXR 1.0.2 release (27-August-2019)
16+
17+
Patch release for the 1.0 series.
18+
19+
Note that the loader on Windows has a **security fix**: All developers incorporating
20+
the OpenXR loader should update immediately.
21+
22+
### GitHub Pull Requests
23+
24+
These had been integrated into the public repo incrementally.
25+
26+
- General, Build, Other
27+
- #112 - Update active runtime search documentation
28+
- #106 - List app changes
29+
- #114 - Support for building WindowsStore loader and layers, and simplified filename
30+
- #96 - Misc cleanup: build simplification, install hello_xr,
31+
allow building as subproject, fix null deref in validation layer.
32+
- Loader
33+
- #102 - Default to catching exceptions, since not being able to catch
34+
(and having a non-throwing standard library) is less common
35+
- #109 - Factor out some debug-utils related code from the loader,
36+
and migrate validation layer to that shared code.
37+
- #108 - Update json_stream initialization to improve compatibility
38+
- #118 - Fix logic error in Linux active runtime search
39+
- #115, #117 - Simplification and refactoring.
40+
- Layers
41+
- #111 - Some fixes to Validation Layer (as found applying to the UE4 OpenXR plugin)
42+
- #110 - Fix cleaning up session labels in validation layer
43+
- From OpenXR-Docs:
44+
- #26 - Proposal for unbounded space and spatial anchor extensions (vendor extensions)
45+
46+
### Internal issues
47+
48+
- General, Build, Other
49+
- Allow project to be included in a parent project. (Internal MR 1512)
50+
- hello_xr
51+
- Fix OpenGL version number to be XrVersion. (Internal MR 1515)
52+
- Make D3D11 debug device handling more friendly. (Internal MR 1504)
53+
- Registry
54+
- Fix error in extension-added function. (Internal MR 1510)
55+
- Add Oculus Android extension. (Internal MR 1518)
56+
- Reserve additional extension number for Oculus. (Internal MR 1517)
57+
- Loader
58+
- **Security fix**: Do not use HKEY_CURRENT_USER or environment variables when
59+
running as a medium-integrity process or higher on Windows.
60+
(Internal issue 1205, internal MR 1511)
61+
- Small updates to the loader documentation.
62+
63+
### New extension
64+
65+
- `XR_OCULUS_android_session_state_enable`
66+
1567
## OpenXR 1.0.1 release (2-August-2019)
1668

1769
Patch release for the 1.0 series.

external/libs/glslang/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ elseif( ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" )
1515
add_definitions( -std=c++11 )
1616
endif()
1717

18-
set( GLSLANG_DIR "${CMAKE_SOURCE_DIR}/../glslang" )
18+
set( GLSLANG_DIR "${PROJECT_SOURCE_DIR}/../glslang" )
1919

2020
# SPIRV
2121
set( SOURCES

specification/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ ifneq (,$(strip $(VERY_STRICT)))
4343
ASCIIDOC := $(ASCIIDOC) --failure-level WARN
4444
endif
4545

46-
SPECREVISION = 1.0.1
46+
SPECREVISION = 1.0.2
4747
REVISION_COMPONENTS = $(subst ., ,$(SPECREVISION))
4848
MAJORMINORVER = $(word 1,$(REVISION_COMPONENTS)).$(word 2,$(REVISION_COMPONENTS))
4949

specification/loader/design.adoc

Lines changed: 47 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -389,15 +389,17 @@ XrResult res = xrCreateInstance(info, instance);
389389
if (XR_SUCCESS != res) {
390390
std::string error_message = "xrCreateInstance failed with result ";
391391
error_message += std::to_string(res);
392-
LoaderLogger::LogErrorMessage(error_message);
392+
LoaderLogger::LogErrorMessage("", error_message);
393393
}
394394
----
395395
396396
[source,c++]
397397
----
398398
// After successfully adding all API layers
399-
LoaderLogger::LogInfoMessage("Loaded all API layers");
399+
LoaderLogger::LogInfoMessage("", "Loaded all API layers");
400400
----
401+
402+
In these examples, the message does not correspond to a named command so an empty string is passed.
401403
====
402404

403405
[[loaderlogrecorder]]
@@ -597,7 +599,7 @@ void LoaderCleanUpMapsForInstance(
597599
----
598600
* pname:loader_instance is a pointer to the `LoaderInstance`
599601
that is going away and needs all references removed from all the
600-
global unordered_maps.
602+
global state.
601603

602604
==== xr_loader_generated.cpp ====
603605

@@ -735,40 +737,32 @@ same `LoaderInstance*`.
735737
XRAPI_ATTR XrResult XRAPI_CALL xrCreateSession(
736738
XrInstance instance,
737739
const XrSessionCreateInfo* createInfo,
738-
XrSession* session) {
739-
try {
740-
LoaderInstance *loader_instance = g_instance_map.Get(instance);
741-
if (nullptr == loader_instance) {
742-
LoaderLogger::LogValidationErrorMessage(
743-
"VUID-xrCreateSession-instance-parameter",
744-
"xrCreateSession",
745-
"instance is not a valid XrInstance",
746-
{XrLoaderLogObjectInfo{instance, XR_OBJECT_TYPE_INSTANCE}});
747-
return XR_ERROR_HANDLE_INVALID;
748-
}
749-
const std::unique_ptr<XrGeneratedDispatchTable>& dispatch_table =
750-
loader_instance->DispatchTable();
751-
XrResult result = XR_SUCCESS;
752-
result = dispatch_table->CreateSession(instance, createInfo, session);
753-
if (XR_SUCCESS == result && nullptr != session) {
754-
XrResult insert_result = g_session_map.Insert(*session, *loader_instance);
755-
if (XR_FAILED(insert_result)) {
756-
LoaderLogger::LogErrorMessage(
757-
"xrCreateSession",
758-
"Failed inserting new session into map: may be null or not unique");
759-
}
740+
XrSession* session) XRLOADER_ABI_TRY {
741+
742+
LoaderInstance *loader_instance = g_instance_map.Get(instance);
743+
if (nullptr == loader_instance) {
744+
LoaderLogger::LogValidationErrorMessage(
745+
"VUID-xrCreateSession-instance-parameter", "xrCreateSession",
746+
"instance is not a valid XrInstance",
747+
{XrSdkLogObjectInfo{instance, XR_OBJECT_TYPE_INSTANCE}});
748+
return XR_ERROR_HANDLE_INVALID;
749+
}
750+
const std::unique_ptr<XrGeneratedDispatchTable> &dispatch_table =
751+
loader_instance->DispatchTable();
752+
XrResult result = XR_SUCCESS;
753+
result = dispatch_table->CreateSession(instance, createInfo, session);
754+
if (XR_SUCCESS == result && nullptr != session) {
755+
XrResult insert_result =
756+
g_session_map.Insert(*session, *loader_instance);
757+
if (XR_FAILED(insert_result)) {
758+
LoaderLogger::LogErrorMessage("xrCreateSession",
759+
"Failed inserting new session into "
760+
"map: may be null or not unique");
760761
}
761-
return result;
762-
} catch (std::bad_alloc &) {
763-
LoaderLogger::LogErrorMessage("xrCreateSession",
764-
"xrCreateSession trampoline failed allocating memory");
765-
return XR_ERROR_OUT_OF_MEMORY;
766-
} catch (...) {
767-
LoaderLogger::LogErrorMessage("xrCreateSession",
768-
"xrCreateSession trampoline encountered an unknown error");
769-
return XR_ERROR_INITIALIZATION_FAILED;
770762
}
763+
return result;
771764
}
765+
XRLOADER_ABI_CATCH_FALLBACK
772766
----
773767
====
774768

@@ -780,32 +774,27 @@ is called.
780774
[source,c++]
781775
----
782776
XRAPI_ATTR XrResult XRAPI_CALL xrDestroySession(
783-
XrSession session) {
784-
try {
785-
LoaderInstance *loader_instance = g_session_map.Get(session);
786-
// Destroy the mapping entry for this item if it was valid.
787-
if (nullptr != loader_instance) {
788-
g_session_map.Erase(session);
789-
}
790-
if (nullptr == loader_instance) {
791-
LoaderLogger::LogValidationErrorMessage(
792-
"VUID-xrDestroySession-session-parameter", "xrDestroySession",
793-
"session is not a valid XrSession",
794-
{XrLoaderLogObjectInfo{session, XR_OBJECT_TYPE_SESSION} });
795-
return XR_ERROR_HANDLE_INVALID;
796-
}
797-
const std::unique_ptr<XrGeneratedDispatchTable>& dispatch_table =
798-
loader_instance->DispatchTable();
799-
XrResult result = XR_SUCCESS;
800-
result = dispatch_table->DestroySession(session);
801-
return result;
802-
} catch (...) {
803-
LoaderLogger::LogErrorMessage("xrDestroySession",
804-
"xrDestroySession trampoline encountered an unknown error");
805-
// NOTE: Most calls only allow XR_SUCCESS as a return code
806-
return XR_SUCCESS;
777+
XrSession session)
778+
XRLOADER_ABI_TRY {
779+
LoaderInstance *loader_instance = g_session_map.Get(session);
780+
// Destroy the mapping entry for this item if it was valid.
781+
if (nullptr != loader_instance) {
782+
g_session_map.Erase(session);
783+
}
784+
if (nullptr == loader_instance) {
785+
LoaderLogger::LogValidationErrorMessage(
786+
"VUID-xrDestroySession-session-parameter", "xrDestroySession",
787+
"session is not a valid XrSession",
788+
{XrSdkLogObjectInfo{session, XR_OBJECT_TYPE_SESSION}});
789+
return XR_ERROR_HANDLE_INVALID;
807790
}
791+
const std::unique_ptr<XrGeneratedDispatchTable> &dispatch_table =
792+
loader_instance->DispatchTable();
793+
XrResult result = XR_SUCCESS;
794+
result = dispatch_table->DestroySession(session);
795+
return result;
808796
}
797+
XRLOADER_ABI_CATCH_FALLBACK
809798
----
810799
====
811800

specification/registry/xr.xml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ maintained in the master branch of the Khronos OpenXR GitHub project.
112112
updates them automatically by processing a line at a time.
113113
-->
114114
<type category="define">// OpenXR current version number.
115-
#define <name>XR_CURRENT_API_VERSION</name> <type>XR_MAKE_VERSION</type>(1, 0, 1)</type>
115+
#define <name>XR_CURRENT_API_VERSION</name> <type>XR_MAKE_VERSION</type>(1, 0, 2)</type>
116116

117117
<!--
118118
NOTE: For avoidance of ambiguity, there should only be 1 <name> tag immediately in
@@ -978,7 +978,7 @@ maintained in the master branch of the Khronos OpenXR GitHub project.
978978
<member><type>XrTime</type> <name>time</name></member>
979979
</type>
980980
<type category="struct" name="XrSpatialAnchorSpaceCreateInfoMSFT">
981-
<member values="XR_TYPE_ACTION_SPACE_CREATE_INFO"><type>XrStructureType</type> <name>type</name></member>
981+
<member values="XR_TYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT"><type>XrStructureType</type> <name>type</name></member>
982982
<member>const <type>void</type>* <name>next</name></member>
983983
<member><type>XrSpatialAnchorMSFT</type> <name>anchor</name></member>
984984
<member><type>XrPosef</type> <name>poseInAnchorSpace</name></member>
@@ -2344,5 +2344,20 @@ maintained in the master branch of the Khronos OpenXR GitHub project.
23442344
<enum value="&quot;XR_MND_headless&quot;" name="XR_MND_HEADLESS_EXTENSION_NAME"/>
23452345
</require>
23462346
</extension>
2347+
2348+
<extension name="XR_OCULUS_extension_44" number="44" type="instance" supported="disabled">
2349+
<require>
2350+
<enum value="1" name="XR_OCULUS_extension_44_SPEC_VERSION"/>
2351+
<enum value="&quot;XR_OCULUS_extension_44&quot;" name="XR_OCULUS_EXTENSION_44_EXTENSION_NAME"/>
2352+
</require>
2353+
</extension>
2354+
2355+
<extension name="XR_OCULUS_android_session_state_enable" number="45" type="instance" supported="openxr">
2356+
<require>
2357+
<enum value="1" name="XR_OCULUS_android_session_state_enable_SPEC_VERSION"/>
2358+
<enum value="&quot;XR_OCULUS_android_session_state_enable&quot;" name="XR_OCULUS_ANDROID_SESSION_STATE_ENABLE_EXTENSION_NAME"/>
2359+
</require>
2360+
</extension>
2361+
23472362
</extensions>
23482363
</registry>

0 commit comments

Comments
 (0)