Skip to content

Commit 434f398

Browse files
author
dengkail
committed
OpenXR loader: add API layer discovery support.
Revert "Update local repo to latest."
1 parent 6f3ccf3 commit 434f398

File tree

111 files changed

+4746
-2538
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+4746
-2538
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5-
version: 1.0.28.{build}
5+
version: 1.0.27.{build}
66
image: Visual Studio 2017
77

88

.gitattributes

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@
2323
*.sh eol=lf
2424

2525
*.png binary
26-
27-
# git-lfs big files
28-
*.pdf filter=lfs diff=lfs merge=lfs -text
29-
*.glb filter=lfs diff=lfs merge=lfs -text
26+
*.pdf binary
3027

3128
# Shell/python scripts that don't end in .sh
3229
specification/makeAllExts eol=lf

.github/scripts/CMakePresets.json

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -65,31 +65,6 @@
6565
"CMAKE_SYSTEM_NAME": "WindowsStore",
6666
"CMAKE_SYSTEM_VERSION": "10.0"
6767
}
68-
},
69-
{
70-
"name": ".base-cts-msvc",
71-
"generator": "Visual Studio 17 2022",
72-
"hidden": true,
73-
"installDir": "$env{INSTALL_DIR}",
74-
"cacheVariables": {
75-
"DYNAMIC_LOADER": false,
76-
"BUILD_ALL_EXTENSIONS": true
77-
},
78-
"condition": {
79-
"type": "equals",
80-
"lhs": "${hostSystemName}",
81-
"rhs": "Windows"
82-
}
83-
},
84-
{
85-
"name": "cts-win32",
86-
"inherits": ".base-cts-msvc",
87-
"architecture": "Win32"
88-
},
89-
{
90-
"name": "cts-x64",
91-
"inherits": ".base-cts-msvc",
92-
"architecture": "x64"
9368
}
9469
]
9570
}

.github/scripts/shared.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import json
55
import sys
6-
import os
76
from dataclasses import dataclass
87
from itertools import product
98

@@ -26,10 +25,6 @@ def should_skip(self) -> bool:
2625
# can switch to just doing x64 for speed of testing
2726
# return self.arch != "x64"
2827

29-
def has_cts_build(self) -> bool:
30-
# No UWP CTS right now
31-
return not self.uwp and not self.should_skip()
32-
3328
def preset(self) -> str:
3429
if self.uwp:
3530
return f"{self.arch.lower()}_uwp"
@@ -39,9 +34,6 @@ def preset(self) -> str:
3934
def win_artifact_name(self) -> str:
4035
return f"loader_{self.preset()}"
4136

42-
def win_cts_artifact_name(self) -> str:
43-
return f"loader_{self.preset()}"
44-
4537
def platform_dirname(self) -> str:
4638
if self.uwp:
4739
return f"{self.arch}_uwp"
@@ -54,14 +46,9 @@ def platform_dirname(self) -> str:
5446

5547
BUILD_CONFIGS = [c for c in _UNFILTERED_BUILD_CONFIGS if not c.should_skip()]
5648

57-
CTS_BUILD_CONFIGS = [c for c in _UNFILTERED_BUILD_CONFIGS if c.has_cts_build()]
58-
5949

6050
def output_json(data, variable_name=None):
6151
if variable_name:
62-
envfile = os.getenv("GITHUB_ENV")
63-
assert envfile
64-
with open(envfile, "w", encoding="utf-8") as fp:
65-
fp.write(f"{variable_name}={json.dumps(data)}")
52+
print(f"::set-output name={variable_name}::{json.dumps(data)}")
6653
else:
6754
print(json.dumps(data, indent=4))

.github/workflows/android.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v3
2727
- name: Get modern CMake and Ninja
28-
uses: lukka/get-cmake@v3.26.4
28+
uses: lukka/get-cmake@v3.25.2
2929

