Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Etch-9:xr
monado-vulkan-layers-git
_service:obs_scm:vulkan-layers-0.9.0ae43cdc.obs...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:vulkan-layers-0.9.0ae43cdc.obscpio of Package monado-vulkan-layers-git
07070100000000000081A400000000000000000000000165D6762A000007C7000000000000000000000000000000000000002C00000000vulkan-layers-0.9.0ae43cdc/.cmake-format.py# SPDX-FileCopyrightText: 2021-2022, Collabora, Ltd. # SPDX-License-Identifier: CC0-1.0 with section("parse"): # Specify structure for custom cmake functions additional_commands = { "generate_openxr_runtime_manifest_at_install": { "kwargs": { "DESTINATION": 1, "MANIFEST_TEMPLATE": 1, "OUT_FILENAME": 1, "RELATIVE_RUNTIME_DIR": 1, "RUNTIME_DIR_RELATIVE_TO_MANIFEST": 1, "RUNTIME_TARGET": 1, }, "pargs": {"flags": ["ABSOLUTE_RUNTIME_PATH"], "nargs": "*"}, }, "generate_openxr_runtime_manifest_buildtree": { "kwargs": {"MANIFEST_TEMPLATE": 1, "OUT_FILE": 1, "RUNTIME_TARGET": 1}, "pargs": {"flags": [], "nargs": "*"}, }, "generate_vulkan_api_layer_manifest_at_install": { "kwargs": { "DESTINATION": 1, "MANIFEST_TEMPLATE": 1, "OUT_FILENAME": 1, "RELATIVE_LAYER_DIR": 1, "LAYER_DIR_RELATIVE_TO_MANIFEST": 1, "LAYER_TARGET": 1, "COMPONENT": 1, }, "pargs": {"flags": ["ABSOLUTE_RUNTIME_PATH"], "nargs": "*"}, }, "generate_vulkan_api_layer_manifest_buildtree": { "kwargs": {"MANIFEST_TEMPLATE": 1, "OUT_FILE": 1, "LAYER_TARGET": 1}, "pargs": {"flags": [], "nargs": "*"}, }, "option_with_deps": { "kwargs": {"DEFAULT": 1, "DEPENDS": "+"}, "pargs": {"flags": [], "nargs": "2+"}, }, } with section("format"): line_width = 100 tab_size = 8 use_tabchars = True fractional_tab_policy = "use-space" max_prefix_chars = 4 dangle_parens = True dangle_align = "prefix-indent" max_pargs_hwrap = 4 max_rows_cmdline = 1 keyword_case = "upper" # Do not reflow comments with section("markup"): enable_markup = False 07070100000001000081A400000000000000000000000165D6762A000000CF000000000000000000000000000000000000002600000000vulkan-layers-0.9.0ae43cdc/.gitignore# SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. # Ignore Python caches __pycache__/ # Ignore debian bits and pieces obj-*/ .pc/ # Ignore miscellany build*/ .vscode/ 07070100000002000041ED00000000000000000000000365D6762A00000000000000000000000000000000000000000000002600000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci07070100000003000081A400000000000000000000000165D6762A00003218000000000000000000000000000000000000002A00000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci.yml# SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors ## ############################################ # GENERATED - DO NOT EDIT # # see .gitlab-ci/ci.template, etc instead # ########################################### ## stages: - container_prep - build - package - reprepro - pages - deploy ## ## ## ## variables: FDO_UPSTREAM_REPO: monado/utilities/vulkan-layers .templates_sha: &templates_sha 541748b7644201bac3e3b1ffd69f4ae67a678d93 include: # Debian - project: "freedesktop/ci-templates" ref: *templates_sha file: "/templates/debian.yml" # Ubuntu - project: "freedesktop/ci-templates" ref: *templates_sha file: "/templates/ubuntu.yml" # Variables for build and usage of Debian bullseye image .monado.variables.debian:bullseye: variables: FDO_DISTRIBUTION_VERSION: "bullseye" FDO_DISTRIBUTION_TAG: "2022-06-20.0" # Variables for build and usage of Ubuntu focal image .monado.variables.ubuntu:focal: variables: FDO_DISTRIBUTION_VERSION: "20.04" FDO_DISTRIBUTION_TAG: "2022-06-20.0" # Variables for build and usage of Ubuntu jammy image .monado.variables.ubuntu:jammy: variables: FDO_DISTRIBUTION_VERSION: "22.04" FDO_DISTRIBUTION_TAG: "2022-06-20.0" ### # Container prep jobs # Make Debian bullseye image debian:bullseye:container_prep: stage: container_prep extends: - .monado.variables.debian:bullseye - .fdo.container-build@debian # from ci-templates only: changes: - .gitlab-ci/**/* variables: FDO_DISTRIBUTION_PACKAGES: 'build-essential clang-format cmake codespell curl debhelper devscripts doxygen dput-ng gettext-base git graphviz libvulkan-dev ninja-build patch python3 python3-click python3-pip unzip wget' # Make Ubuntu focal image ubuntu:focal:container_prep: stage: container_prep extends: - .monado.variables.ubuntu:focal - .fdo.container-build@ubuntu # from ci-templates only: changes: - .gitlab-ci/**/* variables: FDO_DISTRIBUTION_PACKAGES: 'build-essential cmake curl debhelper devscripts dput-ng gettext-base git libvulkan-dev ninja-build patch python3 unzip wget' # Make Ubuntu jammy image ubuntu:jammy:container_prep: stage: container_prep extends: - .monado.variables.ubuntu:jammy - .fdo.container-build@ubuntu # from ci-templates only: changes: - .gitlab-ci/**/* variables: FDO_DISTRIBUTION_PACKAGES: 'build-essential cmake curl debhelper devscripts dput-ng gettext-base git libvulkan-dev ninja-build patch python3 python3-pip reprepro unzip wget' FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/install-python-packages.sh' ### # Container usage base jobs # Base for using Debian bullseye image .monado.image.debian:bullseye: extends: - .monado.variables.debian:bullseye - .fdo.distribution-image@debian # from ci-templates # Base for using Ubuntu focal image .monado.image.ubuntu:focal: extends: - .monado.variables.ubuntu:focal - .fdo.distribution-image@ubuntu # from ci-templates # Base for using Ubuntu jammy image .monado.image.ubuntu:jammy: extends: - .monado.variables.ubuntu:jammy - .fdo.distribution-image@ubuntu # from ci-templates # # # ### # Windows container-related jobs (prep and usage) .monado.common_variables.windows:vs2022: inherit: default: false variables: MONADO_WIN_BASE_TAG: "20220727.0" MONADO_WIN_MAIN_TAG: "20220727.0" MONADO_BASE_IMAGE_PATH: "win2022/vs2022_base" MONADO_MAIN_IMAGE_PATH: "win2022/vs2022" .monado.variables.windows:vs2022: inherit: default: false extends: - .monado.common_variables.windows:vs2022 variables: MONADO_IMAGE_PATH: "$MONADO_MAIN_IMAGE_PATH" FDO_DISTRIBUTION_TAG: "$MONADO_WIN_MAIN_TAG" MONADO_IMAGE: "$CI_REGISTRY_IMAGE/$MONADO_IMAGE_PATH:$FDO_DISTRIBUTION_TAG" MONADO_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$MONADO_IMAGE_PATH:$FDO_DISTRIBUTION_TAG" # Shared container-building job .monado.windows.container_prep: inherit: default: false tags: - windows - "2022" - shell variables: GIT_STRATEGY: fetch only: changes: - .gitlab-ci/**/* stage: container_prep script: - | .gitlab-ci\windows\monado_container.ps1 -RegistryUri "$CI_REGISTRY" -RegistryUsername "$CI_REGISTRY_USER" -UserImage "$MONADO_IMAGE" -UpstreamImage "$MONADO_UPSTREAM_IMAGE" -Dockerfile "$DOCKERFILE" -BaseImage "$MONADO_BASE_IMAGE" -BaseUpstreamImage "$MONADO_UPSTREAM_BASE_IMAGE" -Verbose # # This container just installs Visual C++ Build Tools. # win:container_prep:base: # extends: # - .monado.windows.container_prep # - .monado.common_variables.windows:vs2022 # variables: # DOCKERFILE: Dockerfile.vs2022 # MONADO_IMAGE_PATH: ${MONADO_BASE_IMAGE_PATH} # FDO_DISTRIBUTION_TAG: "$MONADO_WIN_BASE_TAG" # MONADO_IMAGE: "$CI_REGISTRY_IMAGE/$MONADO_IMAGE_PATH:$FDO_DISTRIBUTION_TAG" # MONADO_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$MONADO_IMAGE_PATH:$FDO_DISTRIBUTION_TAG" # This container adds other deps win:container_prep: extends: - .monado.windows.container_prep - .monado.variables.windows:vs2022 variables: DOCKERFILE: Dockerfile # MONADO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/$MONADO_BASE_IMAGE_PATH:$MONADO_WIN_BASE_TAG" # MONADO_UPSTREAM_BASE_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$MONADO_BASE_IMAGE_PATH:$MONADO_WIN_BASE_TAG" # Base job to use a Windows build container .monado.image.windows: tags: - windows - "2022" - docker extends: - .monado.variables.windows:vs2022 image: $MONADO_IMAGE ## ## ## ## # check ci-fairy ci-fairy: stage: build extends: - .monado.image.ubuntu:jammy rules: - if: '$CI_PIPELINE_SOURCE == "push"' changes: - .gitlab-ci/**/* script: # Make sure a full ci-fairy run is a no-op (meaning no generated files were modified on their own) - make -f .gitlab-ci/ci-scripts.mk clean all # If your build fails here, run the preceding `make` line and commit the changes. See .gitlab-ci/README.md for details # We only push if the repo is the upstream one because that's the only place our token works. - | if ! git diff --exit-code; then if [ $CI_PROJECT_PATH = $FDO_UPSTREAM_REPO ]; then echo "Automatically re-generating and pushing a new commit." git add -u git config user.name "Monado Project CI" git config user.email "ryan.pavlik@collabora.com" git commit -m "ci: Regenerate" git push "https://token:${PUSH_TOKEN}@${CI_REPOSITORY_URL#*@}" "HEAD:${CI_COMMIT_REF_NAME}" else echo "Please commit the results of the following: make -f .gitlab-ci/ci-scripts.mk clean all" exit 1 fi fi debian:cmake: stage: build extends: - .monado.image.debian:bullseye script: - rm -rf build - cmake -GNinja -B build -S . - ninja -C build ubuntu:focal:cmake: stage: build extends: - .monado.image.ubuntu:focal script: - rm -rf build - cmake -GNinja -B build -S . - ninja -C build ubuntu:jammy:cmake: stage: build extends: - .monado.image.ubuntu:jammy script: - rm -rf build - cmake -GNinja -B build -S . - ninja -C build # Windows build windows: stage: build extends: - .monado.image.windows script: - ./.gitlab-ci/Build-OnWindows.ps1 -Install -Package artifacts: when: always paths: - install - build/Testing/Temporary - build/*.exe ## ## ## ## # Packaging source-tarball: stage: build interruptible: true rules: # Only the default branch of the "upstream" repo. - if: '$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # Or, on release tags - if: $CI_COMMIT_TAG # Build packages on branches starting with "ci" too, just don't publish them. - if: '$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH =~ /^ci.*/' extends: - .monado.image.ubuntu:jammy variables: GIT_STRATEGY: clone script: # Prep the source tree - git clean -dfx - git fetch --tags - .gitlab-ci/make-source-tarball.sh artifacts: untracked: false paths: - "monado-vulkan-layers*.tar.xz" reports: dotenv: sourcetarball.env debian:bullseye:package: stage: package rules: # Only the default branch of the "upstream" repo. - if: '$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # Or, on release tags - if: $CI_COMMIT_TAG # Build packages on branches starting with "ci" too, just don't publish them. - if: '$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH =~ /^ci.*/' interruptible: true extends: - ".monado.image.debian:bullseye" variables: GIT_STRATEGY: clone DEBFULLNAME: "Monado CI" DEBEMAIL: "ryan.pavlik@collabora.com" DISTRO: debian CODENAME: bullseye DEB_VERSION_SUFFIX: bpo11 needs: - source-tarball before_script: - 'git config --global user.name "Monado CI"' - 'git config --global user.email "ryan.pavlik@collabora.com"' script: # Unpack the source tarball we got - tar xJf *.tar.xz - .gitlab-ci/build-and-submit-package.sh artifacts: paths: - "incoming/" expire_in: 2 days expose_as: 'deb packages for bullseye' reports: dotenv: bullseye.env ubuntu:focal:package: stage: package rules: # Only the default branch of the "upstream" repo. - if: '$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # Or, on release tags - if: $CI_COMMIT_TAG # Build packages on branches starting with "ci" too, just don't publish them. - if: '$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH =~ /^ci.*/' interruptible: true extends: - ".monado.image.ubuntu:focal" variables: GIT_STRATEGY: clone DEBFULLNAME: "Monado CI" DEBEMAIL: "ryan.pavlik@collabora.com" DISTRO: ubuntu CODENAME: focal DEB_VERSION_SUFFIX: ubuntu2004 needs: - source-tarball before_script: - 'git config --global user.name "Monado CI"' - 'git config --global user.email "ryan.pavlik@collabora.com"' script: # Unpack the source tarball we got - tar xJf *.tar.xz - .gitlab-ci/build-and-submit-package.sh artifacts: paths: - "incoming/" expire_in: 2 days expose_as: 'deb packages for focal' reports: dotenv: focal.env ubuntu:jammy:package: stage: package rules: # Only the default branch of the "upstream" repo. - if: '$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # Or, on release tags - if: $CI_COMMIT_TAG # Build packages on branches starting with "ci" too, just don't publish them. - if: '$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH =~ /^ci.*/' interruptible: true extends: - ".monado.image.ubuntu:jammy" variables: GIT_STRATEGY: clone DEBFULLNAME: "Monado CI" DEBEMAIL: "ryan.pavlik@collabora.com" DISTRO: ubuntu CODENAME: jammy DEB_VERSION_SUFFIX: ubuntu2204 needs: - source-tarball before_script: - 'git config --global user.name "Monado CI"' - 'git config --global user.email "ryan.pavlik@collabora.com"' script: # Unpack the source tarball we got - tar xJf *.tar.xz - .gitlab-ci/build-and-submit-package.sh artifacts: paths: - "incoming/" expire_in: 2 days expose_as: 'deb packages for jammy' reports: dotenv: jammy.env reprepro:package: stage: reprepro interruptible: true extends: - .monado.image.ubuntu:jammy rules: # Only the default branch of the "upstream" repo. - if: '$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # Or, on release tags - if: $CI_COMMIT_TAG needs: - debian:bullseye:package - ubuntu:focal:package - ubuntu:jammy:package script: - bash .gitlab-ci/reprepro.sh artifacts: paths: - "repo/" expire_in: 2 days ### # Pages ### pages: stage: deploy rules: # Only the default branch of the "upstream" repo. - if: '$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' needs: - "reprepro:package" script: - mkdir -p public - mv repo public/apt artifacts: paths: - public 07070100000004000081A400000000000000000000000165D6762A00000942000000000000000000000000000000000000003A00000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/Build-OnWindows.ps1# Copyright 2019-2022, Mesa contributors # Copyright 2022, Collabora, Ltd. # SPDX-License-Identifier: MIT # Based on https://gitlab.freedesktop.org/mesa/mesa/-/blob/8396df5ad90aeb6ab2267811aba2187954562f81/.gitlab-ci/windows/mesa_build.ps1 [CmdletBinding()] param ( # Should we install the project? [Parameter()] [switch] $Install = $false, # Should we package the project? [Parameter()] [switch] $Package = $false, # Should we run the test suite? [Parameter()] [switch] $RunTests = $false ) $ErrorActionPreference = 'Stop' Get-Date Write-Host "Compiling" $sourcedir = (Resolve-Path "$PSScriptRoot/..") $builddir = Join-Path $sourcedir "build" $installdir = Join-Path $sourcedir "install" # $vcpkgdir = "c:\vcpkg" # $toolchainfile = Join-Path $vcpkgdir "scripts/buildsystems/vcpkg.cmake" Remove-Item -Recurse -Force $installdir -ErrorAction SilentlyContinue Write-Host "builddir:$builddir" Write-Host "installdir:$installdir" Write-Host "sourcedir:$sourcedir" # Write-Host "toolchainfile:$toolchainfile" $installPath = vswhere -version 17 -latest -products * -property installationpath Write-Host "vswhere.exe installPath: $installPath" if (!$installPath) { throw "Could not find VS2022 using vswhere!" } $devshell = vswhere -version 17 -products * -latest -find "**\Microsoft.VisualStudio.DevShell.dll" if (!$devshell) { throw "Could not find VS2022 devshell module using vswhere!" } Write-Host "devshell: $devshell" Import-Module $devshell Enter-VsDevShell -VsInstallPath $installPath -SkipAutomaticLocation -DevCmdArguments '-arch=x64 -no_logo -host_arch=amd64' Push-Location $sourcedir $cmakeArgs = @( "-S" "." "-B" "$builddir" "-GNinja" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" # "-DCMAKE_TOOLCHAIN_FILE=$toolchainfile" "-DCMAKE_INSTALL_PREFIX=$installdir" # "-DVCPKG_MANIFEST_MODE=OFF" # "-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON" ) cmake @cmakeArgs if (!$?) { throw "cmake generate failed!" } Write-Host "Building" cmake --build $builddir if (!$?) { throw "cmake build failed!" } if ($RunTests) { Write-Host "Running tests" cmake --build $builddir --target test } if ($Install) { Write-Host "Installing" cmake --build $builddir --target install } if ($Package) { Write-Host "Packaging" cmake --build $builddir --target package } 07070100000005000081A400000000000000000000000165D6762A00000464000000000000000000000000000000000000003000000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/README.md# CI and Generated Stuff Readme <!-- # Copyright 2018-2022 Collabora, Ltd. and the Monado contributors # # SPDX-License-Identifier: CC0-1.0 --> We use the FreeDesktop ["CI Templates"](https://freedesktop.pages.freedesktop.org/ci-templates) to maintain build containers using code in this repo, storing the images in GitLab Registry. Our CI files (and some other files) are auto-generated from Jinja templates and `config.yml`, using [ci-fairy](https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html). You can install it with: <!-- do not break the following line, it is used in CI setup too, to make sure it works --> ```sh python3 -m pip install git+https://gitlab.freedesktop.org/freedesktop/ci-templates@541748b7644201bac3e3b1ffd69f4ae67a678d93 ``` On Windows you will also need to have GNU make and busybox installed, such as with: ```pwsh scoop install make busybox ``` To re-generate files, from the root directory, run: ```sh make -f .gitlab-ci/ci-scripts.mk ``` If you really want to force rebuilding, you can build the clean target first: ```sh make -f .gitlab-ci/ci-scripts.mk clean all ``` 07070100000006000081ED00000000000000000000000165D6762A000006BB000000000000000000000000000000000000004200000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/build-and-submit-package.sh#!/usr/bin/env bash # SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors # # Requires some environment variables (normally set by CI) # Any extra args get passed to debuild, so try -B for a local binary-only build CI_COMMIT_SHA=${CI_COMMIT_SHA:-HEAD} CODENAME=${CODENAME:-focal} DISTRO=${CODENAME:-ubuntu} DEB_VERSION_SUFFIX=${DEB_VERSION_SUFFIX:-ci} set -euo pipefail echo "DISTRO ${DISTRO}" echo "CODENAME ${CODENAME}" echo "DEB_VERSION_SUFFIX ${DEB_VERSION_SUFFIX}" echo "CI_COMMIT_SHA ${CI_COMMIT_SHA}" echo "FULL_VER ${FULL_VER}" echo "DATESTAMP ${DATESTAMP}" # Prep the source tree: grab the debian directory from the packaging branch. git remote update --prune git checkout origin/debian -- debian/ PKGNAME=$(dpkg-parsechangelog --show-field source) mv debian ${PKGNAME}/debian INCOMING="$(pwd)/incoming" export INCOMING mkdir -p "$INCOMING" cd monado-vulkan-layers export DEVSCRIPTS_CHECK_DIRNAME_LEVEL=0 DECORATED="${FULL_VER}-1~${DATESTAMP}${DEB_VERSION_SUFFIX}" # -b forces the version even though it's "worse" than the previous one. dch --newversion "${DECORATED}" --preserve "Automated CI build of commit ${CI_COMMIT_SHA}" -b # Stash the package version in a convenient file for a later job. echo "${DECORATED}" > "${INCOMING}/${CODENAME}.distro" echo "${CODENAME}_pkgversion=${DECORATED}" > "../${CODENAME}.env" # Build the package debuild -uc -us "$@" cd .. # Use dput-ng to move the package-related files into some artifacts. mkdir -p ~/.dput.d/profiles envsubst < .gitlab-ci/localhost.json > ~/.dput.d/profiles/localhost.json eval "$(dpkg-architecture)" dput --debug localhost "${PKGNAME}_${DECORATED}_${DEB_BUILD_ARCH}.changes" 07070100000007000081A400000000000000000000000165D6762A00000A3D000000000000000000000000000000000000003900000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/ci-build.yml.jinja#{# # SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors #}# #{# This file contains "normal" build-related parts of the template. #}# #{# It is a Jinja template for generating (part of) a YAML file configuring GitLab CI #}# #{# See README.md for details on how to regenerate generated files after updating this template file. #}# {% from 'macros.jinja' import make_cmake_args %} {% from 'ci-containers.yml.jinja' import base_job_to_use_image %} {% for distro in distributions -%} {%- for image in distro.images if image.codename == "jammy" -%} # check ci-fairy ci-fairy: stage: build extends: - {{base_job_to_use_image(distro, image)}} rules: - if: '$CI_PIPELINE_SOURCE == "push"' changes: - .gitlab-ci/**/* script: # Make sure a full ci-fairy run is a no-op (meaning no generated files were modified on their own) - make -f .gitlab-ci/ci-scripts.mk clean all # If your build fails here, run the preceding `make` line and commit the changes. See .gitlab-ci/README.md for details # We only push if the repo is the upstream one because that's the only place our token works. - | if ! git diff --exit-code; then if [ $CI_PROJECT_PATH = $FDO_UPSTREAM_REPO ]; then echo "Automatically re-generating and pushing a new commit." git add -u git config user.name "Monado Project CI" git config user.email "ryan.pavlik@collabora.com" git commit -m "ci: Regenerate" git push "https://token:${PUSH_TOKEN}@${CI_REPOSITORY_URL#*@}" "HEAD:${CI_COMMIT_REF_NAME}" else echo "Please commit the results of the following: make -f .gitlab-ci/ci-scripts.mk clean all" exit 1 fi fi {% endfor -%} {%- endfor %} {% for distro in distributions -%} {%- for image in distro.images if image.build_jobs -%} {%- for job in image.build_jobs %} {{job.name}}: stage: build extends: - {{base_job_to_use_image(distro, image)}} script: {#- regular or NDK cmake builds -#} {%- if "cmake" in job.name or "ndk" in job.name %} - rm -rf build - cmake -GNinja -B build -S . {{- make_cmake_args(job.cmake_defines) }} - ninja -C build {%- else %} {# error message #} CANNOT GUESS JOB TYPE {%- endif %} {% endfor -%} {%- endfor -%} {%- endfor %} # Windows build windows: stage: build extends: - .monado.image.windows script: - ./.gitlab-ci/Build-OnWindows.ps1 -Install -Package artifacts: when: always paths: - install - build/Testing/Temporary - build/*.exe 07070100000008000081A400000000000000000000000165D6762A00000C8E000000000000000000000000000000000000003E00000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/ci-containers.yml.jinja#{# # SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors #}# #{# This file contains container-related parts of the template. #}# #{# It is a Jinja template for generating (part of) a YAML file configuring GitLab CI #}# #{# See README.md for details on how to regenerate generated files after updating this template file. #}# {# Macro to compute job name to extend to use image given distro name and codename #} {% macro base_job_to_use_image_for_distro_and_codename(distro_name, codename) %}.monado.image.{{distro_name}}:{{codename}}{% endmacro -%} {# Macro to compute job name to extend to use image given distro and image objects #} {% macro base_job_to_use_image(distro, image) %}{{base_job_to_use_image_for_distro_and_codename(distro.name, image.codename)}}{% endmacro -%} {# Macro to compute job name to extend to use image given a package we want TODO doesn't work#} {% macro base_job_to_use_image_containing(package) %} {% for distro in distributions -%} {%- for image in distro.images if package in image.packages %} {{ base_job_to_use_image(distro, image) if loop.first }} {% endfor -%} {%- endfor %} {% endmacro -%} variables: FDO_UPSTREAM_REPO: monado/utilities/vulkan-layers .templates_sha: &templates_sha {{fdo_ci_templates_sha}} include: {% for distro in distributions %} # {{ distro.name | capitalize }} - project: "freedesktop/ci-templates" ref: *templates_sha file: "/templates/{{distro.name}}.yml" {% endfor %} {% for distro in distributions -%} {%- for image in distro.images %} # Variables for build and usage of {{ distro.name|capitalize }} {{ image.codename }} image .monado.variables.{{ distro.name }}:{{ image.codename }}: variables: FDO_DISTRIBUTION_VERSION: "{{ image["distro_version"] | default(image.codename) }}" FDO_DISTRIBUTION_TAG: "{{image["tag"]}}" {% if "repo_suffix" in image %} FDO_REPO_SUFFIX: {{image["repo_suffix"]}} {% endif %} {% endfor -%} {%- endfor %} ### # Container prep jobs {%- for distro in distributions -%} {%- for image in distro.images %} # Make {{ distro.name|capitalize }} {{image.codename}} image {{distro.name}}:{{image.codename}}:container_prep: stage: container_prep extends: - .monado.variables.{{distro.name}}:{{image.codename}} - .fdo.container-build@{{distro.name}} # from ci-templates only: changes: - .gitlab-ci/**/* variables: {# The packages list is actually a mapping, not an array, but the same syntax works. #} {# Needed to be a mapping so it could be "merged" #} FDO_DISTRIBUTION_PACKAGES: '{{image.packages | sort | join(" ")}}' {% if "script" in image %} FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/{{image["script"]}}' {% endif %} {% endfor -%} {%- endfor %} ### # Container usage base jobs {% for distro in distributions -%} {%- for image in distro.images %} # Base for using {{ distro.name|capitalize }} {{image.codename}} image {{ base_job_to_use_image(distro, image) }}: extends: - .monado.variables.{{ distro.name }}:{{ image.codename }} - .fdo.{{ "suffixed" if "repo_suffix" in image else "distribution" }}-image@{{ distro.name }} # from ci-templates {% endfor -%} {%- endfor %} 07070100000009000081A400000000000000000000000165D6762A00000DD0000000000000000000000000000000000000003D00000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/ci-packaging.yml.jinja#{# # SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors #}# #{# This file contains packaging-related parts of the template. #}# #{# It is a Jinja template for generating (part of) a YAML file configuring GitLab CI #}# #{# See README.md for details on how to regenerate generated files after updating this template file. #}# {% from 'ci-containers.yml.jinja' import base_job_to_use_image_for_distro_and_codename, base_job_to_use_image %} {% macro packaging_job_name(distro, image) -%} {{distro.name}}:{{image.codename}}:package {%- endmacro %} {% set reprepro_image_job = base_job_to_use_image_for_distro_and_codename("ubuntu", "jammy") %} {% set packaging_conditions %} # Only the default branch of the "upstream" repo. - if: '$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' {% endset %} {% set release_tag_conditions %} # Or, on release tags - if: $CI_COMMIT_TAG {% endset %} {% set ci_branch_conditions %} # Build packages on branches starting with "ci" too, just don't publish them. - if: '$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH =~ /^ci.*/' {% endset %} # Packaging source-tarball: stage: build interruptible: true rules: {{ packaging_conditions }} {{ release_tag_conditions }} {{ ci_branch_conditions }} extends: - {{ reprepro_image_job }} variables: GIT_STRATEGY: clone script: # Prep the source tree - git clean -dfx - git fetch --tags - .gitlab-ci/make-source-tarball.sh artifacts: untracked: false paths: - "monado-vulkan-layers*.tar.xz" reports: dotenv: sourcetarball.env {% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %} {{packaging_job_name(distro, image)}}: stage: package rules: {{ packaging_conditions }} {{ release_tag_conditions }} {{ ci_branch_conditions }} interruptible: true extends: - "{{ base_job_to_use_image(distro, image) }}" variables: GIT_STRATEGY: clone DEBFULLNAME: "{{packaging.name}}" DEBEMAIL: "{{packaging.email}}" DISTRO: {{distro.name}} CODENAME: {{image.codename}} DEB_VERSION_SUFFIX: {{image.deb_version_suffix}} needs: - source-tarball before_script: {# Configure git - needed despite not actually committing here. #} - 'git config --global user.name "{{packaging.name}}"' - 'git config --global user.email "{{packaging.email}}"' script: # Unpack the source tarball we got - tar xJf *.tar.xz - .gitlab-ci/build-and-submit-package.sh artifacts: paths: - "incoming/" expire_in: 2 days expose_as: 'deb packages for {{image.codename}}' reports: dotenv: {{image.codename}}.env {% endfor -%} {%- endfor %} reprepro:package: stage: reprepro interruptible: true extends: - {{ reprepro_image_job }} rules: {{ packaging_conditions }} {{ release_tag_conditions }} needs: {% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %} - {{packaging_job_name(distro, image)}} {% endfor -%} {%- endfor %} script: - bash .gitlab-ci/reprepro.sh artifacts: paths: - "repo/" expire_in: 2 days ### # Pages ### pages: stage: deploy rules: {{ packaging_conditions }} needs: - "reprepro:package" script: - mkdir -p public - mv repo public/apt artifacts: paths: - public 0707010000000A000081A400000000000000000000000165D6762A00000519000000000000000000000000000000000000003400000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/ci-scripts.mk# SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2022 Collabora, Ltd. and the Monado contributors # # To generate all the templated files, run this from the root of the repo: # make -f .gitlab-ci/ci-scripts.mk # These also all have their template named the same with a .jinja suffix. FILES_IN_SUBDIR := \ .gitlab-ci/distributions \ .gitlab-ci/reprepro.sh \ CONFIG_FILE := .gitlab-ci/config.yml OUTPUTS := .gitlab-ci.yml \ $(FILES_IN_SUBDIR) ifeq ($(OS),Windows_NT) CHMOD := busybox chmod RM := busybox rm -f else CHMOD := chmod RM := rm -f endif all: $(OUTPUTS) $(CHMOD) +x .gitlab-ci/*.sh .PHONY: all clean: $(RM) $(OUTPUTS) .PHONY: clean CI_FAIRY := ci-fairy generate-template --config=$(CONFIG_FILE) # As the default thing for ci-fairy to template, this is special cased .gitlab-ci.yml: .gitlab-ci/ci.template $(CONFIG_FILE) $(CI_FAIRY) $< > $@ # More deps: # included files .gitlab-ci.yml: .gitlab-ci/macros.jinja .gitlab-ci/ci-build.yml.jinja .gitlab-ci/ci-containers.yml.jinja .gitlab-ci/ci-packaging.yml.jinja .gitlab-ci/ci-win-containers.yml.jinja # command to install ci-fairy extracted from readme .gitlab-ci.yml: .gitlab-ci/README.md # Everything else is structured alike $(FILES_IN_SUBDIR): %: %.jinja $(CONFIG_FILE) $(CI_FAIRY) $< > $@ 0707010000000B000081A400000000000000000000000165D6762A00000A15000000000000000000000000000000000000004200000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/ci-win-containers.yml.jinja# {# included by ci.template #} # {# SPDX-License-Identifier: CC0-1.0 #} # {# SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors #} ### # Windows container-related jobs (prep and usage) .monado.common_variables.windows:vs2022: inherit: default: false variables: MONADO_WIN_BASE_TAG: "20220727.0" MONADO_WIN_MAIN_TAG: "20220727.0" MONADO_BASE_IMAGE_PATH: "win2022/vs2022_base" MONADO_MAIN_IMAGE_PATH: "win2022/vs2022" .monado.variables.windows:vs2022: inherit: default: false extends: - .monado.common_variables.windows:vs2022 variables: MONADO_IMAGE_PATH: "$MONADO_MAIN_IMAGE_PATH" FDO_DISTRIBUTION_TAG: "$MONADO_WIN_MAIN_TAG" MONADO_IMAGE: "$CI_REGISTRY_IMAGE/$MONADO_IMAGE_PATH:$FDO_DISTRIBUTION_TAG" MONADO_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$MONADO_IMAGE_PATH:$FDO_DISTRIBUTION_TAG" # Shared container-building job .monado.windows.container_prep: inherit: default: false tags: - windows - "{{win_runner_version}}" - shell variables: GIT_STRATEGY: fetch only: changes: - .gitlab-ci/**/* stage: container_prep script: - | .gitlab-ci\windows\monado_container.ps1 -RegistryUri "$CI_REGISTRY" -RegistryUsername "$CI_REGISTRY_USER" -UserImage "$MONADO_IMAGE" -UpstreamImage "$MONADO_UPSTREAM_IMAGE" -Dockerfile "$DOCKERFILE" -BaseImage "$MONADO_BASE_IMAGE" -BaseUpstreamImage "$MONADO_UPSTREAM_BASE_IMAGE" -Verbose # # This container just installs Visual C++ Build Tools. # win:container_prep:base: # extends: # - .monado.windows.container_prep # - .monado.common_variables.windows:vs2022 # variables: # DOCKERFILE: Dockerfile.vs2022 # MONADO_IMAGE_PATH: ${MONADO_BASE_IMAGE_PATH} # FDO_DISTRIBUTION_TAG: "$MONADO_WIN_BASE_TAG" # MONADO_IMAGE: "$CI_REGISTRY_IMAGE/$MONADO_IMAGE_PATH:$FDO_DISTRIBUTION_TAG" # MONADO_UPSTREAM_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$MONADO_IMAGE_PATH:$FDO_DISTRIBUTION_TAG" # This container adds other deps win:container_prep: extends: - .monado.windows.container_prep - .monado.variables.windows:vs2022 variables: DOCKERFILE: Dockerfile # MONADO_BASE_IMAGE: "$CI_REGISTRY_IMAGE/$MONADO_BASE_IMAGE_PATH:$MONADO_WIN_BASE_TAG" # MONADO_UPSTREAM_BASE_IMAGE: "$CI_REGISTRY/$FDO_UPSTREAM_REPO/$MONADO_BASE_IMAGE_PATH:$MONADO_WIN_BASE_TAG" # Base job to use a Windows build container .monado.image.windows: tags: - windows - "{{win_runner_version}}" - docker extends: - .monado.variables.windows:vs2022 image: $MONADO_IMAGE 0707010000000C000081A400000000000000000000000165D6762A0000040D000000000000000000000000000000000000003200000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/ci.template# SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors #{# This is the root Jinja template for generating .gitlab-ci.yml #}# #{# ignore the warning, this is actually the template to edit. #} ########################################### # GENERATED - DO NOT EDIT # # see .gitlab-ci/ci.template, etc instead # ########################################### #{# # useful links: # https://freedesktop.pages.freedesktop.org/ci-templates/ # https://freedesktop.pages.freedesktop.org/ci-templates/ci-fairy.html#templating-gitlab-ci-yml # https://gitlab.freedesktop.org/freedesktop/ci-templates # The following will update all files from templates: # make -f .gitlab-ci/ci-scripts.mk # # See README.md for more details #}# stages: - container_prep - build - package - reprepro - pages - deploy {% include 'ci-containers.yml.jinja' %} {% include 'ci-win-containers.yml.jinja' %} {% include 'ci-build.yml.jinja' %} {% include 'ci-packaging.yml.jinja' %} 0707010000000D000081A400000000000000000000000165D6762A00000755000000000000000000000000000000000000003100000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/config.yml# SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors # Please run the following from the repo root after modifying this file: # make -f .gitlab-ci/ci-scripts.mk fdo_ci_templates_sha: 541748b7644201bac3e3b1ffd69f4ae67a678d93 # These are a mapping, instead of a list/array, so we can merge. .default_debian_packages: &default_debian_packages # Packages required for build and some other basic jobs build-essential: git: wget: unzip: cmake: ninja-build: curl: patch: python3: libvulkan-dev: # Only used for building packages devscripts: debhelper: dput-ng: gettext-base: win_runner_version: 2022 # The distributions we'll make an image for distributions: - name: debian images: # This image does some extra work. - codename: bullseye tag: "2022-06-20.0" deb_version_suffix: bpo11 packages: <<: *default_debian_packages codespell: doxygen: graphviz: python3-pip: python3-click: clang-format: build_jobs: - name: "debian:cmake" - name: ubuntu images: # LTS - codename: focal distro_version: "20.04" tag: "2022-06-20.0" deb_version_suffix: ubuntu2004 packages: <<: *default_debian_packages build_jobs: - name: "ubuntu:focal:cmake" - codename: jammy distro_version: "22.04" tag: "2022-06-20.0" deb_version_suffix: ubuntu2204 build_jobs: - name: "ubuntu:jammy:cmake" script: install-python-packages.sh packages: <<: *default_debian_packages python3-pip: reprepro: packaging: # Name and email associated with the package name: "Monado CI" email: "ryan.pavlik@collabora.com" 0707010000000E000081A400000000000000000000000165D6762A00000267000000000000000000000000000000000000003400000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/distributionsOrigin: monado.freedesktop.org Description: Monado Vulkan layers CI apt repository Codename: bullseye Architectures: amd64 i386 source Components: main Tracking: minimal SignWith: ${MONADO_GPG_FINGERPRINT} Origin: monado.freedesktop.org Description: Monado Vulkan layers CI apt repository Codename: focal Architectures: amd64 i386 source Components: main Tracking: minimal SignWith: ${MONADO_GPG_FINGERPRINT} Origin: monado.freedesktop.org Description: Monado Vulkan layers CI apt repository Codename: jammy Architectures: amd64 i386 source Components: main Tracking: minimal SignWith: ${MONADO_GPG_FINGERPRINT} 0707010000000F000081A400000000000000000000000165D6762A000003E6000000000000000000000000000000000000003A00000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/distributions.jinja{# Copyright 2020-2022, Collabora, Ltd. SPDX-License-Identifier: BSL-1.0 #} {# Template for reprepro distributions config file. After this template gets expanded, with a paragraph for each distribution codename supported, the GPG fingerprint gets substituted into that at CI time using envsubst, (not ahead of time using ci-fairy) because the fingerprint is included in the "secrets" in CI. Note: There is no way to indicate comments in the reprepro distributions config file format, and whitespace is meaningful (need blank lines between paragraphs). Please run the following after modifying this file: make -f .gitlab-ci/ci-scripts.mk #} {% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %} Origin: monado.freedesktop.org Description: Monado Vulkan layers CI apt repository Codename: {{ image.codename }} Architectures: amd64 i386 source Components: main Tracking: minimal SignWith: ${MONADO_GPG_FINGERPRINT} {% endfor -%} {%- endfor %} 07070100000010000081A400000000000000000000000165D6762A00000079000000000000000000000000000000000000003C00000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/distributions.licenseCopyright 2020-2022, Collabora, Ltd. SPDX-License-Identifier: BSL-1.0 Generated from distributions.jinja with ci-fairy 07070100000011000081A400000000000000000000000165D6762A000000AC000000000000000000000000000000000000003500000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/gpg-agent.conf# SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors # Used for CI package building. allow-loopback-pinentry 07070100000012000081A400000000000000000000000165D6762A000000B5000000000000000000000000000000000000002F00000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/gpg.conf# SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors # Used for CI package building. use-agent pinentry-mode loopback 07070100000013000081ED00000000000000000000000165D6762A00000116000000000000000000000000000000000000003A00000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/install-ci-fairy.sh#!/bin/sh # SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors # This runs the command in the README as an extra bit of continuous integration. set -e ( cd "$(dirname "$0")" sh -c "$(grep pip README.md)" ) 07070100000014000081ED00000000000000000000000165D6762A000000E8000000000000000000000000000000000000004100000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/install-python-packages.sh#!/bin/sh # SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors set -e ( cd "$(dirname "$0")" ./install-ci-fairy.sh python3 -m pip install git-archive-all ) 07070100000015000081A400000000000000000000000165D6762A000000F2000000000000000000000000000000000000003500000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/localhost.json{ "+hooks": [ ], "-hooks": [ "gpg", "allowed-distribution", "suite-mismatch", "lintian" ], "incoming": "${INCOMING}", "meta": "debian", "method": "local", "run_lintian": false } 07070100000016000081A400000000000000000000000165D6762A00000041000000000000000000000000000000000000003D00000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/localhost.json.licenseCopyright 2020, Collabora, Ltd. SPDX-License-Identifier: BSL-1.007070100000017000081A400000000000000000000000165D6762A00000384000000000000000000000000000000000000003300000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/macros.jinja#{# # SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors #}# #{# This file contains container-related parts of the template. #}# #{# See README.md for details on how to regenerate generated files after updating this template file. #}# {% from 'ci-containers.yml.jinja' import base_job_to_use_image %} {# Macro to compute job name to extend to use image given a package we want#} {% macro base_job_to_use_image_containing(package) %} {% for distro in distributions -%} {%- for image in distro.images if package in image.packages %} {{distro}} {{image}} {{ base_job_to_use_image(distro, image) if loop.first }} {% endfor -%} {%- endfor %} {% endmacro -%} {% macro make_cmake_args(cmake_defines) %} {% if cmake_defines is defined %} {%- for k, v in cmake_defines |dictsort %} -D{{ k }}={{ v }}{% endfor %} {%- endif %} {%- endmacro -%} 07070100000018000081ED00000000000000000000000165D6762A0000034A000000000000000000000000000000000000003D00000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/make-source-tarball.sh#!/usr/bin/env bash # SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors # # Requires some environment variables (normally set by CI) CI_COMMIT_SHA=${CI_COMMIT_SHA:-HEAD} echo "Will make source tarball for ${CI_COMMIT_SHA}" CI_DIR=$(cd "$(dirname "$0")" && pwd) set -euo pipefail datestamp=$(date --utc "+%Y%m%d") FULL_VER=$("${CI_DIR}/../get-version.sh") if [ -z "$FULL_VER" ];then echo "Could not figure out version!" exit 1 fi echo "Got full version $FULL_VER" # Generate source tarball git-archive-all -v --prefix "monado-vulkan-layers" "../monado-vulkan-layers_$FULL_VER.orig.tar.xz" mv "../monado-vulkan-layers_$FULL_VER.orig.tar.xz" . # Stash these for later use echo "FULL_VER=$FULL_VER" > sourcetarball.env echo "DATESTAMP=$datestamp" >> sourcetarball.env 07070100000019000081ED00000000000000000000000165D6762A00000A5B000000000000000000000000000000000000003200000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/reprepro.sh#!/usr/bin/env bash # SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors # ############################################### # GENERATED - DO NOT EDIT # # see .gitlab-ci/reprepro.sh.template instead # ############################################### # set -euo pipefail # Convince gnupg to work properly in CI echo "Import and cache the GPG key" mkdir -p ~/.gnupg && chmod 700 ~/.gnupg cp .gitlab-ci/gpg.conf .gitlab-ci/gpg-agent.conf ~/.gnupg echo RELOADAGENT | gpg-connect-agent gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase-file "${MONADO_GPG_PASSPHRASE}" --import "${MONADO_GPG_SECRET_KEY}" echo "Prepare reprepro config" mkdir -p repo/conf # Substitute in the GPG fingerprint into the repository config. # This file is itself generated with ci-fairy. cat .gitlab-ci/distributions | envsubst > repo/conf/distributions echo "reprepro config file:" echo "---------------------" cat repo/conf/distributions echo "---------------------" PKGNAME="monado-vulkan-layers" # For each distro, sign the changes file and add it to the repo. # bullseye if [ -f "incoming/bullseye.distro" ]; then VERSION=$(cat incoming/bullseye.distro) echo "Signing and processing bullseye: ${VERSION}" debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase-file ${MONADO_GPG_PASSPHRASE}" "incoming/${PKGNAME}_${VERSION}_amd64.changes" reprepro -V --ignore=wrongdistribution -b repo include bullseye "incoming/${PKGNAME}_${VERSION}_amd64.changes" else echo "Skipping bullseye - no artifact found" fi # focal if [ -f "incoming/focal.distro" ]; then VERSION=$(cat incoming/focal.distro) echo "Signing and processing focal: ${VERSION}" debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase-file ${MONADO_GPG_PASSPHRASE}" "incoming/${PKGNAME}_${VERSION}_amd64.changes" reprepro -V --ignore=wrongdistribution -b repo include focal "incoming/${PKGNAME}_${VERSION}_amd64.changes" else echo "Skipping focal - no artifact found" fi # jammy if [ -f "incoming/jammy.distro" ]; then VERSION=$(cat incoming/jammy.distro) echo "Signing and processing jammy: ${VERSION}" debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase-file ${MONADO_GPG_PASSPHRASE}" "incoming/${PKGNAME}_${VERSION}_amd64.changes" reprepro -V --ignore=wrongdistribution -b repo include jammy "incoming/${PKGNAME}_${VERSION}_amd64.changes" else echo "Skipping jammy - no artifact found" fi 0707010000001A000081A400000000000000000000000165D6762A000007CD000000000000000000000000000000000000003800000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/reprepro.sh.jinja#!/usr/bin/env bash # SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors # {# ignore the warning, this is actually the template to edit. #} ############################################### # GENERATED - DO NOT EDIT # # see .gitlab-ci/reprepro.sh.template instead # ############################################### # {# # Please run the following after editing: # make -f .gitlab-ci/ci-scripts.mk #} set -euo pipefail # Convince gnupg to work properly in CI echo "Import and cache the GPG key" mkdir -p ~/.gnupg && chmod 700 ~/.gnupg cp .gitlab-ci/gpg.conf .gitlab-ci/gpg-agent.conf ~/.gnupg echo RELOADAGENT | gpg-connect-agent gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase-file "${MONADO_GPG_PASSPHRASE}" --import "${MONADO_GPG_SECRET_KEY}" echo "Prepare reprepro config" mkdir -p repo/conf # Substitute in the GPG fingerprint into the repository config. # This file is itself generated with ci-fairy. cat .gitlab-ci/distributions | envsubst > repo/conf/distributions echo "reprepro config file:" echo "---------------------" cat repo/conf/distributions echo "---------------------" PKGNAME="monado-vulkan-layers" # For each distro, sign the changes file and add it to the repo. {% for distro in distributions -%} {%- for image in distro.images if "deb_version_suffix" in image %} # {{ image.codename }} if [ -f "incoming/{{image.codename}}.distro" ]; then VERSION=$(cat incoming/{{image.codename}}.distro) echo "Signing and processing {{image.codename}}: ${VERSION}" debsign -k "${MONADO_GPG_FINGERPRINT}" -p "gpg --batch --no-tty --yes --pinentry-mode loopback --passphrase-file ${MONADO_GPG_PASSPHRASE}" "incoming/${PKGNAME}_${VERSION}_amd64.changes" reprepro -V --ignore=wrongdistribution -b repo include {{image.codename}} "incoming/${PKGNAME}_${VERSION}_amd64.changes" else echo "Skipping {{image.codename}} - no artifact found" fi {% endfor -%} {%- endfor %} 0707010000001B000041ED00000000000000000000000265D6762A00000000000000000000000000000000000000000000002E00000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/windows0707010000001C000081A400000000000000000000000165D6762A0000045E000000000000000000000000000000000000003900000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/windows/Dockerfile# Copyright 2019-2022, Mesa contributors # Copyright 2022, Collabora, Ltd. # SPDX-License-Identifier: MIT # Based on https://gitlab.freedesktop.org/mesa/mesa/-/blob/8396df5ad90aeb6ab2267811aba2187954562f81/.gitlab-ci/windows/Dockerfile_build # escape=` # FROM mcr.microsoft.com/windows:2004 FROM mcr.microsoft.com/windows/servercore:ltsc2022 # Make sure any failure in PowerShell scripts is fatal SHELL ["powershell", "-ExecutionPolicy", "RemoteSigned", "-Command", "$ErrorActionPreference = 'Stop';"] ENV ErrorActionPreference='Stop' COPY "win_container_utils.ps1" "C:/" RUN . c:/win_container_utils.ps1; Update-TLSCerts RUN . c:/win_container_utils.ps1; Install-MSVCRedist RUN . c:/win_container_utils.ps1; Install-VS2022BuildTools RUN . c:/win_container_utils.ps1; Install-Scoop RUN scoop install vswhere; scoop cache rm * RUN scoop install cmake; scoop cache rm * RUN scoop install vulkan; scoop cache rm * RUN scoop install ninja; scoop cache rm * RUN scoop install git; scoop cache rm * RUN scoop bucket add extras RUN scoop install nsis; scoop cache rm * RUN scoop install wixtoolkit; scoop cache rm * 0707010000001D000081A400000000000000000000000165D6762A00000A61000000000000000000000000000000000000003800000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/windows/README.md# Native Windows GitLab CI builds <!-- # Copyright 2019-2022, Mesa contributors # Copyright 2022, Collabora, Ltd. # SPDX-License-Identifier: MIT Based on https://gitlab.freedesktop.org/mesa/mesa/-/blob/8396df5ad90aeb6ab2267811aba2187954562f81/.gitlab-ci/windows/README.md --> We are using the same basic approach to Windows CI building as Mesa, just as we do on Linux. See <https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/.gitlab-ci/windows> for the details there. The following is the Mesa readme, lightly modified to fit Monado. Unlike Linux, Windows cannot reuse the freedesktop ci-templates as they exist as we do not have Podman, Skopeo, or even Docker-in-Docker builds available under Windows. We still reuse the same model: build a base container with the core operating system and infrequently-changed build dependencies, then execute Monado builds only inside that base container. This is open-coded in PowerShell scripts. ## Base container build The base container build jobs execute the `monado_container.ps1` script which reproduces the ci-templates behaviour. It looks for the registry image in the user's namespace, and exits if found. If not found, it tries to copy the same image tag from the upstream Monado repository. If that is not found, the image is rebuilt inside the user's namespace. The rebuild executes `docker build` which calls `monado_deps_*.ps1` inside the container to fetch and install all build dependencies. This includes Visual Studio Build Tools (downloaded from Microsoft, under the license which allows use by open-source projects), and other build tools from Scoop. (These are done as two separate jobs to allow "resuming from the middle".) This job is executed inside a Windows shell environment directly inside the host, without Docker. ## Monado build The Monado build runs inside the base container, executing `Build-OnWindows.ps1`. This simply compiles using CMake and Ninja, executing the build and unit tests. ## Local testing To try these scripts locally, you need this done once, rebooting after they are complete: ```pwsh scoop install sudo sudo Add-MpPreference -ExclusionProcess dockerd.exe sudo Add-MpPreference -ExclusionProcess docker.exe winget install stevedore sudo Add-MpPreference -ExclusionPath c:\ProgramData\docker ``` then this, done when you want to test: ```pwsh docker context use desktop-windows ``` before doing your normal `docker build .`, etc. (It may still be very slow despite the virus scanning exclusions.) If you're having issues accessing the network, see this comment's instructions: <https://github.com/docker/for-win/issues/9847#issuecomment-832674649> 0707010000001E000081A400000000000000000000000165D6762A0000180A000000000000000000000000000000000000004300000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/windows/monado_container.ps1# Copyright 2019-2022, Mesa contributors # Copyright 2022, Collabora, Ltd. # SPDX-License-Identifier: MIT # Based on https://gitlab.freedesktop.org/mesa/mesa/-/blob/8396df5ad90aeb6ab2267811aba2187954562f81/.gitlab-ci/windows/mesa_container.ps1 # Implements the equivalent of ci-templates container-ifnot-exists, using # Docker directly as we don't have buildah/podman/skopeo available under # Windows, nor can we execute Docker-in-Docker [CmdletBinding()] param ( # Address for container registry [Parameter()] [string] $RegistryUri, # Username for container registry [Parameter()] [ValidateNotNullOrEmpty()] [string] $RegistryUsername, # The path of the image for this user's fork [Parameter()] [ValidateNotNullOrEmpty()] [string] $UserImage, # The path of the image in the upstream registry [Parameter()] [string] $UpstreamImage, # Dockerfile to build [Parameter()] [string] $Dockerfile = "Dockerfile", # Base image to use for this container, if any [Parameter()] [string] $BaseImage, # Base image to use for this container, from the upstream repo, if any [Parameter()] [string] $BaseUpstreamImage ) $RegistryPassword = "$env:CI_REGISTRY_PASSWORD" $CommonDockerArgs = @( "--config" "windows-docker.conf" ) $ErrorActionPreference = 'Stop' # Returns $true on a zero error code # If $AllowFailure is not set, throws on a nonzero exit code function Start-Docker { param ( # Should we just return the exit code on failure instead of throwing? [Parameter()] [switch] $AllowFailure = $false, # Should we try to log out before throwing in case of an error? [Parameter()] [switch] $LogoutOnFailure = $false, # What arguments should be passed to docker (besides the config) [Parameter(Mandatory = $true)] [string[]] $ArgumentList ) $DockerArgs = $CommonDockerArgs + $ArgumentList Write-Verbose ("Will run docker " + ($DockerArgs -join " ")) $proc = Start-Process -FilePath "docker" -ArgumentList $DockerArgs -NoNewWindow -PassThru -WorkingDirectory "$PSScriptRoot" -Wait if ($proc.ExitCode -eq 0) { Write-Verbose "Success!" return $true } if (!$AllowFailure) { Write-Error ($ArgumentList[0] + " failed") if ($LogoutOnFailure) { Write-Host "Logging out" Start-Process -FilePath "docker" -ArgumentList ($CommonDockerArgs + @("logout", "$RegistryUri")) ` -NoNewWindow -PassThru -WorkingDirectory "$PSScriptRoot" -Wait } throw ("docker " + $ArgumentList[0] + " invocation failed") } return $false } # Returns $true if the $Image exists (whether or not we had to copy $UpstreamImage) function Test-Image { param ( # Image to look for [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [string] $Image, # Equivalent image from the upstream repo, if any [Parameter()] [string] $UpstreamImage ) # if the image already exists, great Write-Verbose "Looking for $Image" # $pullResult = Start-Docker -AllowFailure -ArgumentList ("pull", "$Image") docker @CommonDockerArgs pull "$Image" if ($?) { Write-Host "Image $UserImage exists" return $true } if (!$UpstreamImage) { Write-Host "Cannot find $Image" return $false } # if it's only upstream, copy it Write-Host "Cannot find $Image, looking for upstream $UpstreamImage" docker @CommonDockerArgs pull "$UpstreamImage" if ($?) { Write-Host "Found upstream image, copying image from upstream $UpstreamImage to user $Image" Start-Docker -LogoutOnFailure -ArgumentList ("tag", "$UpstreamImage", "$Image") Start-Docker -LogoutOnFailure -ArgumentList ("push", "$Image") return $true } Write-Host "Cannot find $Image nor $UpstreamImage" return $false } Write-Host "Will log in to $RegistryUri as $RegistryUsername" Write-Host "Will check for image $UserImage - if it does not exist but $UpstreamImage does, we copy that one, otherwise we need to build it." if ($BaseImage) { Write-Host "This image builds on $BaseImage so we will check for it." if ($BaseUpstreamImage) { Write-Host "If it is missing but $BaseUpstreamImage exists, we copy that one. If both are missing, we error out." } else { Write-Host "If it is missing, we error out." } } # Start-Docker -ArgumentList ("login", "-u", "$RegistryUsername", "--password-stdin", "$RegistryPassword", "$RegistryUri") $loginProc = Start-Process -FilePath "docker" -ArgumentList ($CommonDockerArgs + @("login", "-u", "$RegistryUsername", "--password", "$RegistryPassword", "$RegistryUri")) ` -NoNewWindow -PassThru -WorkingDirectory "$PSScriptRoot" -Wait if ($loginProc.ExitCode -ne 0) { throw "docker login failed" } # if the image already exists, don't rebuild it $imageResult = Test-Image -Image $UserImage -UpstreamImage $UpstreamImage if ($imageResult) { Write-Host "User image $UserImage already exists; not rebuilding" Start-Docker -ArgumentList ("logout", "$RegistryUri") Exit 0 } # do we need a base image? if ($BaseImage) { $baseImageResult = Test-Image -Image "$BaseImage" -UpstreamImage "$BaseUpstreamImage" if (!$baseImageResult) { throw "Could not find base image: neither '$BaseImage' nor '$BaseUpstreamImage' exist." } } Write-Host "No image found at $UserImage or $UpstreamImage; rebuilding, this may take a while" $DockerBuildArgs = @( "build" "--no-cache" "-t" "$UserImage" "-f" "$Dockerfile" ) if ($BaseImage) { $DockerBuildArgs += @( "--build-arg" "base_image=$BaseImage" ) } $DockerBuildArgs += "." Start-Docker -LogoutOnFailure -ArgumentList (, $DockerBuildArgs) Get-Date Write-Host "Done building image, now pushing $UserImage" Start-Docker -LogoutOnFailure -ArgumentList ("push", "$UserImage") Start-Docker -ArgumentList ("logout", "$RegistryUri") 0707010000001F000081A400000000000000000000000165D6762A0000129C000000000000000000000000000000000000004600000000vulkan-layers-0.9.0ae43cdc/.gitlab-ci/windows/win_container_utils.ps1# Copyright 2019-2022, Mesa contributors # Copyright 2022, Collabora, Ltd. # SPDX-License-Identifier: MIT # Based on https://gitlab.freedesktop.org/mesa/mesa/-/blob/8396df5ad90aeb6ab2267811aba2187954562f81/.gitlab-ci/windows/mesa_deps_vs2019.ps1 # and https://gitlab.freedesktop.org/mesa/mesa/-/blob/8396df5ad90aeb6ab2267811aba2187954562f81/.gitlab-ci/windows/mesa_deps_build.ps1 $ErrorActionPreference = 'Stop' # VS17.x is 2022 $msvc_url = 'https://aka.ms/vs/17/release/vs_buildtools.exe' $VulkanRTVersion = "1.3.211.0" $DefaultVcpkgLocation = "C:\vcpkg" $DefaultBuildToolsInstallPath = "C:\BuildTools" $BuildToolsInstaller = "c:\vs_buildtools.exe" function Install-VS2022BuildTools { [CmdletBinding()] param ( $InstallPath = $DefaultBuildToolsInstallPath ) # we want more secure TLS 1.2 for most things [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Write-Host (Get-Date) Write-Host "Downloading Visual Studio 2022 build tools" Invoke-WebRequest -Uri $msvc_url -OutFile $BuildToolsInstaller -UseBasicParsing Write-Host (Get-Date) Write-Host "Installing Visual Studio build tools" $vsInstallerArgs = @( "--wait" "--quiet" "--norestart" "--nocache" "--installPath" $InstallPath "--add" "Microsoft.VisualStudio.Component.VC.CoreBuildTools" "--add" "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core" "--add" "Microsoft.VisualStudio.Component.Windows11SDK.22000" "--add" "Component.Microsoft.Windows.CppWinRT" "--add" "Microsoft.VisualStudio.Component.VC.Tools.x86.x64" ) Start-Process -NoNewWindow -Wait $BuildToolsInstaller -ArgumentList $vsInstallerArgs if (!$?) { Write-Error "Failed to install Visual Studio tools" Exit 1 } Remove-Item $BuildToolsInstaller -Force # Create a directory whose absence would otherwise cause an error with Enter-VsDevShell New-Item -Path "$InstallPath\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer" -ItemType Directory -ErrorAction Continue Write-Host (Get-Date) Write-Host "Done" } function Update-TLSCerts { Write-Host (Get-Date) Write-Host "Updating TLS certificate store" $certdir = (New-Item -ItemType Directory -Name "_tlscerts") certutil -syncwithWU "$certdir" Foreach ($file in (Get-ChildItem -Path "$certdir\*" -Include "*.crt")) { Import-Certificate -FilePath $file -CertStoreLocation Cert:\LocalMachine\Root } Remove-Item -Recurse -Path $certdir } function Install-MSVCRedist { Write-Host (Get-Date) Write-Host "Installing runtime redistributables" Invoke-WebRequest -Uri "https://aka.ms/vs/17/release/vc_redist.x64.exe" -OutFile "c:\vcredist_x64.exe" -UseBasicParsing Start-Process -NoNewWindow -Wait "c:\vcredist_x64.exe" -ArgumentList "/install /passive /norestart /log out.txt" if (!$?) { Write-Error "Failed to install vc_redist" } Remove-Item "c:\vcredist_x64.exe" -Force } function Install-Scoop { Write-Host (Get-Date) Write-Host "Installing Scoop" Set-ExecutionPolicy RemoteSigned -Scope CurrentUser Invoke-WebRequest get.scoop.sh -OutFile c:\install.ps1 c:\install.ps1 -RunAsAdmin } function Install-Vcpkg { [CmdletBinding()] param ( [Parameter()] [string] $Location = $DefaultVcpkgLocation ) Write-Host (Get-Date) Write-Host "Cloning vcpkg" git clone https://github.com/microsoft/vcpkg.git "$Location" Write-Host (Get-Date) Write-Host "Bootstrapping vcpkg" Push-Location "$Location" ./bootstrap-vcpkg.bat -DisableMetrics Pop-Location } function Install-VcpkgPackages { [CmdletBinding()] param ( [Parameter()] [string] $Location = $DefaultVcpkgLocation ) Push-Location "$Location" ./vcpkg.exe install $args Remove-Item -Recurse -Path downloads -ErrorAction Continue Remove-Item -Recurse -Path buildtrees -ErrorAction Continue Pop-Location } function Install-VulkanRuntime { Write-Host (Get-Date) Write-Host "Downloading Vulkan runtime components" $VulkanInstaller = "C:\VulkanRTInstaller.exe" Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/$VulkanRTVersion/windows/VulkanRT-$VulkanRTVersion-Installer.exe" -OutFile "$VulkanInstaller" Write-Host (Get-Date) Write-Host "Installing Vulkan runtime components" Start-Process -NoNewWindow -Wait "$VulkanInstaller" -ArgumentList "/S" if (!$?) { Write-Error "Failed to install Vulkan runtime components" throw "failure" } Remove-Item "$VulkanInstaller" -Force } 07070100000020000041ED00000000000000000000000265D6762A00000000000000000000000000000000000000000000002200000000vulkan-layers-0.9.0ae43cdc/.reuse07070100000021000081A400000000000000000000000165D6762A00000157000000000000000000000000000000000000002700000000vulkan-layers-0.9.0ae43cdc/.reuse/dep5Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Monado Vulkan Layers Upstream-Contact: Jakob Bornecrantz <jakob@collabora.com> Source: https://gitlab.freedesktop.org/monado/utilities/vulkan-layers # Sample paragraph, commented out: # # Files: src/* # Copyright: $YEAR $NAME <$CONTACT> # License: ... 07070100000022000081A400000000000000000000000165D6762A00000DD5000000000000000000000000000000000000002A00000000vulkan-layers-0.9.0ae43cdc/CMakeLists.txt# Copyright 2018-2022, Collabora, Ltd. # SPDX-License-Identifier: BSL-1.0 cmake_minimum_required(VERSION 3.10.2) project(enable_timeline_semaphore_layer VERSION 1.0.0) find_package(Vulkan REQUIRED) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(GenerateVulkanApiLayerManifest) include(GNUInstallDirs) # Needlessly long, set a variable. set(LAYER_TARGET VkLayer_MND_enable_timeline_semaphore) add_library(${LAYER_TARGET} MODULE src/layer.cpp src/env_option.c src/env_option.h src/layer.def) target_link_libraries(${LAYER_TARGET} PRIVATE Vulkan::Vulkan) generate_vulkan_api_layer_manifest_buildtree( MANIFEST_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/VkLayer_MND_enable_timeline_semaphore.in.json LAYER_TARGET ${LAYER_TARGET} OUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/VkLayer_MND_enable_timeline_semaphore-dev.json ) if(WIN32) set(LAYER_INSTALLDIR ${CMAKE_INSTALL_BINDIR}) set(EXTRA_ARGS LAYER_DIR_RELATIVE_TO_MANIFEST ../../../${CMAKE_INSTALL_BINDIR}) else() set(LAYER_INSTALLDIR ${CMAKE_INSTALL_LIBDIR}) endif() install( TARGETS ${LAYER_TARGET} RUNTIME DESTINATION ${LAYER_INSTALLDIR} COMPONENT vulkan_layer LIBRARY DESTINATION ${LAYER_INSTALLDIR} COMPONENT vulkan_layer ) generate_vulkan_api_layer_manifest_at_install( ${EXTRA_ARGS} MANIFEST_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/VkLayer_MND_enable_timeline_semaphore.in.json LAYER_TARGET ${LAYER_TARGET} RELATIVE_LAYER_DIR ${LAYER_INSTALLDIR} DESTINATION ${CMAKE_INSTALL_DATADIR}/vulkan/implicit_layer.d COMPONENT vulkan_layer ) set(CPACK_COMPONENT_vulkan_layer_DISPLAY_NAME "Timeline Semaphore Vulkan Implicit Layer") set(CPACK_COMPONENT_vulkan_layer_DESCRIPTION "Forces-on timeline semaphore support, allowing some performance improvements with some Vulkan OpenXR applications" ) if(WIN32 AND "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") set(CPACK_PACKAGE_NAME "Monado Vulkan Layers") set(CPACK_PACKAGE_VENDOR "Monado Community") set(CMAKE_PROJECT_DESCRIPTION "An implicit Vulkan API layer to improve performance of applications running under Monado" ) set(CPACK_PACKAGE_HOMEPAGE_URL "https://gitlab.freedesktop.org/monado/utilities/vulkan-layers" ) set(CPACK_MONOLITHIC_INSTALL TRUE) set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSES/BSL-1.0.txt") # used by install and uninstall to configure registry install( FILES Configure-Layer.ps1 DESTINATION . COMPONENT vulkan_layer ) # NSIS stuff set(CPACK_GENERATOR NSIS) if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(powershell_start [[ExecWait `\$WINDIR\\sysnative\\windowspowershell\\v1.0\\powershell.exe -ExecutionPolicy Bypass -WindowStyle hidden ]] ) else() set(powershell_start [[ExecWait `\$WINDIR\\System32\\windowspowershell\\v1.0\\powershell.exe -ExecutionPolicy Bypass -WindowStyle hidden ]] ) endif() set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL FALSE) set(CPACK_NSIS_UNINSTALL_NAME "Uninstall Monado Vulkan Layers") set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS ${powershell_start}) string( APPEND CPACK_NSIS_EXTRA_INSTALL_COMMANDS [[ -File \"$INSTDIR\\Configure-Layer.ps1\" -Manifest \"\$INSTDIR\\share\\vulkan\\implicit_layer.d\\VkLayer_MND_enable_timeline_semaphore.json\"`]] ) set(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS ${powershell_start}) string( APPEND CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS [[ -File \"$INSTDIR\\Configure-Layer.ps1\" -Uninstall -Manifest \"\$INSTDIR\\share\\vulkan\\implicit_layer.d\\VkLayer_MND_enable_timeline_semaphore.json\"`]] ) include(CPack) endif() 07070100000023000081A400000000000000000000000165D6762A00000531000000000000000000000000000000000000002F00000000vulkan-layers-0.9.0ae43cdc/Configure-Layer.ps1# Copyright 2022 Collabora, Ltd. # SPDX-License-Identifier: BSL-1.0 <# .SYNOPSIS Configure a Vulkan implicit API layer .DESCRIPTION Use the parameters to either install or uninstall a Vulkan implicit API layer .PARAMETER Manifest Path to the JSON manifest for the layer .PARAMETER User Install/uninstall in the current user registry hive (HKCU), rather than the system hive (HKLM). .PARAMETER Uninstall Remove the entries added during the installation instead of adding them #> [CmdletBinding()] param ( [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [string] $Manifest, [Parameter()] [switch] $User = $false, [Parameter()] [switch] $Uninstall = $false ) $ErrorActionPreference = "Stop" $Manifest = (Get-Item $Manifest -ErrorAction Stop).FullName $Hive = "HKLM:" if ($User) { $Hive = "HKCU:" } $RegPath = "$Hive\SOFTWARE\Khronos\Vulkan\ImplicitLayers" if ($Uninstall) { Write-Host "Unregistering manifest $Manifest from $RegPath" Remove-ItemProperty -Path $RegPath -Name "$Manifest" -ErrorAction SilentlyContinue } else { Write-Host "Registering manifest $Manifest in $RegPath" if (!(Test-Path $RegPath)) { New-Item -Path $RegPath -Force } New-ItemProperty -Path $RegPath -Name "$Manifest" -Value 0 -PropertyType "DWord" | Out-Null } # 07070100000024000081A400000000000000000000000165D6762A00000500000000000000000000000000000000000000002300000000vulkan-layers-0.9.0ae43cdc/LICENSEPermission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 07070100000025000041ED00000000000000000000000265D6762A00000000000000000000000000000000000000000000002400000000vulkan-layers-0.9.0ae43cdc/LICENSES07070100000026000081A400000000000000000000000165D6762A0000053A000000000000000000000000000000000000003000000000vulkan-layers-0.9.0ae43cdc/LICENSES/BSL-1.0.txtBoost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 07070100000027000081A400000000000000000000000165D6762A00001B88000000000000000000000000000000000000003000000000vulkan-layers-0.9.0ae43cdc/LICENSES/CC0-1.0.txtCreative Commons Legal Code CC0 1.0 Universal CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER. Statement of Purpose The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work"). Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others. For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights. 1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following: i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; ii. moral rights retained by the original author(s) and/or performer(s); iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; v. rights protecting the extraction, dissemination, use and reuse of data in a Work; vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. 2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. 3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. 4. Limitations and Disclaimers. a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. 07070100000028000081A400000000000000000000000165D6762A0000015F000000000000000000000000000000000000004900000000vulkan-layers-0.9.0ae43cdc/VkLayer_MND_enable_timeline_semaphore.in.json{ "file_format_version" : "1.0.0", "layer" : { "name": "VK_LAYER_MND_enable_timeline_semaphore", "type": "GLOBAL", "library_path": "@target_path@", "api_version": "1.2.199", "implementation_version": "1", "description": "Monado enable timeline semaphore layer", "disable_environment": { "NO_ENABLE_TIMELINE_SEMAPHORE": "1" } } } 07070100000029000081A400000000000000000000000165D6762A00000042000000000000000000000000000000000000005100000000vulkan-layers-0.9.0ae43cdc/VkLayer_MND_enable_timeline_semaphore.in.json.licenseCopyright 2022, Collabora, Ltd. SPDX-License-Identifier: BSL-1.0 0707010000002A000041ED00000000000000000000000265D6762A00000000000000000000000000000000000000000000002100000000vulkan-layers-0.9.0ae43cdc/cmake0707010000002B000081A400000000000000000000000165D6762A000000EE000000000000000000000000000000000000003400000000vulkan-layers-0.9.0ae43cdc/cmake/.cmake-format.json{ "tab_size": 4, "dangle_parens": false, "line_ending": "unix", "command_case": "canonical", "keyword_case": "upper", "first_comment_is_literal": true, "literal_comment_pattern": "(^[.]rst)|(#+)", "enable_markup": false } 0707010000002C000081A400000000000000000000000165D6762A00000046000000000000000000000000000000000000003C00000000vulkan-layers-0.9.0ae43cdc/cmake/.cmake-format.json.licenseCopyright 2019-2020, Collabora, Ltd. SPDX-License-Identifier: BSL-1.00707010000002D000081A400000000000000000000000165D6762A00001757000000000000000000000000000000000000003B00000000vulkan-layers-0.9.0ae43cdc/cmake/GenerateKhrManifest.cmake# Copyright 2019-2022, Collabora, Ltd. # # SPDX-License-Identifier: BSL-1.0 # # Maintained by: # 2019-2022 Ryan Pavlik <ryan.pavlik@collabora.com> <ryan.pavlik@gmail.com> #[[.rst: GenerateKhrManifest ------------------- This is a utility module, usually wrapped by more usage-specific modules. The general goal is to be able to generate a (JSON) manifest describing targets with some absolute, relative, or unspecified path, such as required by the OpenXR and Vulkan loaders for runtimes and API layers. The following functions are provided by this module: - :command:`generate_khr_manifest_buildtree` - :command:`generate_khr_manifest_at_install` .. command:: generate_khr_manifest_buildtree Generates a manifest suitable for use in the build tree, with absolute paths, at configure time:: generate_khr_manifest_buildtree( MANIFEST_TEMPLATE <template> # The template for your manifest file TARGET <target> # Name of your target (layer, runtime, etc) OUT_FILE <outfile> # Name of the manifest file (with path) to generate MANIFEST_DESCRIPTION "<desc>" # A brief description of the thing we're generating (e.g. "Vulkan API layer manifest") ) .. command:: generate_khr_manifest_at_install Generates a manifest at install time and installs it where desired:: generate_khr_manifest_at_install( MANIFEST_TEMPLATE <template> # The template for your manifest file TARGET <target> # Name of your target (layer, runtime, etc) DESTINATION <dest> # The install-prefix-relative path to install the manifest to. RELATIVE_TARGET_DIR <dir> # The install-prefix-relative path that the target library is installed to. MANIFEST_DESCRIPTION "<desc>" # A brief description of the thing we're generating (e.g. "Vulkan API layer manifest") [COMPONENT <comp>] # If present, the component to place the manifest in. [ABSOLUTE_TARGET_PATH| # If present, path in generated manifest is absolute TARGET_DIR_RELATIVE_TO_MANIFEST <dir>] # If present (and ABSOLUTE_TARGET_PATH not present), specifies the # target directory relative to the manifest directory in the installed layout [OUT_FILENAME <outfilename> # Optional: Alternate name of the manifest file to generate (defaults to target name + .json) ) #]] get_filename_component(_KHR_MANIFEST_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) set(_KHR_MANIFEST_SCRIPT "${_KHR_MANIFEST_CMAKE_DIR}/GenerateKhrManifestInternals.cmake.in" CACHE INTERNAL "" FORCE) function(generate_khr_manifest_buildtree) set(options) set(oneValueArgs MANIFEST_TEMPLATE TARGET OUT_FILE MANIFEST_DESCRIPTION) set(multiValueArgs) cmake_parse_arguments(_genmanifest "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if(NOT _genmanifest_MANIFEST_TEMPLATE) message(FATAL_ERROR "Need MANIFEST_TEMPLATE specified!") endif() if(NOT _genmanifest_TARGET) message(FATAL_ERROR "Need TARGET specified!") endif() if(NOT _genmanifest_OUT_FILE) message(FATAL_ERROR "Need OUT_FILE specified!") endif() if(NOT _genmanifest_MANIFEST_DESCRIPTION) message(FATAL_ERROR "Need MANIFEST_DESCRIPTION specified!") endif() # Set template values set(_genmanifest_INTERMEDIATE_MANIFEST ${CMAKE_CURRENT_BINARY_DIR}/intermediate_manifest_buildtree_${_genmanifest_TARGET}.json ) set(_genmanifest_IS_INSTALL OFF) set(_script ${CMAKE_CURRENT_BINARY_DIR}/make_build_manifest_${_genmanifest_TARGET}.cmake ) configure_file("${_KHR_MANIFEST_SCRIPT}" "${_script}" @ONLY) add_custom_command( TARGET ${_genmanifest_TARGET} POST_BUILD BYPRODUCTS "${_genmanifest_OUT_FILE}" COMMAND "${CMAKE_COMMAND}" "-DOUT_FILE=${_genmanifest_OUT_FILE}" "-DTARGET_PATH=$<TARGET_FILE:${_genmanifest_TARGET}>" -P "${_script}" DEPENDS "${_script}" COMMENT "Generating ${_genmanifest_MANIFEST_DESCRIPTION} named ${_genmanifest_OUT_FILE} for build tree usage" ) endfunction() function(generate_khr_manifest_at_install) set(options ABSOLUTE_TARGET_PATH) set(oneValueArgs MANIFEST_TEMPLATE TARGET DESTINATION OUT_FILENAME TARGET_DIR_RELATIVE_TO_MANIFEST RELATIVE_TARGET_DIR MANIFEST_DESCRIPTION COMPONENT) set(multiValueArgs) cmake_parse_arguments(_genmanifest "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if(NOT _genmanifest_MANIFEST_TEMPLATE) message(FATAL_ERROR "Need MANIFEST_TEMPLATE specified!") endif() if(NOT _genmanifest_TARGET) message(FATAL_ERROR "Need TARGET specified!") endif() if(NOT _genmanifest_DESTINATION) message(FATAL_ERROR "Need DESTINATION specified!") endif() if(NOT _genmanifest_RELATIVE_TARGET_DIR) message(FATAL_ERROR "Need RELATIVE_TARGET_DIR specified!") endif() if(NOT _genmanifest_OUT_FILENAME) set(_genmanifest_OUT_FILENAME "${_genmanifest_TARGET}.json") endif() if(NOT _genmanifest_COMPONENT) set(_genmanifest_COMPONENT Unspecified) endif() set(_genmanifest_INTERMEDIATE_MANIFEST "${CMAKE_CURRENT_BINARY_DIR}/${_genmanifest_OUT_FILENAME}") set(_genmanifest_IS_INSTALL ON) # Template value set(TARGET_FILENAME ${CMAKE_SHARED_MODULE_PREFIX}${_genmanifest_TARGET}${CMAKE_SHARED_MODULE_SUFFIX} ) set(_script ${CMAKE_CURRENT_BINARY_DIR}/make_manifest_${_genmanifest_TARGET}.cmake) configure_file("${_KHR_MANIFEST_SCRIPT}" "${_script}" @ONLY) install(SCRIPT "${_script}" COMPONENT ${_genmanifest_COMPONENT}) endfunction() 0707010000002E000081A400000000000000000000000165D6762A000009BD000000000000000000000000000000000000004700000000vulkan-layers-0.9.0ae43cdc/cmake/GenerateKhrManifestInternals.cmake.in# Copyright 2019-2022, Collabora, Ltd. # Copyright 2019, Benjamin Saunders <ben.e.saunders@gmail.com> # # SPDX-License-Identifier: BSL-1.0 # # Maintained by: # 2019-2022 Ryan Pavlik <ryan.pavlik@collabora.com> <ryan.pavlik@gmail.com> # Get input from main CMake script set(MANIFEST_TEMPLATE @_genmanifest_MANIFEST_TEMPLATE@) set(DESTINATION @_genmanifest_DESTINATION@) set(OUT_FILENAME @_genmanifest_OUT_FILENAME@) set(CONFIGURE_OUTPUT_FILE @_genmanifest_INTERMEDIATE_MANIFEST@) set(IS_INSTALL @_genmanifest_IS_INSTALL@) set(MANIFEST_DESCRIPTION "@_genmanifest_MANIFEST_DESCRIPTION@") set(TARGET @_genmanifest_TARGET@) # Target install dir relative to install prefix set(RELATIVE_TARGET_DIR @_genmanifest_RELATIVE_TARGET_DIR@) # Target so/dll filename set(TARGET_FILENAME @TARGET_FILENAME@) # The relative path from the manifest dir to the library. Optional. set(TARGET_DIR_RELATIVE_TO_MANIFEST @_genmanifest_TARGET_DIR_RELATIVE_TO_MANIFEST@) # Config option set(ABSOLUTE_TARGET_PATH @_genmanifest_ABSOLUTE_TARGET_PATH@) if(TARGET_PATH) # This is at build time, not install time set(CONFIGURE_OUTPUT_FILE "${OUT_FILE}") elseif(ABSOLUTE_TARGET_PATH) # Absolute path to TARGET message( STATUS "Installing ${MANIFEST_DESCRIPTION} with absolute path to library") set(TARGET_PATH ${RELATIVE_TARGET_DIR}/${TARGET_FILENAME}) if(NOT IS_ABSOLUTE ${RELATIVE_TARGET_DIR}) set(TARGET_PATH ${CMAKE_INSTALL_PREFIX}/${TARGET_PATH}) endif() elseif(TARGET_DIR_RELATIVE_TO_MANIFEST) # Relative path to target. message( STATUS "Installing ${MANIFEST_DESCRIPTION} with JSON-relative path to library" ) set(TARGET_PATH ${TARGET_DIR_RELATIVE_TO_MANIFEST}/${TARGET_FILENAME}) else() # Unqualified filename: requires it exist on the system shared library search path. message( STATUS "Installing ${MANIFEST_DESCRIPTION} with unqualified library filename (uses system search path)" ) set(TARGET_PATH ${TARGET_FILENAME}) endif() if(WIN32) # Windows really wants backslashes in the manifest, and they must be escaped. string(REPLACE "/" [[\\]] TARGET_PATH ${TARGET_PATH}) endif() set(target_path ${TARGET_PATH}) # Create manifest configure_file("${MANIFEST_TEMPLATE}" "${CONFIGURE_OUTPUT_FILE}") if(IS_INSTALL) # Install it file( INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/${DESTINATION}" TYPE FILE FILES "${CONFIGURE_OUTPUT_FILE}") endif() 0707010000002F000081A400000000000000000000000165D6762A00001381000000000000000000000000000000000000004600000000vulkan-layers-0.9.0ae43cdc/cmake/GenerateVulkanApiLayerManifest.cmake# Copyright 2019-2022, Collabora, Ltd. # # SPDX-License-Identifier: BSL-1.0 # # Maintained by: # 2019-2022 Ryan Pavlik <ryan.pavlik@collabora.com> <ryan.pavlik@gmail.com> #[[.rst: GenerateVulkanApiLayerManifest --------------- The following functions are provided by this module: - :command:`generate_vulkan_api_layer_manifest_buildtree` - :command:`generate_vulkan_api_layer_manifest_at_install` .. command:: generate_vulkan_api_layer_manifest_buildtree Generates a layer manifest suitable for use in the build tree, with absolute paths, at configure time:: generate_vulkan_api_layer_manifest_buildtree( MANIFEST_TEMPLATE <template> # The template for your manifest file LAYER_TARGET <target> # Name of your layer target OUT_FILE <outfile> # Name of the manifest file (with path) to generate ) .. command:: generate_vulkan_api_layer_manifest_at_install Generates a layer manifest at install time and installs it where desired:: generate_vulkan_api_layer_manifest_at_install( MANIFEST_TEMPLATE <template> # The template for your manifest file LAYER_TARGET <target> # Name of your layer target DESTINATION <dest> # The install-prefix-relative path to install the manifest to. RELATIVE_LAYER_DIR <dir> # The install-prefix-relative path that the layer library is installed to. [COMPONENT <comp>] # If present, the component to place the manifest in. [ABSOLUTE_LAYER_PATH| # If present, path in generated manifest is absolute LAYER_DIR_RELATIVE_TO_MANIFEST <dir>] # If present (and ABSOLUTE_LAYER_PATH not present), specifies the # layer directory relative to the manifest directory in the installed layout [OUT_FILENAME <outfilename> # Optional: Alternate name of the manifest file to generate ) #]] get_filename_component(_VK_MANIFEST_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) include("${_VK_MANIFEST_CMAKE_DIR}/GenerateKhrManifest.cmake") function(generate_vulkan_api_layer_manifest_buildtree) set(options) set(oneValueArgs MANIFEST_TEMPLATE LAYER_TARGET OUT_FILE) set(multiValueArgs) cmake_parse_arguments(_genmanifest "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if(NOT _genmanifest_MANIFEST_TEMPLATE) message(FATAL_ERROR "Need MANIFEST_TEMPLATE specified!") endif() if(NOT _genmanifest_LAYER_TARGET) message(FATAL_ERROR "Need LAYER_TARGET specified!") endif() if(NOT _genmanifest_OUT_FILE) message(FATAL_ERROR "Need OUT_FILE specified!") endif() generate_khr_manifest_buildtree( MANIFEST_DESCRIPTION "Vulkan API layer manifest" MANIFEST_TEMPLATE "${_genmanifest_MANIFEST_TEMPLATE}" TARGET "${_genmanifest_LAYER_TARGET}" OUT_FILE "${_genmanifest_OUT_FILE}") endfunction() function(generate_vulkan_api_layer_manifest_at_install) set(options ABSOLUTE_LAYER_PATH) set(oneValueArgs MANIFEST_TEMPLATE LAYER_TARGET DESTINATION OUT_FILENAME LAYER_DIR_RELATIVE_TO_MANIFEST RELATIVE_LAYER_DIR) set(multiValueArgs) cmake_parse_arguments(_genmanifest "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) if(NOT _genmanifest_MANIFEST_TEMPLATE) message(FATAL_ERROR "Need MANIFEST_TEMPLATE specified!") endif() if(NOT _genmanifest_LAYER_TARGET) message(FATAL_ERROR "Need LAYER_TARGET specified!") endif() if(NOT _genmanifest_DESTINATION) message(FATAL_ERROR "Need DESTINATION specified!") endif() if(NOT _genmanifest_RELATIVE_LAYER_DIR) message(FATAL_ERROR "Need RELATIVE_LAYER_DIR specified!") endif() if(NOT _genmanifest_OUT_FILENAME) set(_genmanifest_OUT_FILENAME "${_genmanifest_LAYER_TARGET}.json") endif() set(_genmanifest_fwdargs) if(_genmanifest_ABSOLUTE_LAYER_PATH) list(APPEND _genmanifest_fwdargs ABSOLUTE_TARGET_PATH) endif() if(_genmanifest_LAYER_DIR_RELATIVE_TO_MANIFEST) list(APPEND _genmanifest_fwdargs TARGET_DIR_RELATIVE_TO_MANIFEST "${_genmanifest_LAYER_DIR_RELATIVE_TO_MANIFEST}") endif() if(_genmanifest_COMPONENT) list(APPEND _genmanifest_fwdargs COMPONENT "${_genmanifest_COMPONENT}") endif() generate_khr_manifest_at_install( ${_genmanifest_fwdargs} MANIFEST_DESCRIPTION "Vulkan API layer manifest" MANIFEST_TEMPLATE "${_genmanifest_MANIFEST_TEMPLATE}" TARGET "${_genmanifest_LAYER_TARGET}" DESTINATION "${_genmanifest_DESTINATION}" RELATIVE_TARGET_DIR "${_genmanifest_RELATIVE_LAYER_DIR}" OUT_FILENAME "${_genmanifest_OUT_FILENAME}") endfunction() 07070100000030000081ED00000000000000000000000165D6762A000001B9000000000000000000000000000000000000002A00000000vulkan-layers-0.9.0ae43cdc/get-version.sh#!/usr/bin/env bash # SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors # # Wraps versioning.cmake for use from command line set -euo pipefail CI_COMMIT_SHA=${CI_COMMIT_SHA:-HEAD} REPO_DIR=$(cd "$(dirname "$0")" && pwd) GIT_DESCRIBE=$(git describe --always "${CI_COMMIT_SHA}") FULL_VER=$(cmake "-DINPUT=$GIT_DESCRIBE" -P "${REPO_DIR}/versioning.cmake" 2>&1) echo "$FULL_VER" 07070100000031000041ED00000000000000000000000265D6762A00000000000000000000000000000000000000000000001F00000000vulkan-layers-0.9.0ae43cdc/src07070100000032000081A400000000000000000000000165D6762A000004FD000000000000000000000000000000000000002D00000000vulkan-layers-0.9.0ae43cdc/src/.clang-format--- # SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2020, Collabora, Ltd. Language: Cpp BasedOnStyle: LLVM Standard: Auto # Includes SortIncludes: false # Spacing and Blank Lines DerivePointerAlignment: false PointerAlignment: Right #AlignEscapedNewlines: DontAlign #AlignConsecutiveDeclarations: false #AlignConsecutiveAssignments: false MaxEmptyLinesToKeep: 3 # Indentation IndentWidth: 8 TabWidth: 8 UseTab: ForIndentation AccessModifierOffset: -8 IndentCaseLabels: false NamespaceIndentation: Inner # Line length/reflow ColumnLimit: 120 ReflowComments: true # Line breaks AlwaysBreakAfterReturnType: All AllowShortFunctionsOnASingleLine: Empty AllowShortIfStatementsOnASingleLine: false AllowShortCaseLabelsOnASingleLine: true AlwaysBreakBeforeMultilineStrings: true BreakBeforeBraces: Custom BraceWrapping: AfterEnum: true AfterStruct: true AfterClass: true SplitEmptyFunction: false AfterFunction: true AfterNamespace: false # false means either "all on one line" or "each on their own", # won't put more than one on a line if they don't all fit. BinPackArguments: true BinPackParameters: false 07070100000033000081A400000000000000000000000165D6762A000005F6000000000000000000000000000000000000002C00000000vulkan-layers-0.9.0ae43cdc/src/env_option.c// Copyright 2019-2022, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 /*! * @file * @brief Environmental helpers. * @author Jakob Bornecrantz <jakob@collabora.com> * * Copied from Monado. * Debug get option helpers heavily inspired from mesa ones. */ #include "env_option.h" #include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> static const char * os_getenv(const char *name) { return getenv(name); } const char * debug_get_option(const char *name, const char *_default) { const char *raw = getenv(name); const char *ret; if (raw == NULL) { ret = _default; } else { ret = raw; } return ret; } bool debug_string_to_bool(const char *raw) { bool ret; if (raw == NULL) { ret = false; } else if (!strcmp(raw, "false")) { ret = false; } else if (!strcmp(raw, "FALSE")) { ret = false; } else if (!strcmp(raw, "off")) { ret = false; } else if (!strcmp(raw, "OFF")) { ret = false; } else if (!strcmp(raw, "no")) { ret = false; } else if (!strcmp(raw, "NO")) { ret = false; } else if (!strcmp(raw, "n")) { ret = false; } else if (!strcmp(raw, "N")) { ret = false; } else if (!strcmp(raw, "f")) { ret = false; } else if (!strcmp(raw, "F")) { ret = false; } else if (!strcmp(raw, "0")) { ret = false; } else { ret = true; } return ret; } bool debug_get_bool_option(const char *name, bool _default) { const char *raw = os_getenv(name); bool ret = raw == NULL ? _default : debug_string_to_bool(raw); return ret; } 07070100000034000081A400000000000000000000000165D6762A00000608000000000000000000000000000000000000002C00000000vulkan-layers-0.9.0ae43cdc/src/env_option.h// Copyright 2019-2022, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 /*! * @file * @brief Environmental helpers. * @author Jakob Bornecrantz <jakob@collabora.com> * @ingroup aux_util * * Copied from Monado. * Debug get option helpers heavily inspired from mesa ones. */ #pragma once #include <stdbool.h> #ifdef __cplusplus extern "C" { #endif bool debug_get_bool_option(const char *name, bool _default); #define DEBUG_GET_ONCE_BOOL_OPTION(suffix, name, _default) \ static bool debug_get_bool_option_##suffix() \ { \ static bool gotten = false; \ static bool stored; \ if (!gotten) { \ gotten = true; \ stored = debug_get_bool_option(name, _default); \ } \ return stored; \ } #ifdef __cplusplus } #endif 07070100000035000081A400000000000000000000000165D6762A000024FC000000000000000000000000000000000000002900000000vulkan-layers-0.9.0ae43cdc/src/layer.cpp// Copyright 2022, Collabora, Ltd. // SPDX-License-Identifier: BSL-1.0 #include "vulkan/vulkan_core.h" #include "vulkan/vk_layer.h" #include "env_option.h" #include <vector> #include <string> #include <stdio.h> #include <string.h> #ifndef VK_LAYER_EXPORT #if defined(__GNUC__) && __GNUC__ >= 4 #define VK_LAYER_EXPORT __attribute__((visibility("default"))) #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) #define VK_LAYER_EXPORT __attribute__((visibility("default"))) #else #define VK_LAYER_EXPORT #endif #endif /* * * Helpers * */ DEBUG_GET_ONCE_BOOL_OPTION(print, "ENABLE_TIMELINE_SEMAPHORE_LOG", false) #define LOG(str) \ do { \ if (debug_get_bool_option_print()) { \ fprintf(stderr, "%s: %s\n", __func__, str); \ } \ } while (false) #if 0 #define ENTER_FUNCTION_PRINT() LOG(str) #else #define ENTER_FUNCTION_PRINT() #endif template <typename T, VkStructureType type> static T * getLayerCreateInfo(const void *pNext) { T *layerCreateInfo = (T *)pNext; // step through the chain of pNext until we get to the link info while (layerCreateInfo && (layerCreateInfo->sType != type || layerCreateInfo->function != VK_LAYER_LINK_INFO)) { layerCreateInfo = (T *)layerCreateInfo->pNext; } return layerCreateInfo; } static VkLayerInstanceCreateInfo * getInstanceLayerCreateInfo(const void *pNext) { return getLayerCreateInfo<VkLayerInstanceCreateInfo, VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO>(pNext); } static VkLayerDeviceCreateInfo * getDeviceLayerCreateInfo(const void *pNext) { return getLayerCreateInfo<VkLayerDeviceCreateInfo, VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO>(pNext); } static bool hasChainStruct(const void *pNext, VkStructureType sType) { VkBaseInStructure const *base = (const VkBaseInStructure *)pNext; while (base != NULL) { if (base->sType == sType) { return true; } base = (const VkBaseInStructure *)base->pNext; } return false; } /* * * Layer lists. * */ #define ENTRY_COUNT 16 struct InstanceEntry { VkInstance instance{}; PFN_vkGetInstanceProcAddr getInstanceProcAddr{}; PFN_vkDestroyInstance destroyInstance{}; }; struct DeviceEntry { VkDevice device{}; PFN_vkGetDeviceProcAddr getDeviceProcAddr{}; PFN_vkDestroyDevice destroyDevice{}; }; static InstanceEntry gInstanceList[ENTRY_COUNT]{}; static DeviceEntry gDeviceList[ENTRY_COUNT]{}; static InstanceEntry * getInstanceEntry(VkInstance instance) { InstanceEntry *entry = NULL; for (int i = 0; i < ENTRY_COUNT; i++) { if (gInstanceList[i].instance != instance) { continue; } return &gInstanceList[i]; } return NULL; } static void destroyInstanceEntry(InstanceEntry *entry) { entry->getInstanceProcAddr = NULL; entry->destroyInstance = NULL; entry->instance = VK_NULL_HANDLE; } static DeviceEntry * getDeviceEntry(VkDevice device) { DeviceEntry *entry = NULL; for (int i = 0; i < ENTRY_COUNT; i++) { if (gDeviceList[i].device != device) { continue; } return &gDeviceList[i]; } return NULL; } static void destroyDeviceEntry(DeviceEntry *entry) { entry->device = VK_NULL_HANDLE; entry->destroyDevice = NULL; entry->getDeviceProcAddr = NULL; } /* * * Layer functions. * */ static VkResult VKAPI_CALL EnableTimeline_CreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkInstance *pInstance) { ENTER_FUNCTION_PRINT(); VkLayerInstanceCreateInfo *layerCreateInfo = getInstanceLayerCreateInfo(pCreateInfo->pNext); if (layerCreateInfo == NULL) { // No loader instance create info return VK_ERROR_INITIALIZATION_FAILED; } PFN_vkGetInstanceProcAddr getInstanceProcAddr = layerCreateInfo->u.pLayerInfo->pfnNextGetInstanceProcAddr; // Move chain on for next layer layerCreateInfo->u.pLayerInfo = layerCreateInfo->u.pLayerInfo->pNext; PFN_vkCreateInstance createFunc = (PFN_vkCreateInstance)getInstanceProcAddr(VK_NULL_HANDLE, "vkCreateInstance"); VkResult ret = createFunc(pCreateInfo, pAllocator, pInstance); if (ret != VK_SUCCESS) { // Failed to create instance. return ret; } // Find the first empty layer entry. InstanceEntry *entry = getInstanceEntry(VK_NULL_HANDLE); if (entry == NULL) { return VK_ERROR_INITIALIZATION_FAILED; } entry->instance = *pInstance; entry->getInstanceProcAddr = getInstanceProcAddr; entry->destroyInstance = (PFN_vkDestroyInstance)getInstanceProcAddr(*pInstance, "vkDestroyInstance"); return ret; } static VKAPI_ATTR void VKAPI_CALL EnableTimeline_DestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) { ENTER_FUNCTION_PRINT(); InstanceEntry *entry = getInstanceEntry(instance); entry->destroyInstance(instance, pAllocator); destroyInstanceEntry(entry); } static VKAPI_ATTR VkResult VKAPI_CALL EnableTimeline_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) { ENTER_FUNCTION_PRINT(); VkLayerDeviceCreateInfo *layerCreateInfo = getDeviceLayerCreateInfo(pCreateInfo->pNext); if (layerCreateInfo == NULL) { // No loader device create info. return VK_ERROR_INITIALIZATION_FAILED; } PFN_vkGetInstanceProcAddr getInstanceProcAddr = layerCreateInfo->u.pLayerInfo->pfnNextGetInstanceProcAddr; PFN_vkGetDeviceProcAddr getDeviceProcAddr = layerCreateInfo->u.pLayerInfo->pfnNextGetDeviceProcAddr; // Move chain on for next layer. layerCreateInfo->u.pLayerInfo = layerCreateInfo->u.pLayerInfo->pNext; PFN_vkCreateDevice createFunc = (PFN_vkCreateDevice)getInstanceProcAddr(VK_NULL_HANDLE, "vkCreateDevice"); /* * Add extension and timeline semaphore enablement struct. */ VkDeviceCreateInfo createInfo = *pCreateInfo; std::vector<const char *> array{}; bool found = false; for (uint32_t i = 0; i < createInfo.enabledExtensionCount; i++) { const char *str = createInfo.ppEnabledExtensionNames[i]; if (strcmp(str, VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME) == 0) { found = true; } // Push all of the extensions to the array as well. array.push_back(str); } if (!found) { array.push_back(VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME); // Update array with new extension. createInfo.ppEnabledExtensionNames = &array[0]; createInfo.enabledExtensionCount++; } VkPhysicalDeviceTimelineSemaphoreFeatures timelineSemaphore{}; timelineSemaphore.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES; timelineSemaphore.timelineSemaphore = true; timelineSemaphore.pNext = (void *)createInfo.pNext; // Have to cast here. if (hasChainStruct(createInfo.pNext, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES)) { LOG("Found VkPhysicalDeviceTimelineSemaphoreFeatures in next chain, not adding."); } else { LOG("Adding VkPhysicalDeviceTimelineSemaphoreFeatures to next chain."); createInfo.pNext = &timelineSemaphore; } VkResult ret = createFunc(physicalDevice, &createInfo, pAllocator, pDevice); if (ret != VK_SUCCESS) { // Failed to create device. return ret; } // Find the first empty layer entry. DeviceEntry *entry = getDeviceEntry(VK_NULL_HANDLE); if (entry == NULL) { return VK_ERROR_INITIALIZATION_FAILED; } entry->device = *pDevice; entry->getDeviceProcAddr = getDeviceProcAddr; entry->destroyDevice = (PFN_vkDestroyDevice)getDeviceProcAddr(*pDevice, "vkDestroyDevice"); return VK_SUCCESS; } static VKAPI_ATTR void VKAPI_CALL EnableTimeline_DestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator) { ENTER_FUNCTION_PRINT(); DeviceEntry *entry = getDeviceEntry(device); entry->destroyDevice(device, pAllocator); destroyDeviceEntry(entry); } static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL EnableTimeline_GetInstanceProcAddr(VkInstance instance, const char *pName) { if (strcmp(pName, "vkCreateInstance") == 0) { return (PFN_vkVoidFunction)EnableTimeline_CreateInstance; } if (strcmp(pName, "vkDestroyInstance") == 0) { return (PFN_vkVoidFunction)EnableTimeline_DestroyInstance; } if (strcmp(pName, "vkCreateDevice") == 0) { return (PFN_vkVoidFunction)EnableTimeline_CreateDevice; } return getInstanceEntry(instance)->getInstanceProcAddr(instance, pName); } static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL EnableTimeline_GetDeviceProcAddr(VkDevice device, const char *pName) { if (strcmp(pName, "vkDestroyDevice") == 0) { return (PFN_vkVoidFunction)EnableTimeline_DestroyDevice; } return getDeviceEntry(device)->getDeviceProcAddr(device, pName); } VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct) { ENTER_FUNCTION_PRINT(); if (pVersionStruct->loaderLayerInterfaceVersion < 2) { return VK_ERROR_INITIALIZATION_FAILED; } pVersionStruct->loaderLayerInterfaceVersion = 2; pVersionStruct->pfnGetInstanceProcAddr = EnableTimeline_GetInstanceProcAddr; pVersionStruct->pfnGetDeviceProcAddr = EnableTimeline_GetDeviceProcAddr; return VK_SUCCESS; } 07070100000036000081A400000000000000000000000165D6762A00000078000000000000000000000000000000000000002900000000vulkan-layers-0.9.0ae43cdc/src/layer.def; Copyright 2022, Collabora, Ltd. ; SPDX-License-Identifier: BSL-1.0 EXPORTS vkNegotiateLoaderLayerInterfaceVersion 07070100000037000081A400000000000000000000000165D6762A000002C1000000000000000000000000000000000000002C00000000vulkan-layers-0.9.0ae43cdc/versioning.cmake# SPDX-License-Identifier: CC0-1.0 # SPDX-FileCopyrightText: 2018-2022 Collabora, Ltd. and the Monado contributors # This script is for use both within cmake configuration, as well as in script mode. # Script mode usage is something like this: # cmake "-DINPUT=$(git describe --always)" -P versioning.cmake function(monado_process_git_describe input outvar) # This is our "single source of truth" for converting git-describe output into versions. string(REGEX REPLACE "-([0-9]+)-g([0-9a-f]+)" ".\\1.git.\\2" result "${input}") set(${outvar} "${result}" PARENT_SCOPE ) endfunction() if(CMAKE_SCRIPT_MODE_FILE) monado_process_git_describe(${INPUT} OUTPUT) message("${OUTPUT}") endif() 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!223 blocks
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor