Skip to content

Commit

Permalink
OpenXR CTS 1.0.33.0 (2024-01-18)
Browse files Browse the repository at this point in the history
-   Conformance Tests
    -   Fix: Refactor Pbr::Model into an immutable Pbr::Model and
        Pbr::Instance that holds the state for one drawn instance of the
        model. This corrects the known issue in the self-tests mentioned
        in a previous changelog. (internal MR 3079, internal issue 2139,
        internal MR 3141)
    -   Fix: Avoid artificial error precedence requirement in test for
        XR_ERROR_GRAPHICS_DEVICE_INVALID, by making sure to call the
        “check graphics requirements” function if applicable. (internal
        MR 3093, internal issue 2155)
    -   Fix: Remove extra xrSyncActions call in test_glTFRendering to
        resolve interaction issue. (internal MR 3107, internal issue
        2163)
    -   Fix: Skip XR_MSFT_controller_model interactive test if extension
        is not supported. (internal MR 3146, internal issue 2187)
    -   Improvement: Adjust StringToPath utility function to be easier
        to use. (internal MR 2076)
    -   Improvement: Simplify how some tests refer to the main OpenXR
        handles. (internal MR 3023)
    -   Improvement: Make AutoBasicSession use EventReader to support
        event multiplexing. (internal MR 3023)
    -   Improvement: Do not require system support for
        XR_EXT_eye_gaze_interaction before running XrPath and
        interaction profile related tests. Paths are valid as long as
        the extension is offered and enabled, regardless of whether
        there is system support for eye tracking. (internal MR 3055)
    -   Improvement: General code cleanup, warning fixes, clang-tidy
        fixes, and refactoring to improve flexibility and
        maintainability. (internal MR 3082, internal MR 3023)
    -   Improvement: On Android, log using the “FATAL” severity before
        triggering an abort from the conformance layer. (internal MR
        3087)
    -   Improvement: Exclude loader negotiation functions (added to XML
        and ratified spec in 1.0.33) from the list of functions
        automatically tested by the conformance suite. (internal MR
        3113)
    -   New test: Check behavior for actions created without subaction
        paths, but queried using subaction paths. (internal MR 3068)

GitOrigin-RevId: a8b4c88506ea13655ef848c38d5a158e36977205
  • Loading branch information
rpavlik committed Jan 18, 2024
1 parent 1234a8d commit e50152f
Show file tree
Hide file tree
Showing 92 changed files with 1,308 additions and 1,027 deletions.
49 changes: 49 additions & 0 deletions CHANGELOG.CTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,55 @@ particular, since it is primarily software, pull requests may be integrated as
they are accepted even between periodic updates. However, versions that are not
signed tags on the `approved` branch are not valid for conformance submission.

## OpenXR CTS 1.0.33.0 (2024-01-18)

