Skip to content

Commit 18b5197

Browse files
committed
Changes from OpenXR 1.1.47.
GitOrigin-RevId: dea45cd1e7203eda2e30bc02f8918075ca7dc61f
1 parent 82306b1 commit 18b5197

26 files changed

+1550
-165
lines changed

.github/scripts/shared.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
VS_VERSION = "Visual Studio 17 2022"
1111

12-
PLATFORMS = ("Win32", "x64", "ARM64") # "ARM",
12+
PLATFORMS = ("Win32", "x64", "ARM64")
1313

1414
TRUE_FALSE = (True, False)
1515

changes/conformance/mr.3675.gl.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fix: Account for "depends" of extensions in generated dependencies for automated availability tests

changes/conformance/mr.3683.gl.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
- issue.2435.gl
3+
---
4+
- Fix: Do not clamp max layers in MaxLayers-noninteractive test as we test submitting max+1 expecting failure. Use a fixed 4 swapchains to limit resource usage instead.

changes/conformance/mr.3705.gl.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
- mr.3705.gl
3+
- mr.3714.gl
4+
---
5+
New test: Add test cases for XrPose containing NaN.

changes/conformance/mr.3708.gl.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
- issue.2384.gl
3+
---
4+
New test: Validate that the `XrFovf` values returned from `xrLocateViews` are valid, plus warn if left == right or up == down are equal (0 FOV in either direction) as that is permitted but likely to lead to undefined behavior when applications compute their projection matrix.

changes/conformance/mr.3719.gl.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improvement: Update Android target SDK version to 34 to eliminate Play Protect warning on install, and verify runtime can handle applications built with updated target SDK. (Minimum SDK remains 24.)

changes/conformance/mr.3726.gl.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Fix: Changed interactive MaxLayer test to MinLayer test to more accurately reflect specification constraints.
2+
- Fix: Changed the MaxLayer-noninteractive test to emit a warning when failing to submit `maxLayer` layers, instead of an error.

specification/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ endif
3939
VERSIONS := XR_VERSION_1_0 XR_VERSION_1_1 XR_LOADER_VERSION_1_0
4040
VERSIONOPTIONS := $(foreach version,$(VERSIONS),-feature $(version))
4141

42-
SPECREVISION = 1.1.46
42+
SPECREVISION = 1.1.47
4343
REVISION_COMPONENTS = $(subst ., ,$(SPECREVISION))
4444
MAJORMINORVER = $(word 1,$(REVISION_COMPONENTS)).$(word 2,$(REVISION_COMPONENTS))
4545

specification/registry/xr.xml

+1,111-32
Large diffs are not rendered by default.

specification/scripts/check_spec_links.py

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
# TODO move permissions into XML eventually
4141
EXTRA_REFPAGES = (
4242
'org.khronos.openxr.permission.ext.HAND_TRACKING',
43+
44+
# Used by multiple XR_BD_spatial_* extensions
45+
'com.picovr.permission.SPATIAL_DATA',
4346
)
4447

4548
# These are marked with the code: macro

specification/scripts/reg.py

+4
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,9 @@ def markRequired(self, featurename, feature, required):
11121112
# We will eventually use these `interaction_profile_path`s but for the
11131113
# moment we just need them to exist so we can run schema validation.
11141114
pass
1115+
elif extendElem.get('interaction_profile_predicate'):
1116+
# These are processed separately.
1117+
pass
11151118
else:
11161119
self.gen.logMsg('warn', 'extend type:', extendType, 'IS NOT SUPPORTED')
11171120

@@ -1127,6 +1130,7 @@ def getAlias(self, elem, dict):
11271130
typeinfo = self.lookupElementInfo(name, dict)
11281131
if not typeinfo:
11291132
self.gen.logMsg('error', name, 'is not a known name')
1133+
return None
11301134
alias = typeinfo.elem.get('alias')
11311135

11321136
return alias

specification/scripts/spec_tools/consistency_tools.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ def check_command_return_codes(self, name, type_info,
552552
"- none of these types:",
553553
required_types,
554554
"found in the set of referenced types",
555-
referenced_types)
555+
sorted(referenced_types))
556556

557557
###
558558
# Utility properties/methods

specification/scripts/xml_consistency.py

