Skip to content

Commit

Permalink
OpenXR CTS 1.1.43.0 (2024-12-12)
Browse files Browse the repository at this point in the history
-   Conformance Tests
    -   Fix: Correctly load the glCompressedTexImage2D function
        (internal MR 3555, internal issue 2390)
    -   Fix: Upload compressed and mip-mapped textures correctly on
        OpenGL and OpenGL ES (internal MR 3555, internal issue 2390)
    -   Fix: Fix printing of some printf-based messages in the CTS.
        (internal MR 3582)
    -   Fix: Broken Android builds - not runnable due to undefined
        symbol. (internal MR 3596)
    -   Fix: Install manifest for conformance test layer (OpenXR-CTS PR
        100)
    -   Improvement: Simplify and refactor selection of swapchain
        formats. (internal MR 3368)
    -   Improvement: Add ability to quit/fail test for
        XR_EXT_eye_gaze_interaction by closing your eyes or otherwise
        losing eye tracking for 10 seconds. (internal MR 3401, internal
        MR 3587)
    -   Improvement: Add example image for Anisotropy Barn Lamp
        self-test (internal MR 3555)
    -   Improvement: Rename types, fields, and variables to use the term
        “binding path” when appropriate. In the past these have
        sometimes been confusingly called “input sources” despite being
        unrelated to the paths returned from
        xrEnumerateBoundSourcesForAction and passed to
        xrGetInputSourceLocalizedName. (internal MR 3561)
    -   Improvement: Code cleanup, documentation, and consistency
        improvements. (internal MR 3575, internal MR 3609)
    -   Improvement: Update jnipp, used for Android loader builds. New
        version includes a build fix for some environments, as well as a
        crash fix. (internal MR 3589)
    -   Improvement: Add Vulkan debug messages during Vulkan instance
        creation. (internal MR 3592)
    -   Improvement: Test correct non-availability in the
        xrLocateSpacesKHR and xrLocateSpaces tests, as well as the
        non-interactive local floor tests. (internal MR 3619)
    -   New test: Automated test that attempts to write from a compute
        shader to swapchain images in formats that support unordered
        access, via Vulkan. D3D11/12 check flags to see that they could
        do so but do not yet actually attempt it. (internal MR 3379,
        internal issue 2162, internal issue 2400, internal MR 2597,
        internal MR 3600)

GitOrigin-RevId: 40d446b855b4315965f457e75a63bcd44febb423
  • Loading branch information