3030
- name: set up JDK 11
3131
uses: actions/setup-java@v3
@@ -93,7 +93,7 @@ jobs:
9393
steps:
9494
- uses: actions/checkout@v3
9595
- name: Get modern CMake and Ninja
96-
uses: lukka/get-cmake@v3.26.4
96+
uses: lukka/get-cmake@v3.25.2
9797
- name: set up JDK 11
9898
uses: actions/setup-java@v3
9999
with:
Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021-2023, Collabora, Ltd.
1+
# Copyright 2021-2022, Collabora, Ltd.
22
# SPDX-License-Identifier: CC0-1.0
33

44
on:
@@ -9,18 +9,13 @@ on:
99
type: string
1010
required: true
1111
buildType:
12-
description: "Build configuration"
12+
description: "Build type"
1313
type: string
14-
required: true
1514
default: RelWithDebInfo
1615
artifactName:
1716
description: "Artifact name to upload to."
1817
type: string
1918
required: false
20-
subdir:
21-
description: "Subdir of the workspace to upload as an artifact."
22-
type: string
23-
default: install
2419

2520
jobs:
2621
msvc-build:
@@ -30,33 +25,30 @@ jobs:
3025
INSTALL_DIR: "${{ github.workspace }}/install"
3126
steps:
3227
- uses: actions/checkout@v3
33-
34-
- name: Get modern CMake and Ninja
35-
uses: lukka/get-cmake@v3.26.4
36-
28+
- uses: lukka/get-cmake@v3.25.2
3729
- name: Add msbuild to PATH
3830
uses: microsoft/setup-msbuild@v1.3
3931

4032
- name: Install Vulkan SDK
41-
run: ./.github/scripts/install_vulkan.ps1
42-
if: "${{ !contains( inputs.preset, 'uwp') }}"
43-
working-directory: "${{ github.workspace }}"
33+
if: ${{ !contains( inputs.preset, 'uwp') }}
34+
working-directory: ${{ github.workspace }}
4435
shell: pwsh
36+
run: ./.github/scripts/install_vulkan.ps1
4537

4638
- name: Generate build system
4739
shell: pwsh
4840
run: |
4941
Copy-Item .github/scripts/CMakePresets.json .
5042
cmake --fresh --preset ${{ inputs.preset }} -S . -B $env:RUNNER_TEMP
5143
- name: Build
52-
run: "cmake --build $env:RUNNER_TEMP --parallel --clean-first --config ${{ inputs.buildType }}"
44+
run: cmake --build $env:RUNNER_TEMP --parallel --clean-first --config ${{ inputs.buildType }}
5345

5446
- name: Install
55-
run: "cmake --build $env:RUNNER_TEMP --parallel --config ${{ inputs.buildType }} --target install"
47+
run: cmake --build $env:RUNNER_TEMP --parallel --config ${{ inputs.buildType }} --target install
5648

5749
- name: Upload Artifacts
5850
uses: actions/upload-artifact@v3
5951
if: inputs.artifactName
6052
with:
61-
name: "${{ inputs.artifactName }}"
62-
path: "${{ github.workspace }}/${{ inputs.subdir }}"
53+
name: ${{ inputs.artifactName }}
54+
path: ${{ github.workspace }}/install
Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021-2023, Collabora, Ltd.
1+
# Copyright 2021-2022, Collabora, Ltd.
22
# SPDX-License-Identifier: CC0-1.0
33

44
name: Windows builds
@@ -12,73 +12,62 @@ on:
1212
workflow_dispatch:
1313