+4
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ def __init__(self):
200200
"Missing expected return code(s) XR_ERROR_HANDLE_INVALID,XR_ERROR_INSTANCE_LOST implied because of input of type XrInstance",
201201
"Missing expected return code(s) XR_ERROR_INSTANCE_LOST,XR_ERROR_HANDLE_INVALID implied because of input of type XrInstance",
202202
),
203+
# Some derived structs use two-call idiom
204+
"xrGetSpatialEntityComponentDataBD": (
205+
"Unexpected return code XR_ERROR_SIZE_INSUFFICIENT - none of these types: {'uint32_t'} found in the set of referenced types ['XrSenseDataSnapshotBD', 'XrSpatialEntityComponentDataBaseHeaderBD', 'XrSpatialEntityComponentGetInfoBD', 'XrSpatialEntityComponentTypeBD', 'XrSpatialEntityIdBD', 'XrStructureType', 'void']",
206+
),
203207
# XrLoaderInterfaceStructs doesn't match the OpenXR pattern :(
204208
"XrLoaderInterfaceStructs": (
205209
"Got an enum value whose name does not match the pattern: got XR_LOADER_INTERFACE_STRUCT_API_LAYER_CREATE_INFO but expected something that started with XR_LOADER_INTERFACE_STRUCTS_ due to typename being XrLoaderInterfaceStructs",

src/conformance/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ android {
5858
applicationId "org.khronos.openxr.cts"
5959
// for Vulkan, need at least 24
6060
minSdkVersion 24
61+
targetSdkVersion 34
6162

6263
versionName = project.versionOpenXR.toString() + project.versionQualifier
6364
versionCode = project.versionOpenXR.getVersionCode()

src/conformance/conformance_layer/RuntimeFailure.cpp

+11
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,14 @@ void ValidateXrVector3f(ConformanceHooksBase* conformanceHook, const XrVector3f&
163163
"%s is not a valid XrVector3f value: (%f, %f, %f)", valueName, v.x, v.y, v.z);
164164
}
165165
}
166+
167+
void ValidateXrFovf(ConformanceHooksBase* conformanceHook, const XrFovf& fov, const char* valueName, const char* xrFunctionName)
168+
{
169+
const float pi_2 = std::acos(0.0f);
170+
auto isValidFov = [pi_2](float v) { return std::isfinite(v) && (-pi_2 < v && v < pi_2); };
171+
if (!isValidFov(fov.angleLeft) || !isValidFov(fov.angleRight) || !isValidFov(fov.angleUp) || !isValidFov(fov.angleDown)) {
172+
conformanceHook->ConformanceFailure(XR_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT, xrFunctionName,
173+
"%s is not a valid XrFovf value: (%f, %f, %f, %f)", valueName, fov.angleLeft, fov.angleRight,
174+
fov.angleUp, fov.angleDown);
175+
}
176+
}

src/conformance/conformance_layer/RuntimeFailure.h

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ void ValidateFloat(ConformanceHooksBase* conformanceHook, float value, float min
5252
void ValidateXrTime(ConformanceHooksBase* conformanceHook, XrTime time, const char* valueName, const char* xrFunctionName);
5353
void ValidateXrQuaternion(ConformanceHooksBase* conformanceHook, const XrQuaternionf& q, const char* valueName, const char* xrFunctionName);
5454
void ValidateXrVector3f(ConformanceHooksBase* conformanceHook, const XrVector3f& v, const char* valueName, const char* xrFunctionName);
55+
void ValidateXrFovf(ConformanceHooksBase* conformanceHook, const XrFovf& fov, const char* valueName, const char* xrFunctionName);
5556

5657
// clang-format off
5758
#define ENUM_CASE_BOOL(name, val) case name:
@@ -115,4 +116,5 @@ void ValidateXrEnum(ConformanceHooksBase* conformanceHook, TEnum value, const ch
115116
#define VALIDATE_XRTIME(value) ValidateXrTime(this, value, #value, __func__)
116117
#define VALIDATE_QUATERNION(value) ValidateXrQuaternion(this, value, #value, __func__)
117118
#define VALIDATE_VECTOR3F(value) ValidateXrVector3f(this, value, #value, __func__)
119+
#define VALIDATE_FOVF(value) ValidateXrFovf(this, value, #value, __func__)
118120
#define VALIDATE_XRENUM(value) ValidateXrEnum(this, value, #value, __func__)

src/conformance/conformance_layer/Session.cpp

+14-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,20 @@ XrResult ConformanceHooks::xrLocateViews(XrSession session, const XrViewLocateIn
270270
VALIDATE_VECTOR3F(currentView.pose.position);
271271
}
272272

273-
// TODO: Validate FOV.
273+
VALIDATE_FOVF(currentView.fov);
274+
275+
if (currentView.fov.angleLeft == currentView.fov.angleRight) {
276+
POSSIBLE_NONCONFORMANT(
277+
"fov.angleLeft (%f) and fov.angleRight (%f) were equal."
278+
" This is legal, but applications without special handling for this may have trouble.",
279+
currentView.fov.angleLeft, currentView.fov.angleRight);
280+
}
281+
if (currentView.fov.angleUp == currentView.fov.angleDown) {
282+
POSSIBLE_NONCONFORMANT(
283+
"fov.angleUp (%f) and fov.angleDown (%f) were equal."
284+
" This is legal, but applications without special handling for this may have trouble.",
285+
currentView.fov.angleUp, currentView.fov.angleDown);
286+
}
274287
}
275288
}
276289
}

0 commit comments

Comments
 (0)