Skip to content

Commit

Permalink
OpenXR CTS 1.0.29.0 (2023-09-07)
Browse files Browse the repository at this point in the history
-   Conformance Tests
    -   Fix: Use actual acquired image index in swapchain rendering
        test. (internal MR 2746)
    -   Fix: Do not use Catch2 assertion macros in graphics plugin
        methods that may be called before the first test case execution
        begins. (internal MR 2756, internal issue 1387)
    -   Fix: spelling. (internal MR 2766)
    -   Fix: Fix <queries> element contents in Android manifest.
        (internal MR 2840, internal issue 2053)
    -   Fix: Allow building CTS with mingw compiler. (internal MR 2850)
    -   Fix: Do not create an XrInstance during XML writing process, to
        prevent possible crash if one already exists. (internal MR 2927)
    -   Improvement: Refactor utilities that do not depend on Catch2
        into a separate internal library. (internal MR 2669)
    -   Improvement: Refactor and standardize creation of swapchain
        image format tables, fixing some Vulkan invalid usage. (internal
        MR 2685, internal issue 1978)
    -   Improvement: Make composition test help/example world locked but
        based on initial view, for more natural reading. (internal MR
        2689)
    -   Improvement: Cleanup and code quality work. (internal MR 2704,
        internal MR 2717, internal MR 2784, internal MR 2785, internal
        MR 2808, internal MR 2809)
    -   Improvement: Add separate license file for gradlew and
        gradlew.bat (internal MR 2725)
    -   Improvement: Optionally poll xrGetSystem before running test
        cases. (internal MR 2735, OpenXR-CTS issue 53, internal issue
        1947)
    -   Improvement: Select the first enumerated environment blend mode
        by default, rather than always using “opaque” (internal MR 2736,
        internal issue 1950)
    -   Improvement: Migrate more tests to use the SKIP macro when
        appropriate. (internal MR 2737, internal issue 1932)
    -   Improvement: Change background color based on selected blend
        mode: black for additive and transparent for alpha blend.
        (internal MR 2883, internal issue 1949)
    -   Improvement: Add extra information to errors in case of CTS
        timeouts. (internal MR 2889)
    -   Improvement: Remove conditional XR_KHR_headless support as the
        extension is not part of OpenXR 1.0. (internal MR 2901)
    -   Improvement: Remove empty XR_EXT_performance_settings test that
        was never implemented (internal MR 2902)
    -   Improvement: Fix names of tests to not have spaces, and adjust
        tags so that the instructions in the README will cause all tests
        to be executed. (internal MR 2924)
    -   New test: Verify two-call idiom behavior of
        XR_MSFT_controller_model as well as handling of invalid model
        keys. (internal MR 2387, internal MR 2858)
    -   New test: Added XR_EXT_plane_detection extension. (internal MR
        2510, internal MR 2751, internal MR 2676)
    -   New test: Add non-interactive test for XR_EXT_palm_pose vendor
        extension. (internal MR 2672)
    -   New test: Add joint query to non-interactive test for
        XR_EXT_hand_tracking. (internal MR 2729, internal MR 2795,
        internal MR 2858, internal MR 2916)
    -   New test: Add test for calling xrAcquireSwapchainImage multiple
        times without calling xrEndFrame. (internal MR 2730)
    -   New test: Add additional tests for XR_EXT_debug_utils based on
        the test app loader_test. (internal MR 2775)
    -   New test: Add checks for palm position and palm and wrist
        orientation to XR_EXT_hand_tracking interactive tests. (internal
        MR 2798)
    -   New test: Add unbound action set to action sets test. (internal
        MR 2862, internal issue 2043)
    -   New test: Add conformance test for calling xrDestroyInstance
        from a different thread to xrCreateInstance, and
        xrDestroySession on a different thread to xrCreateSession.
        (internal MR 2863)
    -   New test: Add interactive conformance test for infrequently
        updated swapchains. (internal MR 2873)
    -   New test: Add conformance tests for xrCreateSession failing,
        then passing (internal MR 2884)
    -   New test: Test xrSyncActions with no active action sets.
        (internal MR 2903)
    -   New test: Test calling xrLocateSpace with timestamps up to 1s
        old. (internal MR 2904)

GitOrigin-RevId: 2b2967dda2f7cc444561b8547fedf70a5613c6a1
  • Loading branch information