1414
jobs:
15-
# generate_matrix:
16-
# runs-on: ubuntu-latest
17-
# outputs:
18-
# matrix: "${{ steps.set-matrix.outputs.matrix }}"
19-
# steps:
20-
# - uses: "actions/checkout@v3"
21-
# - id: set-matrix
22-
# run: "python3 .github/scripts/generate_windows_matrix_build.py matrix"
15+
generate_matrix:
16+
runs-on: ubuntu-latest
17+
outputs:
18+
matrix: ${{ steps.set-matrix.outputs.matrix }}
19+
steps:
20+
- uses: actions/checkout@v3
21+
- id: set-matrix
22+
run: python3 .github/scripts/generate_windows_matrix_build.py matrix
2323
msvc-build:
24-
# needs: generate_matrix
24+
needs: generate_matrix
2525
strategy:
2626
fail-fast: true
27-
# TODO: Fix matrix generation? Broke recently due to changes in github actions
28-
# matrix: "${{fromJson(needs.generate_matrix.outputs.matrix)}}"
29-
matrix:
30-
preset:
31-
- win32
32-
- x64
33-
- win32_uwp
34-
- x64_uwp
35-
- arm64_uwp
36-
- arm_uwp
27+
matrix: ${{fromJson(needs.generate_matrix.outputs.matrix)}}
3728

38-
uses: "./.github/workflows/msvc-build-preset.yml"
29+
uses: ./.github/workflows/msvc-build-preset.yml
3930
with:
40-
preset: "${{ matrix.preset }}"
31+
preset: ${{ matrix.preset }}
4132
artifactName: "loader_${{ matrix.preset }}"
42-
buildType: "RelWithDebInfo"
4333

4434
organize-and-release-artifacts:
4535
if: inputs.organizeAndRelease
4636
needs:
4737
- msvc-build
4838
runs-on: ubuntu-latest
4939
steps:
50-
- uses: "actions/checkout@v3"
40+
- uses: actions/checkout@v3
5141

5242
- name: Retrieve artifacts
53-
uses: "actions/download-artifact@v3"
43+
uses: actions/download-artifact@v3
5444
with:
5545
path: artifacts
5646

5747
- name: Organize artifacts
58-
run: 'python .github/scripts/organize_windows_artifacts.py "${{ github.workspace }}" "${{ github.workspace }}/openxr_loader"'
48+
run: python .github/scripts/organize_windows_artifacts.py "${{ github.workspace }}" "${{ github.workspace }}/openxr_loader"
5949

6050
- name: Upload combined artifact
61-
uses: "actions/upload-artifact@v3"
51+
uses: actions/upload-artifact@v3
6252
with:
6353
name: openxr_loader_windows
6454
path: "${{ github.workspace }}/openxr_loader"
6555

6656
# NuGet stuff now
6757

6858
- name: Setup NuGet
69-
uses: "NuGet/setup-nuget@296fd3ccf8528660c91106efefe2364482f86d6f"
59+
uses: NuGet/setup-nuget@v1
7060
with:
7161
nuget-version: "5.x"
72-
7362
- name: Stage loader and headers for NuGet
7463
shell: pwsh
75-
run: '${{ github.workspace }}/.azure-pipelines/nuget/stage_nuget.ps1 "${{ github.workspace }}/openxr_loader" "${{ github.workspace }}/specification/Makefile" "${{ github.workspace }}/openxr_loader_staging"'
64+
run: ${{ github.workspace }}/.azure-pipelines/nuget/stage_nuget.ps1 "${{ github.workspace }}/openxr_loader" "${{ github.workspace }}/specification/Makefile" "${{ github.workspace }}/openxr_loader_staging"
7665

7766
- name: Pack NuGet package
78-
run: 'nuget pack "${{ github.workspace }}/openxr_loader_staging/OpenXR.Loader.nuspec" -OutputDirectory "${{ github.workspace }}/nuget"'
67+
run: nuget pack ${{ github.workspace }}/openxr_loader_staging/OpenXR.Loader.nuspec -OutputDirectory ${{ github.workspace }}/nuget
7968

8069
- name: Upload NuGet artifact
81-
uses: "actions/upload-artifact@v3"
70+
uses: actions/upload-artifact@v3
8271
with:
8372
name: NuGet
8473
path: "${{ github.workspace }}/nuget"

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ pregen/
1818
generated-includes
1919
cmake_install.cmake
2020
cmake_uninstall.cmake
21-
cmake-build-*
2221