- Conformance Tests
- Fix: Refactor Pbr::Model into an immutable Pbr::Model and Pbr::Instance that
holds the state for one drawn instance of the model. This corrects the known
issue in the self-tests mentioned in a previous changelog.
([internal MR 3079](https://gitlab.khronos.org/openxr/openxr/merge_requests/3079),
[internal issue 2139](https://gitlab.khronos.org/openxr/openxr/issues/2139),
[internal MR 3141](https://gitlab.khronos.org/openxr/openxr/merge_requests/3141))
- Fix: Avoid artificial error precedence requirement in test for
`XR_ERROR_GRAPHICS_DEVICE_INVALID`, by making sure to call the "check graphics
requirements" function if applicable.
([internal MR 3093](https://gitlab.khronos.org/openxr/openxr/merge_requests/3093),
[internal issue 2155](https://gitlab.khronos.org/openxr/openxr/issues/2155))
- Fix: Remove extra `xrSyncActions` call in `test_glTFRendering` to resolve
interaction issue.
([internal MR 3107](https://gitlab.khronos.org/openxr/openxr/merge_requests/3107),
[internal issue 2163](https://gitlab.khronos.org/openxr/openxr/issues/2163))
- Fix: Skip `XR_MSFT_controller_model` interactive test if extension is not
supported.
([internal MR 3146](https://gitlab.khronos.org/openxr/openxr/merge_requests/3146),
[internal issue 2187](https://gitlab.khronos.org/openxr/openxr/issues/2187))
- Improvement: Adjust `StringToPath` utility function to be easier to use.
([internal MR 2076](https://gitlab.khronos.org/openxr/openxr/merge_requests/2076))
- Improvement: Simplify how some tests refer to the main OpenXR handles.
([internal MR 3023](https://gitlab.khronos.org/openxr/openxr/merge_requests/3023))
- Improvement: Make `AutoBasicSession` use `EventReader` to support event
multiplexing.
([internal MR 3023](https://gitlab.khronos.org/openxr/openxr/merge_requests/3023))
- Improvement: Do not require system support for `XR_EXT_eye_gaze_interaction`
before running XrPath and interaction profile related tests. Paths are valid as
long as the extension is offered and enabled, regardless of whether there is
system support for eye tracking.
([internal MR 3055](https://gitlab.khronos.org/openxr/openxr/merge_requests/3055))
- Improvement: General code cleanup, warning fixes, clang-tidy fixes, and
refactoring to improve flexibility and maintainability.
([internal MR 3082](https://gitlab.khronos.org/openxr/openxr/merge_requests/3082),
[internal MR 3023](https://gitlab.khronos.org/openxr/openxr/merge_requests/3023))
- Improvement: On Android, log using the "FATAL" severity before triggering an
abort from the conformance layer.
([internal MR 3087](https://gitlab.khronos.org/openxr/openxr/merge_requests/3087))
- Improvement: Exclude loader negotiation functions (added to XML and ratified
spec in 1.0.33) from the list of functions automatically tested by the
conformance suite.
([internal MR 3113](https://gitlab.khronos.org/openxr/openxr/merge_requests/3113))
- New test: Check behavior for actions created without subaction paths, but
queried using subaction paths.
([internal MR 3068](https://gitlab.khronos.org/openxr/openxr/merge_requests/3068))

## OpenXR CTS 1.0.32.1 (2023-12-14)

A notable change in this release, is that the build system now checks for git
Expand Down
3 changes: 0 additions & 3 deletions changes/conformance/mr.3023.gl.md

This file was deleted.

1 change: 0 additions & 1 deletion changes/conformance/mr.3087.gl.md

This file was deleted.

2 changes: 1 addition & 1 deletion specification/registry/xr.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<?xml-model href="registry.rnc" type="application/relax-ng-compact-syntax"?>
<?xml-model href="registry.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
Expand Down
23 changes: 19 additions & 4 deletions src/conformance/conformance_layer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ add_library(
XrApiLayer_runtime_conformance MODULE
${LOCAL_SOURCE}
${LOCAL_HEADERS}
XrApiLayer_conformance_layer.def
${PROJECT_BINARY_DIR}/src/xr_generated_dispatch_table.c
${CMAKE_CURRENT_BINARY_DIR}/gen_dispatch.cpp
${CMAKE_CURRENT_BINARY_DIR}/gen_dispatch.h
Expand Down Expand Up @@ -107,17 +106,33 @@ if(ANDROID)
)
endif()

if(APPLE)
# Dynamic Library:
# - Make build depend on the module definition/version script/export map
# - Add the linker flag (except windows)
if(WIN32)
target_sources(
XrApiLayer_runtime_conformance
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/XrApiLayer_conformance_layer.def"
)
elseif(APPLE)
set_target_properties(
XrApiLayer_runtime_conformance
PROPERTIES
LINK_FLAGS
"-Wl,-exported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/XrApiLayer_conformance_layer.expsym"
)
elseif(NOT WIN32)
target_sources(
XrApiLayer_runtime_conformance
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/XrApiLayer_conformance_layer.expsym"
)
else()
set_target_properties(
XrApiLayer_runtime_conformance
PROPERTIES LINK_FLAGS "-Wl,-Bsymbolic,--exclude-libs,ALL"
PROPERTIES LINK_FLAGS "-Wl,--version-script=\"${CMAKE_CURRENT_SOURCE_DIR}/XrApiLayer_conformance_layer.map\""
)
target_sources(
XrApiLayer_runtime_conformance
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/XrApiLayer_conformance_layer.map"
)
endif()

Expand Down
5 changes: 3 additions & 2 deletions src/conformance/conformance_layer/RuntimeFailure.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ void ValidateXrQuaternion(ConformanceHooksBase* conformanceHook, const XrQuatern
void ValidateXrVector3f(ConformanceHooksBase* conformanceHook, const XrVector3f& v, const char* valueName, const char* xrFunctionName);

// clang-format off
#define ENUM_CASE_BOOL(name, val) case name: return true;
#define ENUM_CASE_BOOL(name, val) case name:
#define MAKE_IS_VALID_ENUM_VALUE(enumType, zeroIsValid) \
inline bool is_valid_enum_val(enumType e) { \
if (!zeroIsValid && e == 0) return false; \
else if (e == 0x7FFFFFFF) return false; \
if (e == 0x7FFFFFFF) return false; \
\
switch (e) { \
XR_LIST_ENUM_##enumType(ENUM_CASE_BOOL) \
return true; \
default: return false; \
} \
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
; Copyright (c) 2019-2024, The Khronos Group Inc.
;
; SPDX-License-Identifier: Apache-2.0

EXPORTS
xrNegotiateLoaderApiLayerInterface

This file was deleted.

12 changes: 12 additions & 0 deletions src/conformance/conformance_layer/XrApiLayer_conformance_layer.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
Copyright (c) 2019-2024, The Khronos Group Inc.

SPDX-License-Identifier: Apache-2.0
*/

{
global:
xrNegotiateLoaderApiLayerInterface;
local:
*;
};
10 changes: 4 additions & 6 deletions src/conformance/conformance_test/test_LayerComposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "conformance_framework.h"
#include "utilities/throw_helpers.h"
#include "utilities/types_and_constants.h"
#include "utilities/utils.h"
#include "utilities/xrduration_literals.h"

#include <catch2/catch_test_macros.hpp>
#include <openxr/openxr.h>
Expand Down Expand Up @@ -309,8 +309,7 @@ namespace Conformance
interactionManager.AttachActionSets();
compositionHelper.BeginSession();

const XrSpace localSpace =
compositionHelper.CreateReferenceSpace(XR_REFERENCE_SPACE_TYPE_LOCAL, XrPosef{Quat::Identity, {0, 0, 0}});
const XrSpace localSpace = compositionHelper.CreateReferenceSpace(XR_REFERENCE_SPACE_TYPE_LOCAL, XrPosefCPP());

const std::vector<XrViewConfigurationView> viewProperties = compositionHelper.EnumerateConfigurationViews();

Expand Down Expand Up @@ -382,8 +381,7 @@ namespace Conformance
interactionManager.AttachActionSets();
compositionHelper.BeginSession();

const XrSpace localSpace =
compositionHelper.CreateReferenceSpace(XR_REFERENCE_SPACE_TYPE_LOCAL, XrPosef{Quat::Identity, {0, 0, 0}});
const XrSpace localSpace = compositionHelper.CreateReferenceSpace(XR_REFERENCE_SPACE_TYPE_LOCAL, XrPosefCPP());

const std::vector<XrViewConfigurationView> viewProperties = compositionHelper.EnumerateConfigurationViews();

Expand Down Expand Up @@ -524,7 +522,7 @@ namespace Conformance
XrActionSpaceCreateInfo spaceCreateInfo{XR_TYPE_ACTION_SPACE_CREATE_INFO};
spaceCreateInfo.action = gripPoseAction;
spaceCreateInfo.subactionPath = subactionPaths[i];
spaceCreateInfo.poseInActionSpace = {{0, 0, 0, 1}, {0, 0, 0}};
spaceCreateInfo.poseInActionSpace = XrPosefCPP();
XRC_CHECK_THROW_XRCMD(xrCreateActionSpace(session, &spaceCreateInfo, &space));
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace Conformance
MakeSystemPropertiesBoolChecker(XrSystemEyeGazeInteractionPropertiesEXT{XR_TYPE_SYSTEM_EYE_GAZE_INTERACTION_PROPERTIES_EXT},
&XrSystemEyeGazeInteractionPropertiesEXT::supportsEyeGazeInteraction);

TEST_CASE("XR_EXT_eye_gaze_interaction", "[scenario][interactive][no_auto][XR_EXT_eye_gaze_interaction]")
TEST_CASE("XR_EXT_eye_gaze_interaction-system_support_optional", "[XR_EXT_eye_gaze_interaction]")
{
GlobalData& globalData = GetGlobalData();
if (!globalData.IsInstanceExtensionSupported(XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME)) {
Expand All @@ -70,12 +70,7 @@ namespace Conformance

SECTION("Extension enabled")
{
AutoBasicInstance instance({XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME}, AutoBasicInstance::createSystemId);
XrSystemId systemId = instance.systemId;
if (!SystemSupportsEyeGazeInteraction(instance, systemId)) {
// This runtime does support eye gaze, but this headset does not which is fine.
SKIP("System does not support eye gaze interaction");
}
AutoBasicInstance instance({XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME});

SECTION("Create and destroy eye gaze actions")
{
Expand Down Expand Up @@ -206,14 +201,7 @@ namespace Conformance
// Verify that eye gaze interaction input can be combined with other input sources.
// Use Simple Controller profile as opposed to vendor-specific inputs for broader coverage.

AutoBasicInstance instance({XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME}, AutoBasicInstance::createSystemId);
XrSystemId systemId = instance.systemId;
if (!SystemSupportsEyeGazeInteraction(instance, systemId)) {
// This runtime does support eye gaze, but this headset does not which is fine.
WARN("System does not support eye gaze interaction");
return;
}

AutoBasicInstance instance({XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME});
AutoBasicSession session(AutoBasicSession::beginSession, instance);

// Create action set
Expand Down Expand Up @@ -280,6 +268,14 @@ namespace Conformance
XrSpace gazeActionSpace{XR_NULL_HANDLE};
REQUIRE_RESULT(xrCreateActionSpace(session, &createActionSpaceInfo, &gazeActionSpace), XR_SUCCESS);
}
}

TEST_CASE("XR_EXT_eye_gaze_interaction", "[scenario][interactive][no_auto][XR_EXT_eye_gaze_interaction]")
{
GlobalData& globalData = GetGlobalData();
if (!globalData.IsInstanceExtensionSupported(XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME)) {
SKIP(XR_EXT_EYE_GAZE_INTERACTION_EXTENSION_NAME " not supported");
}

SECTION("Localize eye gaze paths")
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@
#include "utilities/generator.h"
#include "utilities/bitmask_generator.h"
#include "utilities/bitmask_to_string.h"
#include "utilities/xrduration_literals.h"

#include <catch2/catch_test_macros.hpp>
#include <openxr/openxr.h>

#include <array>
#include <chrono>
#include <memory>
#include <ostream>
#include <ratio>
#include <vector>

namespace Conformance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "conformance_framework.h"
#include "conformance_utils.h"
#include "utilities/bitmask_generator.h"
#include "utilities/xrduration_literals.h"

#include <catch2/catch_test_macros.hpp>
#include <openxr/openxr.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@
#include "utilities/bitmask_generator.h"
#include "utilities/bitmask_to_string.h"
#include "utilities/generator.h"
#include "utilities/xrduration_literals.h"

#include <catch2/catch_test_macros.hpp>
#include <openxr/openxr.h>

#include <array>
#include <chrono>
#include <memory>
#include <ostream>
#include <ratio>
#include <vector>

namespace Conformance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#ifdef XR_USE_PLATFORM_WIN32
#include "utilities/utils.h"
#include "utilities/xrduration_literals.h"
#include "conformance_utils.h"
#include "conformance_framework.h"
#include <catch2/catch_test_macros.hpp>
Expand Down
23 changes: 17 additions & 6 deletions src/conformance/conformance_test/test_XR_MSFT_controller_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ namespace Conformance
syncInfo.countActiveActionSets = 1;

XrActionSpaceCreateInfo actionSpaceCreateInfo{XR_TYPE_ACTION_SPACE_CREATE_INFO};
actionSpaceCreateInfo.poseInActionSpace = XrPosef{Quat::Identity, {0, 0, 0}};
actionSpaceCreateInfo.poseInActionSpace = XrPosefCPP();

std::vector<XrSpace> gripSpaces;
for (std::shared_ptr<IInputTestDevice> controller : {leftHandInputDevice, rightHandInputDevice}) {
Expand Down Expand Up @@ -309,6 +309,13 @@ namespace Conformance

TEST_CASE("XR_MSFT_controller_model_interactive", "[scenario][interactive][no_auto]")
{

GlobalData& globalData = GetGlobalData();

if (!globalData.IsInstanceExtensionSupported(XR_MSFT_CONTROLLER_MODEL_EXTENSION_NAME)) {
SKIP(XR_MSFT_CONTROLLER_MODEL_EXTENSION_NAME " not supported");
}

const char* instructions =
"Ensure the controller model is positioned in the same position as the physical controller. "
"Press menu to complete the validation.";
Expand Down Expand Up @@ -338,7 +345,8 @@ namespace Conformance
XrPath subactionPath;
XrSpace space;
XrControllerModelKeyMSFT modelKey;
GLTFHandle controllerModel;
GLTFModelHandle controllerModel;
GLTFModelInstanceHandle controllerModelInstance;
ControllerAnimationHandler animationHandler;
};

Expand Down Expand Up @@ -394,6 +402,7 @@ namespace Conformance

compositionHelper.BeginSession();
XrSession session = compositionHelper.GetSession();
auto& graphicsPlugin = GetGlobalData().graphicsPlugin;

// Create the instructional quad layer placed to the left.
XrCompositionLayerQuad* const instructionsQuad =
Expand Down Expand Up @@ -450,6 +459,7 @@ namespace Conformance
ext.xrLoadControllerModelMSFT_(session, hand.modelKey, modelBufferSize, &modelBufferSize, modelBuffer.data()));

hand.controllerModel = GetGlobalData().graphicsPlugin->LoadGLTF(modelBuffer);
hand.controllerModelInstance = GetGlobalData().graphicsPlugin->CreateGLTFModelInstance(hand.controllerModel);

XrControllerModelPropertiesMSFT modelProperties{XR_TYPE_CONTROLLER_MODEL_PROPERTIES_MSFT};
REQUIRE_RESULT_UNQUALIFIED_SUCCESS(ext.xrGetControllerModelPropertiesMSFT_(session, hand.modelKey, &modelProperties));
Expand All @@ -458,8 +468,8 @@ namespace Conformance
modelProperties.nodeProperties = nodePropertiesBuffer.data();
REQUIRE_RESULT_UNQUALIFIED_SUCCESS(ext.xrGetControllerModelPropertiesMSFT_(session, hand.modelKey, &modelProperties));

hand.animationHandler =
ControllerAnimationHandler(GetGlobalData().graphicsPlugin->GetModel(hand.controllerModel), nodePropertiesBuffer);
hand.animationHandler = ControllerAnimationHandler{*GetGlobalData().graphicsPlugin->GetPbrModel(hand.controllerModel),
std::move(nodePropertiesBuffer)};

ReportF("Loaded model for key");
}
Expand All @@ -481,9 +491,10 @@ namespace Conformance
modelState.nodeStates = nodeStateBuffer.data();
REQUIRE_RESULT_UNQUALIFIED_SUCCESS(ext.xrGetControllerModelStateMSFT_(session, hand.modelKey, &modelState));

hand.animationHandler.UpdateControllerParts(nodeStateBuffer);
hand.animationHandler.UpdateControllerParts(nodeStateBuffer,
graphicsPlugin->GetModelInstance(hand.controllerModelInstance));

renderedGLTFs.push_back(GLTFDrawable{hand.controllerModel, spaceLocation.pose});
renderedGLTFs.push_back(GLTFDrawable{hand.controllerModelInstance, spaceLocation.pose});
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "utilities/bitmask_generator.h"
#include "utilities/bitmask_to_string.h"
#include "utilities/generator.h"
#include "utilities/xrduration_literals.h"

#include <catch2/catch_test_macros.hpp>
#include <openxr/openxr.h>
Expand All @@ -30,7 +31,6 @@
#include <functional>
#include <iterator>
#include <memory>
#include <ostream>
#include <vector>

namespace Conformance
Expand Down
Loading

0 comments on commit e50152f

Please sign in to comment.