rpavlik committed Sep 18, 2023
1 parent d3797bd commit 4fa1925
Show file tree
Hide file tree
Showing 80 changed files with 1,012 additions and 580 deletions.
4 changes: 2 additions & 2 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ Comment: Unmodified, vendored copy of a subset of the tiny-gltf repo v2.8.9
Files: src/external/d3dx12/*
Copyright: Copyright (c) Microsoft Corporation.
License: MIT
Comment: Unmodified, vendored copy of DirectX-Headers commit da7aedb
of https://github.com/microsoft/DirectX-Headers filtered to just d3dx12 headers
Comment: Unmodified, vendored copy of d3dx12.h from directx-vs-templates commit 86b9c45
This repo includes ifdefs to improve compatibility with older Windows SDK verions.

Files: src/external/mikktspace/*
Copyright: 2011 by Morten S. Mikkelsen
Expand Down
104 changes: 104 additions & 0 deletions CHANGELOG.CTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,110 @@ 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.29.0 (2023-09-07)

- Conformance Tests
- Fix: Use actual acquired image index in swapchain rendering test.
([internal MR 2746](https://gitlab.khronos.org/openxr/openxr/merge_requests/2746))
- Fix: Do not use Catch2 assertion macros in graphics plugin methods that may be
called before the first test case execution begins.
([internal MR 2756](https://gitlab.khronos.org/openxr/openxr/merge_requests/2756),
[internal issue 1387](https://gitlab.khronos.org/openxr/openxr/issues/1387))
- Fix: spelling.
([internal MR 2766](https://gitlab.khronos.org/openxr/openxr/merge_requests/2766))
- Fix: Fix `<queries>` element contents in Android manifest.
([internal MR 2840](https://gitlab.khronos.org/openxr/openxr/merge_requests/2840),
[internal issue 2053](https://gitlab.khronos.org/openxr/openxr/issues/2053))
- Fix: Allow building CTS with mingw compiler.
([internal MR 2850](https://gitlab.khronos.org/openxr/openxr/merge_requests/2850))
- Fix: Do not create an `XrInstance` during XML writing process, to prevent
possible crash if one already exists.
([internal MR 2927](https://gitlab.khronos.org/openxr/openxr/merge_requests/2927))
- Improvement: Refactor utilities that do not depend on Catch2 into a separate
internal library.
([internal MR 2669](https://gitlab.khronos.org/openxr/openxr/merge_requests/2669))
- Improvement: Refactor and standardize creation of swapchain image format
tables, fixing some Vulkan invalid usage.
([internal MR 2685](https://gitlab.khronos.org/openxr/openxr/merge_requests/2685),
[internal issue 1978](https://gitlab.khronos.org/openxr/openxr/issues/1978))
- Improvement: Make composition test help/example world locked but based on
initial view, for more natural reading.
([internal MR 2689](https://gitlab.khronos.org/openxr/openxr/merge_requests/2689))
- Improvement: Cleanup and code quality work.
([internal MR 2704](https://gitlab.khronos.org/openxr/openxr/merge_requests/2704),
[internal MR 2717](https://gitlab.khronos.org/openxr/openxr/merge_requests/2717),
[internal MR 2784](https://gitlab.khronos.org/openxr/openxr/merge_requests/2784),
[internal MR 2785](https://gitlab.khronos.org/openxr/openxr/merge_requests/2785),
[internal MR 2808](https://gitlab.khronos.org/openxr/openxr/merge_requests/2808),
[internal MR 2809](https://gitlab.khronos.org/openxr/openxr/merge_requests/2809))
- Improvement: Add separate license file for gradlew and gradlew.bat
([internal MR 2725](https://gitlab.khronos.org/openxr/openxr/merge_requests/2725))
- Improvement: Optionally poll `xrGetSystem` before running test cases.
([internal MR 2735](https://gitlab.khronos.org/openxr/openxr/merge_requests/2735),
[OpenXR-CTS issue 53](https://github.com/KhronosGroup/OpenXR-CTS/issues/53),
[internal issue 1947](https://gitlab.khronos.org/openxr/openxr/issues/1947))
- Improvement: Select the first enumerated environment blend mode by default,
rather than always using "opaque"
([internal MR 2736](https://gitlab.khronos.org/openxr/openxr/merge_requests/2736),
[internal issue 1950](https://gitlab.khronos.org/openxr/openxr/issues/1950))
- Improvement: Migrate more tests to use the `SKIP` macro when appropriate.
([internal MR 2737](https://gitlab.khronos.org/openxr/openxr/merge_requests/2737),
[internal issue 1932](https://gitlab.khronos.org/openxr/openxr/issues/1932))
- Improvement: Change background color based on selected blend mode: black for
additive and transparent for alpha blend.
([internal MR 2883](https://gitlab.khronos.org/openxr/openxr/merge_requests/2883),
[internal issue 1949](https://gitlab.khronos.org/openxr/openxr/issues/1949))
- Improvement: Add extra information to errors in case of CTS timeouts.
([internal MR 2889](https://gitlab.khronos.org/openxr/openxr/merge_requests/2889))
- Improvement: Remove conditional `XR_KHR_headless` support as the extension is
not part of OpenXR 1.0.
([internal MR 2901](https://gitlab.khronos.org/openxr/openxr/merge_requests/2901))
- Improvement: Remove empty `XR_EXT_performance_settings` test that was never
implemented
([internal MR 2902](https://gitlab.khronos.org/openxr/openxr/merge_requests/2902))
- Improvement: Fix names of tests to not have spaces, and adjust tags so that the
instructions in the README will cause all tests to be executed.
([internal MR 2924](https://gitlab.khronos.org/openxr/openxr/merge_requests/2924))
- New test: Verify two-call idiom behavior of `XR_MSFT_controller_model` as well
as handling of invalid model keys.
([internal MR 2387](https://gitlab.khronos.org/openxr/openxr/merge_requests/2387),
[internal MR 2858](https://gitlab.khronos.org/openxr/openxr/merge_requests/2858))
- New test: Added `XR_EXT_plane_detection` extension.
([internal MR 2510](https://gitlab.khronos.org/openxr/openxr/merge_requests/2510),
[internal MR 2751](https://gitlab.khronos.org/openxr/openxr/merge_requests/2751),
[internal MR 2676](https://gitlab.khronos.org/openxr/openxr/merge_requests/2676))
- New test: Add non-interactive test for `XR_EXT_palm_pose` vendor extension.
([internal MR 2672](https://gitlab.khronos.org/openxr/openxr/merge_requests/2672))
- New test: Add joint query to non-interactive test for `XR_EXT_hand_tracking`.
([internal MR 2729](https://gitlab.khronos.org/openxr/openxr/merge_requests/2729),
[internal MR 2795](https://gitlab.khronos.org/openxr/openxr/merge_requests/2795),
[internal MR 2858](https://gitlab.khronos.org/openxr/openxr/merge_requests/2858),
[internal MR 2916](https://gitlab.khronos.org/openxr/openxr/merge_requests/2916))
- New test: Add test for calling `xrAcquireSwapchainImage` multiple times without
calling `xrEndFrame`.
([internal MR 2730](https://gitlab.khronos.org/openxr/openxr/merge_requests/2730))
- New test: Add additional tests for `XR_EXT_debug_utils` based on the test app
`loader_test`.
([internal MR 2775](https://gitlab.khronos.org/openxr/openxr/merge_requests/2775))
- New test: Add checks for palm position and palm and wrist orientation to
`XR_EXT_hand_tracking` interactive tests.
([internal MR 2798](https://gitlab.khronos.org/openxr/openxr/merge_requests/2798))
- New test: Add unbound action set to action sets test.
([internal MR 2862](https://gitlab.khronos.org/openxr/openxr/merge_requests/2862),
[internal issue 2043](https://gitlab.khronos.org/openxr/openxr/issues/2043))
- New test: Add conformance test for calling `xrDestroyInstance` from a different
thread to `xrCreateInstance`, and `xrDestroySession` on a different thread to
`xrCreateSession`.
([internal MR 2863](https://gitlab.khronos.org/openxr/openxr/merge_requests/2863))
- New test: Add interactive conformance test for infrequently updated swapchains.
([internal MR 2873](https://gitlab.khronos.org/openxr/openxr/merge_requests/2873))
- New test: Add conformance tests for `xrCreateSession` failing, then passing
([internal MR 2884](https://gitlab.khronos.org/openxr/openxr/merge_requests/2884))
- New test: Test `xrSyncActions` with no active action sets.
([internal MR 2903](https://gitlab.khronos.org/openxr/openxr/merge_requests/2903))
- New test: Test calling `xrLocateSpace` with timestamps up to 1s old.
([internal MR 2904](https://gitlab.khronos.org/openxr/openxr/merge_requests/2904))

## OpenXR CTS 1.0.27.0 (2023-05-10)

This release contains a large number of new or improved tests. It is expected
Expand Down
4 changes: 0 additions & 4 deletions changes/conformance/mr.2387.gl.md

This file was deleted.

5 changes: 0 additions & 5 deletions changes/conformance/mr.2510.gl.md

This file was deleted.

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

This file was deleted.

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

This file was deleted.

4 changes: 0 additions & 4 deletions changes/conformance/mr.2685.gl.md

This file was deleted.

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

This file was deleted.

7 changes: 0 additions & 7 deletions changes/conformance/mr.2704.gl.md

This file was deleted.

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

This file was deleted.

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

This file was deleted.

5 changes: 0 additions & 5 deletions changes/conformance/mr.2729.gl.md

This file was deleted.

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

This file was deleted.

5 changes: 0 additions & 5 deletions changes/conformance/mr.2735.gl.md

This file was deleted.

4 changes: 0 additions & 4 deletions changes/conformance/mr.2736.gl.md

This file was deleted.

4 changes: 0 additions & 4 deletions changes/conformance/mr.2737.gl.md

This file was deleted.

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

This file was deleted.

4 changes: 0 additions & 4 deletions changes/conformance/mr.2756.gl.md

This file was deleted.

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

This file was deleted.

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

This file was deleted.

4 changes: 0 additions & 4 deletions changes/conformance/mr.2840.gl.md

This file was deleted.

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

This file was deleted.

34 changes: 9 additions & 25 deletions src/conformance/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,42 @@

// Open this directory in Android Studio, or build with Gradle,
// to build the conformance suite.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
}
}

repositories {
google()
mavenCentral()
plugins {
id 'com.android.application' version '7.4.2'
}

apply plugin: 'com.android.application'

// These next few lines are just to make the version match the OpenXR release.
project.ext.repoRoot = file('../../')
apply from: file('../version.gradle')

def assetDest = layout.buildDir.dir('intermediates/assets')

task copyFont(type: Copy) {
task copyAssets(type: Copy) {
// fonts
from('conformance_test') {
include '*.otf'
}
into assetDest
}

task copyAssets(type: Copy) {
// sample images
from('conformance_test/composition_examples') {
include '*.png'
}
into assetDest
dependsOn copyFont
}

task copyLayerInfo(type: Copy) {
// layer manifests
from('conformance_test/android_assets') {
include '**/*.json'
}