2322
# Marker file for a snapshot build
2423
SNAPSHOT

.reuse/dep5

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ Upstream-Contact: Ryan Pavlik <openxr-speceditor AT khronos DOT org>
44
Source: https://khronos.org/registry/OpenXR/
55

66
Files: changes/*
7-
HOTFIX
87
Copyright: 2019-2023, The Khronos Group Inc.
98
License: CC-BY-4.0
109

@@ -39,27 +38,6 @@ Copyright: 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
3938
License: MIT OR LicenseRef-jsoncpp-public-domain
4039
Comment: Unmodified, vendored copy of jsoncpp 1.9.5
4140

42-
Files: src/external/tinygltf/*
43-
Copyright: 2017 Syoyo Fujita, Aurélien Chatelain and many contributors
44-
License: MIT
45-
Comment: Unmodified, vendored copy of a subset of the tiny-gltf repo v2.8.9
46-
47-
Files: src/external/tinygltf/json.hpp
48-
Copyright: 2013-2017 Niels Lohmann <http://nlohmann.me>
49-
License: MIT
50-
Comment: Unmodified, included in tiny-gltf repo.
51-
52-
Files: src/external/d3dx12/*
53-
Copyright: Copyright (c) Microsoft Corporation.
54-
License: MIT
55-
Comment: Unmodified, vendored copy of DirectX-Headers commit da7aedb
56-
of https://github.com/microsoft/DirectX-Headers filtered to just d3dx12 headers
57-
58-
Files: src/external/mikktspace/*
59-
Copyright: 2011 by Morten S. Mikkelsen
60-
License: Zlib
61-
Comment: Unmodified, vendored copy of MikkTSpace commit 3e895b4
62-
6341
Files: src/external/jnipp/*
6442
Copyright: 2016-2020, Mitchell Dowd
6543
2020, Collabora, Ltd.
@@ -89,7 +67,7 @@ Comment: In-line license comments requested, https://gitlab.khronos.org/openxr/o
8967

9068
Files: specification/sources/chapters/extensions/ext/ext_performance_settings.adoc
9169
specification/sources/chapters/extensions/ext/ext_thermal_query.adoc
92-
Copyright: 2017-2023, The Khronos Group Inc.
70+
Copyright: 2017-2020, The Khronos Group Inc.
9371
License: CC-BY-4.0
9472
Comment: In-line license comments requested, https://gitlab.khronos.org/openxr/openxr/-/issues/1419
9573

@@ -98,7 +76,7 @@ Files: src/conformance/platform_specific/android_resources/mipmap-hdpi/*
9876
src/conformance/platform_specific/android_resources/mipmap-xhdpi/*
9977
src/conformance/platform_specific/android_resources/mipmap-xxhdpi/*
10078
src/conformance/platform_specific/android_resources/mipmap-xxxhdpi/*
101-
Copyright: 2020-2023, The Khronos Group Inc.
79+
Copyright: 2020, The Khronos Group Inc.
10280
2020, Google
10381
License: Apache-2.0
10482
Comment: Generated .png versions of an icon, created in Android Studio

BUILDING.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -142,21 +142,6 @@ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ../..
142142
make
143143
```
144144

145-
### macOS
146-
147-
Building the OpenXR components in this tree on macOS is supported using Xcode
148-
14.0 and newer. You may need to install Xcode Command Line Tools and cmake.
149-
150-
First, generate the Xcode project file using CMake:
151-
152-
```cmd
153-
mkdir -p build/macos
154-
cd build/macos
155-
cmake -G "Xcode" ../..
156-
```
157-
158-
Finally, open the build/macos/OPENXR.xcodeproj in Xcode to build the samples.
159-
160145
### Android
161146

162147
```sh

0 commit comments

Comments
 (0)