Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
189 changes: 189 additions & 0 deletions .github/workflows/openxr_engine_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
name: OpenXR Engine CI

on:
push:
paths:
- 'attachments/openxr_engine/**'
- 'attachments/simple_engine/**'
- '.github/workflows/openxr_engine_ci.yml'
pull_request:
paths:
- 'attachments/openxr_engine/**'
- 'attachments/simple_engine/**'
- '.github/workflows/openxr_engine_ci.yml'
workflow_dispatch:

jobs:
desktop:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]

defaults:
run:
working-directory: attachments/openxr_engine

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Clang + Ninja + ccache (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y clang ninja-build ccache libopenxr-dev

- name: Select Clang toolchain (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
set -euo pipefail
echo "CC=clang" >> "$GITHUB_ENV"
echo "CXX=clang++" >> "$GITHUB_ENV"

- name: Set up MSVC dev environment
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1

- name: Set up Ninja + sccache
if: runner.os == 'Windows'
shell: pwsh
run: |
choco install -y ninja sccache
$chocoBin = "C:\ProgramData\chocolatey\bin"
if (Test-Path $chocoBin) {
$chocoBin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
}
"SCCACHE_DIR=$env:LOCALAPPDATA\Mozilla\sccache" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: ccache (Linux)
if: runner.os == 'Linux'
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ${{ runner.os }}-openxr-ccache-${{ github.sha }}
restore-keys: ${{ runner.os }}-openxr-ccache-

- name: sccache (Windows)
if: runner.os == 'Windows'
uses: actions/cache@v4
with:
path: ${{ env.SCCACHE_DIR }}
key: ${{ runner.os }}-openxr-sccache-${{ github.sha }}
restore-keys: ${{ runner.os }}-openxr-sccache-

- name: Cache Vulkan SDK (Windows)
if: runner.os == 'Windows'
id: cache-vulkan-windows
uses: actions/cache@v4
with:
path: C:\VulkanSDK
key: ${{ runner.os }}-vulkan-sdk

- name: Install Vulkan SDK (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
if ("${{ steps.cache-vulkan-windows.outputs.cache-hit }}" -ne "true") {
choco install -y aria2
$installer = Join-Path $env:TEMP "vulkan-sdk.exe"
aria2c --split=8 --max-connection-per-server=8 --min-split-size=1M --dir="$env:TEMP" --out="vulkan-sdk.exe" "https://sdk.lunarg.com/sdk/download/latest/windows/vulkan-sdk.exe"
Start-Process -FilePath $installer -ArgumentList "--accept-licenses --default-answer --confirm-command install" -Wait -NoNewWindow
}
$vulkanPath = Get-ChildItem "C:\VulkanSDK" | Sort-Object -Property Name -Descending | Select-Object -First 1 -ExpandProperty FullName
"VULKAN_SDK=$vulkanPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
"$vulkanPath\Bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
"CMAKE_PREFIX_PATH=$vulkanPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Install Vulkan SDK (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y curl xz-utils
VULKAN_VERSION=$(curl -s https://vulkan.lunarg.com/sdk/latest/linux.txt)
SDK_TGZ="${RUNNER_TEMP}/vulkansdk-linux.tar.xz"
curl -L -o "$SDK_TGZ" "https://sdk.lunarg.com/sdk/download/$VULKAN_VERSION/linux/vulkansdk-linux-x86_64-$VULKAN_VERSION.tar.xz"
mkdir -p "${RUNNER_TEMP}/VulkanSDK"
tar -xJf "$SDK_TGZ" -C "${RUNNER_TEMP}/VulkanSDK"
VULKAN_SDK_PATH=$(find "${RUNNER_TEMP}/VulkanSDK" -maxdepth 1 -type d -name '1.*' | head -n 1)
SDK_SYSROOT="$VULKAN_SDK_PATH/x86_64"
echo "VULKAN_SDK=$VULKAN_SDK_PATH" >> "$GITHUB_ENV"
echo "VULKAN_SDK_SYSROOT=$SDK_SYSROOT" >> "$GITHUB_ENV"
echo "$SDK_SYSROOT/bin" >> "$GITHUB_PATH"
echo "CMAKE_PREFIX_PATH=$SDK_SYSROOT" >> "$GITHUB_ENV"
echo "Vulkan_INCLUDE_DIR=$SDK_SYSROOT/include" >> "$GITHUB_ENV"

# Use the engine's dependency install scripts instead of calling vcpkg directly in CI.
- name: Cache vcpkg (Windows)
if: runner.os == 'Windows'
id: cache-vcpkg-windows
uses: actions/cache@v4
with:
path: |
${{ runner.temp }}/vcpkg
${{ runner.temp }}/vcpkg-cache
key: ${{ runner.os }}-openxr-vcpkg-${{ hashFiles('attachments/simple_engine/vcpkg.json') }}

- name: Bootstrap vcpkg (Windows)
if: runner.os == 'Windows' && steps.cache-vcpkg-windows.outputs.cache-hit != 'true'
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$vcpkgRoot = Join-Path $env:RUNNER_TEMP "vcpkg"
if (-not (Test-Path $vcpkgRoot)) {
git clone https://github.com/microsoft/vcpkg $vcpkgRoot
}
Push-Location $vcpkgRoot
.\bootstrap-vcpkg.bat
Pop-Location
"VCPKG_INSTALLATION_ROOT=$vcpkgRoot" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
"$vcpkgRoot" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
"CMAKE_TOOLCHAIN_FILE=$vcpkgRoot\scripts\buildsystems\vcpkg.cmake" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Set vcpkg env (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$vcpkgRoot = Join-Path $env:RUNNER_TEMP "vcpkg"
$vcpkgCache = Join-Path $env:RUNNER_TEMP "vcpkg-cache"
if (-not (Test-Path $vcpkgCache)) {
New-Item -Path $vcpkgCache -ItemType Directory
}
"VCPKG_INSTALLATION_ROOT=$vcpkgRoot" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
"$vcpkgRoot" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
"CMAKE_TOOLCHAIN_FILE=$vcpkgRoot\scripts\buildsystems\vcpkg.cmake" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
"VCPKG_DEFAULT_BINARY_CACHE=$vcpkgCache" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
"VCPKG_BINARY_SOURCES=clear;files,$vcpkgCache,readwrite" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Install dependencies (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
call install_dependencies_windows.bat

- name: Install dependencies (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
bash install_dependencies_linux.sh

- name: Configure (Windows)
if: runner.os == 'Windows'
run: |
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="$env:CMAKE_TOOLCHAIN_FILE" -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache

- name: Configure (Linux)
if: runner.os == 'Linux'
run: |
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_PREFIX_PATH="/home/runner/.local;${{ env.VULKAN_SDK_SYSROOT }}"

- name: Build
run: cmake --build build --target OpenXREngine --parallel 4
101 changes: 101 additions & 0 deletions antora/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,104 @@
*** xref:Building_a_Simple_Engine/Advanced_Topics/Robustness2.adoc[Robustness2]
** Appendix
*** xref:Building_a_Simple_Engine/Appendix/appendix.adoc[Appendix]

* OpenXR and Vulkan 1.4 Spatial Computing
** xref:OpenXR_Vulkan_Spatial_Computing/introduction.adoc[Introduction]
** The OpenXR-Vulkan 1.4 Handshake
*** xref:OpenXR_Vulkan_Spatial_Computing/02_OpenXR_Vulkan_Handshake/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/02_OpenXR_Vulkan_Handshake/02_system_integration.adoc[System Integration]
*** xref:OpenXR_Vulkan_Spatial_Computing/02_OpenXR_Vulkan_Handshake/03_hardware_alignment_luid.adoc[Hardware Alignment (LUID)]
*** xref:OpenXR_Vulkan_Spatial_Computing/02_OpenXR_Vulkan_Handshake/04_vulkan_1_4_feature_requirements.adoc[Vulkan 1.4 Feature Requirements]
*** xref:OpenXR_Vulkan_Spatial_Computing/02_OpenXR_Vulkan_Handshake/05_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** Runtime-Owned Swapchains
*** xref:OpenXR_Vulkan_Spatial_Computing/03_Runtime_Owned_Swapchains/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/03_Runtime_Owned_Swapchains/02_external_image_negotiation.adoc[External Image Negotiation]
*** xref:OpenXR_Vulkan_Spatial_Computing/03_Runtime_Owned_Swapchains/03_raii_resource_integration.adoc[RAII Resource Integration]
*** xref:OpenXR_Vulkan_Spatial_Computing/03_Runtime_Owned_Swapchains/04_memory_ownership_lifecycle.adoc[Memory Ownership Lifecycle]
*** xref:OpenXR_Vulkan_Spatial_Computing/03_Runtime_Owned_Swapchains/05_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** Dynamic Rendering for Spatial Views
*** xref:OpenXR_Vulkan_Spatial_Computing/04_Dynamic_Rendering/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/04_Dynamic_Rendering/02_rendering_to_spatial_swapchains.adoc[Rendering into Spatial Swapchains]
*** xref:OpenXR_Vulkan_Spatial_Computing/04_Dynamic_Rendering/03_stereo_viewport_scissor.adoc[Stereo Viewport & Scissor Management]
*** xref:OpenXR_Vulkan_Spatial_Computing/04_Dynamic_Rendering/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** The Predictive Frame Loop
*** xref:OpenXR_Vulkan_Spatial_Computing/05_Predictive_Frame_Loop/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/05_Predictive_Frame_Loop/02_xr_lifecycle.adoc[The XR Lifecycle]
*** xref:OpenXR_Vulkan_Spatial_Computing/05_Predictive_Frame_Loop/03_display_time_prediction.adoc[Display Time Prediction]
*** xref:OpenXR_Vulkan_Spatial_Computing/05_Predictive_Frame_Loop/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** Late Latching
*** xref:OpenXR_Vulkan_Spatial_Computing/06_Late_Latching/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/06_Late_Latching/02_last_second_update.adoc[The Last-Second Update]
*** xref:OpenXR_Vulkan_Spatial_Computing/06_Late_Latching/03_implementation.adoc[Implementation]
*** xref:OpenXR_Vulkan_Spatial_Computing/06_Late_Latching/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** Action Spaces and Input
*** xref:OpenXR_Vulkan_Spatial_Computing/07_Action_Spaces_Input/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/07_Action_Spaces_Input/02_openxr_action_system.adoc[The OpenXR Action System]
*** xref:OpenXR_Vulkan_Spatial_Computing/07_Action_Spaces_Input/03_space_manifolds.adoc[Space Manifolds]
*** xref:OpenXR_Vulkan_Spatial_Computing/07_Action_Spaces_Input/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** Slang for Spatial Shaders
*** xref:OpenXR_Vulkan_Spatial_Computing/08_Slang_Spatial_Shaders/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/08_Slang_Spatial_Shaders/02_native_multiview.adoc[Native Multiview (N=2)]
*** xref:OpenXR_Vulkan_Spatial_Computing/08_Slang_Spatial_Shaders/03_slang_architecture.adoc[Slang Architecture]
*** xref:OpenXR_Vulkan_Spatial_Computing/08_Slang_Spatial_Shaders/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** Quad-Views and Foveated Rendering
*** xref:OpenXR_Vulkan_Spatial_Computing/09_Quad_Views_Foveated/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/09_Quad_Views_Foveated/02_primary_stereo_with_insets.adoc[Primary Stereo with Insets]
*** xref:OpenXR_Vulkan_Spatial_Computing/09_Quad_Views_Foveated/03_multi_layer_composition.adoc[Multi-Layer Composition]
*** xref:OpenXR_Vulkan_Spatial_Computing/09_Quad_Views_Foveated/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** Variable Rate Shading
*** xref:OpenXR_Vulkan_Spatial_Computing/10_Variable_Rate_Shading/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/10_Variable_Rate_Shading/02_fragment_density_control.adoc[Fragment Density Control]
*** xref:OpenXR_Vulkan_Spatial_Computing/10_Variable_Rate_Shading/03_gaze_driven_logic.adoc[Gaze-Driven Logic]
*** xref:OpenXR_Vulkan_Spatial_Computing/10_Variable_Rate_Shading/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** Canted Displays
*** xref:OpenXR_Vulkan_Spatial_Computing/11_Canted_Displays/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/11_Canted_Displays/02_non_parallel_projections.adoc[Non-Parallel Projections]
*** xref:OpenXR_Vulkan_Spatial_Computing/11_Canted_Displays/03_viewport_swizzling.adoc[Viewport Swizzling]
*** xref:OpenXR_Vulkan_Spatial_Computing/11_Canted_Displays/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** CAVE Architecture
*** xref:OpenXR_Vulkan_Spatial_Computing/12_CAVE_Architecture/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/12_CAVE_Architecture/02_projector_based_spatial_tech.adoc[Projector-Based Spatial Tech]
*** xref:OpenXR_Vulkan_Spatial_Computing/12_CAVE_Architecture/03_hardware_sync.adoc[Hardware Sync]
*** xref:OpenXR_Vulkan_Spatial_Computing/12_CAVE_Architecture/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** Warp and Blend
*** xref:OpenXR_Vulkan_Spatial_Computing/13_Warp_and_Blend/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/13_Warp_and_Blend/02_geometric_correction.adoc[Geometric Correction]
*** xref:OpenXR_Vulkan_Spatial_Computing/13_Warp_and_Blend/03_post_process_warping.adoc[Post-Process Warping]
*** xref:OpenXR_Vulkan_Spatial_Computing/13_Warp_and_Blend/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** LightField Theory
*** xref:OpenXR_Vulkan_Spatial_Computing/14_LightField_Theory/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/14_LightField_Theory/02_4d_lightfield_representation.adoc[4D LightField Representation]
*** xref:OpenXR_Vulkan_Spatial_Computing/14_LightField_Theory/03_high_density_view_arrays.adoc[High-Density View Arrays]
*** xref:OpenXR_Vulkan_Spatial_Computing/14_LightField_Theory/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** Plenoptic Synthesis
*** xref:OpenXR_Vulkan_Spatial_Computing/15_Plenoptic_Synthesis/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/15_Plenoptic_Synthesis/02_synthesis_shaders.adoc[Synthesis Shaders]
*** xref:OpenXR_Vulkan_Spatial_Computing/15_Plenoptic_Synthesis/03_ray_traced_synthesis.adoc[Ray Traced Synthesis]
*** xref:OpenXR_Vulkan_Spatial_Computing/15_Plenoptic_Synthesis/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** Scene Understanding
*** xref:OpenXR_Vulkan_Spatial_Computing/16_Scene_Understanding/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/16_Scene_Understanding/02_environmental_ingestion.adoc[Environmental Ingestion]
*** xref:OpenXR_Vulkan_Spatial_Computing/16_Scene_Understanding/03_zero_copy_hand_off.adoc[Zero-Copy Hand-off]
*** xref:OpenXR_Vulkan_Spatial_Computing/16_Scene_Understanding/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** ML Inference for Spatial Data
*** xref:OpenXR_Vulkan_Spatial_Computing/17_ML_Inference_Spatial/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/17_ML_Inference_Spatial/02_on_gpu_inference.adoc[On-GPU Inference]
*** xref:OpenXR_Vulkan_Spatial_Computing/17_ML_Inference_Spatial/03_refining_spatial_data.adoc[Refining Spatial Data]
*** xref:OpenXR_Vulkan_Spatial_Computing/17_ML_Inference_Spatial/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** Semantic Occlusion
*** xref:OpenXR_Vulkan_Spatial_Computing/18_Semantic_Occlusion/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/18_Semantic_Occlusion/02_ml_driven_segmentation.adoc[ML-Driven Segmentation]
*** xref:OpenXR_Vulkan_Spatial_Computing/18_Semantic_Occlusion/03_per_pixel_masking.adoc[Per-Pixel Masking]
*** xref:OpenXR_Vulkan_Spatial_Computing/18_Semantic_Occlusion/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** Platform Divergence
*** xref:OpenXR_Vulkan_Spatial_Computing/19_Platform_Divergence/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/19_Platform_Divergence/02_desktop_high_end.adoc[Desktop High-End]
*** xref:OpenXR_Vulkan_Spatial_Computing/19_Platform_Divergence/03_mobile_mastery.adoc[Mobile Mastery]
*** xref:OpenXR_Vulkan_Spatial_Computing/19_Platform_Divergence/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** Spatial Diagnostics
*** xref:OpenXR_Vulkan_Spatial_Computing/20_Spatial_Diagnostics_CI_CD/01_introduction.adoc[Introduction]
*** xref:OpenXR_Vulkan_Spatial_Computing/20_Spatial_Diagnostics_CI_CD/02_spatial_debugging.adoc[Spatial Debugging]
*** xref:OpenXR_Vulkan_Spatial_Computing/20_Spatial_Diagnostics_CI_CD/03_automated_qa.adoc[Automated QA]
*** xref:OpenXR_Vulkan_Spatial_Computing/20_Spatial_Diagnostics_CI_CD/04_incorporating_into_the_engine.adoc[Incorporating into the Engine]
** xref:OpenXR_Vulkan_Spatial_Computing/conclusion.adoc[Conclusion]
Loading
Loading