rpavlik committed Dec 12, 2024
1 parent e22d4f1 commit 7162782
Show file tree
Hide file tree
Showing 28 changed files with 306 additions and 327 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ local.properties
*.pom
clang-format-patches/
/*.jar
/*.diff
/*.log
/*.pdf

# Key stores
*.jks
50 changes: 50 additions & 0 deletions CHANGELOG.CTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,56 @@ 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.1.43.0 (2024-12-12)

- Conformance Tests
- Fix: Correctly load the `glCompressedTexImage2D` function
([internal MR 3555](https://gitlab.khronos.org/openxr/openxr/merge_requests/3555),
[internal issue 2390](https://gitlab.khronos.org/openxr/openxr/issues/2390))
- Fix: Upload compressed and mip-mapped textures correctly on OpenGL and OpenGL
ES
([internal MR 3555](https://gitlab.khronos.org/openxr/openxr/merge_requests/3555),
[internal issue 2390](https://gitlab.khronos.org/openxr/openxr/issues/2390))
- Fix: Fix printing of some printf-based messages in the CTS.
([internal MR 3582](https://gitlab.khronos.org/openxr/openxr/merge_requests/3582))
- Fix: Broken Android builds - not runnable due to undefined symbol.
([internal MR 3596](https://gitlab.khronos.org/openxr/openxr/merge_requests/3596))
- Fix: Install manifest for conformance test layer
([OpenXR-CTS PR 100](https://github.com/KhronosGroup/OpenXR-CTS/pull/100))
- Improvement: Simplify and refactor selection of swapchain formats.
([internal MR 3368](https://gitlab.khronos.org/openxr/openxr/merge_requests/3368))
- Improvement: Add ability to quit/fail test for `XR_EXT_eye_gaze_interaction` by
closing your eyes or otherwise losing eye tracking for 10 seconds.
([internal MR 3401](https://gitlab.khronos.org/openxr/openxr/merge_requests/3401),
[internal MR 3587](https://gitlab.khronos.org/openxr/openxr/merge_requests/3587))
- Improvement: Add example image for _Anisotropy Barn Lamp_ self-test
([internal MR 3555](https://gitlab.khronos.org/openxr/openxr/merge_requests/3555))
- Improvement: Rename types, fields, and variables to use the term "binding path"
when appropriate. In the past these have sometimes been confusingly called
"input sources" despite being unrelated to the paths returned from
`xrEnumerateBoundSourcesForAction` and passed to
`xrGetInputSourceLocalizedName`.
([internal MR 3561](https://gitlab.khronos.org/openxr/openxr/merge_requests/3561))
- Improvement: Code cleanup, documentation, and consistency improvements.
([internal MR 3575](https://gitlab.khronos.org/openxr/openxr/merge_requests/3575),
[internal MR 3609](https://gitlab.khronos.org/openxr/openxr/merge_requests/3609))
- Improvement: Update jnipp, used for Android loader builds. New version includes
a build fix for some environments, as well as a crash fix.
([internal MR 3589](https://gitlab.khronos.org/openxr/openxr/merge_requests/3589))
- Improvement: Add Vulkan debug messages during Vulkan instance creation.
([internal MR 3592](https://gitlab.khronos.org/openxr/openxr/merge_requests/3592))
- Improvement: Test correct non-availability in the `xrLocateSpacesKHR` and
`xrLocateSpaces` tests, as well as the non-interactive local floor tests.
([internal MR 3619](https://gitlab.khronos.org/openxr/openxr/merge_requests/3619))
- New test: Automated test that attempts to write from a compute shader to
swapchain images in formats that support unordered access, via Vulkan. D3D11/12
check flags to see that they *could* do so but do not yet actually attempt it.
([internal MR 3379](https://gitlab.khronos.org/openxr/openxr/merge_requests/3379),
[internal issue 2162](https://gitlab.khronos.org/openxr/openxr/issues/2162),
[internal issue 2400](https://gitlab.khronos.org/openxr/openxr/issues/2400),
[internal MR 2597](https://gitlab.khronos.org/openxr/openxr/merge_requests/2597),
[internal MR 3600](https://gitlab.khronos.org/openxr/openxr/merge_requests/3600))

## OpenXR CTS 1.1.42.0 (2024-11-07)

This release, like the previous one, has a separate "Usage Guide" document with
Expand Down
7 changes: 0 additions & 7 deletions changes/conformance/mr.3379.gl.md

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

1 change: 0 additions & 1 deletion changes/conformance/pr.100.gh.OpenXR-CTS.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@
#include <chrono>

using namespace Conformance;
namespace chrono = std::chrono;

namespace Conformance
{
using namespace openxr::math_operators;

using namespace std::chrono_literals;

static constexpr const char* kEyeGazeInteractionUserPath = "/user/eyes_ext";
static constexpr const char* kEyeGazeInteractionPoseInputPath = "/user/eyes_ext/input/gaze_ext/pose";
static constexpr const char* kEyeGazeInteractionProfilePath = "/interaction_profiles/ext/eye_gaze_interaction";
Expand All @@ -43,6 +44,8 @@ namespace Conformance
static constexpr XrVector3f kVectorUp{0, 1, 0};
static constexpr XrVector3f kVectorForward{0, 0, -1};

static constexpr std::chrono::seconds kGazeLostTimeout = 10s;

static const auto SystemSupportsEyeGazeInteraction =
MakeSystemPropertiesBoolChecker(XrSystemEyeGazeInteractionPropertiesEXT{XR_TYPE_SYSTEM_EYE_GAZE_INTERACTION_PROPERTIES_EXT},
&XrSystemEyeGazeInteractionPropertiesEXT::supportsEyeGazeInteraction);
Expand Down Expand Up @@ -458,8 +461,7 @@ namespace Conformance
instructionsQuad->pose.orientation = Quat::FromAxisAngle(kVectorUp, DegToRad(70));

bool eyeGazeSampleTimeFound = false;
auto lastTrackedGaze = chrono::steady_clock::now();
const int blinkTimout = 10;
Stopwatch sinceTrackedGazeDuration;
auto update = [&](const XrFrameState& frameState) {
std::vector<Cube> renderedCubes;

Expand All @@ -479,9 +481,9 @@ namespace Conformance
// Check if user has requested to complete or fail the test.
{
// Check if the user closed eyes (or otherwise lost gaze tracking) for ten seconds
const auto lostGazeDuration = chrono::duration_cast<chrono::seconds>(chrono::steady_clock::now() - lastTrackedGaze);
if (lostGazeDuration.count() > blinkTimout) {
FAIL("Test failed by user request");
if (sinceTrackedGazeDuration.IsStarted() &&
std::chrono::duration_cast<std::chrono::seconds>(sinceTrackedGazeDuration.Elapsed()) >= kGazeLostTimeout) {
FAIL("Test failed by user request - gaze lost for longer than timeout");
}

// Check if user has brought the head to the cubes
Expand Down Expand Up @@ -527,7 +529,11 @@ namespace Conformance

// Check if eyes were tracked and reset timeout
if ((gazeLocation.locationFlags & XR_SPACE_LOCATION_POSITION_TRACKED_BIT) == XR_SPACE_LOCATION_POSITION_TRACKED_BIT) {
lastTrackedGaze = chrono::steady_clock::now();
sinceTrackedGazeDuration.Stop();
}
// not tracked, make sure timer is running.
else if (!sinceTrackedGazeDuration.IsStarted()) {
sinceTrackedGazeDuration.Restart();
}

// If at least orientation is valid, show a ray representing the gaze
Expand Down
4 changes: 3 additions & 1 deletion src/conformance/conformance_test/test_XR_EXT_local_floor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ namespace Conformance
static inline void SharedLocalFloorAutomated(const FeatureSet& featureSet)
{
GlobalData& globalData = GetGlobalData();
const std::vector<const char*> extensions = SkipOrGetExtensions("Local floor", globalData, featureSet);

// See if it is explicitly enabled by default
FeatureSet enabled;
Expand All @@ -180,6 +179,9 @@ namespace Conformance
}
}

// Skip after the "Requirements not enabled" tests, so that unavailability of LOCAL_FLOOR on OpenXR 1.0 is tested before the skip.
const std::vector<const char*> extensions = SkipOrGetExtensions("Local floor", globalData, featureSet);

SECTION("Validate creation")
{
AutoBasicInstance instance(extensions);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ namespace Conformance
{
GlobalData& globalData = GetGlobalData();

const std::vector<const char*> extensions = SkipOrGetExtensions("Locate spaces", globalData, featureSet);

SECTION("Requirements not enabled")
{
// See if it is explicitly enabled by default
Expand All @@ -67,6 +65,9 @@ namespace Conformance
}
}

// Skip after the "Requirements not enabled" tests, so that unavailability of xrLocateSpaces{,KHR} on OpenXR 1.0 is tested before the skip.
const std::vector<const char*> extensions = SkipOrGetExtensions("Locate spaces", globalData, featureSet);

AutoBasicInstance instance(extensions, AutoBasicInstance::createSystemId);

PFN_xrLocateSpacesKHR xrLocateSpacesPFN = nullptr;
Expand Down
6 changes: 2 additions & 4 deletions src/conformance/framework/composition_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,8 @@ namespace Conformance
}

if (GetGlobalData().IsUsingGraphicsPlugin()) {
m_defaultColorFormat =
GetGlobalData().graphicsPlugin->SelectColorSwapchainFormat(swapchainFormats.data(), swapchainFormats.size());
m_defaultDepthFormat =
GetGlobalData().graphicsPlugin->SelectDepthSwapchainFormat(swapchainFormats.data(), swapchainFormats.size());
m_defaultColorFormat = GetGlobalData().graphicsPlugin->SelectColorSwapchainFormat(true, swapchainFormats);
m_defaultDepthFormat = GetGlobalData().graphicsPlugin->SelectDepthSwapchainFormat(true, swapchainFormats);
}
else {
m_defaultColorFormat = static_cast<uint64_t>(-1);
Expand Down
6 changes: 3 additions & 3 deletions src/conformance/framework/conformance_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ namespace Conformance
createInfo.faceCount = cubemap ? 6 : 1;
createInfo.createFlags = 0; // XR_SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT or XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT
createInfo.usageFlags = usageFlags;
createInfo.format = graphicsPlugin->SelectColorSwapchainFormat(formatArray.data(), formatArray.size());
createInfo.format = graphicsPlugin->SelectColorSwapchainFormat(true, formatArray);
createInfo.sampleCount = 1;
createInfo.width = (uint32_t)widthHeight->width;
createInfo.height = (uint32_t)widthHeight->height;
Expand Down Expand Up @@ -1159,7 +1159,7 @@ namespace Conformance
createInfo.faceCount = 1;
createInfo.createFlags = 0; // XR_SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT or XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT
createInfo.usageFlags = usageFlags;
createInfo.format = graphicsPlugin->SelectDepthSwapchainFormat(formatArray.data(), formatArray.size());
createInfo.format = graphicsPlugin->SelectDepthSwapchainFormat(true, formatArray);
createInfo.sampleCount = 1;
createInfo.width = (uint32_t)widthHeight->width;
createInfo.height = (uint32_t)widthHeight->height;
Expand Down Expand Up @@ -1202,7 +1202,7 @@ namespace Conformance
createInfo.faceCount = 1;
createInfo.createFlags = 0; // XR_SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT or XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT
createInfo.usageFlags = usageFlags;
createInfo.format = graphicsPlugin->SelectMotionVectorSwapchainFormat(formatArray.data(), formatArray.size());
createInfo.format = graphicsPlugin->SelectMotionVectorSwapchainFormat(true, formatArray);
createInfo.sampleCount = 1;
createInfo.width = (uint32_t)widthHeight->width;
createInfo.height = (uint32_t)widthHeight->height;
Expand Down
11 changes: 7 additions & 4 deletions src/conformance/framework/graphics_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -311,14 +311,17 @@ namespace Conformance
virtual bool ValidateSwapchainImageState(XrSwapchain /*swapchain*/, uint32_t /*index*/, int64_t /*imageFormat*/) const
noexcept(false) = 0;

