├── .clang-format ├── .github ├── dependabot.yml └── workflows │ └── ci.yml ├── .gitignore ├── .gitmodules ├── BUILD.md ├── CHANGELOG.md ├── CMakeLists.txt ├── CONTRIBUTING.md ├── LICENSE.md ├── LICENSES ├── Apache-2.0.txt ├── BSD-2-Clause.txt └── BSL-1.0.txt ├── OVERVIEW.md ├── README.md ├── doc └── design.vpp ├── images ├── logo.png ├── overview.png └── vkconfig.png ├── layer ├── .ispell_words ├── CMakeLists.txt ├── TUTORIAL.md ├── VkLayer_khronos_profiles.def ├── VkLayer_khronos_profiles.json.in ├── VkLayer_khronos_profiles.map ├── profiles.cpp ├── profiles.h ├── profiles_interface.cpp ├── profiles_interface.h ├── profiles_json.cpp ├── profiles_json.h ├── profiles_settings.cpp ├── profiles_settings.h ├── profiles_util.cpp ├── profiles_util.h ├── sample_configs │ ├── portability_test.json │ ├── sdk_sample_configs │ │ ├── iOS_gpu_family_3_portability.json │ │ ├── iOS_gpu_family_5_portability.json │ │ ├── macOS_gpu_family_1_portability.json │ │ ├── portability_desktop_1_0.json │ │ ├── portability_desktop_1_2.json │ │ ├── portability_minimum_vulkan_1_0.json │ │ ├── portability_minimum_vulkan_1_1.json │ │ ├── portability_minimum_vulkan_1_2.json │ │ ├── spec_minimum_vulkan_1_0.json │ │ ├── spec_minimum_vulkan_1_1.json │ │ └── spec_minimum_vulkan_1_2.json │ └── tiny1.json ├── tests │ ├── CMakeLists.txt │ ├── layer_tests_main.cpp │ ├── layer_tests_main.h │ ├── platforms │ │ └── android │ │ │ └── AndroidManifest.xml │ ├── profiles_test_helper.cpp │ ├── profiles_test_helper.h │ ├── tests.cpp │ ├── tests_combine_intersection.cpp │ ├── tests_combine_union.cpp │ ├── tests_desktop_2022.cpp │ ├── tests_mechanism.cpp │ ├── tests_mechanism_api_version.cpp │ ├── tests_mechanism_check_values.cpp │ ├── tests_mechanism_format.cpp │ ├── tests_mechanism_physical_device_selection.cpp │ ├── tests_mechanism_video_profiles.cpp │ ├── tests_merged_intersection.cpp │ ├── tests_merged_union.cpp │ ├── tests_promoted.cpp │ ├── tests_util.cpp │ ├── vktestframework.cpp │ └── vktestframework.h ├── vk_layer_table.cpp └── vk_layer_table.h ├── library ├── .ispell_words ├── CMakeLists.txt ├── TUTORIAL.md └── test │ ├── CMakeLists.txt │ ├── mock_debug_message_callback.hpp │ ├── mock_vulkan_api.hpp │ ├── platforms │ └── android │ │ └── AndroidManifest.xml │ ├── profiles │ ├── VP_LUNARG_test_profile_a.json │ ├── VP_LUNARG_test_profile_b.json │ ├── VP_LUNARG_test_variants.json │ ├── VP_RASTERGRID_test_queue_families.json │ ├── VP_RASTERGRID_test_video_profiles.json │ └── VP_RASTERGRID_test_wildcard_video_profiles.json │ ├── test.hpp │ ├── test_api_create_device.cpp │ ├── test_api_create_device_android.cpp │ ├── test_api_get_profiles_beta.cpp │ ├── test_api_profile_object.cpp │ ├── test_api_reflection.cpp │ ├── test_mocked_api_create_device.cpp │ ├── test_mocked_api_create_instance.cpp │ ├── test_mocked_api_generated_library.cpp │ ├── test_mocked_api_get_instance_profile_support.cpp │ ├── test_mocked_api_get_physdev_profile_support.cpp │ └── test_util.cpp ├── profiles ├── CMakeLists.txt ├── VP_ANDROID_15_minimums.json ├── VP_ANDROID_16_minimums.json ├── VP_ANDROID_baseline_2021.json ├── VP_ANDROID_baseline_2022.json ├── VP_KHR_roadmap_2022.json ├── VP_LUNARG_desktop_baseline_2022 │ ├── vp_gpuinfo_amd_radeon__tm__r7_370_series_2_0_179_windows_10.json │ ├── vp_gpuinfo_amd_radeon_pro_560_0_2_2010_osx_12_6.json │ ├── vp_gpuinfo_amd_radeon_rx_vega_64_0_2_1911_osx_10_15.json │ ├── vp_gpuinfo_amd_radv_bonaire__aco__21_1_4_arch_unknown.json │ ├── vp_gpuinfo_apple_m1_0_2_1911_osx_11_2.json │ ├── vp_gpuinfo_intel_r__arc_tm__a380_graphics_0_405_161_windows_11.json │ ├── vp_gpuinfo_intel_r__arc_tm__a380_graphics__dg2__23_0_99_ubuntu_22_04.json │ ├── vp_gpuinfo_intel_r__hd_graphics_515_0_402_1124_windows_10.json │ ├── vp_gpuinfo_intel_r__hd_graphics_520__skl_gt2__21_1_1_arch_unknown.json │ ├── vp_gpuinfo_intel_r__iris_tm__graphics_6000_0_2_1911_osx_10_15.json │ ├── vp_gpuinfo_nvidia_geforce_gtx_650_ti_472_98_0_0_windows_10.json │ ├── vp_gpuinfo_nvidia_geforce_gtx_660_470_74_0_0_arch_unknown.json │ └── vp_gpuinfo_nvidia_quadro_k4200_0_0_157_53_osx_10_15.json ├── VP_LUNARG_desktop_baseline_2023 │ ├── vp_gpuinfo_amd_radeon_pro_vega_48_0_2_2009_osx_13_1.json │ ├── vp_gpuinfo_amd_radeon_r7_200_series_2_0_179_windows_10.json │ ├── vp_gpuinfo_amd_radeon_rx_7800_xt_2_0_294_windows_11.json │ ├── vp_gpuinfo_amd_radeon_rx_7800_xt__radv_navi32__24_0_99_arch_unknown.json │ ├── vp_gpuinfo_amd_radv_pitcairn_21_2_1_arch_unknown.json │ ├── vp_gpuinfo_apple_m1_0_2_2015_osx_14_3.json │ ├── vp_gpuinfo_apple_m3_max_0_2_2015_osx_14_1.json │ ├── vp_gpuinfo_intel_r__arc_tm__a380_graphics_0_405_161_windows_11.json │ ├── vp_gpuinfo_intel_r__arc_tm__a380_graphics__dg2__23_0_99_ubuntu_22_04.json │ ├── vp_gpuinfo_intel_r__arc_tm__a380_graphics__dg2__24_0_99_opensuse_tumbleweed_20240213.json │ ├── vp_gpuinfo_intel_r__arc_tm__a770_graphics_0_405_1234_windows_11.json │ ├── vp_gpuinfo_intel_r__hd_graphics_520_0_402_1274_windows_10.json │ ├── vp_gpuinfo_intel_r__hd_graphics_530__skl_gt2__21_1_99_ubuntu_21_02.json │ ├── vp_gpuinfo_intel_r__uhd_graphics_630_0_2_2009_osx_13_2.json │ ├── vp_gpuinfo_nvidia_geforce_gtx_650_ti_474_4_0_0_windows_10.json │ ├── vp_gpuinfo_nvidia_geforce_gtx_660_470_161_3_0_ubuntu_22_04.json │ ├── vp_gpuinfo_nvidia_geforce_gtx_680mx_0_0_159_24_osx_10_15.json │ └── vp_gpuinfo_nvidia_geforce_rtx_4070_551_61_0_0_windows_11.json ├── VP_LUNARG_desktop_baseline_2024 │ ├── vp_gpuinfo_amd_radeon_rx_580_series__radv_polaris10__23_1_7_arch_unknown.json │ ├── vp_gpuinfo_amd_radeon_rx_7800_xt_2_0_294_windows_11.json │ ├── vp_gpuinfo_amd_radeon_rx_7800_xt__radv_navi32__24_0_99_arch_unknown.json │ ├── vp_gpuinfo_apple_m1_0_2_2015_osx_14_3.json │ ├── vp_gpuinfo_apple_m3_max_0_2_2015_osx_14_1.json │ ├── vp_gpuinfo_intel_r__arc_tm__a380_graphics_0_405_161_windows_11.json │ ├── vp_gpuinfo_intel_r__arc_tm__a380_graphics__dg2__23_0_99_ubuntu_22_04.json │ ├── vp_gpuinfo_intel_r__arc_tm__a380_graphics__dg2__24_0_99_opensuse_tumbleweed_20240213.json │ ├── vp_gpuinfo_intel_r__arc_tm__a770_graphics_0_405_1234_windows_11.json │ ├── vp_gpuinfo_intel_r__uhd_graphics_620_0_404_2125_windows_10.json │ ├── vp_gpuinfo_intel_r__uhd_graphics_620__whl_gt2__23_1_7_arch_unknown.json │ ├── vp_gpuinfo_nvidia_geforce_gtx_1060_535_86_5_0_ubuntu_22_04.json │ ├── vp_gpuinfo_nvidia_geforce_gtx_1060_537_13_0_0_windows_10.json │ ├── vp_gpuinfo_nvidia_geforce_rtx_4070_551_61_0_0_windows_11.json │ └── vp_gpuinfo_radeon_rx_580_series_2_0_258_windows_10.json ├── VP_LUNARG_desktop_baseline_config.json ├── VP_LUNARG_desktop_max_2024 │ ├── vp_gpuinfo_amd_radeon_rx_6600__radv_navi23__23_2_99_endeavouros_unknown.json │ ├── vp_gpuinfo_amd_radeon_rx_6800_xt_2_0_283_windows_11.json │ ├── vp_gpuinfo_intel_r__arc_tm__a750_graphics_0_405_728_windows_10.json │ ├── vp_gpuinfo_intel_r__arc_tm__a750_graphics__dg2__23_2_99_arch_unknown.json │ ├── vp_gpuinfo_nvidia_geforce_rtx_2060_525_47_26_0_ubuntu_23_04.json │ └── vp_gpuinfo_nvidia_geforce_rtx_2060_537_59_0_0_windows_11.json ├── VP_LUNARG_minimum_requirements.json ├── config │ └── VP_LUNARG_desktop_baseline_config.json └── test │ ├── CMakeLists.txt │ ├── data │ ├── VP_LUNARG_test_api.json │ ├── VP_LUNARG_test_api_1_0.json │ ├── VP_LUNARG_test_api_1_1.json │ ├── VP_LUNARG_test_api_1_2.json │ ├── VP_LUNARG_test_api_1_3.json │ ├── VP_LUNARG_test_api_alternate.json │ ├── VP_LUNARG_test_api_version.json │ ├── VP_LUNARG_test_api_version_profile.json │ ├── VP_LUNARG_test_baseline_formats.json │ ├── VP_LUNARG_test_capabilities.json │ ├── VP_LUNARG_test_combine_intersect │ │ ├── VP_LUNARG_test_combine_intersect1.json │ │ └── VP_LUNARG_test_combine_intersect2.json │ ├── VP_LUNARG_test_combine_union │ │ ├── VP_LUNARG_test_combine_union1.json │ │ └── VP_LUNARG_test_combine_union2.json │ ├── VP_LUNARG_test_device_extensions.json │ ├── VP_LUNARG_test_device_features.json │ ├── VP_LUNARG_test_device_properties.json │ ├── VP_LUNARG_test_duplicated.json │ ├── VP_LUNARG_test_formats.json │ ├── VP_LUNARG_test_host_image_copy │ │ ├── local_gpu.json │ │ └── remote_gpu.json │ ├── VP_LUNARG_test_instance_extensions.json │ ├── VP_LUNARG_test_promoted_api.json │ ├── VP_LUNARG_test_required_profiles.json │ ├── VP_LUNARG_test_required_profiles2.json │ ├── VP_LUNARG_test_selecting_profile.json │ ├── VP_LUNARG_test_structure_complex.json │ ├── VP_LUNARG_test_structure_fallback.json │ ├── VP_LUNARG_test_structure_simple.json │ ├── VP_LUNARG_test_variants.json │ ├── VP_LUNARG_test_vkformatproperties.json │ ├── VP_LUNARG_test_vkqueuefamilyproperties.json │ └── VP_RASTERGRID_test_video_profiles.json │ ├── test.hpp │ └── test_validate.cpp └── scripts ├── CMakeLists.txt ├── gen_profiles_file.py ├── gen_profiles_layer.py ├── gen_profiles_solution.py ├── gen_profiles_tests.py ├── known_good.json └── update_deps.py /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | # Use defaults from the Google style with the following exceptions: 3 | BasedOnStyle: Google 4 | IndentWidth: 4 5 | ColumnLimit: 132 6 | SortIncludes: false 7 | ... 8 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 LunarG, Inc. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | version: 2 15 | updates: 16 | - package-ecosystem: "github-actions" 17 | directory: "/" 18 | schedule: 19 | interval: "weekly" 20 | open-pull-requests-limit: 1 -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2023 Valve Corporation 2 | # Copyright (c) 2023 LunarG, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | name: ci 17 | 18 | # https://docs.github.com/en/actions/using-jobs/using-concurrency 19 | concurrency: 20 | # github.head_ref is only defined on pull_request 21 | # Fallback to the run ID, which is guaranteed to be both unique and defined for the run. 22 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} 23 | cancel-in-progress: true 24 | 25 | env: 26 | CMAKE_GENERATOR: Ninja 27 | 28 | on: 29 | push: 30 | pull_request: 31 | branches: 32 | - main 33 | 34 | permissions: 35 | contents: read 36 | 37 | jobs: 38 | ubuntu-latest: 39 | env: 40 | CMAKE_C_COMPILER_LAUNCHER: ccache 41 | CMAKE_CXX_COMPILER_LAUNCHER: ccache 42 | runs-on: ubuntu-latest 43 | strategy: 44 | fail-fast: false 45 | matrix: 46 | config: [Debug, Release] 47 | steps: 48 | - uses: actions/checkout@v4 49 | - uses: actions/setup-python@v5 50 | with: 51 | python-version: '3.8' 52 | - name: Install jsonschema 53 | run: python3 -m pip install jsonschema 54 | - name: Install Dependencies 55 | run: sudo apt update && sudo apt install --yes --no-install-recommends libwayland-dev libxrandr-dev 56 | - uses: lukka/get-cmake@latest 57 | with: 58 | cmakeVersion: 3.22.1 59 | - name: Setup ccache 60 | uses: hendrikmuhs/ccache-action@v1.2 61 | with: 62 | key: ${{ runner.os }}-${{ matrix.config }} 63 | - name: Configure/Generate 64 | run: cmake -S. -B build -D BUILD_TESTS=OFF -D UPDATE_DEPS=ON -DCMAKE_BUILD_TYPE=${{matrix.config}} 65 | - name: Build 66 | run: cmake --build build --config ${{matrix.config}} 67 | - name: Install 68 | run: cmake --install build --prefix build/install --config ${{matrix.config}} 69 | 70 | android: 71 | env: 72 | CMAKE_C_COMPILER_LAUNCHER: ccache 73 | CMAKE_CXX_COMPILER_LAUNCHER: ccache 74 | runs-on: ubuntu-22.04 75 | steps: 76 | - uses: actions/checkout@v4 77 | - uses: actions/setup-python@v5 78 | with: 79 | python-version: '3.10' 80 | - name: Install jsonschema 81 | run: python3 -m pip install jsonschema 82 | - name: Setup ccache 83 | uses: hendrikmuhs/ccache-action@v1.2 84 | with: 85 | key: android-ccache 86 | - uses: lukka/get-cmake@latest 87 | - name: Configure 88 | run: | 89 | cmake -S . -B build/ --toolchain $ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake \ 90 | -D ANDROID_PLATFORM=26 \ 91 | -D CMAKE_ANDROID_ARCH_ABI=x86_64 \ 92 | -D CMAKE_ANDROID_STL_TYPE=c++_static \ 93 | -D CMAKE_ANDROID_RTTI=YES \ 94 | -D CMAKE_ANDROID_EXCEPTIONS=YES \ 95 | -D ANDROID_USE_LEGACY_TOOLCHAIN_FILE=NO \ 96 | -D BUILD_WERROR=ON \ 97 | -D CMAKE_BUILD_TYPE=Debug \ 98 | -D UPDATE_DEPS=ON \ 99 | -D BUILD_TESTS=OFF 100 | - name: Build 101 | run: cmake --build build 102 | - name: Install 103 | run: cmake --install build --prefix build/install 104 | 105 | windows-latest: 106 | runs-on: windows-latest 107 | strategy: 108 | fail-fast: false 109 | matrix: 110 | arch: [ x64, Win32 ] 111 | config: [ debug, release ] 112 | exclude: 113 | - arch: Win32 114 | config: release 115 | - arch: x64 116 | config: debug 117 | steps: 118 | - uses: actions/checkout@v4 119 | - uses: actions/setup-python@v5 120 | with: 121 | python-version: '3.8' 122 | - name: Install jsonschema 123 | run: python3 -m pip install jsonschema 124 | - uses: lukka/get-cmake@latest 125 | - uses: ilammy/msvc-dev-cmd@v1 126 | with: 127 | arch: ${{ matrix.arch }} 128 | - name: Configure/Generate 129 | run: cmake -S. -B build -D BUILD_TESTS=OFF -D UPDATE_DEPS=ON -DCMAKE_BUILD_TYPE=${{matrix.config}} 130 | - name: Build 131 | run: cmake --build build --config ${{matrix.config}} 132 | - name: Install 133 | run: cmake --install build --prefix build/install --config ${{matrix.config}} 134 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | CMakeCache.txt 2 | CMakeLists.txt.user 3 | CMakeFiles/ 4 | Testing/ 5 | cmake_install.cmake 6 | Makefile 7 | scripts/__pycache__ 8 | *.so 9 | *.so.* 10 | _out64 11 | out32/* 12 | out64/* 13 | *.pyc 14 | *.vcproj 15 | *.sln 16 | *.suo 17 | *.vcxproj 18 | *.sdf 19 | *.filters 20 | .*.swp 21 | build 22 | build32 23 | dbuild 24 | rbuild 25 | build-android/external 26 | *.config 27 | *.creator 28 | *.creator.user 29 | *.user 30 | *.autosave 31 | *.files 32 | *.includes 33 | .vscode/ 34 | helper.cmake 35 | Vulkan-Headers/ 36 | Vulkan-Tools/ 37 | external/ 38 | profiles/test/data/VP_LUNARG_test_host_image_copy.json 39 | profiles/test/data/VP_LUNARG_test_generated_name.json 40 | profiles/test/data/VP_LUNARG_test_api_generated.json 41 | profiles/test/data/VP_LUNARG_test_combine_intersect.json 42 | profiles/test/data/VP_LUNARG_test_combine_union.json 43 | profiles/test/data/VP_LUNARG_desktop_max_2024.json 44 | profiles/VP_KHR_roadmap.json 45 | profiles/VP_LUNARG_desktop_baseline.json 46 | profiles/VP_LUNARG_desktop_baseline_2022.json 47 | profiles/VP_LUNARG_desktop_baseline_2023.json 48 | profiles/VP_LUNARG_desktop_baseline_2024.json 49 | PROFILES.md 50 | PROFILES_ALL.md 51 | PROFILES_ANDROID.md 52 | schema/profiles-0.8-latest.json 53 | library/include/ 54 | library/source/ 55 | library/include/vulkan/vulkan_profiles.h 56 | library/include/vulkan/vulkan_profiles.hpp 57 | library/include/vulkan/debug/vulkan_profiles.h 58 | library/include/vulkan/debug/vulkan_profiles.hpp 59 | library/source/vulkan_profiles.cpp 60 | library/source/debug/vulkan_profiles.cpp 61 | library/test/test_vulkan_profiles* 62 | layer/profiles_generated.cpp 63 | layer/tests/tests_generated.cpp 64 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/Vulkan-Profiles/518105425a308ae915f063b4fd8d309610b15b09/.gitmodules -------------------------------------------------------------------------------- /BUILD.md: -------------------------------------------------------------------------------- 1 | # Build Instructions 2 | 3 | This document contains the instructions for building this repository. 4 | 5 | ## System Requirements 6 | 7 | ### Windows System Requirements 8 | 9 | - Microsoft Visual Studio 2019 or higher 10 | - [CMake 3.22.1](https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1-windows-x86_64.zip) is recommended. 11 | - Tell the installer to "Add CMake to the system `PATH`" environment variable. 12 | - Python 3.7.2 or later (from https://www.python.org/downloads). Notes: 13 | - Select to install the optional sub-package to add Python to the system `PATH` environment variable. 14 | - Need python3.3 or later to get the Windows `py.exe` launcher that is used to get `python3` rather than `python2` if both are installed on Windows 15 | - Install `jsonschema` package (`pip3 install jsonschema`) 16 | - Git (from http://git-scm.com/download/win). 17 | - Tell the installer to allow it to be used for "Developer Prompt" as well as "Git Bash". 18 | - Tell the installer to treat line endings "as is" (i.e. both DOS and Unix-style line endings). 19 | 20 | Optional software packages: 21 | 22 | - *Cygwin* (from https://www.cygwin.com/). 23 | - *Cygwin* provides some Linux-like tools, which are valuable for obtaining the source code, and running CMake. 24 | Especially valuable are the *BASH* shell and git packages. 25 | - If you do not wish to use *Cygwin*, there are other shells and environments that can be used. 26 | You can also use a Git package that does not come from *Cygwin*. 27 | 28 | ### Ubuntu System Requirements 29 | 30 | [CMake 3.22.1](https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1-linux-x86_64.tar.gz) is recommended. 31 | 32 | ``` 33 | # Dependencies from included submodule components 34 | sudo apt-get install git build-essential bison libx11-xcb-dev libxkbcommon-dev libwayland-dev libxrandr-dev libxcb-randr0-dev 35 | 36 | # Additional dependencies for this repo: 37 | sudo apt-get install wget autotools-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-ewmh-dev 38 | 39 | # If performing 32-bit builds, you will also need: 40 | sudo apt-get install libc6-dev-i386 g++-multilib 41 | 42 | # Install jsonschema python package 43 | sudo apt-get install python3-pip 44 | pip3 install jsonschema 45 | ``` 46 | 47 | ### Fedora Core System Requirements 48 | 49 | Fedora Core 28 and 29 were tested with this repo. 50 | 51 | [CMake 3.22.1](https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1-linux-x86_64.tar.gz) is recommended. 52 | 53 | Additional package dependencies include: 54 | 55 | ``` 56 | # Dependencies from included submodule components 57 | sudo dnf install git @development-tools glm-devel \ 58 | libpng-devel wayland-devel libpciaccess-devel \ 59 | libX11-devel libXpresent libxcb xcb-util libxcb-devel libXrandr-devel \ 60 | xcb-util-keysyms-devel xcb-util-wm-devel 61 | 62 | # Install jsonschema python package 63 | sudo dnf install python3-pip 64 | pip3 install jsonschema 65 | ``` 66 | 67 | Optional software packages: 68 | 69 | ### macOS System Requirements 70 | 71 | MacOS 10.15 have been tested with this repo. 72 | 73 | - [CMake 3.22.1](https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1-Darwin-x86_64.tar.gz) is recommended. 74 | 75 | Setup Homebrew and components 76 | 77 | - Ensure Homebrew is at the beginning of your PATH: 78 | ``` 79 | export PATH=/usr/local/bin:$PATH 80 | ``` 81 | 82 | - Add packages with the following (may need refinement) 83 | ``` 84 | brew install python python3 git 85 | ``` 86 | 87 | - Install `jsonschema` python package 88 | ``` 89 | pip3 install jsonschema 90 | ``` 91 | 92 | ### Android Additional System Requirements 93 | Install the required tools for Linux and Windows covered above, then add the 94 | following. 95 | 96 | #### Install the Android SDK and NDK 97 | 98 | - With Android Studio 99 | - Install [Android Studio 2.3](https://developer.android.com/studio/index.html) 100 | or later. 101 | - From the "Welcome to Android Studio" splash screen, add the following 102 | components using Configure > SDK Manager: 103 | - SDK Platforms > Android 8.0.0 and newer 104 | - SDK Tools > Android SDK Build-Tools 105 | - SDK Tools > Android SDK Platform-Tools 106 | - SDK Tools > Android SDK Tools 107 | - SDK Tools > NDK 108 | - [sdkmanager](https://developer.android.com/studio/command-line/sdkmanager) CLI tool 109 | 110 | #### Set SDK/NDK Build Environment Variables 111 | 112 | Some common locations for the `ANDROID_SDK_HOME` and `ANDROID_NDK_HOME` are: 113 | 114 | On Linux: 115 | 116 | ```bash 117 | export ANDROID_SDK_HOME=$HOME/Android/sdk 118 | export ANDROID_NDK_HOME=$HOME/Android/sdk/ndk-bundle 119 | ``` 120 | 121 | On Windows: 122 | 123 | ```batch 124 | set ANDROID_SDK_HOME=%LOCALAPPDATA%\Android\sdk 125 | set ANDROID_NDK_HOME=%LOCALAPPDATA%\Android\sdk\ndk-bundle 126 | ``` 127 | 128 | On OSX: 129 | 130 | ```bash 131 | export ANDROID_SDK_HOME=$HOME/Library/Android/sdk 132 | export ANDROID_NDK_HOME=$HOME/Library/Android/sdk/ndk-bundle 133 | ``` 134 | 135 | ## Getting Started Build Instructions 136 | 137 | ### 64-bit Windows Build 138 | ``` 139 | git clone git@github.com:KhronosGroup/Vulkan-Profiles.git 140 | cd Vulkan-Profiles 141 | cmake -S . -B build/ -D CMAKE_BUILD_TYPE=Debug -D BUILD_TESTS=ON -D UPDATE_DEPS=ON -A x64 142 | cmake --build ./build/ --config Debug 143 | ``` 144 | 145 | ### Windows Unit Tests 146 | 147 | ``` 148 | cd build/ 149 | ctest -C Debug --output-on-failure --parallel 16 150 | ``` 151 | 152 | ### Linux and macOS Build 153 | ``` 154 | git clone git@github.com:KhronosGroup/Vulkan-Profiles.git 155 | cd Vulkan-Profiles 156 | cmake -S . -B build/ -D CMAKE_BUILD_TYPE=Debug -D UPDATE_DEPS=ON 157 | cmake --build ./build/ 158 | ``` 159 | 160 | ### Linux and macOS Unit Tests 161 | 162 | ``` 163 | cd build/ 164 | ctest --parallel 8 --output-on-failure 165 | ``` 166 | 167 | ### Android Build 168 | Use the following to ensure the Android build works. 169 | 170 | #### Android Build using CMake For Windows, Linux, and OSX 171 | 172 | ```bash 173 | cmake -Bandroid-build \ 174 | -DCMAKE_TOOLCHAIN_FILE=/build/cmake/android.toolchain.cmake \ 175 | -DANDROID_PLATFORM=28 \ 176 | -DANDROID_BUILD_TOOLS=30.0.3 \ 177 | -DANDROID_ABI=arm64-v8a 178 | 179 | cd android-build 180 | cmake --build . --parallel 181 | ``` 182 | 183 | #### Android Unit Tests 184 | The Android test packages are created in the following directory: 185 | Vulkan-Profiles/android-build/apk/out 186 | 187 | ``` 188 | adb install -r apk/out/TestPackageName.apk 189 | adb shell am start -a android.intent.MAIN -c android-intent.category.LAUNCH -n com.example.TestPackageName/android.app.NativeActivity --es args --gtest_catch_exceptions=0 190 | # Test output is written to logcat 191 | adb logcat > tempfile 192 | grep VulkanProfilesLayerTests: tempfile 193 | ``` 194 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ~~~ 2 | # Copyright (c) 2020-2025 LunarG, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ~~~ 16 | 17 | cmake_minimum_required(VERSION 3.22.1) 18 | 19 | project(VULKAN_PROFILES LANGUAGES CXX C) 20 | 21 | # Enable GUI folders 22 | set_property(GLOBAL PROPERTY USE_FOLDERS ON) 23 | 24 | include(GNUInstallDirs) 25 | 26 | # This variable enables downstream users to customize the target API variant (e.g. Vulkan SC) 27 | set(API_TYPE "vulkan") 28 | 29 | set(PROFILES_CPP_STANDARD 17 CACHE STRING "Set the C++ standard to build against.") 30 | set(CMAKE_CXX_STANDARD ${PROFILES_CPP_STANDARD}) 31 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 32 | set(CMAKE_CXX_EXTENSIONS OFF) 33 | set(CMAKE_POSITION_INDEPENDENT_CODE ON) 34 | set(CMAKE_CXX_VISIBILITY_PRESET "hidden") 35 | set(CMAKE_C_VISIBILITY_PRESET "hidden") 36 | set(CMAKE_VISIBILITY_INLINES_HIDDEN "YES") 37 | 38 | add_subdirectory(scripts) 39 | set(MERGE_SCRIPT ${PROJECT_SOURCE_DIR}/scripts/gen_profiles_file.py) 40 | set(SOLUTION_SCRIPT ${PROJECT_SOURCE_DIR}/scripts/gen_profiles_solution.py) 41 | 42 | find_package(VulkanHeaders REQUIRED CONFIG QUIET) 43 | 44 | find_package(VulkanUtilityLibraries REQUIRED CONFIG QUIET) 45 | 46 | find_package(valijson REQUIRED CONFIG) 47 | 48 | find_package(jsoncpp REQUIRED CONFIG) 49 | 50 | option(BUILD_TESTS "Build the tests") 51 | if (BUILD_TESTS) 52 | enable_testing() 53 | find_package(GTest REQUIRED CONFIG) 54 | 55 | if(NOT ANDROID) 56 | find_package(VulkanLoader REQUIRED CONFIG) 57 | endif() 58 | endif() 59 | 60 | option(BUILD_TESTS_EXTRA "Build the extra tests, for developers only") 61 | if (BUILD_TESTS_EXTRA) 62 | add_definitions(-DVKU_FORCE_EXTRA_TESTS) 63 | endif() 64 | 65 | set(PROFILES_SCHEMA_FILENAME "profiles-0.8-latest.json") 66 | 67 | find_package(Python3 REQUIRED) 68 | 69 | # The profiles directory regenerates the Profiles source and headers. 70 | add_subdirectory(profiles) 71 | add_subdirectory(library) 72 | add_subdirectory(layer) 73 | 74 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Vulkan Profiles repository 2 | 3 | ## Contributions Welcome 4 | 5 | The easiest method for contributing to *Vulkan Profiles* repository is to examine the [issues list](https://github.com/LunarG/VulkanProfiles/issues) and the [roadmaps](https://github.com/LunarG/VulkanProfiles/projects) 6 | and look for areas that are of interest. 7 | 8 | Furthermore: 9 | - If you have your own work in mind, please open an issue to describe it and assign it to yourself. 10 | - If you choose to work on an issue that is assigned, simply coordinate with the current assignee. 11 | 12 | -------------- 13 | ## Building the repository 14 | 15 | It requires *[Qt 5](https://www.qt.io/download)* to be install and *Qt* `bin` directory to be added to the `PATH` environment variable. *Vulkan Configurator* is built as part of the [VulkanTools](https://github.com/LunarG/VulkanTools/blob/main/BUILD.md) using *CMake* build system or alternatively with `vkconfig.pro` using Qt Creator. 16 | 17 | -------------- 18 | ## Running unit tests 19 | 20 | When submitting a PR, the unit tests will ran automatically. 21 | 22 | However, it's trivial and more effective to run the unit tests locally with the following commands: 23 | 24 | On Windows, from the build directory: 25 | ``` 26 | ctest -C Debug --output-on-failure --parallel 16 27 | ctest -C Release --output-on-failure --parallel 16 28 | ``` 29 | 30 | On Linux and macOS, from the build directory: 31 | ``` 32 | ctest --output-on-failure --parallel 16 33 | ``` 34 | 35 | `--parallel` runs the unit tests on the especified number of threads. 36 | 37 | `--output-on-failure` outputs unit tests details only on failed tests. 38 | 39 | -------------- 40 | ## Submitting Fixes 41 | 42 | * **Ensure that the bug was not already reported or fixed** by searching on GitHub under [Issues](https://github.com/LunarG/VulkanTools/issues) and [Pull Requests](https://github.com/LunarG/VulkanTools/pulls). 43 | * Use the existing GitHub forking and pull request process. 44 | This will involve [forking the repository](https://help.github.com/articles/fork-a-repo/), 45 | creating a branch with your commits, and then [submitting a pull request](https://help.github.com/articles/using-pull-requests/). 46 | * Please read and adhere to the style and process [guidelines ](#coding-conventions-and-formatting) enumerated below. 47 | * Please base your fixes on the `main` branch. SDK branches are generally not updated except for critical fixes needed to repair an SDK release. 48 | * The resulting Pull Request will be assigned to a repository maintainer. Once the Pull Request has been approved and is passing internal CI, a repository maintainer 49 | will merge the PR. 50 | 51 | ### Coding Conventions and Formatting 52 | * Use the **[Google style guide](https://google.github.io/styleguide/cppguide.html)** for source code with the following exceptions: 53 | * The column limit is 132 (as opposed to the default value 80). The clang-format tool will handle this. See below. 54 | * The indent is 4 spaces instead of the default 2 spaces. Again, the clang-format tool will handle this. 55 | * If you can justify a reason for violating a rule in the guidelines, then you are free to do so. Be prepared to defend your 56 | decision during code review. This should be used responsibly. An example of a bad reason is "I don't like that rule." An example of 57 | a good reason is "This violates the style guide, but it improves type safety." 58 | 59 | * Run **clang-format** on your changes to maintain consistent formatting 60 | * There are `.clang-format files` present in the repository to define clang-format settings 61 | which are found and used automatically by clang-format. 62 | * A sample git workflow may look like: 63 | 64 | > # Make changes to the source. 65 | > $ git add -u . 66 | > $ git clang-format --style=file 67 | > # Check to see if clang-format made any changes and if they are OK. 68 | > $ git add -u . 69 | > $ git commit 70 | 71 | * **Commit Messages** 72 | * Limit the subject line to 50 characters -- this allows the information to display correctly in git/Github logs 73 | * Begin subject line with a one-word component description followed by a colon (e.g. layer/tool name, tests, etc.) 74 | * Separate subject from body with a blank line 75 | * Wrap the body at 72 characters 76 | * Capitalize the subject line 77 | * Do not end the subject line with a period 78 | * Use the body to explain what and why vs. how 79 | * Use the imperative mode in the subject line. This just means to write it as a command (e.g. Fix the sprocket) 80 | 81 | Strive for commits that implement a single or related set of functionality, using as many commits as is necessary (more is better). 82 | That said, please ensure that the repository compiles and passes tests without error for each commit in your pull request. Note 83 | that to be accepted into the repository, the pull request must [pass all tests](#testing your changes) on all supported platforms 84 | -- the automatic Github Travis and AppVeyor continuous integration features will assist in enforcing this requirement. 85 | 86 | -------------- 87 | ## Contributor License Agreement (CLA) 88 | 89 | You will be prompted with a one-time "click-through" CLA dialog as part of submitting your pull request 90 | or other contribution to GitHub. 91 | 92 | -------------- 93 | ## License and Copyrights 94 | 95 | All contributions made to the LunarG repositories need to have the Apache 2.0 license. 96 | Please see an existing file in this repository for an example. 97 | 98 | You can include your individual copyright after any existing copyrights. 99 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # LICENSE file for the KhronosGroup/Vulkan-Docs project 2 | Files in this repository fall under one of these licenses: 3 | - SPDX license identifier: “Apache-2.0” 4 | - Apache License 2.0 5 | - For scripts 6 | 7 | - SPDX license identifier: “CC-BY-4.0” 8 | - Creative Commons Attribution 4.0 International 9 | - For markdown, dot, and CMakeLists files 10 | 11 | - SPDX license identifier: "BSL-1.0" 12 | - Boost Software License 1.0 13 | - For external/compat/optional.hpp 14 | 15 | - SPDX license identifier: "BSD-2-Clause" 16 | - BSD 2-Clause "Simplified" License 17 | - For external/valijson/* 18 | -------------------------------------------------------------------------------- /LICENSES/BSD-2-Clause.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2 | 3 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 4 | 5 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 6 | 7 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | 9 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10 | -------------------------------------------------------------------------------- /LICENSES/BSL-1.0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | 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: 4 | 5 | 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. 6 | 7 | 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. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 |

