Page MenuHome

Core XR Support [part 1]: Add OpenXR-SDK dependency and WITH_OPENXR build option
Needs ReviewPublic

Authored by Julian Eisel (Severin) on Tue, Nov 5, 11:50 AM.

Details

Summary

Some points on the OpenXR-SDK dependency:

  • The repository is located at https://github.com/KhronosGroup/OpenXR-SDK (Apache 2).
  • We use the OpenXR loader lib from it, the headers, and some CMake utilities.
  • It contains a bunch of generated files, for which the sources are in a separate repository.
  • To use the injected OpenXR API-layers from the SDK (e.g. API validation layers), the SDK needs to be compiled from this other repository.
  • We could use that other repo by default, but I'd rather go with the simpler solution and allow people to opt in if they want advanced dev features.
  • For Windows a patch is needed to link the CRT in a compatible way.

All this is entirely untested on macOS.

Diff Detail

Repository
rB Blender
Branch
arcpatch-D6188 (branched from master)
Build Status
Buildable 5582
Build 5582: arc lint + arc unit

Event Timeline

Julian Eisel (Severin) retitled this revision from XR: Add OpenXR-SDK dependency and WITH_XR build option to Core XR Support [part 1]: Add OpenXR-SDK dependency and WITH_XR build option.Tue, Nov 5, 11:52 AM

@Bastien Montagne (mont29) added you for review of the install_deps part, @LazyDodo (LazyDodo) for Windows stuff and @Sergey Sharybin (sergey) for general review.

Add back accidentally removed CMake files

No clue how those could end up being tagged as deleted...

build_files/build_environment/CMakeLists.txt
101

Should this be wrapped by an if(WITH_XR)?
Other optional dependencies don't do this here.

Once these patches land in master, XR will no longer be an optional dep, I'd perhaps wrap it with an if (WIN32) to single out platforms that support it, but it shouldn't require a WITH_XR option.

Julian Eisel (Severin) retitled this revision from Core XR Support [part 1]: Add OpenXR-SDK dependency and WITH_XR build option to Core XR Support [part 1]: Add OpenXR-SDK dependency and WITH_OPENXR build option.Tue, Nov 5, 5:28 PM

Two clarifications:

  • I wrote WITH_XR in the title and previous comment, the option is actually called WITH_OPENXR.
  • What @LazyDodo (LazyDodo) said about this not being an optional dependency only matters for the platform dev's perspective. For everybody else, the OpenXR SDK is still an optional dependency.

Correct: blender cmakelists.txt should have an option to build with or without openxr if people want, however the deps builder only should have options for things that have not yet landed in master (such as embree)

install_deps.sh part looks good to me.

  • Update OpenXR-SDK dependency to 1.0.3
  • Remove unrelated files (helpers for launching with Oculus runtime)
  • Hugely simplify system specific define and desktop environment setup
Julian Eisel (Severin) edited the summary of this revision. (Show Details)Wed, Nov 6, 4:59 PM
Julian Eisel (Severin) edited the summary of this revision. (Show Details)Wed, Nov 6, 5:08 PM