/// Select the first supported color swapchain format from the list of available formats.
/// Implementation must select a format with alpha unless there are none with alpha.
virtual int64_t SelectColorSwapchainFormat(const int64_t* /*imageFormatArray*/, size_t /*count*/) const = 0;
/// (As of writing, no backend supports a format without alpha, so this may be buggy.)
virtual int64_t SelectColorSwapchainFormat(bool throwIfNotFound, span<const int64_t> imageFormatArray) const = 0;

/// Select the preferred swapchain format from the list of available formats.
virtual int64_t SelectDepthSwapchainFormat(const int64_t* /*imageFormatArray*/, size_t /*count*/) const = 0;
/// Select the first supported depth swapchain format from the list of available formats.
virtual int64_t SelectDepthSwapchainFormat(bool throwIfNotFound, span<const int64_t> imageFormatArray) const = 0;

/// Select the first swapchain format appropriate for motion vectors from the list of available formats.
/// Implementation must select a signed format with four components unless there are none with alpha.
virtual int64_t SelectMotionVectorSwapchainFormat(const int64_t* /*imageFormatArray*/, size_t /*count*/) const = 0;
virtual int64_t SelectMotionVectorSwapchainFormat(bool throwIfNotFound, span<const int64_t> imageFormatArray) const = 0;