LunarG

3 |

Copyright © 2021-2025 LunarG, Inc.

4 | 5 |

6 | 7 | [![Creative Commons][3]][4] 8 | 9 | [3]: https://i.creativecommons.org/l/by-nd/4.0/88x31.png "Creative Commons License" 10 | [4]: https://creativecommons.org/licenses/by-nd/4.0/ 11 | 12 | # Vulkan Profiles Toolset 13 | 14 | The *Vulkan Profiles Toolset* is a collection of tools delivered with the [Vulkan SDK](https://www.lunarg.com/vulkan-sdk/) for Vulkan application developers to leverage *Vulkan Profiles* while developing a Vulkan application. 15 | 16 | * **[Vulkan Profiles Tools Overview](./OVERVIEW.md)**: Discover the components and how they work together. 17 | * **[Vulkan Profiles Documentation](https://vulkan.lunarg.com/doc/sdk/latest/windows/profiles_definitions.html)**: *Tables to compare profiles capabilities*. 18 | * **[Change Log](./CHANGELOG.md)**: The history of *Vulkan Profiles Toolset* releases. 19 | * **[Contributing](./CONTRIBUTING.md)**: How to contribute to the *Vulkan Profiles* repository. 20 | * **[Bug reports](https://github.com/KhronosGroup/Vulkan-Profiles)**: Open a GitHub issue when you encounter a bug. 21 | 22 | -------------- 23 | ## Contact Information 24 | * [Christophe Riccio](mailto:christophe@lunarg.com) 25 | * [Žiga Markuš](mailto:ziga@lunarg.com) 26 | 27 | -------------- 28 | ## Information for Developing or Contributing: 29 | Please see the [CONTRIBUTING.md](./CONTRIBUTING.md) file in this repository for more details. 30 | 31 | -------------- 32 | ## How to Build and Run 33 | [BUILD.md](./BUILD.md) provides instructions to build the repository, which allows regenerating the *Vulkan Profiles Toolset* against new Vulkan Header API version and with supports of new profiles or updated profiles. 34 | 35 | -------------- 36 | ## Version Tagging Scheme 37 | 38 | Updates to this repository which correspond to a new Vulkan specification release are tagged using the following format: `v<`_`version`_`>` (e.g., `v1.3.266`). 39 | 40 | **Note**: Marked version releases have undergone thorough testing but do not imply the same quality level as SDK tags. SDK tags follow the `vulkan-sdk-<`_`version`_`>.<`_`patch`_`>` format (e.g., `vulkan-sdk-1.3.266.0`). 41 | 42 | This scheme was adopted following the `1.3.266` Vulkan specification release. 43 | 44 | -------------- 45 | ## License 46 | 47 | This work is released as open source under a [Apache-style license](./LICENSE.md) from Khronos including a Khronos copyright. 48 | 49 | -------------- 50 | ## Downloads 51 | 52 | *Vulkan Profiles Tools* is delivered with the [Vulkan SDK](https://vulkan.lunarg.com/sdk/home). 53 | 54 | 55 | -------------------------------------------------------------------------------- /doc/design.vpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/Vulkan-Profiles/518105425a308ae915f063b4fd8d309610b15b09/doc/design.vpp -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/Vulkan-Profiles/518105425a308ae915f063b4fd8d309610b15b09/images/logo.png -------------------------------------------------------------------------------- /images/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/Vulkan-Profiles/518105425a308ae915f063b4fd8d309610b15b09/images/overview.png -------------------------------------------------------------------------------- /images/vkconfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/Vulkan-Profiles/518105425a308ae915f063b4fd8d309610b15b09/images/vkconfig.png -------------------------------------------------------------------------------- /layer/.ispell_words: -------------------------------------------------------------------------------- 1 | adb 2 | alt 3 | API 4 | app 5 | com 6 | Configurator 7 | creativecommons 8 | env 9 | github 10 | GPU 11 | html 12 | https 13 | img 14 | json 15 | JSON 16 | khr 17 | KHR 18 | khronos 19 | Khronos 20 | KHRONOS 21 | KhronosGroup 22 | lunarg 23 | LunarG 24 | LUNARG 25 | macOS 26 | markdownlint 27 | NewLunarGLogoBlack 28 | org 29 | overcommit 30 | PhysicalDevice 31 | png 32 | pre 33 | sdk 34 | SDK 35 | src 36 | STDOUT 37 | txt 38 | validators 39 | vk 40 | VK 41 | vkconfig 42 | vkEnumeratePhysicalDevices 43 | VP 44 | vulkan 45 | Vulkan 46 | VULKAN 47 | vulkaninfo 48 | VulkanProfiles 49 | www 50 | -------------------------------------------------------------------------------- /layer/VkLayer_khronos_profiles.def: -------------------------------------------------------------------------------- 1 | ;;;; Begin Copyright Notice ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 2 | ; 3 | ; Copyright (c) 2015-2023 Valve Corporation 4 | ; Copyright (c) 2015-2023 LunarG, Inc. 5 | ; 6 | ; Licensed under the Apache License, Version 2.0 (the "License"); 7 | ; you may not use this file except in compliance with the License. 8 | ; You may obtain a copy of the License at 9 | ; 10 | ; http://www.apache.org/licenses/LICENSE-2.0 11 | ; 12 | ; Unless required by applicable law or agreed to in writing, software 13 | ; distributed under the License is distributed on an "AS IS" BASIS, 14 | ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | ; See the License for the specific language governing permissions and 16 | ; limitations under the License. 17 | ; 18 | ;;;; End Copyright Notice ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 19 | 20 | LIBRARY VkLayer_khronos_profiles 21 | EXPORTS 22 | vkGetInstanceProcAddr 23 | vkCreateInstance 24 | vkEnumerateInstanceLayerProperties 25 | vkEnumerateInstanceExtensionProperties 26 | vkEnumeratePhysicalDevices 27 | vkNegotiateLoaderLayerInterfaceVersion 28 | -------------------------------------------------------------------------------- /layer/VkLayer_khronos_profiles.map: -------------------------------------------------------------------------------- 1 | { 2 | global: 3 | vkGetInstanceProcAddr; 4 | vkCreateInstance; 5 | vkEnumerateInstanceLayerProperties; 6 | vkEnumerateInstanceExtensionProperties; 7 | vkEnumeratePhysicalDevices; 8 | vkNegotiateLoaderLayerInterfaceVersion; 9 | local: 10 | *; 11 | }; 12 | -------------------------------------------------------------------------------- /layer/profiles.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KhronosGroup/Vulkan-Profiles/518105425a308ae915f063b4fd8d309610b15b09/layer/profiles.cpp -------------------------------------------------------------------------------- /layer/profiles.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2025 Valve Corporation 3 | * Copyright (C) 2015-2025 LunarG, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Author: Christophe Riccio 18 | */ 19 | 20 | #pragma once 21 | #include "profiles_settings.h" 22 | 23 | VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance, const char *pName); 24 | VKAPI_ATTR VkResult VKAPI_CALL CreateInstance(const VkInstanceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, 25 | VkInstance *pInstance); 26 | VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceLayerProperties(uint32_t *pCount, VkLayerProperties *pProperties); 27 | VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pCount, 28 | VkExtensionProperties *pProperties); 29 | VKAPI_ATTR VkResult VKAPI_CALL EnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount, 30 | VkPhysicalDevice *pPhysicalDevices); 31 | 32 | std::string GetFormatFeatureString(VkFormatFeatureFlags flags); 33 | 34 | std::string GetFormatFeature2String(VkFormatFeatureFlags2 flags); 35 | 36 | SimulateCapabilityFlags GetSimulateCapabilityFlags(const std::vector &values); 37 | 38 | std::string GetSimulateCapabilitiesLog(SimulateCapabilityFlags flags); 39 | 40 | std::string GetDebugReportsLog(DebugActionFlags flags); 41 | 42 | #define kLayerName "VK_LAYER_KHRONOS_profiles" 43 | #define kLayerSettingsProfileEmulation "profile_emulation" 44 | #define kLayerSettingsProfileFile "profile_file" 45 | #define kLayerSettingsProfileDirs "profile_dirs" 46 | #define kLayerSettingsProfileName "profile_name" 47 | #define kLayerSettingsProfileValidation "profile_validation" 48 | #define kLayerSettingsEmulatePortability "emulate_portability" 49 | #define kLayerSettings_constantAlphaColorBlendFactors "constantAlphaColorBlendFactors" 50 | #define kLayerSettings_events "events" 51 | #define kLayerSettings_imageViewFormatReinterpretation "imageViewFormatReinterpretation" 52 | #define kLayerSettings_imageViewFormatSwizzle "imageViewFormatSwizzle" 53 | #define kLayerSettings_imageView2DOn3DImage "imageView2DOn3DImage" 54 | #define kLayerSettings_multisampleArrayImage "multisampleArrayImage" 55 | #define kLayerSettings_mutableComparisonSamplers "mutableComparisonSamplers" 56 | #define kLayerSettings_pointPolygons "pointPolygons" 57 | #define kLayerSettings_samplerMipLodBias "samplerMipLodBias" 58 | #define kLayerSettings_separateStencilMaskRef "separateStencilMaskRef" 59 | #define kLayerSettings_shaderSampleRateInterpolationFunctions "shaderSampleRateInterpolationFunctions" 60 | #define kLayerSettings_tessellationIsolines "tessellationIsolines" 61 | #define kLayerSettings_tessellationPointMode "tessellationPointMode" 62 | #define kLayerSettings_triangleFans "triangleFans" 63 | #define kLayerSettings_vertexAttributeAccessBeyondStride "vertexAttributeAccessBeyondStride" 64 | #define kLayerSettings_minVertexInputBindingStrideAlignment "minVertexInputBindingStrideAlignment" 65 | #define kLayerSettingsSimulateCapabilities "simulate_capabilities" 66 | #define kLayerSettingsDebugActions "debug_actions" 67 | #define kLayerSettingsDebugFilename "debug_filename" 68 | #define kLayerSettingsDebugFileClear "debug_file_clear" 69 | #define kLayerSettingsDebugFailOnError "debug_fail_on_error" 70 | #define kLayerSettingsDebugReports "debug_reports" 71 | #define kLayerSettingsExcludeDeviceExtensions "exclude_device_extensions" 72 | #define kLayerSettingsExcludeFormats "exclude_formats" 73 | #define kLayerSettingsDefaultFeatureValues "default_feature_values" 74 | #define kLayerSettingsForceDevice "force_device" 75 | #define kLayerSettingsForceDeviceUUID "force_device_uuid" 76 | #define kLayerSettingsForceDeviceName "force_device_name" 77 | 78 | -------------------------------------------------------------------------------- /layer/profiles_interface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2022-2025 Valve Corporation 3 | * Copyright (C) 2022-2025 LunarG, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Author: Christophe Riccio 18 | */ 19 | 20 | #include "profiles.h" 21 | #include "profiles_interface.h" 22 | #include "vulkan/vk_layer.h" 23 | #include 24 | 25 | uint32_t loader_layer_iface_version = CURRENT_LOADER_LAYER_INTERFACE_VERSION; 26 | 27 | // Function symbols exported by this layer's library ////////////////////////////////////////////////////////////////// 28 | 29 | #if defined(__GNUC__) && __GNUC__ >= 4 30 | #define PROFILES_EXPORT __attribute__((visibility("default"))) 31 | #else 32 | #define PROFILES_EXPORT 33 | #endif 34 | 35 | // Keep synchronized with VkLayer_khronos_profiles.def / VkLayer_khronos_profiles.map 36 | extern "C" { 37 | 38 | PROFILES_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance, const char *pName) { 39 | return GetInstanceProcAddr(instance, pName); 40 | } 41 | 42 | PROFILES_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(const VkInstanceCreateInfo *pCreateInfo, 43 | const VkAllocationCallbacks *pAllocator, VkInstance *pInstance) { 44 | return CreateInstance(pCreateInfo, pAllocator, pInstance); 45 | } 46 | 47 | PROFILES_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(uint32_t *pCount, 48 | VkLayerProperties *pProperties) { 49 | return EnumerateInstanceLayerProperties(pCount, pProperties); 50 | } 51 | 52 | PROFILES_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(const char *pLayerName, uint32_t *pCount, 53 | VkExtensionProperties *pProperties) { 54 | return EnumerateInstanceExtensionProperties(pLayerName, pCount, pProperties); 55 | } 56 | 57 | PROFILES_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount, 58 | VkPhysicalDevice *pPhysicalDevices) { 59 | return EnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices); 60 | } 61 | 62 | PROFILES_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct) { 63 | assert(pVersionStruct != NULL); 64 | assert(pVersionStruct->sType == LAYER_NEGOTIATE_INTERFACE_STRUCT); 65 | 66 | if (pVersionStruct->loaderLayerInterfaceVersion > CURRENT_LOADER_LAYER_INTERFACE_VERSION) { 67 | // Loader is requesting newer interface version; reduce to the version we support. 68 | pVersionStruct->loaderLayerInterfaceVersion = CURRENT_LOADER_LAYER_INTERFACE_VERSION; 69 | } else if (pVersionStruct->loaderLayerInterfaceVersion < CURRENT_LOADER_LAYER_INTERFACE_VERSION) { 70 | // Loader is requesting older interface version; record the Loader's version 71 | loader_layer_iface_version = pVersionStruct->loaderLayerInterfaceVersion; 72 | } 73 | 74 | if (pVersionStruct->loaderLayerInterfaceVersion >= 2) { 75 | pVersionStruct->pfnGetInstanceProcAddr = vkGetInstanceProcAddr; 76 | pVersionStruct->pfnGetDeviceProcAddr = nullptr; 77 | pVersionStruct->pfnGetPhysicalDeviceProcAddr = nullptr; 78 | } 79 | 80 | return VK_SUCCESS; 81 | } 82 | 83 | } // extern "C" 84 | -------------------------------------------------------------------------------- /layer/profiles_interface.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2022-2025 Valve Corporation 3 | * Copyright (C) 2022-2025 LunarG, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Author: Christophe Riccio 18 | */ 19 | 20 | #pragma once 21 | -------------------------------------------------------------------------------- /layer/profiles_json.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2022-2025 Valve Corporation 3 | * Copyright (C) 2022-2025 LunarG, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Author: Christophe Riccio 18 | */ 19 | 20 | #include "profiles_json.h" 21 | #include "profiles_util.h" 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | std::unique_ptr schema; 28 | 29 | static Json::Value ParseJsonFile(std::string filename) { 30 | Json::Value root = Json::nullValue; 31 | 32 | // Remove newline from filename 33 | if (int(filename.back() == 0xa)) { 34 | filename.pop_back(); 35 | } 36 | 37 | std::ifstream file; 38 | file.open(filename.c_str()); 39 | if (!file.is_open()) { 40 | return root; 41 | } 42 | 43 | std::string errs; 44 | Json::CharReaderBuilder builder; 45 | Json::parseFromStream(builder, file, &root, &errs); 46 | file.close(); 47 | 48 | return root; 49 | } 50 | 51 | JsonValidator::~JsonValidator() { 52 | ::schema.reset(); 53 | } 54 | 55 | bool JsonValidator::Init() { 56 | #ifdef __APPLE__ 57 | const std::string schema_path = "/usr/local/share/vulkan/registry/profiles-0.8-latest.json"; 58 | #else 59 | const char *sdk_path = std::getenv("VULKAN_SDK"); 60 | if (sdk_path == nullptr) return false; 61 | const std::string schema_path = std::string(sdk_path) + "/share/vulkan/registry/profiles-0.8-latest.json"; 62 | #endif 63 | 64 | if (!schema) { 65 | const Json::Value schema_document = ParseJsonFile(schema_path.c_str()); 66 | if (schema_document == Json::nullValue) { 67 | return false; 68 | } 69 | 70 | schema.reset(new valijson::Schema); 71 | 72 | valijson::SchemaParser parser; 73 | valijson::adapters::JsonCppAdapter schema_adapter(schema_document); 74 | parser.populateSchema(schema_adapter, *schema); 75 | } 76 | 77 | return schema.get() != nullptr; 78 | } 79 | 80 | bool JsonValidator::Check(const Json::Value &json_document) { 81 | assert(!json_document.empty()); 82 | 83 | if (schema.get() == nullptr) return true; 84 | 85 | valijson::Validator validator(valijson::Validator::kWeakTypes); 86 | valijson::adapters::JsonCppAdapter document_adapter(json_document); 87 | 88 | valijson::ValidationResults results; 89 | 90 | if (!validator.validate(*schema, document_adapter, &results)) { 91 | valijson::ValidationResults::Error error; 92 | unsigned int error_num = 1; 93 | while (results.popError(error)) { 94 | std::string context; 95 | std::vector::iterator itr = error.context.begin(); 96 | for (; itr != error.context.end(); itr++) { 97 | context += *itr; 98 | } 99 | 100 | if (error_num <= 3) { 101 | std::string log = format("Error #%d\n", error_num); 102 | log += "\t context: " + context + "\n"; 103 | log += "\t desc: " + error.description + "\n\n"; 104 | 105 | message += log.c_str(); 106 | } 107 | 108 | ++error_num; 109 | } 110 | 111 | message += format("Total Error Count: %d\n", error_num).c_str(); 112 | 113 | return false; 114 | } 115 | return true; 116 | } 117 | 118 | bool WarnDuplicated(ProfileLayerSettings *layer_settings, const Json::Value &parent, const std::vector &members) { 119 | assert(layer_settings != nullptr); 120 | 121 | std::vector set; 122 | for (const auto &member : members) { 123 | if (parent.isMember(member)) { 124 | set.push_back(member); 125 | } 126 | } 127 | 128 | for (uint32_t i = 1; i < set.size(); ++i) { 129 | LogMessage(layer_settings, DEBUG_REPORT_WARNING_BIT, "Profile sets variables for %s while also using %s\n", set[0].c_str(), 130 | set[i].c_str()); 131 | } 132 | return set.size() <= 1; 133 | } 134 | -------------------------------------------------------------------------------- /layer/profiles_json.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2022-2025 Valve Corporation 3 | * Copyright (C) 2022-2025 LunarG, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Author: Christophe Riccio 18 | */ 19 | 20 | #pragma once 21 | #include 22 | #include 23 | #include 24 | 25 | #include "profiles_settings.h" 26 | 27 | struct JsonValidator { 28 | JsonValidator(){} 29 | ~JsonValidator(); 30 | 31 | bool Init(); 32 | 33 | bool Check(const Json::Value &json_document); 34 | 35 | std::string message; 36 | }; 37 | 38 | bool WarnDuplicated(ProfileLayerSettings *layer_settings, const Json::Value &parent, const std::vector &members); 39 | -------------------------------------------------------------------------------- /layer/profiles_util.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2022-2025 Valve Corporation 3 | * Copyright (C) 2022-2025 LunarG, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Author: Christophe Riccio 18 | */ 19 | 20 | #include "profiles_util.h" 21 | #include "profiles_settings.h" 22 | 23 | //void LayerSettingsLog(const char* pSettingName, const char* pMessage) { 24 | // LogMessage(DEBUG_REPORT_ERROR_BIT, "%s : %s\n", pSettingName, pMessage); 25 | //} 26 | 27 | std::string format(const char *message, ...) { 28 | std::size_t const STRING_BUFFER(4096); 29 | 30 | assert(message != nullptr); 31 | assert(strlen(message) < STRING_BUFFER); 32 | 33 | char buffer[STRING_BUFFER]; 34 | va_list list; 35 | 36 | va_start(list, message); 37 | vsnprintf(buffer, STRING_BUFFER, message, list); 38 | va_end(list); 39 | 40 | return buffer; 41 | } 42 | 43 | std::string ToLower(const std::string &s) { 44 | std::string result = s; 45 | for (auto &c : result) { 46 | c = (char)std::tolower(c); 47 | } 48 | return result; 49 | } 50 | 51 | std::string ToUpper(const std::string &s) { 52 | std::string result = s; 53 | for (auto &c : result) { 54 | c = (char)std::toupper(c); 55 | } 56 | return result; 57 | } 58 | /* 59 | std::string GetString(const List &list) { 60 | std::string result; 61 | for (std::size_t i = 0, n = list.size(); i < n; ++i) { 62 | result += list[i].first; 63 | if (i < n - 1) result += ", "; 64 | } 65 | return result; 66 | } 67 | */ 68 | std::string GetString(const std::vector &strings) { 69 | std::string result; 70 | for (std::size_t i = 0, n = strings.size(); i < n; ++i) { 71 | result += strings[i]; 72 | if (i < n - 1) result += ", "; 73 | } 74 | return result; 75 | } 76 | 77 | bool EndsWith(std::string const &value, std::string const &ending) { 78 | if (ending.size() > value.size()) return false; 79 | return std::equal(ending.rbegin(), ending.rend(), value.rbegin()); 80 | } 81 | 82 | std::string GetUUIDString(const uint8_t deviceUUID[VK_UUID_SIZE]) { 83 | std::string result; 84 | 85 | for (std::size_t i = 0, n = VK_UUID_SIZE; i < n; ++i) { 86 | result += format("%02X", deviceUUID[i]); 87 | } 88 | 89 | return result; 90 | } 91 | 92 | std::string format_device_support_string(VkFormatFeatureFlags format_features) { 93 | if (format_features == 0) return std::string("does not support it"); 94 | return ::format("only supports:\n\t\" % s\"", GetFormatFeatureString(format_features).c_str()); 95 | } 96 | 97 | std::string format_device_support_string(VkFormatFeatureFlags2 format_features) { 98 | if (format_features == 0) return std::string("does not support it"); 99 | return ::format("only supports:\n\t\" % s\"", GetFormatFeature2String(format_features).c_str()); 100 | } 101 | 102 | VkResult EnumerateExtensions(const MapOfVkExtensionProperties &source, uint32_t *dst_count, VkExtensionProperties *dst_props) { 103 | assert(dst_count); 104 | if (!dst_props) { 105 | *dst_count = static_cast(source.size()); 106 | return VK_SUCCESS; 107 | } 108 | uint32_t count_written = 0; 109 | uint32_t src_count = static_cast(source.size()); 110 | const uint32_t copy_count = (*dst_count < src_count) ? *dst_count : src_count; 111 | *dst_count = copy_count; 112 | for (const auto &[ext_name, ext] : source) { 113 | dst_props[count_written] = ext; 114 | count_written++; 115 | 116 | if (count_written == *dst_count) { 117 | break; 118 | } 119 | } 120 | return (copy_count == src_count) ? VK_SUCCESS : VK_INCOMPLETE; 121 | } 122 | 123 | bool QueueFamilyMatch(const VkQueueFamilyProperties &device, const VkQueueFamilyProperties &profile) { 124 | if ((device.queueFlags & profile.queueFlags) != profile.queueFlags) { 125 | return false; 126 | } else if (device.queueCount < profile.queueCount) { 127 | return false; 128 | } else if (device.timestampValidBits < profile.timestampValidBits) { 129 | return false; 130 | } else if (profile.minImageTransferGranularity.width > 0 && 131 | device.minImageTransferGranularity.width > profile.minImageTransferGranularity.width) { 132 | return false; 133 | } else if (profile.minImageTransferGranularity.height > 0 && 134 | device.minImageTransferGranularity.height > profile.minImageTransferGranularity.height) { 135 | return false; 136 | } else if (profile.minImageTransferGranularity.depth > 0 && 137 | device.minImageTransferGranularity.depth > profile.minImageTransferGranularity.depth) { 138 | return false; 139 | } 140 | return true; 141 | } 142 | 143 | bool GlobalPriorityMatch(const VkQueueFamilyGlobalPriorityPropertiesKHR &device, 144 | const VkQueueFamilyGlobalPriorityPropertiesKHR &profile) { 145 | if (profile.priorityCount == 0) { 146 | return true; 147 | } else if (device.priorityCount != profile.priorityCount) { 148 | return false; 149 | } 150 | 151 | bool match = true; 152 | for (uint32_t i = 0; i < device.priorityCount; ++i) { 153 | if (device.priorities[i] != profile.priorities[i]) { 154 | match = false; 155 | break; 156 | } 157 | } 158 | return match; 159 | } 160 | -------------------------------------------------------------------------------- /layer/sample_configs/portability_test.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-1.3.201.json#", 3 | "capabilities": [ 4 | { 5 | "features": { 6 | "VkPhysicalDevicePortabilitySubsetFeaturesKHR": { 7 | "imageViewFormatReinterpretation": false, 8 | "pointPolygons": false, 9 | "samplerMipLodBias": false 10 | } 11 | }, 12 | "properties": { 13 | "VkPhysicalDevicePortabilitySubsetPropertiesKHR": { 14 | "minVertexInputBindingStrideAlignment": 8 15 | } 16 | } 17 | } 18 | ], 19 | "profiles": [ 20 | { 21 | "name": "VP_LUNARG_test_api_1_2_198", 22 | "label": "label", 23 | "description": "description", 24 | "version": 1, 25 | "api-version": "1.2.198", 26 | "contributors": [ 27 | { 28 | "name": "Ziga Markus", 29 | "company": "LunarG", 30 | "email": "ziga@lunarg.com", 31 | "github": "ziga-lunarg", 32 | "contact": true 33 | } 34 | ], 35 | "history": [ 36 | { 37 | "revision": 1, 38 | "date": "2021-12-08", 39 | "author": "Ziga Markus", 40 | "comment": "Initial revision" 41 | } 42 | ], 43 | "capabilities": [ "capabilities" ] 44 | } 45 | ] 46 | } -------------------------------------------------------------------------------- /layer/sample_configs/sdk_sample_configs/iOS_gpu_family_3_portability.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-1.3.201.json#", 3 | "capabilities": [ 4 | { 5 | "name": "baseline", 6 | "features": { 7 | "VkPhysicalDevicePortabilitySubsetFeaturesKHR": { 8 | "constantAlphaColorBlendFactors": true, 9 | "events": true, 10 | "imageViewFormatReinterpretation": true, 11 | "imageViewFormatSwizzle": false, 12 | "imageView2DOn3DImage": false, 13 | "multisampleArrayImage": false, 14 | "mutableComparisonSamplers": true, 15 | "pointPolygons": false, 16 | "samplerMipLodBias": false, 17 | "separateStencilMaskRef": true, 18 | "shaderSampleRateInterpolationFunctions": false, 19 | "tessellationIsolines": false, 20 | "tessellationPointMode": false, 21 | "triangleFans": false, 22 | "vertexAttributeAccessBeyondStride": true 23 | } 24 | }, 25 | "properties": { 26 | "VkPhysicalDevicePortabilitySubsetPropertiesKHR": { 27 | "minVertexInputBindingStrideAlignment": 4 28 | } 29 | } 30 | } 31 | ], 32 | "profiles": [ 33 | { 34 | "name": "VP_LUNARG_test_api_1_2_198", 35 | "label": "label", 36 | "description": "description", 37 | "version": 1, 38 | "api-version": "1.2.198", 39 | "contributors": [ 40 | { 41 | "name": "Ziga Markus", 42 | "company": "LunarG", 43 | "email": "ziga@lunarg.com", 44 | "github": "ziga-lunarg", 45 | "contact": true 46 | } 47 | ], 48 | "history": [ 49 | { 50 | "revision": 1, 51 | "date": "2021-12-08", 52 | "author": "Ziga Markus", 53 | "comment": "Initial revision" 54 | } 55 | ], 56 | "capabilities": [ "capabilities" ] 57 | } 58 | ] 59 | } -------------------------------------------------------------------------------- /layer/sample_configs/sdk_sample_configs/iOS_gpu_family_5_portability.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-1.3.201.json#", 3 | "capabilities": [ 4 | { 5 | "name": "baseline", 6 | "features": { 7 | "VkPhysicalDevicePortabilitySubsetFeaturesKHR": { 8 | "constantAlphaColorBlendFactors": true, 9 | "events": true, 10 | "imageViewFormatReinterpretation": true, 11 | "imageViewFormatSwizzle": true, 12 | "imageView2DOn3DImage": false, 13 | "multisampleArrayImage": false, 14 | "mutableComparisonSamplers": true, 15 | "pointPolygons": false, 16 | "samplerMipLodBias": false, 17 | "separateStencilMaskRef": true, 18 | "shaderSampleRateInterpolationFunctions": false, 19 | "tessellationIsolines": false, 20 | "tessellationPointMode": false, 21 | "triangleFans": false, 22 | "vertexAttributeAccessBeyondStride": true 23 | } 24 | }, 25 | "properties": { 26 | "VkPhysicalDevicePortabilitySubsetPropertiesKHR": { 27 | "minVertexInputBindingStrideAlignment": 4 28 | } 29 | } 30 | } 31 | ], 32 | "profiles": [ 33 | { 34 | "name": "VP_LUNARG_test_api_1_2_198", 35 | "label": "label", 36 | "description": "description", 37 | "version": 1, 38 | "api-version": "1.2.198", 39 | "contributors": [ 40 | { 41 | "name": "Ziga Markus", 42 | "company": "LunarG", 43 | "email": "ziga@lunarg.com", 44 | "github": "ziga-lunarg", 45 | "contact": true 46 | } 47 | ], 48 | "history": [ 49 | { 50 | "revision": 1, 51 | "date": "2021-12-08", 52 | "author": "Ziga Markus", 53 | "comment": "Initial revision" 54 | } 55 | ], 56 | "capabilities": [ "capabilities" ] 57 | } 58 | ] 59 | } -------------------------------------------------------------------------------- /layer/sample_configs/sdk_sample_configs/macOS_gpu_family_1_portability.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-1.3.201.json#", 3 | "capabilities": [ 4 | { 5 | "name": "baseline", 6 | "features": { 7 | "VkPhysicalDevicePortabilitySubsetFeaturesKHR": { 8 | "constantAlphaColorBlendFactors": true, 9 | "events": true, 10 | "imageViewFormatReinterpretation": true, 11 | "imageViewFormatSwizzle": false, 12 | "imageView2DOn3DImage": false, 13 | "multisampleArrayImage": true, 14 | "mutableComparisonSamplers": true, 15 | "pointPolygons": false, 16 | "samplerMipLodBias": false, 17 | "separateStencilMaskRef": true, 18 | "shaderSampleRateInterpolationFunctions": false, 19 | "tessellationIsolines": false, 20 | "tessellationPointMode": false, 21 | "triangleFans": false, 22 | "vertexAttributeAccessBeyondStride": true 23 | } 24 | }, 25 | "properties": { 26 | "VkPhysicalDevicePortabilitySubsetPropertiesKHR": { 27 | "minVertexInputBindingStrideAlignment": 4 28 | } 29 | } 30 | } 31 | ], 32 | "profiles": [ 33 | { 34 | "name": "VP_LUNARG_test_api_1_2_198", 35 | "label": "label", 36 | "description": "description", 37 | "version": 1, 38 | "api-version": "1.2.198", 39 | "contributors": [ 40 | { 41 | "name": "Ziga Markus", 42 | "company": "LunarG", 43 | "email": "ziga@lunarg.com", 44 | "github": "ziga-lunarg", 45 | "contact": true 46 | } 47 | ], 48 | "history": [ 49 | { 50 | "revision": 1, 51 | "date": "2021-12-08", 52 | "author": "Ziga Markus", 53 | "comment": "Initial revision" 54 | } 55 | ], 56 | "capabilities": [ "capabilities" ] 57 | } 58 | ] 59 | } -------------------------------------------------------------------------------- /layer/sample_configs/tiny1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-1.3.201.json#", 3 | "capabilities": [ 4 | { 5 | "name": "baseline", 6 | "properties": { 7 | "VkPhysicalDeviceProperties": { 8 | "deviceName": 12345, 9 | "limits": { 10 | "maxViewports": 1, 11 | "maxViewportDimensions": [1024, 1024] 12 | } 13 | } 14 | } 15 | } 16 | ], 17 | "profiles": [ 18 | { 19 | "name": "VP_LUNARG_test_api_1_2_198", 20 | "label": "label", 21 | "description": "description", 22 | "version": 1, 23 | "api-version": "1.2.198", 24 | "contributors": [ 25 | { 26 | "name": "Ziga Markus", 27 | "company": "LunarG", 28 | "email": "ziga@lunarg.com", 29 | "github": "ziga-lunarg", 30 | "contact": true 31 | } 32 | ], 33 | "history": [ 34 | { 35 | "revision": 1, 36 | "date": "2021-12-08", 37 | "author": "Ziga Markus", 38 | "comment": "Initial revision" 39 | } 40 | ], 41 | "capabilities": [ "capabilities" ] 42 | } 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /layer/tests/layer_tests_main.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2022 The Khronos Group Inc. 3 | * Copyright (c) 2015-2022 Valve Corporation 4 | * Copyright (c) 2015-2022 LunarG, Inc. 5 | * Copyright (c) 2015-2022 Google, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Author: Mark Lobodzinski 14 | */ 15 | 16 | #pragma once 17 | 18 | #ifdef __ANDROID__ 19 | #include "vulkan_wrapper.h" 20 | #else 21 | #include 22 | #endif 23 | 24 | #include "gtest/gtest.h" 25 | 26 | #ifdef __ANDROID__ 27 | #include 28 | #if defined(PROFILES_LAYER_APK) 29 | #include 30 | #endif 31 | #endif 32 | 33 | static const char kSkipPrefix[] = " TEST SKIPPED:"; 34 | 35 | void print_android(const char *c); 36 | 37 | #ifdef __ANDROID__ 38 | void ReadAssetFile(android_app *app); 39 | #endif -------------------------------------------------------------------------------- /layer/tests/platforms/android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /layer/tests/profiles_test_helper.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021-2025 Valve Corporation 3 | * Copyright (c) 2021-2025 LunarG, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Authors: 18 | * - Christophe Riccio 19 | * - Mark Lobodzinski 20 | * - Jeremy Kniager 21 | */ 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #ifdef _WIN32 28 | #include 29 | #elif __ANDROID__ 30 | #include 31 | #endif 32 | 33 | #include "profiles_test_helper.h" 34 | 35 | // On Android, VK_MAKE_API_VERSION doesn't yet exist. 36 | #ifndef VK_MAKE_API_VERSION 37 | #define VK_MAKE_API_VERSION(variant, major, minor, patch) VK_MAKE_VERSION(major, minor, patch) 38 | #endif 39 | 40 | // TODO: When the layer path issue is resolved with CI (set outside of the tests) remove this function 41 | void profiles_test::setEnvironmentSetting(std::string setting, const char* val) { 42 | #ifdef _WIN32 43 | _putenv_s(setting.c_str(), val); 44 | #else 45 | setenv(setting.c_str(), val, 1); 46 | #endif 47 | } 48 | 49 | void profiles_test::unsetEnvironmentSetting(std::string setting) { 50 | #ifdef _WIN32 51 | _putenv_s(setting.c_str(), ""); 52 | #else 53 | unsetenv(setting.c_str()); 54 | #endif 55 | } 56 | 57 | std::string profiles_test::getAbsolutePath(std::string filepath) { 58 | std::string out; 59 | #ifdef _WIN32 60 | char abs_path[_MAX_PATH]; 61 | _fullpath(abs_path, filepath.c_str(), _MAX_PATH); 62 | out = abs_path; 63 | #else 64 | char* abs_path = realpath(filepath.c_str(), nullptr); 65 | out = abs_path; 66 | delete[] abs_path; 67 | #endif 68 | return out; 69 | } 70 | 71 | VkApplicationInfo profiles_test::GetDefaultApplicationInfo() { 72 | VkApplicationInfo out{VK_STRUCTURE_TYPE_APPLICATION_INFO}; 73 | out.apiVersion = VK_API_VERSION_1_3; 74 | out.applicationVersion = VK_MAKE_API_VERSION(0, 1, 0, 0); 75 | out.pApplicationName = "profiles_tests"; 76 | out.engineVersion = VK_MAKE_API_VERSION(0, 1, 0, 0); 77 | out.pEngineName = "profiles_tests"; 78 | 79 | return out; 80 | } 81 | 82 | VkResult profiles_test::VulkanInstanceBuilder::getPhysicalDevice(Mode mode, VkPhysicalDevice* phys_dev) { 83 | *phys_dev = VK_NULL_HANDLE; 84 | VkResult res; 85 | uint32_t gpu_count = 0; 86 | res = vkEnumeratePhysicalDevices(_instances[mode], &gpu_count, nullptr); 87 | if (res != VK_SUCCESS) { 88 | return res; 89 | } 90 | std::vector gpus(gpu_count); 91 | res = vkEnumeratePhysicalDevices(_instances[mode], &gpu_count, gpus.data()); 92 | if (res != VK_SUCCESS) { 93 | return res; 94 | } 95 | *phys_dev = gpus[0]; 96 | return res; 97 | } 98 | 99 | VkResult profiles_test::VulkanInstanceBuilder::init(uint32_t apiVersion, const std::vector& settings) { 100 | _layer_names.push_back(kLayerName); 101 | 102 | profiles_test::setEnvironmentSetting("VK_LAYER_PATH", TEST_BINARY_PATH); 103 | 104 | VkApplicationInfo app_info{GetDefaultApplicationInfo()}; 105 | app_info.apiVersion = apiVersion; 106 | 107 | VkInstanceCreateInfo inst_create_info = {}; 108 | 109 | #ifdef __APPLE__ 110 | _extension_names.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME); 111 | inst_create_info.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR; 112 | #endif 113 | 114 | inst_create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; 115 | inst_create_info.pApplicationInfo = &app_info; 116 | inst_create_info.pNext = nullptr; 117 | inst_create_info.enabledLayerCount = 0; 118 | inst_create_info.ppEnabledLayerNames = nullptr; 119 | inst_create_info.enabledExtensionCount = _extension_names.empty() ? 0 : static_cast(_extension_names.size()); 120 | inst_create_info.ppEnabledExtensionNames = _extension_names.empty() ? nullptr : _extension_names.data(); 121 | 122 | _instances[MODE_NATIVE] = VK_NULL_HANDLE; 123 | VkResult result = vkCreateInstance(&inst_create_info, nullptr, &_instances[MODE_NATIVE]); 124 | if (result != VK_SUCCESS) return result; 125 | 126 | this->addExtension(VK_EXT_LAYER_SETTINGS_EXTENSION_NAME); 127 | 128 | VkLayerSettingsCreateInfoEXT layer_settings_create_info{ 129 | VK_STRUCTURE_TYPE_LAYER_SETTINGS_CREATE_INFO_EXT, nullptr, 130 | settings.empty() ? 0 : static_cast(settings.size()), 131 | settings.empty() ? nullptr : &settings[0]}; 132 | 133 | inst_create_info.enabledExtensionCount = static_cast(_extension_names.size()); 134 | inst_create_info.ppEnabledExtensionNames = _extension_names.data(); 135 | inst_create_info.enabledLayerCount = static_cast(_layer_names.size()); 136 | inst_create_info.ppEnabledLayerNames = _layer_names.data(); 137 | inst_create_info.pNext = settings.empty() ? nullptr : &layer_settings_create_info; 138 | 139 | _instances[MODE_PROFILE] = VK_NULL_HANDLE; 140 | return vkCreateInstance(&inst_create_info, nullptr, &_instances[MODE_PROFILE]); 141 | } 142 | 143 | VkResult profiles_test::VulkanInstanceBuilder::init(uint32_t apiVersion) { 144 | return this->init(apiVersion, std::vector()); 145 | } 146 | 147 | VkResult profiles_test::VulkanInstanceBuilder::init(const std::vector& settings) { 148 | return this->init(GetDefaultApplicationInfo().apiVersion, settings); 149 | } 150 | 151 | VkResult profiles_test::VulkanInstanceBuilder::init() { 152 | return this->init(GetDefaultApplicationInfo().apiVersion, std::vector()); 153 | } 154 | 155 | void profiles_test::VulkanInstanceBuilder::reset() { 156 | for (VkInstance& instance : _instances) { 157 | if (instance != VK_NULL_HANDLE) { 158 | vkDestroyInstance(instance, nullptr); 159 | instance = VK_NULL_HANDLE; 160 | } 161 | } 162 | 163 | _layer_names.clear(); 164 | _extension_names.clear(); 165 | } 166 | 167 | bool profiles_test::IsExtensionSupported(VkPhysicalDevice physical_device, const char* extension_name) { 168 | uint32_t property_count = 0; 169 | vkEnumerateDeviceExtensionProperties(physical_device, nullptr, &property_count, nullptr); 170 | if (property_count == 0) return false; 171 | 172 | std::vector properties(static_cast(property_count)); 173 | vkEnumerateDeviceExtensionProperties(physical_device, nullptr, &property_count, &properties[0]); 174 | 175 | for (std::size_t i = 0, n = properties.size(); i < n; ++i) { 176 | if (strcmp(properties[i].extensionName, extension_name) == 0) { 177 | return true; 178 | } 179 | } 180 | 181 | return false; 182 | } 183 | -------------------------------------------------------------------------------- /layer/tests/profiles_test_helper.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020-2022 Valve Corporation 3 | * Copyright (c) 2020-2022 LunarG, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Authors: 18 | * - Jeremy Kniager 19 | * - Mark Lobodzinski 20 | */ 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #include 29 | #include "../profiles.h" 30 | #include "gtest/gtest.h" 31 | #include "vktestframework.h" 32 | 33 | namespace profiles_test { 34 | 35 | inline std::string format(const char* message, ...) { 36 | std::size_t const STRING_BUFFER(4096); 37 | 38 | assert(message != nullptr); 39 | assert(strlen(message) >= 0 && strlen(message) < STRING_BUFFER); 40 | 41 | char buffer[STRING_BUFFER]; 42 | va_list list; 43 | 44 | va_start(list, message); 45 | vsnprintf(buffer, STRING_BUFFER, message, list); 46 | va_end(list); 47 | 48 | return buffer; 49 | } 50 | 51 | void setEnvironmentSetting(std::string setting, const char* val); 52 | void unsetEnvironmentSetting(std::string setting); 53 | 54 | std::string getAbsolutePath(std::string filepath); 55 | 56 | VkApplicationInfo GetDefaultApplicationInfo(); 57 | 58 | bool IsExtensionSupported(VkPhysicalDevice physical_device, const char* extension_name); 59 | 60 | enum Mode { 61 | MODE_NATIVE = 0, 62 | MODE_PROFILE, 63 | 64 | MODE_FIRST = MODE_NATIVE, 65 | MODE_LAST = MODE_PROFILE 66 | }; 67 | 68 | enum { MODE_COUNT = MODE_LAST - MODE_FIRST + 1 }; 69 | 70 | class VulkanInstanceBuilder { 71 | public: 72 | ~VulkanInstanceBuilder() { this->reset(); } 73 | 74 | void addExtension(const char* extension_name) { _extension_names.push_back(extension_name); } 75 | 76 | VkResult init(); 77 | VkResult init(const std::vector& settings); 78 | VkResult init(uint32_t apiVersion); 79 | VkResult init(uint32_t apiVersion, const std::vector& settings); 80 | VkResult getPhysicalDevice(Mode mode, VkPhysicalDevice* phys_dev); 81 | 82 | void reset(); 83 | 84 | VkInstance getInstance(Mode mode) { return _instances[mode]; } 85 | 86 | protected: 87 | std::array _instances; 88 | 89 | std::vector _layer_names; 90 | std::vector _extension_names; 91 | }; 92 | 93 | } // namespace profiles_test 94 | -------------------------------------------------------------------------------- /layer/tests/tests_desktop_2022.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021-2022 Valve Corporation 3 | * Copyright (C) 2021-2022 LunarG, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Author: Ziga Markus 18 | */ 19 | 20 | #include 21 | 22 | #include 23 | #include "profiles_test_helper.h" 24 | 25 | static VkPhysicalDevice gpu_native = VK_NULL_HANDLE; 26 | static VkPhysicalDevice gpu_profile = VK_NULL_HANDLE; 27 | static profiles_test::VulkanInstanceBuilder inst_builder; 28 | 29 | class TestsIntersection : public VkTestFramework { 30 | public: 31 | TestsIntersection(){}; 32 | ~TestsIntersection(){}; 33 | 34 | static void SetUpTestSuite() { 35 | VkResult err = VK_SUCCESS; 36 | 37 | VkProfileLayerSettingsEXT settings; 38 | settings.profile_file = JSON_TEST_FILES_PATH "VP_LUNARG_test_combine_intersect.json"; 39 | settings.emulate_portability = true; 40 | settings.profile_name = "VP_LUNARG_test_combine_intersect"; 41 | settings.simulate_capabilities = SIMULATE_MAX_ENUM; 42 | settings.debug_reports = 43 | DEBUG_REPORT_ERROR_BIT | DEBUG_REPORT_WARNING_BIT | DEBUG_REPORT_NOTIFICATION_BIT | DEBUG_REPORT_DEBUG_BIT; 44 | 45 | err = inst_builder.init(&settings); 46 | ASSERT_EQ(err, VK_SUCCESS); 47 | 48 | err = inst_builder.getPhysicalDevice(profiles_test::MODE_PROFILE, &gpu_profile); 49 | ASSERT_EQ(err, VK_SUCCESS); 50 | 51 | err = inst_builder.getPhysicalDevice(profiles_test::MODE_NATIVE, &gpu_native); 52 | ASSERT_EQ(err, VK_SUCCESS); 53 | } 54 | 55 | static void TearDownTestSuite() { inst_builder.reset(); }; 56 | }; 57 | 58 | TEST_F(TestsIntersection, Extension) { 59 | uint32_t count; 60 | vkEnumerateDeviceExtensionProperties(gpu_profile, nullptr, &count, nullptr); 61 | std::vector device_extensions(count); 62 | vkEnumerateDeviceExtensionProperties(gpu_profile, nullptr, &count, device_extensions.data()); 63 | 64 | ASSERT_STREQ("VK_KHR_maintenance3", device_extensions[0].extensionName); 65 | ASSERT_STREQ("VK_KHR_portability_subset", device_extensions[1].extensionName); 66 | } 67 | 68 | TEST_F(TestsIntersection, Feature) { 69 | VkPhysicalDeviceFeatures gpu_features{}; 70 | vkGetPhysicalDeviceFeatures(gpu_profile, &gpu_features); 71 | 72 | EXPECT_EQ(gpu_features.depthBiasClamp, VK_TRUE); 73 | EXPECT_EQ(gpu_features.depthClamp, VK_FALSE); 74 | } 75 | 76 | TEST_F(TestsIntersection, Properties) { 77 | VkPhysicalDeviceProperties gpu_props{}; 78 | vkGetPhysicalDeviceProperties(gpu_profile, &gpu_props); 79 | 80 | EXPECT_EQ(gpu_props.limits.maxImageDimension1D, 4096u); 81 | EXPECT_EQ(gpu_props.limits.maxComputeWorkGroupCount[0], 4096u); 82 | EXPECT_EQ(gpu_props.limits.maxComputeWorkGroupCount[1], 4096u); 83 | EXPECT_EQ(gpu_props.limits.maxComputeWorkGroupCount[2], 2048u); 84 | EXPECT_EQ(gpu_props.limits.mipmapPrecisionBits, 2u); 85 | EXPECT_TRUE(std::abs(gpu_props.limits.maxSamplerAnisotropy - 1.0) < 0.0001); 86 | EXPECT_EQ(gpu_props.limits.viewportBoundsRange[0], -16384); 87 | EXPECT_EQ(gpu_props.limits.viewportBoundsRange[1], 16384); 88 | EXPECT_EQ(gpu_props.limits.minMemoryMapAlignment, 4096); 89 | EXPECT_EQ(gpu_props.limits.minTexelOffset, -4); 90 | EXPECT_EQ(gpu_props.limits.maxTexelOffset, 3); 91 | EXPECT_EQ(gpu_props.limits.framebufferColorSampleCounts, VK_SAMPLE_COUNT_4_BIT); 92 | EXPECT_EQ(gpu_props.limits.pointSizeRange[0], 4.0); 93 | EXPECT_EQ(gpu_props.limits.pointSizeRange[1], 32.0); 94 | EXPECT_EQ(gpu_props.limits.pointSizeGranularity, 4.0); 95 | } 96 | 97 | // Noauto limittype member should not be modified 98 | TEST_F(TestsIntersection, Noauto) { 99 | VkPhysicalDeviceProperties gpu_props_native{}; 100 | vkGetPhysicalDeviceProperties(gpu_native, &gpu_props_native); 101 | 102 | VkPhysicalDeviceProperties gpu_props_profile{}; 103 | vkGetPhysicalDeviceProperties(gpu_profile, &gpu_props_profile); 104 | 105 | EXPECT_EQ(gpu_props_profile.deviceID, gpu_props_native.deviceID); 106 | EXPECT_EQ(gpu_props_profile.vendorID, gpu_props_native.vendorID); 107 | EXPECT_STREQ(gpu_props_profile.deviceName, gpu_props_native.deviceName); 108 | EXPECT_EQ(gpu_props_profile.deviceType, gpu_props_native.deviceType); 109 | } 110 | -------------------------------------------------------------------------------- /layer/tests/tests_mechanism_physical_device_selection.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021-2025 Valve Corporation 3 | * Copyright (C) 2021-2025 LunarG, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Authors: 18 | * - Ziga Markus 19 | * - Christophe Riccio 20 | * - Mark Lobodzinski 21 | */ 22 | 23 | #include 24 | #include 25 | 26 | #include 27 | #include "profiles_test_helper.h" 28 | 29 | #include 30 | 31 | class TestsMechanismPhysicalSelection : public VkTestFramework { 32 | public: 33 | TestsMechanismPhysicalSelection(){}; 34 | ~TestsMechanismPhysicalSelection(){}; 35 | 36 | static void SetUpTestSuite() {} 37 | static void TearDownTestSuite(){}; 38 | }; 39 | 40 | TEST_F(TestsMechanismPhysicalSelection, force_physical_device) { 41 | VkResult err = VK_SUCCESS; 42 | 43 | profiles_test::VulkanInstanceBuilder inst_builder; 44 | 45 | { 46 | const char* force_device = "FORCE_DEVICE_OFF"; 47 | const char* force_device_name = "NVIDIA"; 48 | const char* force_device_uuid = "BC4A01B15641805847A8151A395A80C7"; 49 | 50 | std::vector settings = { 51 | {kLayerName, kLayerSettingsForceDevice, VK_LAYER_SETTING_TYPE_STRING_EXT, 1, &force_device}, 52 | {kLayerName, kLayerSettingsForceDeviceName, VK_LAYER_SETTING_TYPE_STRING_EXT, 1, &force_device_name}, 53 | {kLayerName, kLayerSettingsForceDeviceUUID, VK_LAYER_SETTING_TYPE_STRING_EXT, 1, &force_device_uuid} 54 | }; 55 | 56 | err = inst_builder.init(settings); 57 | ASSERT_EQ(err, VK_SUCCESS); 58 | 59 | VkPhysicalDevice gpu; 60 | err = inst_builder.getPhysicalDevice(profiles_test::MODE_PROFILE, &gpu); 61 | if (err != VK_SUCCESS) { 62 | inst_builder.reset(); 63 | return; 64 | } 65 | 66 | inst_builder.reset(); 67 | } 68 | } 69 | 70 | -------------------------------------------------------------------------------- /layer/tests/tests_util.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2023-2023 Valve Corporation 3 | * Copyright (C) 2023-2023 LunarG, Inc. 4 | * Copyright (c) 2024 RasterGrid Kft. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * Author: Christophe Riccio 19 | */ 20 | 21 | #include 22 | 23 | #include 24 | #include "profiles_test_helper.h" 25 | 26 | TEST(TestsUtil, DebugAction) { 27 | std::vector strings = GetDebugActionStrings(DEBUG_ACTION_MAX_ENUM); 28 | 29 | EXPECT_STREQ("DEBUG_ACTION_FILE_BIT", strings[0].c_str()); 30 | EXPECT_STREQ("DEBUG_ACTION_STDOUT_BIT", strings[1].c_str()); 31 | EXPECT_STREQ("DEBUG_ACTION_OUTPUT_BIT", strings[2].c_str()); 32 | EXPECT_STREQ("DEBUG_ACTION_BREAKPOINT_BIT", strings[3].c_str()); 33 | 34 | DebugActionFlags flags = GetDebugActionFlags(strings); 35 | 36 | EXPECT_TRUE(flags & DEBUG_ACTION_FILE_BIT); 37 | EXPECT_TRUE(flags & DEBUG_ACTION_STDOUT_BIT); 38 | EXPECT_TRUE(flags & DEBUG_ACTION_OUTPUT_BIT); 39 | EXPECT_TRUE(flags & DEBUG_ACTION_BREAKPOINT_BIT); 40 | } 41 | 42 | static std::vector GetDebugReportStrings(DebugReportFlags flags) { 43 | static const char *table[] = {"DEBUG_REPORT_NOTIFICATION_BIT", "DEBUG_REPORT_WARNING_BIT", "DEBUG_REPORT_ERROR_BIT", 44 | "DEBUG_REPORT_DEBUG_BIT"}; 45 | 46 | std::vector result; 47 | 48 | for (std::size_t i = 0, n = std::size(table); i < n; ++i) { 49 | if (flags & (1 << i)) { 50 | result.push_back(table[i]); 51 | } 52 | } 53 | 54 | return result; 55 | } 56 | 57 | TEST(TestsUtil, DebugReport) { 58 | std::vector strings = GetDebugReportStrings(DEBUG_REPORT_MAX_ENUM); 59 | 60 | EXPECT_STREQ("DEBUG_REPORT_NOTIFICATION_BIT", strings[0].c_str()); 61 | EXPECT_STREQ("DEBUG_REPORT_WARNING_BIT", strings[1].c_str()); 62 | EXPECT_STREQ("DEBUG_REPORT_ERROR_BIT", strings[2].c_str()); 63 | EXPECT_STREQ("DEBUG_REPORT_DEBUG_BIT", strings[3].c_str()); 64 | 65 | DebugReportFlags flags = GetDebugReportFlags(strings); 66 | 67 | EXPECT_TRUE(flags & DEBUG_REPORT_NOTIFICATION_BIT); 68 | EXPECT_TRUE(flags & DEBUG_REPORT_WARNING_BIT); 69 | EXPECT_TRUE(flags & DEBUG_REPORT_ERROR_BIT); 70 | EXPECT_TRUE(flags & DEBUG_REPORT_DEBUG_BIT); 71 | } 72 | 73 | static SimulateCapabilityFlags GetSimulateCapability(const std::vector &values) { 74 | SimulateCapabilityFlags result = 0; 75 | 76 | for (std::size_t i = 0, n = values.size(); i < n; ++i) { 77 | if (values[i] == "SIMULATE_API_VERSION_BIT") { 78 | result |= SIMULATE_API_VERSION_BIT; 79 | } else if (values[i] == "SIMULATE_FEATURES_BIT") { 80 | result |= SIMULATE_FEATURES_BIT; 81 | } else if (values[i] == "SIMULATE_PROPERTIES_BIT") { 82 | result |= SIMULATE_PROPERTIES_BIT; 83 | } else if (values[i] == "SIMULATE_EXTENSIONS_BIT") { 84 | result |= SIMULATE_EXTENSIONS_BIT; 85 | } else if (values[i] == "SIMULATE_FORMATS_BIT") { 86 | result |= SIMULATE_FORMATS_BIT; 87 | } else if (values[i] == "SIMULATE_QUEUE_FAMILY_PROPERTIES_BIT") { 88 | result |= SIMULATE_QUEUE_FAMILY_PROPERTIES_BIT; 89 | } else if (values[i] == "SIMULATE_VIDEO_CAPABILITIES_BIT") { 90 | result |= SIMULATE_VIDEO_CAPABILITIES_BIT; 91 | } else if (values[i] == "SIMULATE_VIDEO_FORMATS_BIT") { 92 | result |= SIMULATE_VIDEO_FORMATS_BIT; 93 | } 94 | } 95 | 96 | return result; 97 | } 98 | 99 | static std::vector GetSimulateCapabilityStrings(SimulateCapabilityFlags flags) { 100 | static const char *table[] = { 101 | "SIMULATE_API_VERSION_BIT", "SIMULATE_FEATURES_BIT", "SIMULATE_PROPERTIES_BIT", 102 | "SIMULATE_EXTENSIONS_BIT", "SIMULATE_FORMATS_BIT", "SIMULATE_QUEUE_FAMILY_PROPERTIES_BIT", 103 | "SIMULATE_VIDEO_CAPABILITIES_BIT", "SIMULATE_VIDEO_FORMATS_BIT"}; 104 | 105 | std::vector result; 106 | 107 | for (std::size_t i = 0, n = std::size(table); i < n; ++i) { 108 | if (flags & (1 << i)) { 109 | result.push_back(table[i]); 110 | } 111 | } 112 | 113 | return result; 114 | } 115 | 116 | TEST(TestsUtil, SimulateCapability) { 117 | std::vector strings = GetSimulateCapabilityStrings(SIMULATE_MAX_ENUM); 118 | 119 | EXPECT_STREQ("SIMULATE_API_VERSION_BIT", strings[0].c_str()); 120 | EXPECT_STREQ("SIMULATE_FEATURES_BIT", strings[1].c_str()); 121 | EXPECT_STREQ("SIMULATE_PROPERTIES_BIT", strings[2].c_str()); 122 | EXPECT_STREQ("SIMULATE_EXTENSIONS_BIT", strings[3].c_str()); 123 | EXPECT_STREQ("SIMULATE_FORMATS_BIT", strings[4].c_str()); 124 | EXPECT_STREQ("SIMULATE_QUEUE_FAMILY_PROPERTIES_BIT", strings[5].c_str()); 125 | EXPECT_STREQ("SIMULATE_VIDEO_CAPABILITIES_BIT", strings[6].c_str()); 126 | EXPECT_STREQ("SIMULATE_VIDEO_FORMATS_BIT", strings[7].c_str()); 127 | 128 | SimulateCapabilityFlags flags = GetSimulateCapability(strings); 129 | 130 | EXPECT_TRUE(flags & SIMULATE_API_VERSION_BIT); 131 | EXPECT_TRUE(flags & SIMULATE_FEATURES_BIT); 132 | EXPECT_TRUE(flags & SIMULATE_PROPERTIES_BIT); 133 | EXPECT_TRUE(flags & SIMULATE_EXTENSIONS_BIT); 134 | EXPECT_TRUE(flags & SIMULATE_FORMATS_BIT); 135 | EXPECT_TRUE(flags & SIMULATE_QUEUE_FAMILY_PROPERTIES_BIT); 136 | EXPECT_TRUE(flags & SIMULATE_VIDEO_CAPABILITIES_BIT); 137 | EXPECT_TRUE(flags & SIMULATE_VIDEO_FORMATS_BIT); 138 | } 139 | 140 | TEST(TestsUtil, DefaultFeatureValues) { 141 | std::string string_value_false = GetDefaultFeatureValuesString(DEFAULT_FEATURE_VALUES_FALSE); 142 | EXPECT_STREQ("DEFAULT_FEATURE_VALUES_FALSE", string_value_false.c_str()); 143 | 144 | EXPECT_EQ(DEFAULT_FEATURE_VALUES_FALSE, GetDefaultFeatureValues("DEFAULT_FEATURE_VALUES_FALSE")); 145 | 146 | std::string string_value_device = GetDefaultFeatureValuesString(DEFAULT_FEATURE_VALUES_DEVICE); 147 | EXPECT_STREQ("DEFAULT_FEATURE_VALUES_DEVICE", string_value_device.c_str()); 148 | 149 | EXPECT_EQ(DEFAULT_FEATURE_VALUES_DEVICE, GetDefaultFeatureValues("DEFAULT_FEATURE_VALUES_DEVICE")); 150 | 151 | EXPECT_EQ(DEFAULT_FEATURE_VALUES_DEVICE, GetDefaultFeatureValues("POUET")); 152 | } 153 | -------------------------------------------------------------------------------- /layer/tests/vktestframework.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2025 The Khronos Group Inc. 3 | * Copyright (c) 2015-2025 Valve Corporation 4 | * Copyright (c) 2015-2025 LunarG, Inc. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * Author: Chia-I Wu 19 | * Author: Courtney Goeltzenleuchter 20 | * Author: Tony Barbour 21 | * Author: Mark Lobodzinski 22 | */ 23 | 24 | #include "vktestframework.h" 25 | #ifdef __ANDROID__ 26 | #include 27 | #endif 28 | 29 | #if defined(PATH_MAX) && !defined(MAX_PATH) 30 | #define MAX_PATH PATH_MAX 31 | #endif 32 | 33 | #ifdef _WIN32 34 | #define ERR_EXIT(err_msg, err_class) \ 35 | do { \ 36 | MessageBox(nullptr, err_msg, err_class, MB_OK); \ 37 | exit(1); \ 38 | } while (0) 39 | #else // _WIN32 40 | 41 | #define ERR_EXIT(err_msg, err_class) \ 42 | do { \ 43 | printf(err_msg); \ 44 | fflush(stdout); \ 45 | exit(1); \ 46 | } while (0) 47 | #endif // _WIN32 48 | 49 | VkTestFramework::VkTestFramework() { 50 | #ifdef _WIN32 51 | _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); 52 | SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); 53 | _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE); 54 | _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); 55 | #endif // _WIN32 56 | } 57 | VkTestFramework::~VkTestFramework() {} 58 | 59 | #ifdef __ANDROID__ 60 | // Define static elements 61 | ANativeWindow *VkTestFramework::window = nullptr; 62 | #endif 63 | -------------------------------------------------------------------------------- /layer/tests/vktestframework.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015-2022 The Khronos Group Inc. 3 | * Copyright (c) 2015-2022 Valve Corporation 4 | * Copyright (c) 2015-2022 LunarG, Inc. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * Author: Mark Lobodzinski 19 | */ 20 | 21 | #ifndef VKTESTFRAMEWORK_H 22 | #define VKTESTFRAMEWORK_H 23 | 24 | #ifdef _WIN32 25 | #ifndef WIN32_LEAN_AND_MEAN 26 | #define WIN32_LEAN_AND_MEAN 27 | #endif 28 | #include 29 | #endif 30 | 31 | #include "gtest/gtest.h" 32 | #ifdef __ANDROID__ 33 | #include 34 | #endif 35 | 36 | // Can be used by tests to record additional details / description of test 37 | #define TEST_DESCRIPTION(desc) RecordProperty("description", desc) 38 | 39 | class VkTestFramework : public ::testing::Test { 40 | public: 41 | #ifdef __ANDROID__ 42 | static ANativeWindow *window; 43 | #endif 44 | VkTestFramework(); 45 | ~VkTestFramework() = 0; 46 | 47 | // Per-test-suite set-up. 48 | // Called before the first test in this test suite. 49 | static void SetUpTestSuite(); 50 | 51 | // Per-test-suite tear-down. 52 | // Called after the last test in this test suite. 53 | static void TearDownTestSuite(); 54 | 55 | }; 56 | 57 | #endif // VKTESTFRAMEWORK_H 58 | -------------------------------------------------------------------------------- /layer/vk_layer_table.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015-2025 The Khronos Group Inc. 2 | * Copyright (c) 2015-2025 Valve Corporation 3 | * Copyright (c) 2015-2025 LunarG, Inc. 4 | * Copyright (c) 2015-2025 Google, Inc. 5 | * Copyright (c) 2023-2023 RasterGrid Kft. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * 19 | * Author: Tobin Ehlis 20 | */ 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include "vulkan/vk_layer.h" 27 | #include "vk_layer_table.h" 28 | static device_table_map tableMap; 29 | static instance_table_map tableInstanceMap; 30 | 31 | dispatch_key get_dispatch_key(const void *object) { return (dispatch_key) * (VkuDeviceDispatchTable **)object; } 32 | 33 | // Map lookup must be thread safe 34 | VkuDeviceDispatchTable *device_dispatch_table(void *object) { 35 | dispatch_key key = get_dispatch_key(object); 36 | device_table_map::const_iterator it = tableMap.find((void *)key); 37 | assert(it != tableMap.end() && "Not able to find device dispatch entry"); 38 | return it->second.get(); 39 | } 40 | 41 | VkuInstanceDispatchTable *instance_dispatch_table(void *object) { 42 | dispatch_key key = get_dispatch_key(object); 43 | instance_table_map::const_iterator it = tableInstanceMap.find((void *)key); 44 | assert(it != tableInstanceMap.end() && "Not able to find instance dispatch entry"); 45 | return it->second.get(); 46 | } 47 | 48 | void destroy_dispatch_table(device_table_map &map, dispatch_key key) { 49 | device_table_map::const_iterator it = map.find((void *)key); 50 | if (it != map.end()) { 51 | map.erase(it); 52 | } 53 | } 54 | 55 | void destroy_dispatch_table(instance_table_map &map, dispatch_key key) { 56 | instance_table_map::const_iterator it = map.find((void *)key); 57 | if (it != map.end()) { 58 | map.erase(it); 59 | } 60 | } 61 | 62 | void destroy_device_dispatch_table(dispatch_key key) { destroy_dispatch_table(tableMap, key); } 63 | 64 | void destroy_instance_dispatch_table(dispatch_key key) { destroy_dispatch_table(tableInstanceMap, key); } 65 | 66 | VkuDeviceDispatchTable *get_dispatch_table(device_table_map &map, void *object) { 67 | dispatch_key key = get_dispatch_key(object); 68 | device_table_map::const_iterator it = map.find((void *)key); 69 | assert(it != map.end() && "Not able to find device dispatch entry"); 70 | return it->second.get(); 71 | } 72 | 73 | VkuInstanceDispatchTable *get_dispatch_table(instance_table_map &map, void *object) { 74 | dispatch_key key = get_dispatch_key(object); 75 | instance_table_map::const_iterator it = map.find((void *)key); 76 | assert(it != map.end() && "Not able to find instance dispatch entry"); 77 | return it->second.get(); 78 | } 79 | 80 | VkLayerInstanceCreateInfo *get_chain_info(const VkInstanceCreateInfo *pCreateInfo, VkLayerFunction func) { 81 | VkLayerInstanceCreateInfo *chain_info = (VkLayerInstanceCreateInfo *)pCreateInfo->pNext; 82 | while (chain_info && !(chain_info->sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO && chain_info->function == func)) { 83 | chain_info = (VkLayerInstanceCreateInfo *)chain_info->pNext; 84 | } 85 | assert(chain_info != NULL); 86 | return chain_info; 87 | } 88 | 89 | VkLayerDeviceCreateInfo *get_chain_info(const VkDeviceCreateInfo *pCreateInfo, VkLayerFunction func) { 90 | VkLayerDeviceCreateInfo *chain_info = (VkLayerDeviceCreateInfo *)pCreateInfo->pNext; 91 | while (chain_info && !(chain_info->sType == VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO && chain_info->function == func)) { 92 | chain_info = (VkLayerDeviceCreateInfo *)chain_info->pNext; 93 | } 94 | assert(chain_info != NULL); 95 | return chain_info; 96 | } 97 | 98 | /* Various dispatchable objects will use the same underlying dispatch table if they 99 | * are created from that "parent" object. Thus use pointer to dispatch table 100 | * as the key to these table maps. 101 | * Instance -> PhysicalDevice 102 | * Device -> CommandBuffer or Queue 103 | * If use the object themselves as key to map then implies Create entrypoints have to be intercepted 104 | * and a new key inserted into map */ 105 | VkuInstanceDispatchTable *initInstanceTable(VkInstance instance, const PFN_vkGetInstanceProcAddr gpa, instance_table_map &map) { 106 | VkuInstanceDispatchTable *pTable; 107 | dispatch_key key = get_dispatch_key(instance); 108 | instance_table_map::const_iterator it = map.find((void *)key); 109 | 110 | if (it == map.end()) { 111 | auto table = std::make_unique(); 112 | pTable = table.get(); 113 | map[(void *)key] = std::move(table); 114 | } else { 115 | return it->second.get(); 116 | } 117 | 118 | vkuInitInstanceDispatchTable(instance, pTable, gpa); 119 | 120 | // Setup func pointers that are required but not externally exposed. These won't be added to the instance dispatch table by 121 | // default. 122 | pTable->GetPhysicalDeviceProcAddr = (PFN_GetPhysicalDeviceProcAddr)gpa(instance, "vk_layerGetPhysicalDeviceProcAddr"); 123 | 124 | return pTable; 125 | } 126 | 127 | VkuInstanceDispatchTable *initInstanceTable(VkInstance instance, const PFN_vkGetInstanceProcAddr gpa) { 128 | return initInstanceTable(instance, gpa, tableInstanceMap); 129 | } 130 | 131 | VkuDeviceDispatchTable *initDeviceTable(VkDevice device, const PFN_vkGetDeviceProcAddr gpa, device_table_map &map) { 132 | VkuDeviceDispatchTable *pTable; 133 | dispatch_key key = get_dispatch_key(device); 134 | device_table_map::const_iterator it = map.find((void *)key); 135 | 136 | if (it == map.end()) { 137 | auto table = std::make_unique(); 138 | pTable = table.get(); 139 | map[(void *)key] = std::move(table); 140 | } else { 141 | return it->second.get(); 142 | } 143 | 144 | vkuInitDeviceDispatchTable(device, pTable, gpa); 145 | 146 | return pTable; 147 | } 148 | 149 | VkuDeviceDispatchTable *initDeviceTable(VkDevice device, const PFN_vkGetDeviceProcAddr gpa) { 150 | return initDeviceTable(device, gpa, tableMap); 151 | } 152 | 153 | // Convert integer API version to a string 154 | std::string StringAPIVersion(uint32_t version) { 155 | std::stringstream version_name; 156 | if (version == 0) { 157 | return ""; 158 | } 159 | version_name << VK_API_VERSION_MAJOR(version) << "." << VK_API_VERSION_MINOR(version) << "." << VK_API_VERSION_PATCH(version) 160 | << " (0x" << std::setfill('0') << std::setw(8) << std::hex << version << ")"; 161 | return version_name.str(); 162 | } 163 | -------------------------------------------------------------------------------- /layer/vk_layer_table.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2015-2025 The Khronos Group Inc. 2 | * Copyright (c) 2015-2025 Valve Corporation 3 | * Copyright (c) 2015-2025 LunarG, Inc. 4 | * Copyright (c) 2023-2023 RasterGrid Kft. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | * 18 | * Author: Tobin Ehlis 19 | */ 20 | 21 | #pragma once 22 | 23 | #include "vulkan/utility/vk_dispatch_table.h" 24 | #include "vulkan/vk_layer.h" 25 | #include "vulkan/vulkan.h" 26 | #include 27 | #include 28 | 29 | typedef std::unordered_map> device_table_map; 30 | typedef std::unordered_map> instance_table_map; 31 | VkuDeviceDispatchTable *initDeviceTable(VkDevice device, const PFN_vkGetDeviceProcAddr gpa, device_table_map &map); 32 | VkuDeviceDispatchTable *initDeviceTable(VkDevice device, const PFN_vkGetDeviceProcAddr gpa); 33 | VkuInstanceDispatchTable *initInstanceTable(VkInstance instance, const PFN_vkGetInstanceProcAddr gpa, instance_table_map &map); 34 | VkuInstanceDispatchTable *initInstanceTable(VkInstance instance, const PFN_vkGetInstanceProcAddr gpa); 35 | 36 | typedef void *dispatch_key; 37 | dispatch_key get_dispatch_key(const void *object); 38 | 39 | VkuDeviceDispatchTable *device_dispatch_table(void *object); 40 | 41 | VkuInstanceDispatchTable *instance_dispatch_table(void *object); 42 | 43 | VkuDeviceDispatchTable *get_dispatch_table(device_table_map &map, void *object); 44 | 45 | VkuInstanceDispatchTable *get_dispatch_table(instance_table_map &map, void *object); 46 | 47 | VkLayerInstanceCreateInfo *get_chain_info(const VkInstanceCreateInfo *pCreateInfo, VkLayerFunction func); 48 | VkLayerDeviceCreateInfo *get_chain_info(const VkDeviceCreateInfo *pCreateInfo, VkLayerFunction func); 49 | 50 | void destroy_device_dispatch_table(dispatch_key key); 51 | void destroy_instance_dispatch_table(dispatch_key key); 52 | void destroy_dispatch_table(device_table_map &map, dispatch_key key); 53 | void destroy_dispatch_table(instance_table_map &map, dispatch_key key); 54 | 55 | // Convert integer API version to a string 56 | std::string StringAPIVersion(uint32_t version); 57 | -------------------------------------------------------------------------------- /library/.ispell_words: -------------------------------------------------------------------------------- 1 | alt 2 | api 3 | API 4 | APIs 5 | apiVersion 6 | com 7 | const 8 | constness 9 | cpp 10 | createInfo 11 | creativecommons 12 | drawIndirectCount 13 | enabledExtensionCount 14 | enablement 15 | enablements 16 | enums 17 | FeaturesEXT 18 | hpp 19 | https 20 | ICD 21 | img 22 | KHR 23 | lunarg 24 | LunarG 25 | markdownlint 26 | mergingoverriding 27 | MIN 28 | multiview 29 | NewLunarGLogoBlack 30 | nullptr 31 | org 32 | overriddenVulkan 33 | pAllocator 34 | pApplicationInfo 35 | pCreateInfo 36 | pDevice 37 | pFormatCount 38 | pFormats 39 | physicalDevice 40 | pInstance 41 | pLayerName 42 | pNext 43 | png 44 | ppEnabledExtensionNames 45 | pProfile 46 | pProperties 47 | pPropertyCount 48 | pre 49 | profileName 50 | pStructureTypeCount 51 | pStructureTypes 52 | pSupported 53 | roadmap 54 | ROADMAP 55 | robustBufferAccess 56 | robustImageAccess 57 | SDK 58 | specVersion 59 | src 60 | standalone 61 | struct 62 | uint 63 | UTF 64 | VK 65 | VkAllocationCallbacks 66 | vkAppInfo 67 | VkApplicationInfo 68 | VkBool 69 | vkCreateDevice 70 | vkCreateInfo 71 | vkCreateInstance 72 | VkDevice 73 | VkDeviceCreateInfo 74 | vkEnumerateInstanceExtensionProperties 75 | VkExtensionProperties 76 | VkFormat 77 | VkInstance 78 | VkInstanceCreateInfo 79 | VkPhysicalDevice 80 | VkPhysicalDeviceFeatures 81 | VkPhysicalDeviceFormatProperties 82 | VkPhysicalDeviceImageRobustnessFeatures 83 | VkPhysicalDeviceProperties 84 | VkPhysicalDeviceRobustness 85 | VkPhysicalDeviceVulkan 86 | VkQueueFamilyProperties 87 | VkResult 88 | VkStructureType 89 | VP 90 | vpCreateDevice 91 | vpCreateInfo 92 | vpCreateInstance 93 | VpDeviceCreateInfo 94 | vpGetInstanceProfileSupport 95 | vpGetPhysicalDeviceProfileSupport 96 | vpGetProfileDeviceExtensionProperties 97 | vpGetProfileFallbacks 98 | vpGetProfileFeatures 99 | vpGetProfileFeatureStructureTypes 100 | vpGetProfileFormatProperties 101 | vpGetProfileFormats 102 | vpGetProfileFormatStructureTypes 103 | vpGetProfileInstanceExtensionProperties 104 | vpGetProfileProperties 105 | vpGetProfilePropertyStructureTypes 106 | vpGetProfileQueueFamilyStructureTypes 107 | vpGetProfiles 108 | VpInstanceCreateFlagBits 109 | VpInstanceCreateFlags 110 | VpInstanceCreateInfo 111 | VpProfileProperties 112 | vulkan 113 | Vulkan 114 | VULKAN 115 | -------------------------------------------------------------------------------- /library/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/library/include/vulkan/debug) 2 | execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/library/source/debug/) 3 | execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_SOURCE_DIR}/library/include/vulkan/vulkan_profiles.h) 4 | execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_SOURCE_DIR}/library/include/vulkan/vulkan_profiles.hpp) 5 | execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_SOURCE_DIR}/library/include/vulkan/debug/vulkan_profiles.h) 6 | execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_SOURCE_DIR}/library/include/vulkan/debug/vulkan_profiles.hpp) 7 | execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_SOURCE_DIR}/library/source/vulkan_profiles.cpp) 8 | execute_process(COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_SOURCE_DIR}/library/source/debug/vulkan_profiles.cpp) 9 | 10 | if(BUILD_TESTS) 11 | add_subdirectory(test) 12 | endif() 13 | 14 | add_library(VulkanProfiles INTERFACE) 15 | target_include_directories(VulkanProfiles INTERFACE include) 16 | add_library(Vulkan::Profiles ALIAS VulkanProfiles) 17 | 18 | # NOTE: vulkan_profiles.h should NOT be installed! 19 | install( 20 | FILES 21 | ${CMAKE_SOURCE_DIR}/library/include/vulkan/debug/vulkan_profiles.hpp 22 | DESTINATION 23 | ${CMAKE_INSTALL_INCLUDEDIR}/vulkan/ 24 | ) 25 | -------------------------------------------------------------------------------- /library/test/mock_debug_message_callback.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021-2022 Valve Corporation 3 | * Copyright (c) 2021-2022 LunarG, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Authors: 18 | * - Daniel Rakos 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #include 26 | #include 27 | 28 | #define VP_DEBUG_MESSAGE_CALLBACK mockDebugMessageCallback 29 | 30 | class MockDebugMessageCallback final 31 | { 32 | private: 33 | std::vector m_expectedMessages; 34 | size_t m_matchedMessages; 35 | 36 | static MockDebugMessageCallback* sInstance; 37 | 38 | public: 39 | MockDebugMessageCallback(std::vector&& messages) 40 | : m_expectedMessages{ std::move(messages) } 41 | , m_matchedMessages{ 0 } 42 | { 43 | sInstance = this; 44 | } 45 | 46 | ~MockDebugMessageCallback() 47 | { 48 | EXPECT_TRUE(m_matchedMessages == m_expectedMessages.size()) << "Not all expected debug messages have been received"; 49 | sInstance = nullptr; 50 | } 51 | 52 | static void callback(const char* pMessage) 53 | { 54 | EXPECT_NE(sInstance, nullptr) << "No debug message callback mock is configured"; 55 | if (sInstance != nullptr) { 56 | if (sInstance->m_matchedMessages < sInstance->m_expectedMessages.size()) { 57 | const char* pExpected = sInstance->m_expectedMessages[sInstance->m_matchedMessages++].c_str(); 58 | EXPECT_STREQ(pMessage, pExpected); 59 | } else { 60 | EXPECT_TRUE(false) << "More debug messages have been received than expected"; 61 | } 62 | } 63 | } 64 | }; 65 | 66 | MockDebugMessageCallback* MockDebugMessageCallback::sInstance = nullptr; 67 | 68 | void mockDebugMessageCallback(const char* pMessage) 69 | { 70 | MockDebugMessageCallback::callback(pMessage); 71 | } 72 | -------------------------------------------------------------------------------- /library/test/platforms/android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /library/test/profiles/VP_LUNARG_test_profile_a.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "extensions": { 6 | "VK_KHR_get_memory_requirements2": 1 7 | }, 8 | "features": { 9 | "VkPhysicalDeviceFeatures": { 10 | "depthBiasClamp": true, 11 | "depthClamp": true 12 | } 13 | }, 14 | "properties": { 15 | "VkPhysicalDeviceProperties": { 16 | "limits": { 17 | "maxImageDimension2D": 4096, 18 | "maxImageDimension3D": 4096, 19 | "maxImageDimensionCube": 4096 20 | } 21 | } 22 | } 23 | } 24 | }, 25 | "profiles": { 26 | "VP_LUNARG_test_profile_a": { 27 | "version": 1, 28 | "api-version": "1.2.224", 29 | "label": "Test Profile A", 30 | "description": "Test.", 31 | "contributors": { 32 | "Christophe Riccio": { 33 | "company": "LunarG", 34 | "email": "christophe@lunarg.com", 35 | "github": "christophe-lunarg", 36 | "contact": true 37 | } 38 | }, 39 | "history": [ 40 | { 41 | "revision": 1, 42 | "date": "2023-10-31", 43 | "author": "Christophe Riccio", 44 | "comment": "Initial revision" 45 | } 46 | ], 47 | "capabilities": [ 48 | "baseline" 49 | ] 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /library/test/profiles/VP_LUNARG_test_profile_b.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.2-266.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "extensions": { 6 | "VK_KHR_driver_properties": 1 7 | }, 8 | "features": { 9 | "VkPhysicalDeviceFeatures": { 10 | "depthBiasClamp": true, 11 | "drawIndirectFirstInstance": true 12 | } 13 | }, 14 | "properties": { 15 | "VkPhysicalDeviceProperties": { 16 | "limits": { 17 | "maxImageDimension1D": 4096, 18 | "maxImageDimension2D": 8192, 19 | "maxImageDimension3D": 2048 20 | } 21 | } 22 | } 23 | }, 24 | "baseline_c": { 25 | "extensions": { 26 | "VK_KHR_create_renderpass2": 1 27 | }, 28 | "features": { 29 | "VkPhysicalDeviceFeatures": { 30 | "fullDrawIndexUint32": true 31 | } 32 | }, 33 | "properties": { 34 | "VkPhysicalDeviceProperties": { 35 | "limits": { 36 | "maxImageDimension1D": 4096, 37 | "maxImageDimension2D": 16384, 38 | "maxImageDimension3D": 4096 39 | } 40 | } 41 | } 42 | } 43 | }, 44 | "profiles": { 45 | "VP_LUNARG_test_profile_b": { 46 | "version": 1, 47 | "api-version": "1.3.204", 48 | "label": "Test Profile B", 49 | "description": "Test.", 50 | "contributors": { 51 | "Christophe Riccio": { 52 | "company": "LunarG", 53 | "email": "christophe@lunarg.com", 54 | "github": "christophe-lunarg", 55 | "contact": true 56 | } 57 | }, 58 | "history": [ 59 | { 60 | "revision": 1, 61 | "date": "2023-10-31", 62 | "author": "Christophe Riccio", 63 | "comment": "Initial revision" 64 | } 65 | ], 66 | "profiles": [ 67 | "VP_LUNARG_test_profile_a" 68 | ], 69 | "capabilities": [ 70 | "baseline" 71 | ] 72 | }, 73 | "VP_LUNARG_test_profile_c": { 74 | "version": 1, 75 | "api-version": "1.3.225", 76 | "label": "Test Profile C", 77 | "description": "Test.", 78 | "contributors": { 79 | "Christophe Riccio": { 80 | "company": "LunarG", 81 | "email": "christophe@lunarg.com", 82 | "github": "christophe-lunarg", 83 | "contact": true 84 | } 85 | }, 86 | "history": [ 87 | { 88 | "revision": 1, 89 | "date": "2023-10-31", 90 | "author": "Christophe Riccio", 91 | "comment": "Initial revision" 92 | } 93 | ], 94 | "profiles": [ 95 | "VP_LUNARG_test_profile_b" 96 | ], 97 | "capabilities": [ 98 | "baseline_c" 99 | ] 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /library/test/profiles/VP_LUNARG_test_variants.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.2-266.json#", 3 | "capabilities": { 4 | "block": { 5 | "extensions": { 6 | "VK_KHR_driver_properties": 1 7 | }, 8 | "features": { 9 | "VkPhysicalDeviceFeatures": { 10 | "depthBiasClamp": true, 11 | "depthClamp": true 12 | } 13 | }, 14 | "properties": { 15 | "VkPhysicalDeviceProperties": { 16 | "limits": { 17 | "maxImageDimension1D": 4096, 18 | "maxImageDimension2D": 4096, 19 | "maxImageDimension3D": 2048 20 | } 21 | } 22 | }, 23 | "formats": { 24 | "VK_FORMAT_R8G8B8A8_UNORM": { 25 | "VkFormatProperties": { 26 | "linearTilingFeatures": [ 27 | "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT", 28 | "VK_FORMAT_FEATURE_TRANSFER_DST_BIT" 29 | ] 30 | } 31 | } 32 | }, 33 | "queueFamiliesProperties": [ 34 | { 35 | "VkQueueFamilyProperties": { 36 | "queueFlags": [ 37 | "VK_QUEUE_TRANSFER_BIT" 38 | ], 39 | "queueCount": 2 40 | } 41 | } 42 | ] 43 | }, 44 | "variant_a": { 45 | "extensions": { 46 | "VK_KHR_get_memory_requirements2": 1 47 | }, 48 | "features": { 49 | "VkPhysicalDeviceFeatures": { 50 | "depthBiasClamp": true, 51 | "drawIndirectFirstInstance": true 52 | } 53 | }, 54 | "properties": { 55 | "VkPhysicalDeviceProperties": { 56 | "limits": { 57 | "maxImageDimension1D": 8192, 58 | "maxImageDimension2D": 8192, 59 | "maxImageDimension3D": 2048 60 | } 61 | } 62 | }, 63 | "formats": { 64 | "VK_FORMAT_R8G8B8A8_UNORM": { 65 | "VkFormatProperties": { 66 | "linearTilingFeatures": [ 67 | "VK_FORMAT_FEATURE_BLIT_SRC_BIT" 68 | ] 69 | } 70 | } 71 | }, 72 | "queueFamiliesProperties": [ 73 | { 74 | "VkQueueFamilyProperties": { 75 | "queueFlags": [ 76 | "VK_QUEUE_GRAPHICS_BIT", 77 | "VK_QUEUE_COMPUTE_BIT" 78 | ], 79 | "queueCount": 2 80 | } 81 | } 82 | ] 83 | }, 84 | "variant_b": { 85 | "extensions": { 86 | "VK_KHR_driver_properties": 1 87 | }, 88 | "features": { 89 | "VkPhysicalDeviceFeatures": { 90 | "depthClamp": true, 91 | "fullDrawIndexUint32": true 92 | } 93 | }, 94 | "properties": { 95 | "VkPhysicalDeviceProperties": { 96 | "limits": { 97 | "maxImageDimension1D": 4096, 98 | "maxImageDimension2D": 8192, 99 | "maxImageDimension3D": 4096, 100 | "maxImageDimensionCube": 4096 101 | } 102 | } 103 | }, 104 | "formats": { 105 | "VK_FORMAT_R8G8B8A8_UNORM": { 106 | "VkFormatProperties": { 107 | "linearTilingFeatures": [ 108 | "VK_FORMAT_FEATURE_BLIT_DST_BIT" 109 | ] 110 | } 111 | } 112 | }, 113 | "queueFamiliesProperties": [ 114 | { 115 | "VkQueueFamilyProperties": { 116 | "queueFlags": [ 117 | "VK_QUEUE_COMPUTE_BIT" 118 | ], 119 | "queueCount": 2 120 | } 121 | }, 122 | { 123 | "VkQueueFamilyProperties": { 124 | "queueFlags": [ 125 | "VK_QUEUE_PROTECTED_BIT" 126 | ], 127 | "queueCount": 1 128 | } 129 | } 130 | ] 131 | } 132 | }, 133 | "profiles": { 134 | "VP_LUNARG_test_variants": { 135 | "version": 1, 136 | "api-version": "1.3.204", 137 | "label": "Test Profile Variants", 138 | "description": "Test.", 139 | "contributors": { 140 | "Christophe Riccio": { 141 | "company": "LunarG", 142 | "email": "christophe@lunarg.com", 143 | "github": "christophe-lunarg", 144 | "contact": true 145 | } 146 | }, 147 | "history": [ 148 | { 149 | "revision": 1, 150 | "date": "2023-10-31", 151 | "author": "Christophe Riccio", 152 | "comment": "Initial revision" 153 | }, 154 | { 155 | "revision": 2, 156 | "date": "2024-08-26", 157 | "author": "Daniel Rakos", 158 | "comment": "Update with queue family properties" 159 | } 160 | ], 161 | "capabilities": [ 162 | "block", 163 | [ 164 | "variant_a", 165 | "variant_b" 166 | ] 167 | ] 168 | } 169 | } 170 | } 171 | -------------------------------------------------------------------------------- /library/test/profiles/VP_RASTERGRID_test_queue_families.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.2-266.json#", 3 | "capabilities": { 4 | "block": { 5 | "extensions": { 6 | "VK_KHR_video_queue": 1, 7 | "VK_KHR_video_decode_queue": 1, 8 | "VK_KHR_video_decode_h264": 1, 9 | "VK_KHR_video_decode_h265": 1, 10 | "VK_KHR_video_encode_queue": 1 11 | }, 12 | "queueFamiliesProperties": [ 13 | { 14 | "VkQueueFamilyProperties": { 15 | "queueFlags": [ 16 | "VK_QUEUE_GRAPHICS_BIT", 17 | "VK_QUEUE_COMPUTE_BIT", 18 | "VK_QUEUE_TRANSFER_BIT" 19 | ], 20 | "queueCount": 1 21 | } 22 | }, 23 | { 24 | "VkQueueFamilyProperties": { 25 | "queueFlags": [ 26 | "VK_QUEUE_VIDEO_DECODE_BIT_KHR" 27 | ], 28 | "queueCount": 1 29 | }, 30 | "VkQueueFamilyVideoPropertiesKHR": { 31 | "videoCodecOperations": [ 32 | "VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR" 33 | ] 34 | } 35 | }, 36 | { 37 | "VkQueueFamilyProperties": { 38 | "queueFlags": [ 39 | "VK_QUEUE_VIDEO_DECODE_BIT_KHR" 40 | ], 41 | "queueCount": 1 42 | }, 43 | "VkQueueFamilyVideoPropertiesKHR": { 44 | "videoCodecOperations": [ 45 | "VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR" 46 | ] 47 | } 48 | }, 49 | { 50 | "VkQueueFamilyProperties": { 51 | "queueFlags": [ 52 | "VK_QUEUE_VIDEO_ENCODE_BIT_KHR" 53 | ], 54 | "queueCount": 1 55 | } 56 | } 57 | ] 58 | } 59 | }, 60 | "profiles": { 61 | "VP_RASTERGRID_test_queue_families": { 62 | "version": 1, 63 | "api-version": "1.3.225", 64 | "label": "Test Profile Variants", 65 | "description": "Test.", 66 | "contributors": { 67 | "Daniel Rakos": { 68 | "company": "RasterGrid", 69 | "email": "daniel.rakos@rastergrid.com", 70 | "github": "aqnuep", 71 | "contact": true 72 | } 73 | }, 74 | "history": [ 75 | { 76 | "revision": 1, 77 | "date": "2024-08-26", 78 | "author": "Daniel Rakos", 79 | "comment": "Initial revision" 80 | } 81 | ], 82 | "capabilities": [ 83 | "block" 84 | ] 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /library/test/profiles/VP_RASTERGRID_test_wildcard_video_profiles.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8-latest.json#", 3 | "capabilities": { 4 | "general": { 5 | "extensions": { 6 | "VK_KHR_video_queue": 1 7 | }, 8 | "videoProfiles": [ 9 | { 10 | "capabilities": { 11 | "VkVideoCapabilitiesKHR": { 12 | "maxCodedExtent": { 13 | "width": 1920, 14 | "height": 1080 15 | } 16 | } 17 | } 18 | } 19 | ] 20 | }, 21 | "decode_420_8bit": { 22 | "extensions": { 23 | "VK_KHR_video_queue": 1, 24 | "VK_KHR_video_decode_queue": 1 25 | }, 26 | "videoProfiles": [ 27 | { 28 | "profile": { 29 | "VkVideoProfileInfoKHR": { 30 | "chromaSubsampling": [ 31 | "VK_VIDEO_CHROMA_SUBSAMPLING_420_BIT_KHR" 32 | ], 33 | "lumaBitDepth": [ 34 | "VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR" 35 | ], 36 | "chromaBitDepth": [ 37 | "VK_VIDEO_COMPONENT_BIT_DEPTH_8_BIT_KHR" 38 | ] 39 | } 40 | }, 41 | "capabilities": { 42 | "VkVideoDecodeCapabilitiesKHR": {} 43 | }, 44 | "formats": [ 45 | { 46 | "VkVideoFormatPropertiesKHR": { 47 | "format": "VK_FORMAT_G8_B8R8_2PLANE_420_UNORM", 48 | "imageCreateFlags": [ 49 | "VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT", 50 | "VK_IMAGE_CREATE_EXTENDED_USAGE_BIT" 51 | ], 52 | "imageUsageFlags": [ 53 | "VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR" 54 | ] 55 | } 56 | }, 57 | { 58 | "VkVideoFormatPropertiesKHR": { 59 | "format": "VK_FORMAT_G8_B8R8_2PLANE_420_UNORM", 60 | "imageUsageFlags": [ 61 | "VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR" 62 | ] 63 | } 64 | } 65 | ] 66 | } 67 | ] 68 | }, 69 | "decode_h264": { 70 | "extensions": { 71 | "VK_KHR_video_queue": 1, 72 | "VK_KHR_video_decode_queue": 1, 73 | "VK_KHR_video_decode_h264": 1 74 | }, 75 | "videoProfiles": [ 76 | { 77 | "profile": { 78 | "VkVideoProfileInfoKHR": { 79 | "videoCodecOperation": "VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR" 80 | }, 81 | "VkVideoDecodeH264ProfileInfoKHR": { 82 | "pictureLayout": "VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_KHR" 83 | } 84 | }, 85 | "capabilities": { 86 | "VkVideoCapabilitiesKHR": { 87 | "maxDpbSlots": 16, 88 | "maxActiveReferencePictures": 15 89 | }, 90 | "VkVideoDecodeH264CapabilitiesKHR": { 91 | "maxLevelIdc": "STD_VIDEO_H264_LEVEL_IDC_6_0" 92 | } 93 | }, 94 | "formats": [ 95 | { 96 | "VkVideoFormatPropertiesKHR": { 97 | "imageUsageFlags": [ 98 | "VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR", 99 | "VK_IMAGE_USAGE_SAMPLED_BIT" 100 | ] 101 | } 102 | } 103 | ] 104 | } 105 | ] 106 | } 107 | }, 108 | "profiles": { 109 | "VP_RASTERGRID_test_wildcard_video_profiles": { 110 | "version": 1, 111 | "api-version": "1.1.276", 112 | "label": "Sample video profile with video profile 'wildcards'", 113 | "description": "Demonstration of 'wildcard' video profile requirements.", 114 | "capabilities": [ 115 | "general", 116 | "decode_420_8bit", 117 | "decode_h264" 118 | ] 119 | } 120 | } 121 | } -------------------------------------------------------------------------------- /library/test/test.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021-2022 Valve Corporation 3 | * Copyright (c) 2021-2022 LunarG, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Authors: 18 | * - Christophe Riccio 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #include 26 | 27 | #if defined(_WIN32) 28 | #include 29 | #include 30 | #include 31 | #endif 32 | #include 33 | 34 | struct DisableDebugPopup { 35 | DisableDebugPopup() { 36 | #if defined(_WIN32) 37 | // Avoid "Abort, Retry, Ignore" dialog boxes 38 | SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); 39 | _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE); 40 | _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); 41 | _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); 42 | _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); 43 | _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE); 44 | _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); 45 | #endif 46 | } 47 | }; 48 | 49 | static DisableDebugPopup disableDebugPopup; 50 | 51 | static const float DEFAULT_QUEUE_PRIORITY(0.0f); 52 | 53 | class TestScaffold { 54 | public: 55 | VkInstance instance; 56 | VkPhysicalDevice physicalDevice; 57 | uint32_t queueFamilyIndex; 58 | VkDeviceQueueCreateInfo queueCreateInfo; 59 | 60 | TestScaffold() : instance(VK_NULL_HANDLE), physicalDevice(VK_NULL_HANDLE), queueFamilyIndex(0), queueCreateInfo{} { 61 | VkApplicationInfo appInfo{}; 62 | appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO; 63 | appInfo.pApplicationName = "Testing scaffold"; 64 | appInfo.applicationVersion = VK_MAKE_VERSION(1, 2, 0); 65 | appInfo.pEngineName = "No Engine"; 66 | appInfo.engineVersion = VK_MAKE_VERSION(1, 2, 0); 67 | appInfo.apiVersion = VK_API_VERSION_1_2; 68 | 69 | const char* surface_extension = VK_KHR_SURFACE_EXTENSION_NAME; 70 | 71 | VkInstanceCreateInfo createInfo{}; 72 | createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; 73 | createInfo.pApplicationInfo = &appInfo; 74 | 75 | uint32_t propertyCount = 0; 76 | vkEnumerateInstanceExtensionProperties(nullptr, &propertyCount, nullptr); 77 | std::vector properties(propertyCount); 78 | vkEnumerateInstanceExtensionProperties(nullptr, &propertyCount, properties.data()); 79 | if (std::any_of(properties.begin(), properties.end(), [&surface_extension](const VkExtensionProperties& p) { 80 | return strcmp(p.extensionName, surface_extension) == 0; 81 | })) { 82 | // Enable VK_KHR_surface if supported, as tests might use it 83 | createInfo.enabledExtensionCount = 1; 84 | createInfo.ppEnabledExtensionNames = &surface_extension; 85 | } 86 | 87 | VkResult res = vkCreateInstance(&createInfo, nullptr, &instance); 88 | EXPECT_TRUE(res == VK_SUCCESS); 89 | 90 | uint32_t deviceCount = 0; 91 | vkEnumeratePhysicalDevices(instance, &deviceCount, nullptr); 92 | EXPECT_TRUE(deviceCount > 0); 93 | 94 | std::vector physicalDevices(deviceCount); 95 | vkEnumeratePhysicalDevices(instance, &deviceCount, physicalDevices.data()); 96 | physicalDevice = physicalDevices[0]; 97 | queueCreateInfo = {}; 98 | uint32_t queueFamilyCount; 99 | vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, &queueFamilyCount, nullptr); 100 | std::vector queueFamilyProperties(queueFamilyCount); 101 | vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, &queueFamilyCount, queueFamilyProperties.data()); 102 | for (uint32_t i = 0; i < static_cast(queueFamilyProperties.size()); ++i) { 103 | if (queueFamilyProperties[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) { 104 | queueFamilyIndex = i; 105 | queueCreateInfo.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; 106 | queueCreateInfo.queueFamilyIndex = i; 107 | queueCreateInfo.queueCount = 1; 108 | queueCreateInfo.pQueuePriorities = &DEFAULT_QUEUE_PRIORITY; 109 | break; 110 | } 111 | } 112 | } 113 | }; 114 | 115 | -------------------------------------------------------------------------------- /library/test/test_api_get_profiles_beta.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021-2022 Valve Corporation 3 | * Copyright (c) 2021-2022 LunarG, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Authors: 18 | * - Christophe Riccio 19 | */ 20 | 21 | #include "test.hpp" 22 | #ifndef VULKAN_PROFILES_HEADER_ONLY 23 | #include 24 | #else 25 | #include 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /profiles/VP_ANDROID_16_minimums.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.2-301.json#", 3 | "capabilities": { 4 | "MUST": { 5 | "extensions": { 6 | "VK_KHR_8bit_storage": 1, 7 | "VK_KHR_load_store_op_none": 1, 8 | "VK_KHR_maintenance6": 1, 9 | "VK_KHR_map_memory2": 1, 10 | "VK_KHR_shader_expect_assume": 1, 11 | "VK_KHR_shader_float_controls2": 1, 12 | "VK_KHR_shader_maximal_reconvergence": 1, 13 | "VK_KHR_shader_subgroup_rotate": 1, 14 | "VK_KHR_shader_subgroup_uniform_control_flow": 1, 15 | "VK_KHR_swapchain_mutable_format": 1, 16 | "VK_EXT_host_image_copy": 1, 17 | "VK_EXT_image_2d_view_of_3d": 1, 18 | "VK_EXT_pipeline_protected_access": 1, 19 | "VK_EXT_pipeline_robustness": 1, 20 | "VK_EXT_transform_feedback": 1 21 | }, 22 | "features": { 23 | "VkPhysicalDeviceFeatures": { 24 | "fullDrawIndexUint32": true, 25 | "shaderInt16": true 26 | }, 27 | "VkPhysicalDeviceVulkan12Features": { 28 | "samplerMirrorClampToEdge": true, 29 | "scalarBlockLayout": true 30 | }, 31 | "VkPhysicalDeviceProtectedMemoryFeatures": { 32 | "protectedMemory": true 33 | }, 34 | "VkPhysicalDeviceShaderIntegerDotProductFeatures": { 35 | "shaderIntegerDotProduct": true 36 | }, 37 | "VkPhysicalDeviceTransformFeedbackFeaturesEXT": { 38 | "transformFeedback": true 39 | }, 40 | "VkPhysicalDeviceImage2DViewOf3DFeaturesEXT": { 41 | "image2DViewOf3D": true 42 | }, 43 | "VkPhysicalDeviceShaderSubgroupUniformControlFlowFeaturesKHR": { 44 | "shaderSubgroupUniformControlFlow": true 45 | } 46 | }, 47 | "properties": { 48 | "VkPhysicalDeviceProperties": { 49 | "limits": { 50 | "bufferImageGranularity": 4096, 51 | "lineWidthGranularity": 0.5, 52 | "maxColorAttachments": 8, 53 | "maxComputeWorkGroupInvocations": 256, 54 | "maxComputeWorkGroupSize": [ 256, 256, 64 ], 55 | "maxImageArrayLayers": 2048, 56 | "maxImageDimension1D": 8192, 57 | "maxImageDimension2D": 8192, 58 | "maxImageDimensionCube": 8192, 59 | "maxDescriptorSetStorageBuffers": 96, 60 | "maxDescriptorSetUniformBuffers": 90, 61 | "maxFragmentCombinedOutputResources": 16, 62 | "maxPerStageDescriptorUniformBuffers": 15, 63 | "maxPerStageResources": 200, 64 | "maxSamplerLodBias": 14, 65 | "maxUniformBufferRange": 65536, 66 | "maxVertexOutputComponents": 72, 67 | "mipmapPrecisionBits": 6, 68 | "pointSizeGranularity": 0.125, 69 | "standardSampleLocations": true, 70 | "subTexelPrecisionBits": 8, 71 | "timestampComputeAndGraphics": true 72 | } 73 | }, 74 | "VkPhysicalDeviceFloatControlsProperties": { 75 | "shaderSignedZeroInfNanPreserveFloat16": true, 76 | "shaderSignedZeroInfNanPreserveFloat32": true 77 | }, 78 | "VkPhysicalDeviceVulkan11Properties": { 79 | "subgroupSupportedStages": ["VK_SHADER_STAGE_COMPUTE_BIT"] 80 | } 81 | } 82 | }, 83 | "multisampledToSingleSampled": { 84 | "extensions": { 85 | "VK_EXT_multisampled_render_to_single_sampled": 1 86 | } 87 | }, 88 | "shaderStencilExport": { 89 | "extensions": { 90 | "VK_EXT_shader_stencil_export": 1 91 | } 92 | } 93 | }, 94 | "profiles": { 95 | "VP_ANDROID_16_minimums": { 96 | "version": 1, 97 | "api-version": "1.3.276", 98 | "label": "Vulkan Minimum Requirements for Android 16", 99 | "description": "Collection of functionality that is mandated on Android 16", 100 | "contributors": { 101 | "Ian Elliott": { 102 | "company": "Google", 103 | "email": "ianelliott@google.com", 104 | "contact": true 105 | } 106 | }, 107 | "history": [ 108 | { 109 | "revision": 1, 110 | "date": "2024-02-20", 111 | "author": "Ian Elliott", 112 | "comment": "First draft" 113 | }, 114 | { 115 | "revision": 2, 116 | "date": "2024-07-22", 117 | "author": "Ian Elliott", 118 | "comment": "Added proposed Vulkan 1.4 scope" 119 | }, 120 | { 121 | "revision": 3, 122 | "date": "2024-11-15", 123 | "author": "Ian Elliott", 124 | "comment": "Delay some requirements that Mali Bifrost chipsets cannot do" 125 | }, 126 | { 127 | "revision": 4, 128 | "date": "2024-12-10", 129 | "author": "Ian Elliott", 130 | "comment": "Delay some requirements that Adreno A6xx chipsets cannot do" 131 | }, 132 | { 133 | "revision": 5, 134 | "date": "2024-12-11", 135 | "author": "Ian Elliott", 136 | "comment": "Delay VK_EXT_device_fault" 137 | }, 138 | { 139 | "revision": 6, 140 | "date": "2024-12-11", 141 | "author": "Ian Elliott", 142 | "comment": "Delay a requirement that IMG BXM-8-256 chipsets cannot do" 143 | } 144 | ], 145 | "profiles": [ 146 | "VP_ANDROID_15_minimums" 147 | ], 148 | "capabilities": [ 149 | "MUST", 150 | ["multisampledToSingleSampled", "shaderStencilExport"] 151 | ] 152 | } 153 | } 154 | } 155 | -------------------------------------------------------------------------------- /profiles/VP_LUNARG_desktop_baseline_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "profiles-config-latest", 3 | "profiles": { 4 | "VP_LUNARG_desktop_baseline_2022": { 5 | "version": 2, 6 | "input": "VP_LUNARG_desktop_baseline_2022", 7 | "label": "LunarG Vulkan Desktop Baseline 2022 profile", 8 | "description": "A profile generated by the intersection of a collection of GPUInfo.org device reports to support a large number of actual systems in the Vulkan ecosystem. This profile is meant to be a usage example for Vulkan application developer.", 9 | "date": "2023-01-26", 10 | "stage": "STABLE", 11 | "api-version": "1.1.139", 12 | "required-profiles": "" 13 | }, 14 | "VP_LUNARG_desktop_baseline_2023": { 15 | "version": 2, 16 | "input": "VP_LUNARG_desktop_baseline_2023", 17 | "label": "LunarG Vulkan Desktop Baseline 2023 profile", 18 | "description": "A profile generated by the intersection of a collection of GPUInfo.org device reports to support a large number of actual systems in the Vulkan ecosystem. This profile is meant to be a usage example for Vulkan application developer.", 19 | "date": "2023-01-30", 20 | "stage": "STABLE", 21 | "api-version": "1.2.148", 22 | "required-profiles": "" 23 | }, 24 | "VP_LUNARG_desktop_baseline_2024": { 25 | "version": 1, 26 | "input": "VP_LUNARG_desktop_baseline_2024", 27 | "label": "LunarG Vulkan Desktop Baseline 2024 profile", 28 | "description": "A profile generated by the intersection of a collection of GPUInfo.org device reports to support a large number of actual systems in the Vulkan ecosystem. This profile is meant to be a usage example for Vulkan application developer.", 29 | "date": "2024-02-20", 30 | "stage": "STABLE", 31 | "api-version": "1.2.197", 32 | "required-profiles": "" 33 | } 34 | }, 35 | "contributors": { 36 | "Christophe Riccio": { 37 | "company": "LunarG", 38 | "email": "christophe@lunarg.com", 39 | "contact": true 40 | } 41 | }, 42 | "history": [ 43 | { 44 | "revision": 2, 45 | "date": "2024-02-21", 46 | "author": "Christophe Riccio", 47 | "comment": "Updated Desktop Baseline 2023 and 2022 to version 2 with ARC support" 48 | }, 49 | { 50 | "revision": 1, 51 | "date": "2024-02-21", 52 | "author": "Christophe Riccio", 53 | "comment": "Merged Desktop Baseline 2024, 2023 and 2022 into a single file" 54 | } 55 | ] 56 | } -------------------------------------------------------------------------------- /profiles/config/VP_LUNARG_desktop_baseline_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "profiles-config-latest", 3 | "profiles": { 4 | "VP_LUNARG_desktop_baseline_2022": { 5 | "version": 2, 6 | "input": "../VP_LUNARG_desktop_baseline_2022", 7 | "label": "LunarG Vulkan Desktop Baseline 2022 profile", 8 | "description": "A profile generated by the intersection of a collection of GPUInfo.org device reports to support a large number of actual systems in the Vulkan ecosystem. This profile is meant to be a usage example for Vulkan application developer.", 9 | "date": "2023-01-26", 10 | "stage": "STABLE", 11 | "api-version": "1.1.139", 12 | "required-profiles": "" 13 | }, 14 | "VP_LUNARG_desktop_baseline_2023": { 15 | "version": 2, 16 | "input": "../VP_LUNARG_desktop_baseline_2023", 17 | "label": "LunarG Vulkan Desktop Baseline 2023 profile", 18 | "description": "A profile generated by the intersection of a collection of GPUInfo.org device reports to support a large number of actual systems in the Vulkan ecosystem. This profile is meant to be a usage example for Vulkan application developer.", 19 | "date": "2023-01-30", 20 | "stage": "STABLE", 21 | "api-version": "1.2.148", 22 | "required-profiles": "" 23 | }, 24 | "VP_LUNARG_desktop_baseline_2024": { 25 | "version": 1, 26 | "input": "../VP_LUNARG_desktop_baseline_2024", 27 | "label": "LunarG Vulkan Desktop Baseline 2024 profile", 28 | "description": "A profile generated by the intersection of a collection of GPUInfo.org device reports to support a large number of actual systems in the Vulkan ecosystem. This profile is meant to be a usage example for Vulkan application developer.", 29 | "date": "2024-02-20", 30 | "stage": "STABLE", 31 | "api-version": "1.2.197", 32 | "required-profiles": "" 33 | } 34 | }, 35 | "contributors": { 36 | "Christophe Riccio": { 37 | "company": "LunarG", 38 | "email": "christophe@lunarg.com", 39 | "contact": true 40 | } 41 | }, 42 | "history": [ 43 | { 44 | "revision": 2, 45 | "date": "2024-02-21", 46 | "author": "Christophe Riccio", 47 | "comment": "Updated Desktop Baseline 2023 and 2022 to version 2 with ARC support" 48 | }, 49 | { 50 | "revision": 1, 51 | "date": "2024-02-21", 52 | "author": "Christophe Riccio", 53 | "comment": "Merged Desktop Baseline 2024, 2023 and 2022 into a single file" 54 | } 55 | ] 56 | } -------------------------------------------------------------------------------- /profiles/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ~~~ 2 | # Copyright (c) 2021-2025 LunarG, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # ~~~ 16 | 17 | set(TEST_FILE test_validate.cpp) 18 | set(TEST_NAME VpProfile_test_schema_validation) 19 | 20 | file(GLOB FILES_UNIT_TEST ${CMAKE_CURRENT_SOURCE_DIR}/data/*.json) 21 | file(GLOB FILES_PROFILE ${CMAKE_CURRENT_SOURCE_DIR}/../*.json) 22 | file(GLOB SCHEMA_PROFILE ${CMAKE_CURRENT_SOURCE_DIR}/../../schema/${PROFILES_SCHEMA_FILENAME}) 23 | 24 | source_group("JSON Files" FILES ${FILES_PROFILE} ${FILES_UNIT_TEST}) 25 | source_group("JSON Schema" FILES ${SCHEMA_PROFILE}) 26 | 27 | add_definitions(-D_CRT_SECURE_NO_WARNINGS) 28 | 29 | add_executable(${TEST_NAME} ${TEST_FILE} ${FILES_PROFILE} ${FILES_UNIT_TEST} ${SCHEMA_PROFILE}) 30 | target_compile_definitions(${TEST_NAME} PRIVATE 31 | PROFILES_SCHEMA_FILENAME="${CMAKE_SOURCE_DIR}/schema/${PROFILES_SCHEMA_FILENAME}" 32 | JSON_TEST_FILES_PATH="${CMAKE_SOURCE_DIR}/profiles/test/data/" 33 | PROFILE_FILES_PATH="${CMAKE_SOURCE_DIR}/profiles/") 34 | add_dependencies(${TEST_NAME} VpGenerated) 35 | 36 | target_link_libraries(${TEST_NAME} PRIVATE GTest::gtest GTest::gtest_main jsoncpp_static valijson) 37 | add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME} --gtest_catch_exceptions=0) 38 | 39 | set_target_properties(${TEST_NAME} PROPERTIES FOLDER "Profiles schema") 40 | 41 | add_dependencies(VpProfile_test_schema_validation VpGenerated) 42 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_api_1_0.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | } 6 | }, 7 | "profiles": { 8 | "VP_LUNARG_test_api_1_0": { 9 | "version": 1, 10 | "api-version": "1.0.198", 11 | "label": "Device extensions", 12 | "description": "Unit test file", 13 | "contributors": { 14 | "Christophe Riccio": { 15 | "company": "LunarG", 16 | "email": "christophe@lunarg.com", 17 | "github": "christophe-lunarg", 18 | "contact": true 19 | } 20 | }, 21 | "history": [ 22 | { 23 | "revision": 1, 24 | "date": "2021-12-08", 25 | "author": "Christophe Riccio", 26 | "comment": "Initial revision" 27 | } 28 | ], 29 | "capabilities": [ 30 | "baseline" 31 | ] 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_api_1_1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | } 6 | }, 7 | "profiles": { 8 | "VP_LUNARG_test_api_1_1": { 9 | "version": 1, 10 | "api-version": "1.1.198", 11 | "label": "Device extensions", 12 | "description": "Unit test file", 13 | "contributors": { 14 | "Christophe Riccio": { 15 | "company": "LunarG", 16 | "email": "christophe@lunarg.com", 17 | "github": "christophe-lunarg", 18 | "contact": true 19 | } 20 | }, 21 | "history": [ 22 | { 23 | "revision": 1, 24 | "date": "2021-12-08", 25 | "author": "Christophe Riccio", 26 | "comment": "Initial revision" 27 | } 28 | ], 29 | "capabilities": [ 30 | "baseline" 31 | ] 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_api_1_2.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | } 6 | }, 7 | "profiles": { 8 | "VP_LUNARG_test_api_1_2": { 9 | "version": 1, 10 | "api-version": "1.2.198", 11 | "label": "Device extensions", 12 | "description": "Unit test file", 13 | "contributors": { 14 | "Christophe Riccio": { 15 | "company": "LunarG", 16 | "email": "christophe@lunarg.com", 17 | "github": "christophe-lunarg", 18 | "contact": true 19 | } 20 | }, 21 | "history": [ 22 | { 23 | "revision": 1, 24 | "date": "2021-12-08", 25 | "author": "Christophe Riccio", 26 | "comment": "Initial revision" 27 | } 28 | ], 29 | "capabilities": [ 30 | "baseline" 31 | ] 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_api_1_3.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | } 6 | }, 7 | "profiles": { 8 | "VP_LUNARG_test_api_1_3": { 9 | "version": 1, 10 | "api-version": "1.3.204", 11 | "label": "Device extensions", 12 | "description": "Unit test file", 13 | "contributors": { 14 | "Christophe Riccio": { 15 | "company": "LunarG", 16 | "email": "christophe@lunarg.com", 17 | "github": "christophe-lunarg", 18 | "contact": true 19 | } 20 | }, 21 | "history": [ 22 | { 23 | "revision": 1, 24 | "date": "2021-12-08", 25 | "author": "Christophe Riccio", 26 | "comment": "Initial revision" 27 | } 28 | ], 29 | "capabilities": [ 30 | "baseline" 31 | ] 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_api_version.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "properties": { 6 | "VkPhysicalDeviceProperties": { 7 | "apiVersion": 4198528, 8 | "limits": { 9 | "maxImageDimension1D": 4096 10 | } 11 | } 12 | } 13 | } 14 | }, 15 | "profiles": { 16 | "VP_LUNARG_test_api_version": { 17 | "version": 1, 18 | "api-version": "1.1.142", 19 | "label": "LunarG Vulkan Desktop Portability 2021 profile", 20 | "description": "Common desktop platforms with drivers supporting Vulkan 1.1 on Windows and Linux.", 21 | "contributors": { 22 | "Christophe Riccio": { 23 | "company": "LunarG", 24 | "email": "christophe@lunarg.com", 25 | "github": "christophe-lunarg", 26 | "contact": true 27 | } 28 | }, 29 | "history": [ 30 | { 31 | "revision": 1, 32 | "date": "2021-12-20", 33 | "author": "Christophe Riccio", 34 | "comment": "Initial revision" 35 | } 36 | ], 37 | "capabilities": [ 38 | "baseline" 39 | ] 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_api_version_profile.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "properties": { 6 | "VkPhysicalDeviceProperties": { 7 | "limits": { 8 | "maxImageDimension1D": 4096 9 | } 10 | } 11 | } 12 | } 13 | }, 14 | "profiles": { 15 | "VP_LUNARG_test_api_version_profile": { 16 | "version": 1, 17 | "api-version": "1.1.142", 18 | "label": "LunarG Vulkan Desktop Portability 2021 profile", 19 | "description": "Common desktop platforms with drivers supporting Vulkan 1.1 on Windows and Linux.", 20 | "contributors": { 21 | "Christophe Riccio": { 22 | "company": "LunarG", 23 | "email": "christophe@lunarg.com", 24 | "github": "christophe-lunarg", 25 | "contact": true 26 | } 27 | }, 28 | "history": [ 29 | { 30 | "revision": 1, 31 | "date": "2021-12-20", 32 | "author": "Christophe Riccio", 33 | "comment": "Initial revision" 34 | } 35 | ], 36 | "capabilities": [ 37 | "baseline" 38 | ] 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_baseline_formats.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "formats": { 6 | "VK_FORMAT_R8G8B8A8_SRGB": { 7 | "VkFormatProperties": { 8 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT" ], 9 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT", "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT", "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT" ], 10 | "bufferFeatures": [ "VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT" ] 11 | }, 12 | "VkFormatProperties3": { 13 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT" ], 14 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT", "VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT" ], 15 | "bufferFeatures": [ "VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT" ] 16 | } 17 | }, 18 | "VK_FORMAT_R8G8B8A8_UNORM": { 19 | "VkFormatProperties": { 20 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT" ], 21 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT", "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT", "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT" ], 22 | "bufferFeatures": [ "VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT" ] 23 | }, 24 | "VkFormatProperties3": { 25 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT" ], 26 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT", "VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT" ], 27 | "bufferFeatures": [ "VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT" ] 28 | } 29 | } 30 | } 31 | } 32 | }, 33 | "profiles": { 34 | "VP_LUNARG_test_formats": { 35 | "version": 1, 36 | "api-version": "1.3.204", 37 | "label": "LunarG Profiles Structure unit test", 38 | "description": "For schema unit test on C.I.", 39 | "contributors": { 40 | "Christophe Riccio": { 41 | "company": "LunarG", 42 | "email": "christophe@lunarg.com", 43 | "github": "christophe-lunarg", 44 | "contact": true 45 | } 46 | }, 47 | "history": [ 48 | { 49 | "revision": 1, 50 | "date": "2021-12-08", 51 | "author": "Christophe Riccio", 52 | "comment": "Initial revision" 53 | } 54 | ], 55 | "capabilities": [ 56 | "baseline" 57 | ] 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_capabilities.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.1-204.json#", 3 | "capabilities": { 4 | "block0": { 5 | }, 6 | "block1": { 7 | }, 8 | "block2": { 9 | } 10 | }, 11 | "profiles": { 12 | "VP_LUNARG_test_capabilities_and": { 13 | "version": 1, 14 | "api-version": "1.0.198", 15 | "label": "Device extensions", 16 | "description": "Unit test file", 17 | "capabilities": [ 18 | "block0", 19 | "block1" 20 | ] 21 | }, 22 | "VP_LUNARG_test_capabilities_or": { 23 | "version": 1, 24 | "api-version": "1.0.198", 25 | "label": "Device extensions", 26 | "description": "Unit test file", 27 | "capabilities": [ 28 | [ "block0", "block1" ] 29 | ] 30 | } 31 | }, 32 | "contributors": { 33 | "Christophe Riccio": { 34 | "company": "LunarG", 35 | "email": "christophe@lunarg.com", 36 | "github": "christophe-lunarg", 37 | "contact": true 38 | } 39 | }, 40 | "history": [ 41 | { 42 | "revision": 1, 43 | "date": "2021-12-08", 44 | "author": "Christophe Riccio", 45 | "comment": "Initial revision" 46 | } 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_combine_intersect/VP_LUNARG_test_combine_intersect1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-155.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "extensions": { 6 | "VK_KHR_maintenance1": 1, 7 | "VK_KHR_maintenance3": 1, 8 | "VK_KHR_imageless_framebuffer": 1, 9 | "VK_EXT_shader_demote_to_helper_invocation": 1 10 | }, 11 | "features": { 12 | "VkPhysicalDeviceFeatures": { 13 | "depthBiasClamp": true, 14 | "depthClamp": false, 15 | "drawIndirectFirstInstance": true, 16 | "multiDrawIndirect": false, 17 | "sampleRateShading": true, 18 | "shaderClipDistance": false, 19 | "largePoints": false 20 | }, 21 | "VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT": { 22 | "shaderDemoteToHelperInvocation": true 23 | }, 24 | "VkPhysicalDeviceImagelessFramebufferFeaturesKHR": { 25 | "imagelessFramebuffer": false 26 | } 27 | }, 28 | "properties": { 29 | "VkPhysicalDeviceProperties": { 30 | "limits": { 31 | "maxImageDimension1D": 4096, 32 | "maxImageDimension2D": 8192, 33 | "maxComputeWorkGroupCount": [ 65535, 4096, 4096 ], 34 | "mipmapPrecisionBits": 4, 35 | "maxSamplerAnisotropy": 16.0, 36 | "viewportBoundsRange": [ -32768, 32767 ], 37 | "minMemoryMapAlignment": 64, 38 | "minTexelOffset": -4, 39 | "maxTexelOffset": 3, 40 | "framebufferColorSampleCounts": [ "VK_SAMPLE_COUNT_1_BIT", "VK_SAMPLE_COUNT_4_BIT" ], 41 | "pointSizeRange": [ 4.0, 32.0 ], 42 | "pointSizeGranularity": 4.0, 43 | "strictLines": true 44 | }, 45 | "sparseProperties": { 46 | "residencyAlignedMipSize": false 47 | }, 48 | "vendorID": 4098, 49 | "deviceType": "VK_PHYSICAL_DEVICE_TYPE_OTHER" 50 | } 51 | }, 52 | "formats": { 53 | "VK_FORMAT_R4G4_UNORM_PACK8": { 54 | "VkFormatProperties": { 55 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT" ], 56 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT" ], 57 | "bufferFeatures": [ "VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT" ] 58 | } 59 | }, 60 | "VK_FORMAT_R4G4B4A4_UNORM_PACK16": { 61 | "VkFormatProperties2": { 62 | "formatProperties": { 63 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT", "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT" ], 64 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT" ], 65 | "bufferFeatures": [ "VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR" ] 66 | } 67 | }, 68 | "VkFormatProperties3": { 69 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT" ], 70 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT" ], 71 | "bufferFeatures": [ "VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT" ] 72 | } 73 | }, 74 | "VK_FORMAT_B4G4R4A4_UNORM_PACK16": { 75 | "VkFormatProperties3KHR": { 76 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT", "VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT" ], 77 | "optimalTilingFeatures": [], 78 | "bufferFeatures": [ "VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT" ] 79 | } 80 | }, 81 | "VK_FORMAT_R5G6B5_UNORM_PACK16": { 82 | } 83 | } 84 | } 85 | }, 86 | "profiles": { 87 | "VP_LUNARG_test_combine_intersect1": { 88 | "version": 1, 89 | "api-version": "1.0.142", 90 | "label": "Test data", 91 | "description": "Test data", 92 | "contributors": { 93 | "Christophe Riccio": { 94 | "company": "LunarG", 95 | "email": "christophe@lunarg.com", 96 | "github": "christophe-lunarg", 97 | "contact": true 98 | } 99 | }, 100 | "history": [ 101 | { 102 | "revision": 1, 103 | "date": "2021-12-20", 104 | "author": "Christophe Riccio", 105 | "comment": "Initial revision" 106 | } 107 | ], 108 | "capabilities": [ 109 | "baseline" 110 | ] 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_combine_intersect/VP_LUNARG_test_combine_intersect2.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-156.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "extensions": { 6 | "VK_KHR_maintenance2": 1, 7 | "VK_KHR_maintenance3": 1, 8 | "VK_KHR_variable_pointers": 1, 9 | "VK_EXT_extended_dynamic_state": 1 10 | }, 11 | "features": { 12 | "VkPhysicalDeviceFeatures": { 13 | "depthBiasClamp": true, 14 | "depthClamp": false, 15 | "drawIndirectFirstInstance": false, 16 | "multiDrawIndirect": true, 17 | "samplerAnisotropy": true, 18 | "multiViewport": false 19 | }, 20 | "VkPhysicalDeviceExtendedDynamicStateFeaturesEXT": { 21 | "extendedDynamicState": true 22 | }, 23 | "VkPhysicalDeviceVariablePointersFeaturesKHR": { 24 | "variablePointersStorageBuffer": false 25 | } 26 | }, 27 | "properties": { 28 | "VkPhysicalDeviceProperties": { 29 | "limits": { 30 | "maxImageDimension1D": 16384, 31 | "maxImageDimension3D": 2048, 32 | "maxComputeWorkGroupCount": [ 4096, 65535, 2048 ], 33 | "mipmapPrecisionBits": 2, 34 | "maxSamplerAnisotropy": 1.0, 35 | "viewportBoundsRange": [ -16384, 16384 ], 36 | "minMemoryMapAlignment": 64, 37 | "minTexelOffset": -8, 38 | "maxTexelOffset": 7, 39 | "framebufferColorSampleCounts": [ "VK_SAMPLE_COUNT_2_BIT", "VK_SAMPLE_COUNT_4_BIT" ], 40 | "pointSizeRange": [ 2.0, 64.0 ], 41 | "pointSizeGranularity": 2.0, 42 | "strictLines": true 43 | }, 44 | "sparseProperties": { 45 | "residencyAlignedMipSize": false 46 | }, 47 | "deviceID": 7676, 48 | "deviceName": "LunarG Toolset" 49 | } 50 | }, 51 | "formats": { 52 | "VK_FORMAT_R4G4_UNORM_PACK8": { 53 | "VkFormatProperties": { 54 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT", "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT" ], 55 | "optimalTilingFeatures": [ ], 56 | "bufferFeatures": [ "VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT" ] 57 | } 58 | }, 59 | "VK_FORMAT_R4G4B4A4_UNORM_PACK16": { 60 | "VkFormatProperties2": { 61 | "formatProperties": { 62 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT" ], 63 | "optimalTilingFeatures": [], 64 | "bufferFeatures": [ "VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR" ] 65 | } 66 | }, 67 | "VkFormatProperties3": { 68 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT" ], 69 | "optimalTilingFeatures": [], 70 | "bufferFeatures": [ "VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT" ] 71 | } 72 | }, 73 | "VK_FORMAT_B4G4R4A4_UNORM_PACK16": { 74 | "VkFormatProperties3KHR": { 75 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT" ], 76 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT" ], 77 | "bufferFeatures": [ "VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT" ] 78 | } 79 | }, 80 | "VK_FORMAT_R5G6B5_UNORM_PACK16": { 81 | } 82 | } 83 | } 84 | }, 85 | "profiles": { 86 | "VP_LUNARG_test_combine_intersect2": { 87 | "version": 1, 88 | "api-version": "1.0.142", 89 | "label": "Test data", 90 | "description": "Test data", 91 | "contributors": { 92 | "Christophe Riccio": { 93 | "company": "LunarG", 94 | "email": "christophe@lunarg.com", 95 | "github": "christophe-lunarg", 96 | "contact": true 97 | } 98 | }, 99 | "history": [ 100 | { 101 | "revision": 1, 102 | "date": "2021-12-20", 103 | "author": "Christophe Riccio", 104 | "comment": "Initial revision" 105 | } 106 | ], 107 | "capabilities": [ 108 | "baseline" 109 | ] 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_combine_union/VP_LUNARG_test_combine_union1.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-154.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "extensions": { 6 | "VK_KHR_maintenance1": 1, 7 | "VK_KHR_maintenance3": 1, 8 | "VK_AMD_device_coherent_memory": 1, 9 | "VK_EXT_shader_demote_to_helper_invocation": 1 10 | }, 11 | "features": { 12 | "VkPhysicalDeviceFeatures": { 13 | "depthBiasClamp": true, 14 | "depthClamp": false, 15 | "drawIndirectFirstInstance": true, 16 | "multiDrawIndirect": false, 17 | "sampleRateShading": true, 18 | "shaderClipDistance": false 19 | }, 20 | "VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT": { 21 | "shaderDemoteToHelperInvocation": true 22 | }, 23 | "VkPhysicalDeviceCoherentMemoryFeaturesAMD": { 24 | "deviceCoherentMemory": false 25 | } 26 | }, 27 | "properties": { 28 | "VkPhysicalDeviceProperties": { 29 | "limits": { 30 | "maxImageDimension1D": 4096, 31 | "maxImageDimension2D": 8192, 32 | "maxComputeWorkGroupCount": [ 65535, 4096, 4096 ], 33 | "mipmapPrecisionBits": 4, 34 | "maxSamplerAnisotropy": 16.0, 35 | "viewportBoundsRange": [ -32768, 32767 ], 36 | "minMemoryMapAlignment": 64, 37 | "minTexelOffset": -4, 38 | "maxTexelOffset": 3, 39 | "framebufferColorSampleCounts": [ "VK_SAMPLE_COUNT_1_BIT", "VK_SAMPLE_COUNT_4_BIT" ], 40 | "pointSizeRange": [ 4.0, 32.0 ], 41 | "pointSizeGranularity": 4.0 42 | }, 43 | "vendorID": 4098, 44 | "deviceType": "VK_PHYSICAL_DEVICE_TYPE_OTHER" 45 | } 46 | }, 47 | "formats": { 48 | "VK_FORMAT_R8G8B8A8_UNORM": { 49 | "VkFormatProperties": { 50 | "linearTilingFeatures": [ ], 51 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT", "VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT" ], 52 | "bufferFeatures": [ "VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT" ] 53 | } 54 | } 55 | } 56 | } 57 | }, 58 | "profiles": { 59 | "VP_LUNARG_test_combine_union1": { 60 | "version": 1, 61 | "api-version": "1.0.142", 62 | "label": "Test data for Desktop Portability 2021 profile", 63 | "description": "Common desktop platforms with drivers supporting Vulkan 1.1 on Windows and Linux.", 64 | "contributors": { 65 | "Christophe Riccio": { 66 | "company": "LunarG", 67 | "email": "christophe@lunarg.com", 68 | "github": "christophe-lunarg", 69 | "contact": true 70 | } 71 | }, 72 | "history": [ 73 | { 74 | "revision": 1, 75 | "date": "2021-12-20", 76 | "author": "Christophe Riccio", 77 | "comment": "Initial revision" 78 | } 79 | ], 80 | "capabilities": [ 81 | "baseline" 82 | ] 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_combine_union/VP_LUNARG_test_combine_union2.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-154.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "extensions": { 6 | "VK_KHR_maintenance2": 1, 7 | "VK_KHR_maintenance3": 1, 8 | "VK_EXT_extended_dynamic_state": 1, 9 | "VK_KHR_variable_pointers": 1 10 | }, 11 | "features": { 12 | "VkPhysicalDeviceFeatures": { 13 | "depthBiasClamp": true, 14 | "depthClamp": false, 15 | "drawIndirectFirstInstance": false, 16 | "multiDrawIndirect": true, 17 | "samplerAnisotropy": true, 18 | "multiViewport": false 19 | }, 20 | "VkPhysicalDeviceExtendedDynamicStateFeaturesEXT": { 21 | "extendedDynamicState": true 22 | }, 23 | "VkPhysicalDeviceVariablePointersFeaturesKHR": { 24 | "variablePointersStorageBuffer": false 25 | } 26 | }, 27 | "properties": { 28 | "VkPhysicalDeviceProperties": { 29 | "limits": { 30 | "maxImageDimension1D": 16384, 31 | "maxImageDimension3D": 2048, 32 | "maxComputeWorkGroupCount": [ 4096, 65535, 2048 ], 33 | "mipmapPrecisionBits": 2, 34 | "maxSamplerAnisotropy": 1.0, 35 | "viewportBoundsRange": [ -16384, 16384 ], 36 | "minMemoryMapAlignment": 64, 37 | "minTexelOffset": -8, 38 | "maxTexelOffset": 7, 39 | "framebufferColorSampleCounts": [ "VK_SAMPLE_COUNT_2_BIT", "VK_SAMPLE_COUNT_4_BIT" ], 40 | "pointSizeRange": [ 2.0, 64.0 ], 41 | "pointSizeGranularity": 2.0 42 | }, 43 | "deviceID": 7676, 44 | "deviceName": "LunarG Toolset" 45 | } 46 | }, 47 | "formats": { 48 | "VK_FORMAT_R8G8B8A8_UNORM": { 49 | "VkFormatProperties": { 50 | "linearTilingFeatures": [], 51 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT", "VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT" ], 52 | "bufferFeatures": [ "VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT" ] 53 | } 54 | } 55 | } 56 | } 57 | }, 58 | "profiles": { 59 | "VP_LUNARG_test_combine_union2": { 60 | "version": 1, 61 | "api-version": "1.0.142", 62 | "label": "Test data for Desktop Portability 2021 profile", 63 | "description": "Common desktop platforms with drivers supporting Vulkan 1.1 on Windows and Linux.", 64 | "contributors": { 65 | "Christophe Riccio": { 66 | "company": "LunarG", 67 | "email": "christophe@lunarg.com", 68 | "github": "christophe-lunarg", 69 | "contact": true 70 | } 71 | }, 72 | "history": [ 73 | { 74 | "revision": 1, 75 | "date": "2021-12-20", 76 | "author": "Christophe Riccio", 77 | "comment": "Initial revision" 78 | } 79 | ], 80 | "capabilities": [ 81 | "baseline" 82 | ] 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_device_extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "extensions": { 6 | "VK_KHR_maintenance3": 1 7 | } 8 | } 9 | }, 10 | "profiles": { 11 | "VP_LUNARG_test_device_extensions": { 12 | "version": 1, 13 | "api-version": "1.0.198", 14 | "label": "Device extensions", 15 | "description": "Unit test file", 16 | "contributors": { 17 | "Christophe Riccio": { 18 | "company": "LunarG", 19 | "email": "christophe@lunarg.com", 20 | "github": "christophe-lunarg", 21 | "contact": true 22 | } 23 | }, 24 | "history": [ 25 | { 26 | "revision": 1, 27 | "date": "2021-12-08", 28 | "author": "Christophe Riccio", 29 | "comment": "Initial revision" 30 | } 31 | ], 32 | "capabilities": [ 33 | "baseline" 34 | ] 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_device_features.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "extensions": { 6 | "VK_EXT_mutable_descriptor_type": 1 7 | }, 8 | "features": { 9 | "VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT": { 10 | "mutableDescriptorType": true 11 | } 12 | } 13 | } 14 | }, 15 | "profiles": { 16 | "VP_LUNARG_test_device_features": { 17 | "label": "label", 18 | "description": "description", 19 | "version": 1, 20 | "api-version": "1.3.204", 21 | "contributors": { 22 | "Christophe": { 23 | "company": "LunarG", 24 | "email": "christophe@lunarg.com", 25 | "github": "christophe-lunarg", 26 | "contact": false 27 | } 28 | }, 29 | "history": [ 30 | { 31 | "revision": 1, 32 | "date": "2023-05-29", 33 | "author": "Christophe", 34 | "comment": "Initial revision against 1.3.204" 35 | } 36 | ], 37 | "capabilities": [ "baseline" ] 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_device_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "properties": { 6 | "VkPhysicalDeviceProperties": { 7 | "limits": { 8 | "maxImageDimension1D": 4096, 9 | "maxImageDimension2D": 4096, 10 | "maxImageDimension3D": 4096 11 | }, 12 | "sparseProperties": { 13 | "residencyStandard2DBlockShape": true, 14 | "residencyStandard2DMultisampleBlockShape": true, 15 | "residencyStandard3DBlockShape": true, 16 | "residencyAlignedMipSize": false, 17 | "residencyNonResidentStrict": false 18 | } 19 | } 20 | } 21 | } 22 | }, 23 | "profiles": { 24 | "VP_LUNARG_test_device_properties": { 25 | "label": "label", 26 | "description": "description", 27 | "version": 1, 28 | "api-version": "1.3.204", 29 | "contributors": { 30 | "Christophe": { 31 | "company": "LunarG", 32 | "email": "christophe@lunarg.com", 33 | "github": "christophe-lunarg", 34 | "contact": false 35 | } 36 | }, 37 | "history": [ 38 | { 39 | "revision": 1, 40 | "date": "2023-05-29", 41 | "author": "Christophe", 42 | "comment": "Initial revision against 1.3.204" 43 | } 44 | ], 45 | "capabilities": [ "baseline" ] 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_duplicated.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "features": { 6 | "VkPhysicalDevice16BitStorageFeaturesKHR": { 7 | "storageBuffer16BitAccess": true, 8 | "uniformAndStorageBuffer16BitAccess": true 9 | }, 10 | "VkPhysicalDevice16BitStorageFeatures": { 11 | "storageBuffer16BitAccess": true, 12 | "uniformAndStorageBuffer16BitAccess": true 13 | } 14 | } 15 | } 16 | }, 17 | "profiles": { 18 | "VP_LUNARG_test_duplicated": { 19 | "version": 1, 20 | "api-version": "1.2.198", 21 | "label": "LunarG Profiles Structure unit test", 22 | "description": "This JSON file is valid but incorrect as a capability set should not have duplicated structures or structures alias", 23 | "contributors": { 24 | "Christophe Riccio": { 25 | "company": "LunarG", 26 | "email": "christophe@lunarg.com", 27 | "github": "christophe-lunarg", 28 | "contact": true 29 | } 30 | }, 31 | "history": [ 32 | { 33 | "revision": 1, 34 | "date": "2021-12-08", 35 | "author": "Christophe Riccio", 36 | "comment": "Initial revision" 37 | } 38 | ], 39 | "capabilities": [ 40 | "baseline" 41 | ] 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_formats.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "formats": { 6 | "VK_FORMAT_R4G4_UNORM_PACK8": { 7 | "VkFormatProperties": { 8 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT" ], 9 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT" ], 10 | "bufferFeatures": [ "VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT" ] 11 | } 12 | }, 13 | "VK_FORMAT_R4G4B4A4_UNORM_PACK16": { 14 | "VkFormatProperties2": { 15 | "formatProperties": { 16 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT" ], 17 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT" ], 18 | "bufferFeatures": [ "VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR" ] 19 | } 20 | } 21 | }, 22 | "VK_FORMAT_B4G4R4A4_UNORM_PACK16": { 23 | "VkFormatProperties3": { 24 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT", "VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT" ], 25 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT" ], 26 | "bufferFeatures": [ ] 27 | }, 28 | "VkFormatProperties3KHR": { 29 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT", "VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT" ], 30 | "optimalTilingFeatures": [ ], 31 | "bufferFeatures": [ "VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT" ] 32 | } 33 | }, 34 | "VK_FORMAT_R5G6B5_UNORM_PACK16": { 35 | }, 36 | "VK_FORMAT_R8G8B8A8_UNORM": { 37 | "VkFormatProperties2": { 38 | "formatProperties": { 39 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT" ], 40 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT" ], 41 | "bufferFeatures": [ "VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR" ] 42 | } 43 | }, 44 | "VkFormatProperties3": { 45 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT" ], 46 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT" ], 47 | "bufferFeatures": [ "VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT" ] 48 | }, 49 | } 50 | } 51 | } 52 | }, 53 | "profiles": { 54 | "VP_LUNARG_test_formats": { 55 | "version": 1, 56 | "api-version": "1.3.204", 57 | "label": "LunarG Profiles Structure unit test", 58 | "description": "For schema unit test on C.I.", 59 | "contributors": { 60 | "Christophe Riccio": { 61 | "company": "LunarG", 62 | "email": "christophe@lunarg.com", 63 | "github": "christophe-lunarg", 64 | "contact": true 65 | } 66 | }, 67 | "history": [ 68 | { 69 | "revision": 1, 70 | "date": "2021-12-08", 71 | "author": "Christophe Riccio", 72 | "comment": "Initial revision" 73 | } 74 | ], 75 | "capabilities": [ 76 | "baseline" 77 | ] 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_instance_extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "extensions": { 6 | "VK_KHR_get_physical_device_properties2": 1 7 | } 8 | } 9 | }, 10 | "profiles": { 11 | "VP_LUNARG_test_instance_extensions": { 12 | "version": 1, 13 | "api-version": "1.0.198", 14 | "label": "Instance extensions", 15 | "description": "Unit test file", 16 | "contributors": { 17 | "Christophe Riccio": { 18 | "company": "LunarG", 19 | "email": "christophe@lunarg.com", 20 | "github": "christophe-lunarg", 21 | "contact": true 22 | } 23 | }, 24 | "history": [ 25 | { 26 | "revision": 1, 27 | "date": "2021-12-08", 28 | "author": "Christophe Riccio", 29 | "comment": "Initial revision" 30 | } 31 | ], 32 | "capabilities": [ 33 | "baseline" 34 | ] 35 | } 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_required_profiles.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.2-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "properties": { 6 | "VkPhysicalDeviceProperties": { 7 | "limits": { 8 | "maxImageDimension2D": 4096 9 | } 10 | } 11 | } 12 | } 13 | }, 14 | "profiles": { 15 | "VP_LUNARG_test_required_profiles": { 16 | "version": 1, 17 | "api-version": "1.1.142", 18 | "label": "LunarG Vulkan Desktop Portability 2021 profile", 19 | "description": "Common desktop platforms with drivers supporting Vulkan 1.1 on Windows and Linux.", 20 | "contributors": { 21 | "Christophe Riccio": { 22 | "company": "LunarG", 23 | "email": "christophe@lunarg.com", 24 | "github": "christophe-lunarg", 25 | "contact": true 26 | } 27 | }, 28 | "history": [ 29 | { 30 | "revision": 1, 31 | "date": "2021-12-20", 32 | "author": "Christophe Riccio", 33 | "comment": "Initial revision" 34 | } 35 | ], 36 | "profiles": [ 37 | "VP_LUNARG_test_api_version_profile" 38 | ], 39 | "capabilities": [ 40 | "baseline" 41 | ] 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_required_profiles2.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.2-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "properties": { 6 | "VkPhysicalDeviceProperties": { 7 | "limits": { 8 | "maxImageDimension1D": 2048 9 | } 10 | } 11 | } 12 | } 13 | }, 14 | "profiles": { 15 | "VP_LUNARG_test_required_profiles2": { 16 | "version": 1, 17 | "api-version": "1.1.142", 18 | "label": "LunarG Vulkan Desktop Portability 2021 profile", 19 | "description": "Common desktop platforms with drivers supporting Vulkan 1.1 on Windows and Linux.", 20 | "contributors": { 21 | "Christophe Riccio": { 22 | "company": "LunarG", 23 | "email": "christophe@lunarg.com", 24 | "github": "christophe-lunarg", 25 | "contact": true 26 | } 27 | }, 28 | "history": [ 29 | { 30 | "revision": 1, 31 | "date": "2021-12-20", 32 | "author": "Christophe Riccio", 33 | "comment": "Initial revision" 34 | } 35 | ], 36 | "profiles": [ 37 | "VP_LUNARG_test_required_profiles" 38 | ], 39 | "capabilities": [ 40 | "baseline" 41 | ] 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_selecting_profile.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "properties": { 6 | "VkPhysicalDeviceProperties": { 7 | "limits": { 8 | "maxImageDimension1D": 4096 9 | } 10 | } 11 | } 12 | }, 13 | "macos-specific": { 14 | "properties": { 15 | "VkPhysicalDeviceProperties": { 16 | "limits": { 17 | "maxImageDimension1D": 2048 18 | } 19 | } 20 | } 21 | } 22 | }, 23 | "profiles": { 24 | "VP_LUNARG_test_selecting_profile_subset": { 25 | "version": 1, 26 | "status": "BETA", 27 | "api-version": "1.1.142", 28 | "label": "LunarG Vulkan Desktop Portability 2021 subset profile", 29 | "description": "Common desktop platforms with drivers supporting Vulkan 1.1 on macOS.", 30 | "contributors": { 31 | "Christophe Riccio": { 32 | "company": "LunarG", 33 | "email": "christophe@lunarg.com", 34 | "github": "christophe-lunarg", 35 | "contact": true 36 | } 37 | }, 38 | "history": [ 39 | { 40 | "revision": 1, 41 | "date": "2021-12-20", 42 | "author": "Christophe Riccio", 43 | "comment": "Initial revision" 44 | } 45 | ], 46 | "capabilities": [ 47 | "baseline", 48 | "macos-specific" 49 | ], 50 | "fallback": [ "VP_LUNARG_desktop_portability_2021" ] 51 | }, 52 | "VP_LUNARG_test_selecting_profile": { 53 | "version": 1, 54 | "api-version": "1.1.142", 55 | "label": "LunarG Vulkan Desktop Portability 2021 profile", 56 | "description": "Common desktop platforms with drivers supporting Vulkan 1.1 on Windows and Linux.", 57 | "contributors": { 58 | "Christophe Riccio": { 59 | "company": "LunarG", 60 | "email": "christophe@lunarg.com", 61 | "github": "christophe-lunarg", 62 | "contact": true 63 | } 64 | }, 65 | "history": [ 66 | { 67 | "revision": 1, 68 | "date": "2021-12-20", 69 | "author": "Christophe Riccio", 70 | "comment": "Initial revision" 71 | } 72 | ], 73 | "capabilities": [ 74 | "baseline" 75 | ] 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_structure_complex.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "extensions": {}, 6 | "features": {}, 7 | "properties": {}, 8 | "formats": {}, 9 | "queueFamiliesProperties": [] 10 | }, 11 | "unused": { 12 | } 13 | }, 14 | "profiles": { 15 | "VP_LUNARG_test_structure_complex": { 16 | "version": 1, 17 | "api-version": "1.2.198", 18 | "label": "LunarG Profiles Structure Complex unit test", 19 | "description": "For schema unit test on C.I.", 20 | "contributors": { 21 | "Christophe Riccio": { 22 | "company": "LunarG", 23 | "email": "christophe@lunarg.com", 24 | "github": "christophe-lunarg", 25 | "contact": true 26 | } 27 | }, 28 | "history": [ 29 | { 30 | "revision": 1, 31 | "date": "2021-12-08", 32 | "author": "Christophe Riccio", 33 | "comment": "Initial revision" 34 | } 35 | ], 36 | "capabilities": [ 37 | "baseline" 38 | ] 39 | } 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_structure_fallback.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": {}, 5 | "advanced": {} 6 | }, 7 | "profiles": { 8 | "VP_LUNARG_test_structure_fallback": { 9 | "version": 1, 10 | "api-version": "1.2.198", 11 | "label": "LunarG Profiles Structure Complex unit test", 12 | "description": "For schema unit test on C.I.", 13 | "contributors": { 14 | "Christophe Riccio": { 15 | "company": "LunarG", 16 | "email": "christophe@lunarg.com", 17 | "github": "christophe-lunarg", 18 | "contact": true 19 | } 20 | }, 21 | "history": [ 22 | { 23 | "revision": 1, 24 | "date": "2021-12-08", 25 | "author": "Christophe Riccio", 26 | "comment": "Initial revision" 27 | } 28 | ], 29 | "capabilities": [ 30 | "baseline", 31 | "advanced" 32 | ], 33 | "fallback": [ "VP_LUNARG_test_structure_fallback_fallback" ] 34 | }, 35 | "VP_LUNARG_test_structure_fallback_fallback": { 36 | "version": 1, 37 | "api-version": "1.2.198", 38 | "label": "LunarG Profiles Structure Complex fallback unit test", 39 | "description": "For schema unit test on C.I.", 40 | "contributors": { 41 | "Christophe Riccio": { 42 | "company": "LunarG", 43 | "email": "christophe@lunarg.com", 44 | "github": "christophe-lunarg", 45 | "contact": true 46 | } 47 | }, 48 | "history": [ 49 | { 50 | "revision": 1, 51 | "date": "2021-12-08", 52 | "author": "Christophe Riccio", 53 | "comment": "Initial revision" 54 | } 55 | ], 56 | "capabilities": [ 57 | "baseline" 58 | ] 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_structure_simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": {}, 5 | "advanced": {} 6 | }, 7 | "profiles": { 8 | "VP_LUNARG_test_structure_simple": { 9 | "version": 1, 10 | "api-version": "1.2.198", 11 | "label": "LunarG Profiles Structure unit test", 12 | "description": "For schema unit test on C.I.", 13 | "contributors": { 14 | "Christophe Riccio": { 15 | "company": "LunarG", 16 | "email": "christophe@lunarg.com", 17 | "github": "christophe-lunarg", 18 | "contact": true 19 | } 20 | }, 21 | "history": [ 22 | { 23 | "revision": 1, 24 | "date": "2021-12-08", 25 | "author": "Christophe Riccio", 26 | "comment": "Initial revision" 27 | } 28 | ], 29 | "capabilities": [ 30 | "baseline" 31 | ] 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_variants.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baselineA": { 5 | "extensions": { 6 | "VK_EXT_inline_uniform_block": 1, 7 | "VK_KHR_16bit_storage": 1 8 | }, 9 | "features": { 10 | "VkPhysicalDeviceFeatures": { 11 | "depthClamp": false, 12 | "depthBiasClamp": true 13 | }, 14 | "VkPhysicalDevice16BitStorageFeaturesKHR": { 15 | "storageBuffer16BitAccess": true, 16 | "uniformAndStorageBuffer16BitAccess": false 17 | } 18 | }, 19 | "properties": { 20 | "VkPhysicalDeviceProperties": { 21 | "limits": { 22 | "maxImageDimension1D": 2048 23 | } 24 | }, 25 | "VkPhysicalDeviceInlineUniformBlockPropertiesEXT": { 26 | "maxDescriptorSetInlineUniformBlocks": 4 27 | } 28 | } 29 | }, 30 | "baselineB": { 31 | "extensions": { 32 | "VK_EXT_inline_uniform_block": 1, 33 | "VK_KHR_16bit_storage": 1 34 | }, 35 | "features": { 36 | "VkPhysicalDeviceFeatures": { 37 | "drawIndirectFirstInstance": false, 38 | "imageCubeArray": true 39 | }, 40 | "VkPhysicalDevice16BitStorageFeaturesKHR": { 41 | "storagePushConstant16": true, 42 | "storageInputOutput16": false 43 | } 44 | }, 45 | "properties": { 46 | "VkPhysicalDeviceProperties": { 47 | "limits": { 48 | "maxImageDimension2D": 1024 49 | } 50 | }, 51 | "VkPhysicalDeviceInlineUniformBlockPropertiesEXT": { 52 | "maxInlineUniformBlockSize": 2048 53 | } 54 | } 55 | } 56 | }, 57 | "profiles": { 58 | "VP_LUNARG_test_variants": { 59 | "version": 1, 60 | "api-version": "1.0.198", 61 | "label": "Test variants", 62 | "description": "Unit test file", 63 | "contributors": { 64 | "Christophe Riccio": { 65 | "company": "LunarG", 66 | "email": "christophe@lunarg.com", 67 | "github": "christophe-lunarg", 68 | "contact": true 69 | } 70 | }, 71 | "history": [ 72 | { 73 | "revision": 1, 74 | "date": "2023-04-05", 75 | "author": "Christophe Riccio", 76 | "comment": "Initial revision" 77 | } 78 | ], 79 | "capabilities": [ 80 | [ "baselineA", "baselineB" ] 81 | ] 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /profiles/test/data/VP_LUNARG_test_vkformatproperties.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.khronos.org/vulkan/profiles-0.8.0-204.json#", 3 | "capabilities": { 4 | "baseline": { 5 | "formats": { 6 | "VK_FORMAT_R8_UNORM": { 7 | "VkFormatProperties": { 8 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT", "VK_FORMAT_FEATURE_BLIT_SRC_BIT", "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT", "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT", "VK_FORMAT_FEATURE_TRANSFER_DST_BIT" ], 9 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT", "VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT", "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT", "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT", "VK_FORMAT_FEATURE_BLIT_SRC_BIT", "VK_FORMAT_FEATURE_BLIT_DST_BIT", "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT", "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT", "VK_FORMAT_FEATURE_TRANSFER_DST_BIT" ], 10 | "bufferFeatures": [ "VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT", "VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT", "VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT" ] 11 | } 12 | }, 13 | "VK_FORMAT_R8_SNORM": { 14 | "VkFormatProperties2": { 15 | "formatProperties": { 16 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT", "VK_FORMAT_FEATURE_BLIT_SRC_BIT", "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT", "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT", "VK_FORMAT_FEATURE_TRANSFER_DST_BIT" ], 17 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT", "VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT", "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT", "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT", "VK_FORMAT_FEATURE_BLIT_SRC_BIT", "VK_FORMAT_FEATURE_BLIT_DST_BIT", "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT", "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT", "VK_FORMAT_FEATURE_TRANSFER_DST_BIT" ], 18 | "bufferFeatures": [ "VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT", "VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT", "VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT" ] 19 | } 20 | } 21 | }, 22 | "VK_FORMAT_R8G8_UNORM": { 23 | "VkFormatProperties2": { 24 | "formatProperties": { 25 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT", "VK_FORMAT_FEATURE_BLIT_SRC_BIT", "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT", "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT", "VK_FORMAT_FEATURE_TRANSFER_DST_BIT" ], 26 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT", "VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT", "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT", "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT", "VK_FORMAT_FEATURE_BLIT_SRC_BIT", "VK_FORMAT_FEATURE_BLIT_DST_BIT", "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT", "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT", "VK_FORMAT_FEATURE_TRANSFER_DST_BIT" ], 27 | "bufferFeatures": [ "VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT", "VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT", "VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT" ] 28 | } 29 | } 30 | }, 31 | "VK_FORMAT_R8G8_SNORM": { 32 | "VkFormatProperties2KHR": { 33 | "formatProperties": { 34 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT", "VK_FORMAT_FEATURE_BLIT_SRC_BIT", "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT", "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT", "VK_FORMAT_FEATURE_TRANSFER_DST_BIT" ], 35 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT", "VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT", "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT", "VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT", "VK_FORMAT_FEATURE_BLIT_SRC_BIT", "VK_FORMAT_FEATURE_BLIT_DST_BIT", "VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT", "VK_FORMAT_FEATURE_TRANSFER_SRC_BIT", "VK_FORMAT_FEATURE_TRANSFER_DST_BIT" ], 36 | "bufferFeatures": [ "VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT", "VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT", "VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT" ] 37 | } 38 | } 39 | }, 40 | "VK_FORMAT_R8G8B8A8_UNORM": { 41 | "VkFormatProperties3": { 42 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT" ], 43 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT", "VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT" ], 44 | "bufferFeatures": [ "VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT", "VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT_KHR" ] 45 | } 46 | }, 47 | "VK_FORMAT_R8G8B8A8_SNORM": { 48 | "VkFormatProperties3KHR": { 49 | "linearTilingFeatures": [ "VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT_KHR" ], 50 | "optimalTilingFeatures": [ "VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT_KHR", "VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT_KHR" ], 51 | "bufferFeatures": [ "VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR", "VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT_KHR" ] 52 | } 53 | } 54 | } 55 | } 56 | }, 57 | "profiles": { 58 | "VP_LUNARG_test_vkformatproperties": { 59 | "version": 1, 60 | "api-version": "1.2.198", 61 | "label": "LunarG VkFormatProperties unit tests", 62 | "description": "LunarG VkFormatProperties unit tests", 63 | "contributors": { 64 | "Christophe Riccio": { 65 | "company": "LunarG", 66 | "email": "christophe@lunarg.com", 67 | "github": "christophe-lunarg", 68 | "contact": true 69 | } 70 | }, 71 | "history": [ 72 | { 73 | "revision": 1, 74 | "date": "2021-12-08", 75 | "author": "Christophe Riccio", 76 | "comment": "Initial revision" 77 | } 78 | ], 79 | "capabilities": [ 80 | "baseline" 81 | ] 82 | } 83 | } 84 | } 85 | 86 | -------------------------------------------------------------------------------- /profiles/test/test.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021-2022 Valve Corporation 3 | * Copyright (c) 2021-2022 LunarG, Inc. 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | * 17 | * Authors: 18 | * - Christophe Riccio 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #include 26 | 27 | #if defined(_WIN32) 28 | #include 29 | #include 30 | #include 31 | #endif 32 | 33 | struct DisableDebugPopup { 34 | DisableDebugPopup() { 35 | #if defined(_WIN32) 36 | // Avoid "Abort, Retry, Ignore" dialog boxes 37 | SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOALIGNMENTFAULTEXCEPT | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX); 38 | _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE); 39 | _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); 40 | _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); 41 | _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); 42 | _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE); 43 | _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); 44 | #endif 45 | } 46 | }; 47 | 48 | static DisableDebugPopup disableDebugPopup; 49 | 50 | static const float DEFAULT_QUEUE_PRIORITY(0.0f); 51 | 52 | class TestScaffold { 53 | public: 54 | VkInstance instance; 55 | VkPhysicalDevice physicalDevice; 56 | uint32_t queueFamilyIndex; 57 | VkDeviceQueueCreateInfo queueCreateInfo; 58 | 59 | TestScaffold() : instance(VK_NULL_HANDLE), physicalDevice(VK_NULL_HANDLE), queueFamilyIndex(0), queueCreateInfo{} { 60 | VkApplicationInfo appInfo{}; 61 | appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO; 62 | appInfo.pApplicationName = "Testing scaffold"; 63 | appInfo.applicationVersion = VK_MAKE_VERSION(1, 2, 0); 64 | appInfo.pEngineName = "No Engine"; 65 | appInfo.engineVersion = VK_MAKE_VERSION(1, 2, 0); 66 | appInfo.apiVersion = VK_API_VERSION_1_2; 67 | 68 | VkInstanceCreateInfo createInfo{}; 69 | createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; 70 | createInfo.pApplicationInfo = &appInfo; 71 | VkResult res = vkCreateInstance(&createInfo, nullptr, &instance); 72 | EXPECT_TRUE(res == VK_SUCCESS); 73 | 74 | uint32_t deviceCount = 0; 75 | vkEnumeratePhysicalDevices(instance, &deviceCount, nullptr); 76 | EXPECT_TRUE(deviceCount > 0); 77 | 78 | std::vector physicalDevices(deviceCount); 79 | vkEnumeratePhysicalDevices(instance, &deviceCount, physicalDevices.data()); 80 | physicalDevice = physicalDevices[0]; 81 | queueCreateInfo = {}; 82 | uint32_t queueFamilyCount; 83 | vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, &queueFamilyCount, nullptr); 84 | std::vector queueFamilyProperties(queueFamilyCount); 85 | vkGetPhysicalDeviceQueueFamilyProperties(physicalDevice, &queueFamilyCount, queueFamilyProperties.data()); 86 | for (uint32_t i = 0; i < static_cast(queueFamilyProperties.size()); ++i) { 87 | if (queueFamilyProperties[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) { 88 | queueFamilyIndex = i; 89 | queueCreateInfo.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; 90 | queueCreateInfo.queueFamilyIndex = i; 91 | queueCreateInfo.queueCount = 1; 92 | queueCreateInfo.pQueuePriorities = &DEFAULT_QUEUE_PRIORITY; 93 | break; 94 | } 95 | } 96 | } 97 | }; 98 | 99 | -------------------------------------------------------------------------------- /scripts/known_good.json: -------------------------------------------------------------------------------- 1 | { 2 | "repos": [ 3 | { 4 | "name": "Vulkan-Headers", 5 | "url": "https://github.com/KhronosGroup/Vulkan-Headers.git", 6 | "sub_dir": "Vulkan-Headers", 7 | "build_dir": "Vulkan-Headers/build", 8 | "install_dir": "Vulkan-Headers/build/install", 9 | "cmake_options": [ 10 | "-DVULKAN_HEADERS_ENABLE_MODULE=OFF" 11 | ], 12 | "commit": "v1.4.316" 13 | }, 14 | { 15 | "name": "Vulkan-Utility-Libraries", 16 | "url": "https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git", 17 | "sub_dir": "Vulkan-Utility-Libraries", 18 | "build_dir": "Vulkan-Utility-Libraries/build", 19 | "install_dir": "Vulkan-Utility-Libraries/build/install", 20 | "commit": "v1.4.316", 21 | "deps": [ 22 | { 23 | "var_name": "VULKAN_HEADERS_INSTALL_DIR", 24 | "repo_name": "Vulkan-Headers" 25 | } 26 | ] 27 | }, 28 | { 29 | "name": "Vulkan-Loader", 30 | "url": "https://github.com/KhronosGroup/Vulkan-Loader.git", 31 | "sub_dir": "Vulkan-Loader", 32 | "build_dir": "Vulkan-Loader/build", 33 | "install_dir": "Vulkan-Loader/build/install", 34 | "commit": "v1.4.316", 35 | "deps": [ 36 | { 37 | "var_name": "VULKAN_HEADERS_INSTALL_DIR", 38 | "repo_name": "Vulkan-Headers" 39 | } 40 | ], 41 | "build_platforms": [ 42 | "windows", 43 | "linux", 44 | "darwin" 45 | ], 46 | "optional": [ 47 | "tests" 48 | ] 49 | }, 50 | { 51 | "name": "jsoncpp", 52 | "url": "https://github.com/open-source-parsers/jsoncpp.git", 53 | "sub_dir": "jsoncpp", 54 | "build_dir": "jsoncpp/build", 55 | "install_dir": "jsoncpp/build/install", 56 | "commit": "1.9.6", 57 | "cmake_options": [ 58 | "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", 59 | "-DJSONCPP_WITH_TESTS=OFF", 60 | "-DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF", 61 | "-DJSONCPP_WITH_WARNING_AS_ERROR=OFF", 62 | "-DJSONCPP_WITH_PKGCONFIG_SUPPORT=OFF", 63 | "-DBUILD_SHARED_LIBS=OFF", 64 | "-DBUILD_STATIC_LIBS=ON", 65 | "-DBUILD_OBJECT_LIBS=OFF" 66 | ] 67 | }, 68 | { 69 | "name": "valijson", 70 | "url": "https://github.com/tristanpenman/valijson.git", 71 | "sub_dir": "valijson", 72 | "build_dir": "valijson/build", 73 | "install_dir": "valijson/build/install", 74 | "commit": "v1.0.2" 75 | }, 76 | { 77 | "name": "googletest", 78 | "url": "https://github.com/google/googletest.git", 79 | "sub_dir": "googletest", 80 | "build_dir": "googletest/build", 81 | "install_dir": "googletest/build/install", 82 | "cmake_options": [ 83 | "-DBUILD_GMOCK=OFF", 84 | "-Dgtest_force_shared_crt=ON", 85 | "-DBUILD_SHARED_LIBS=OFF" 86 | ], 87 | "commit": "v1.14.0", 88 | "optional": [ 89 | "tests" 90 | ] 91 | } 92 | ], 93 | "install_names": { 94 | "Vulkan-Headers": "VULKAN_HEADERS_INSTALL_DIR", 95 | "Vulkan-Utility-Libraries": "VULKAN_UTILITY_LIBRARIES_INSTALL_DIR", 96 | "Vulkan-Loader": "VULKAN_LOADER_INSTALL_DIR", 97 | "jsoncpp": "JSONCPP_INSTALL_DIR", 98 | "valijson": "VALIJSON_INSTALL_DIR", 99 | "googletest": "GOOGLETEST_INSTALL_DIR" 100 | } 101 | } 102 | --------------------------------------------------------------------------------