into assetDest
dependsOn copyFont
}

android {
compileSdk 29
ndkVersion "21.4.7075529"
buildToolsVersion = "30.0.3"
namespace 'org.khronos.openxr.cts'

defaultConfig {
applicationId "org.khronos.openxr.cts"
Expand All @@ -65,16 +51,14 @@ android {

externalNativeBuild {
cmake {
arguments '-DANDROID_STL=c++_shared',
'-DBUILD_TESTS=OFF',
arguments '-DBUILD_TESTS=OFF',
'-DBUILD_LOADER=ON',
'-DBUILD_CONFORMANCE_TESTS=ON',
'-DBUILD_ALL_EXTENSIONS=ON'
targets 'conformance_test', 'openxr_loader', 'XrApiLayer_runtime_conformance'
}
}
preBuild.dependsOn(copyAssets)
preBuild.dependsOn(copyLayerInfo)
}
sourceSets {
main {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2020-2023, The Khronos Group Inc.

SPDX-License-Identifier: Apache-2.0
4 changes: 3 additions & 1 deletion src/conformance/conformance_test/test_FrameSubmission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

#define ENUM_LIST(name, val) name,
constexpr XrEnvironmentBlendMode SupportedBlendModes[] = {XR_LIST_ENUM_XrEnvironmentBlendMode(ENUM_LIST)};
#undef ENUM_LIST

namespace Conformance
{
Expand Down Expand Up @@ -204,7 +205,8 @@ namespace Conformance

CHECK(XR_SUCCESS == xrRequestExitSession(session));

REQUIRE(FrameIterator::RunResult::Success == FrameIterator(&session).RunToSessionState(XR_SESSION_STATE_STOPPING, 5s));
FrameIterator frameIterator(&session);
frameIterator.RunToSessionState(XR_SESSION_STATE_STOPPING);

CHECK(XR_SUCCESS == xrEndSession(session));

Expand Down
2 changes: 1 addition & 1 deletion src/conformance/conformance_test/test_HapticInterrupt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace Conformance
{
constexpr XrVector3f Up{0, 1, 0};

TEST_CASE("Haptic Interrupt", "[scenario][interactive][no_auto]")
TEST_CASE("HapticInterrupt", "[scenario][interactive][no_auto]")
{
const char* instructions =
"Press the select button on either hand to begin a 2 second haptic output. "
Expand Down
2 changes: 1 addition & 1 deletion src/conformance/conformance_test/test_InteractiveThrow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace Conformance
// Purpose: Verify behavior of action timing and action space linear/angular velocity through throwing
// 1. Use action state changed timestamp to query velocities
// 2. Use action space velocities at various rigid offsets to verify "lever arm" effect is computed by runtime.
TEST_CASE("Interactive Throw", "[scenario][interactive][no_auto]")
TEST_CASE("InteractiveThrow", "[scenario][interactive][no_auto]")
{
const char* instructions =
"Press and hold 'select' to spawn three rigidly-attached cubes to that controller. "
Expand Down
60 changes: 60 additions & 0 deletions src/conformance/conformance_test/test_LayerComposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,4 +653,64 @@ namespace Conformance

RenderLoop(compositionHelper.GetSession(), updateLayers).Loop();
}

TEST_CASE("StaleSwapchain", "[composition][interactive][no_auto]")
{
CompositionHelper compositionHelper("Stale swapchain");
InteractiveLayerManager interactiveLayerManager(compositionHelper, "stale_swapchain.png",
"Updates swapchain of each square at 1Hz. "
"Square on left should be constantly green, and square on right "
"should switch between green and blue every second. "
"If there is any flicker on the green square, "
"likely at the same time as the other square changes color, "
"that is a failure.");
compositionHelper.GetInteractionManager().AttachActionSets();
compositionHelper.BeginSession();

const XrSpace viewSpace = compositionHelper.CreateReferenceSpace(XR_REFERENCE_SPACE_TYPE_VIEW, XrPosef{Quat::Identity, {0, 0, -1}});

constexpr int ImageSize = 1;

// Create an array swapchain
auto swapchainCreateInfo =
compositionHelper.DefaultColorSwapchainCreateInfo(ImageSize, ImageSize, 0, GetGlobalData().graphicsPlugin->GetSRGBA8Format());
swapchainCreateInfo.usageFlags |= XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT;
const XrSwapchain constantColorSwapchain = compositionHelper.CreateSwapchain(swapchainCreateInfo);
const XrSwapchain alternatingColorSwapchain = compositionHelper.CreateSwapchain(swapchainCreateInfo);

RGBAImage images[2] = {RGBAImage(ImageSize, ImageSize), RGBAImage(ImageSize, ImageSize)};
images[0].DrawRect(0, 0, ImageSize, ImageSize, Colors::Green);
images[1].DrawRect(0, 0, ImageSize, ImageSize, Colors::Blue);
images[0].ConvertToSRGB();
images[1].ConvertToSRGB();

XrCompositionLayerQuad* const constantQuad =
compositionHelper.CreateQuadLayer(constantColorSwapchain, viewSpace, 0.02f, XrPosef{Quat::Identity, {-0.1f, 0, -1}});
interactiveLayerManager.AddLayer(constantQuad);

XrCompositionLayerQuad* const alternatingQuad =
compositionHelper.CreateQuadLayer(alternatingColorSwapchain, viewSpace, 0.02f, XrPosef{Quat::Identity, {0.1f, 0, -1}});
interactiveLayerManager.AddLayer(alternatingQuad);

XrTime lastUpdate = 0;
bool alternatingIndex = false;
RenderLoop(compositionHelper.GetSession(), [&](const XrFrameState& frameState) {
// Failing this test may create a flashing image. 1Hz is well outside the
// documented normal range for photosensitive epilepsy (rarely as low as 3Hz).
// Regardless, failures may e.g. create a black flash every second, so we use a
// small square to minimise any effects of the failure condition.
if (lastUpdate == 0 || (frameState.predictedDisplayTime - lastUpdate) >= 1_xrSeconds) {
lastUpdate = frameState.predictedDisplayTime;
compositionHelper.AcquireWaitReleaseImage(constantColorSwapchain, [&](const XrSwapchainImageBaseHeader* swapchainImage) {
GetGlobalData().graphicsPlugin->CopyRGBAImage(swapchainImage, 0, images[0]);
});
compositionHelper.AcquireWaitReleaseImage(alternatingColorSwapchain, [&](const XrSwapchainImageBaseHeader* swapchainImage) {
GetGlobalData().graphicsPlugin->CopyRGBAImage(swapchainImage, 0, images[(uint32_t)alternatingIndex]);
alternatingIndex = !alternatingIndex;
});
}
return interactiveLayerManager.EndFrame(frameState);
}).Loop();
}

} // namespace Conformance
Loading

0 comments on commit 4fa1925

Please sign in to comment.