/// Select the preferred swapchain format.
virtual int64_t GetSRGBA8Format() const = 0;
Expand Down
70 changes: 29 additions & 41 deletions src/conformance/framework/graphics_plugin_d3d11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,11 @@ namespace Conformance
uint32_t* imageCount) const override;
bool ValidateSwapchainImageState(XrSwapchain swapchain, uint32_t index, int64_t imageFormat) const override;

int64_t SelectColorSwapchainFormat(const int64_t* imageFormatArray, size_t count) const override;
int64_t SelectColorSwapchainFormat(bool throwIfNotFound, span<const int64_t> imageFormatArray) const override;

int64_t SelectDepthSwapchainFormat(const int64_t* imageFormatArray, size_t count) const override;
int64_t SelectDepthSwapchainFormat(bool throwIfNotFound, span<const int64_t> imageFormatArray) const override;

int64_t SelectMotionVectorSwapchainFormat(const int64_t* imageFormatArray, size_t count) const override;
int64_t SelectMotionVectorSwapchainFormat(bool throwIfNotFound, span<const int64_t> imageFormatArray) const override;

// Format required by RGBAImage type.
int64_t GetSRGBA8Format() const override;
Expand Down Expand Up @@ -593,56 +593,44 @@ namespace Conformance
}

// Select the preferred swapchain format from the list of available formats.
int64_t D3D11GraphicsPlugin::SelectColorSwapchainFormat(const int64_t* formatArray, size_t count) const
int64_t D3D11GraphicsPlugin::SelectColorSwapchainFormat(bool throwIfNotFound, span<const int64_t> imageFormatArray) const
{
// List of supported color swapchain formats.
const std::array<DXGI_FORMAT, 4> f{DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, DXGI_FORMAT_B8G8R8A8_UNORM_SRGB, DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_B8G8R8A8_UNORM};

const int64_t* formatArrayEnd = formatArray + count;
auto it = std::find_first_of(formatArray, formatArrayEnd, f.begin(), f.end());

if (it == formatArrayEnd) {
assert(false); // Assert instead of throw as we need to switch to the big table which can't fail.
return formatArray[0];
}

return *it;
return SelectSwapchainFormat( //
throwIfNotFound, imageFormatArray,
{
DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
DXGI_FORMAT_B8G8R8A8_UNORM_SRGB,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_B8G8R8A8_UNORM,
});
}

// Select the preferred swapchain format from the list of available formats.
int64_t D3D11GraphicsPlugin::SelectDepthSwapchainFormat(const int64_t* formatArray, size_t count) const
int64_t D3D11GraphicsPlugin::SelectDepthSwapchainFormat(bool throwIfNotFound, span<const int64_t> imageFormatArray) const
{
// List of supported depth swapchain formats.
const std::array<DXGI_FORMAT, 4> f{DXGI_FORMAT_D32_FLOAT, DXGI_FORMAT_D24_UNORM_S8_UINT, DXGI_FORMAT_D16_UNORM,
DXGI_FORMAT_D32_FLOAT_S8X24_UINT};

const int64_t* formatArrayEnd = formatArray + count;
auto it = std::find_first_of(formatArray, formatArrayEnd, f.begin(), f.end());

if (it == formatArrayEnd) {
assert(false); // Assert instead of throw as we need to switch to the big table which can't fail.
return formatArray[0];
}

return *it;
return SelectSwapchainFormat( //
throwIfNotFound, imageFormatArray,
{
DXGI_FORMAT_D32_FLOAT,
DXGI_FORMAT_D24_UNORM_S8_UINT,
DXGI_FORMAT_D16_UNORM,
DXGI_FORMAT_D32_FLOAT_S8X24_UINT,
});
}

// Select the preferred swapchain format from the list of available formats.
int64_t D3D11GraphicsPlugin::SelectMotionVectorSwapchainFormat(const int64_t* formatArray, size_t count) const
int64_t D3D11GraphicsPlugin::SelectMotionVectorSwapchainFormat(bool throwIfNotFound, span<const int64_t> imageFormatArray) const
{
// List of swapchain formats suitable for motion vectors.
const std::array<DXGI_FORMAT, 2> f{DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_R32G32B32_FLOAT};

const int64_t* formatArrayEnd = formatArray + count;
auto it = std::find_first_of(formatArray, formatArrayEnd, f.begin(), f.end());

if (it == formatArrayEnd) {
assert(false); // Assert instead of throw as we need to switch to the big table which can't fail.
return formatArray[0];
// Implementation must select a signed format with four components unless there are none with alpha.
int64_t alphaFormat = SelectSwapchainFormat( //
false, imageFormatArray, {DXGI_FORMAT_R16G16B16A16_FLOAT});
if (alphaFormat != -1) {
return alphaFormat;
}

return *it;
return SelectSwapchainFormat( //
throwIfNotFound, imageFormatArray, {DXGI_FORMAT_R32G32B32_FLOAT});
}

int64_t D3D11GraphicsPlugin::GetSRGBA8Format() const
Expand Down
Loading

0 comments on commit 7162782

Please sign in to comment.