diff --git a/.cmake-format.py b/.cmake-format.py deleted file mode 100644 index 07d2f99..0000000 --- a/.cmake-format.py +++ /dev/null @@ -1,34 +0,0 @@ -# Configuration for cmake-format (v0.4.1, circa Jul 2018) -# https://github.com/cheshirekow/cmake_format - -# How wide to allow formatted cmake files -line_width = 132 - -# How many spaces to tab for indent -tab_size = 4 - -# If arglists are longer than this, break them always -max_subargs_per_line = 3 - -# If true, separate flow control names from their parentheses with a space -separate_ctrl_name_with_space = False - -# If true, separate function names from parentheses with a space -separate_fn_name_with_space = False - -# If a statement is wrapped to more than one line, than dangle the closing -# parenthesis on it's own line -dangle_parens = False - -# What character to use for bulleted lists -bullet_char = u'*' - -# What character to use as punctuation after numerals in an enumerated list -enum_char = u'.' - -# What style line endings to use in the output. -line_ending = u'unix' - -# Format command names consistently as 'lower' or 'upper' case -command_case = u'lower' - diff --git a/.gitattributes b/.gitattributes index ca85b46..41eae37 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,11 @@ +# ~~~ +# Copyright 2018-2023 The Khronos Group Inc. +# Copyright 2018-2023 Valve Corporation +# Copyright 2018-2023 LunarG, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# ~~~ + # See https://git-scm.com/docs/gitattributes # See https://help.github.com/articles/dealing-with-line-endings/ diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 7e00290..49893e2 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -15,11 +15,10 @@ This repository is responsible for the following files * BUILD.gn * BUILD.md -* cmake/ +* cmake/* * CMakeLists.txt * tests/* * CODE_OF_CONDUCT.md -* INTEGRATION.md * LICENSE.txt * README.md * Non-API headers diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b25b0eb --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +# ~~~ +# Copyright 2023 LunarG, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# ~~~ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 3 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..1d1657a --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,19 @@ + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..644583c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,66 @@ +# Copyright 2022-2023 LunarG, Inc. +# Copyright 2023-2024 RasterGrid Kft. +# +# SPDX-License-Identifier: Apache-2.0 + +name: ci + +on: + push: + pull_request: + branches: + - main + - sc_main + +env: + CMAKE_GENERATOR: Ninja + +permissions: + contents: read + +jobs: + cmake: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, windows-latest, macos-latest ] + cmake-version: [ '3.15', 'latest'] + steps: + - uses: actions/checkout@v4 + - uses: lukka/get-cmake@latest + with: + cmakeVersion: ${{ matrix.cmake-version }} + - uses: ilammy/msvc-dev-cmd@v1 + - run: cmake -S . -B build -D BUILD_TESTS=ON -G Ninja -DVULKANSC=ON + - run: cmake --build build + - run: cmake --install build --prefix ${GITHUB_WORKSPACE}/build/install + - run: ctest --output-on-failure + working-directory: build + + cmake-combined-headers: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, windows-latest, macos-latest ] + cmake-version: [ '3.15', 'latest'] + steps: + - uses: actions/checkout@v4 + - uses: lukka/get-cmake@latest + with: + cmakeVersion: ${{ matrix.cmake-version }} + - uses: actions/setup-python@v4 + with: + python-version: '3.8' + - uses: ilammy/msvc-dev-cmd@v1 + - run: cmake -S . -B build -D BUILD_TESTS=ON -G Ninja -DVULKANSC=ON -DGEN_VULKANSC_COMBINED=ON + - run: cmake --build build + - run: cmake --install build --prefix ${GITHUB_WORKSPACE}/build/install + - run: ctest --output-on-failure + working-directory: build + + reuse: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v2 diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml deleted file mode 100644 index 4bfc10a..0000000 --- a/.github/workflows/linux.yml +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright (c) 2022-2023 LunarG, Inc. -# Copyright (c) 2023-2023 RasterGrid Kft. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: Linux - -on: - push: - pull_request: - branches: - - main - - sc_main - -jobs: - ubuntu-cmake-install: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: lukka/get-cmake@latest - with: - cmakeVersion: 3.17.0 - - name: Configure VulkanSC-Headers - run: cmake -S . -B build -G "Ninja" -DVULKANSC=ON - - name: Install VulkanSC-Headers - run: cmake --install build --prefix ${GITHUB_WORKSPACE}/build/install - - name: Test VulkanSC-Headers find_package support - run: cmake -S tests/find_package -B build/tests/find_package -D CMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/build/install - - ubuntu-cmake-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: lukka/get-cmake@latest - with: - cmakeVersion: 3.25.0 - - name: Configure VulkanSC-Headers - run: cmake -S . -B build -D BUILD_TESTS=ON --log-level=DEBUG -G "Ninja" -DVULKANSC=ON - - name: Build VulkanSC-Headers Tests - run: cmake --build build - - test-cmake-minimum: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: lukka/get-cmake@latest - with: - cmakeVersion: 3.15.0 - - uses: actions/setup-python@v4 - with: - python-version: '3.8' - - name: Install Python dependencies - run: python3 -m pip install pyparsing - - name: Configure VulkanSC-Headers - run: cmake -S . -B build/ -G "Ninja" --loglevel=DEBUG -DVULKANSC=ON - - name: Install VulkanSC-Headers - run: cmake --install build/ --prefix build/install - - ubuntu-cmake-combined-install: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: lukka/get-cmake@latest - with: - cmakeVersion: 3.17.0 - - uses: actions/setup-python@v4 - with: - python-version: '3.8' - - name: Install Python dependencies - run: python3 -m pip install pyparsing - - name: Configure VulkanSC-Headers - run: cmake -S . -B build -G "Ninja" -DVULKANSC=ON -DGEN_VULKANSC_COMBINED=ON - - name: Build VulkanSC-Headers - run: cmake --build build - - name: Install VulkanSC-Headers - run: cmake --install build --prefix ${GITHUB_WORKSPACE}/build/install - - name: Test VulkanSC-Headers find_package support - run: cmake -S tests/find_package -B build/tests/find_package -D CMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/build/install - - ubuntu-cmake-combined-tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: lukka/get-cmake@latest - with: - cmakeVersion: 3.25.0 - - uses: actions/setup-python@v4 - with: - python-version: '3.8' - - name: Install Python dependencies - run: python3 -m pip install pyparsing - - name: Configure VulkanSC-Headers - run: cmake -S . -B build -D BUILD_TESTS=ON --log-level=DEBUG -G "Ninja" -DVULKANSC=ON -DGEN_VULKANSC_COMBINED=ON - - name: Build VulkanSC-Headers - run: cmake --build build - - name: Build VulkanSC-Headers Tests - run: cmake --build build diff --git a/.gitignore b/.gitignore index 61df001..7f6900b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,11 @@ +# ~~~ +# Copyright 2018-2023 The Khronos Group Inc. +# Copyright 2018-2023 Valve Corporation +# Copyright 2018-2023 LunarG, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# ~~~ + # Python cache __pycache__ *.pyc diff --git a/BUILD.gn b/BUILD.gn index 7d7eded..d5f104d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1,17 +1,7 @@ -# Copyright (C) 2018-2023 The ANGLE Project Authors. -# Copyright (C) 2019-2023 LunarG, Inc. +# Copyright 2018-2023 The ANGLE Project Authors. +# Copyright 2019-2023 LunarG, Inc. # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 import("//build_overrides/vulkan_headers.gni") @@ -37,9 +27,15 @@ config("vulkan_headers_config") { if (is_fuchsia) { defines += [ "VK_USE_PLATFORM_FUCHSIA" ] } - if (is_mac) { + if (is_apple) { defines += [ "VK_USE_PLATFORM_METAL_EXT" ] } + if (is_mac) { + defines += [ "VK_USE_PLATFORM_MACOS_MVK" ] + } + if (is_ios) { + defines += [ "VK_USE_PLATFORM_IOS_MVK" ] + } if (defined(is_ggp) && is_ggp) { defines += [ "VK_USE_PLATFORM_GGP" ] } @@ -60,7 +56,15 @@ source_set("vulkan_headers") { "include/vulkan/vulkan.hpp", "include/vulkan/vulkan_core.h", "include/vulkan/vulkan_screen.h", + "include/vk_video/vulkan_video_codec_av1std_decode.h", + "include/vk_video/vulkan_video_codec_av1std.h", + "include/vk_video/vulkan_video_codec_h264std_decode.h", + "include/vk_video/vulkan_video_codec_h264std_encode.h", + "include/vk_video/vulkan_video_codec_h264std.h", + "include/vk_video/vulkan_video_codec_h265std_decode.h", + "include/vk_video/vulkan_video_codec_h265std_encode.h", + "include/vk_video/vulkan_video_codec_h265std.h", + "include/vk_video/vulkan_video_codecs_common.h", ] public_configs = [ ":vulkan_headers_config" ] } - diff --git a/BUILD.md b/BUILD.md index bb9fcc9..7df2f14 100644 --- a/BUILD.md +++ b/BUILD.md @@ -1,3 +1,9 @@ + + # Vulkan SC Build Instructions Build the Vulkan SC headers from this repository as follows: @@ -53,7 +59,5 @@ find_package(VulkanHeaders REQUIRED CONFIG) target_link_libraries(foobar PRIVATE Vulkan::Headers) -message(STATUS "Vulkan Headers Registry: ${VULKAN_HEADERS_REGISTRY_DIRECTORY}") - -message(STATUS "Vulkan Headers Version: ${VulkanHeaders_VERSION}") +message(STATUS "Vulkan SC Headers Version: ${VulkanHeaders_VERSION}") ``` diff --git a/CMakeLists.txt b/CMakeLists.txt index aa82d34..f525923 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,19 +1,10 @@ # ~~~ -# Copyright (c) 2018-2023 Valve Corporation -# Copyright (c) 2018-2023 LunarG, Inc. -# Copyright (c) 2023-2023 RasterGrid Kft. +# Copyright 2018-2023 The Khronos Group Inc. +# Copyright 2018-2023 Valve Corporation +# Copyright 2018-2023 LunarG, Inc. +# Copyright 2023-2024 RasterGrid Kft. # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 # ~~~ cmake_minimum_required(VERSION 3.15...3.25) @@ -26,17 +17,22 @@ set(GEN_VULKANSC_COMBINED OFF CACHE BOOL "Generate combined headers") # Add preprocessor definition for Vulkan SC. # This "VULKANSC" definition can be used to deactivate the loader code that is not required for the VULKANSC builds. if(VULKANSC) -add_definitions(-DVULKANSC) + add_definitions(-DVULKANSC) endif() +# NOTE: Parsing the version like this is suboptimal but neccessary due to our release process: +# https://github.com/KhronosGroup/Vulkan-Headers/pull/346 +# +# As shown a more robust approach would be just to add basic test code to check the project version. function(vlk_get_header_version) if(VULKANSC) - set(vulkan_core_header_file "${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan/vulkan_sc_core.h") + set(vulkan_core_header_name "vulkan_sc_core.h") else() - set(vulkan_core_header_file "${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan/vulkan_core.h") + set(vulkan_core_header_name "vulkan_core.h") endif() + set(vulkan_core_header_file "${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan/${vulkan_core_header_name}") if (NOT EXISTS ${vulkan_core_header_file}) - message(FATAL_ERROR "Couldn't find vulkan_core.h!") + message(FATAL_ERROR "Couldn't find ${vulkan_core_header_name}!") endif() file(READ ${vulkan_core_header_file} ver) @@ -72,6 +68,7 @@ endif() if (PROJECT_IS_TOP_LEVEL) option(BUILD_TESTS "Build the tests") if (BUILD_TESTS) + enable_testing() add_subdirectory(tests) endif() @@ -79,9 +76,6 @@ if (PROJECT_IS_TOP_LEVEL) include(CMakePackageConfigHelpers) include(cmake/GenVulkanSCCombined.cmake) - set(VLK_REGISTRY_DIR "${CMAKE_INSTALL_DATADIR}/vulkan") - - # Install header files if(NOT VULKANSC) install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/vk_video" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) endif() @@ -89,29 +83,14 @@ if (PROJECT_IS_TOP_LEVEL) install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) endif() # Preserve source permissions https://github.com/KhronosGroup/Vulkan-Headers/issues/336 - install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/registry" DESTINATION ${VLK_REGISTRY_DIR} USE_SOURCE_PERMISSIONS) - - set(cmake_files_install_dir ${CMAKE_INSTALL_DATADIR}/cmake/VulkanHeaders/) + install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/registry" DESTINATION "${CMAKE_INSTALL_DATADIR}/vulkan" USE_SOURCE_PERMISSIONS) set_target_properties(Vulkan-Headers PROPERTIES EXPORT_NAME "Headers") - install(TARGETS Vulkan-Headers EXPORT VulkanHeadersTargets INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - - install(EXPORT VulkanHeadersTargets FILE VulkanHeadersTargets.cmake NAMESPACE "Vulkan::" DESTINATION ${cmake_files_install_dir}) - - set(vulkan_headers_config "${CMAKE_CURRENT_BINARY_DIR}/VulkanHeadersConfig.cmake") - set(VULKAN_HEADERS_REGISTRY_DIRECTORY "${VLK_REGISTRY_DIR}/registry") - - configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/VulkanHeadersConfig.cmake.in ${vulkan_headers_config} - INSTALL_DESTINATION ${cmake_files_install_dir} - PATH_VARS VULKAN_HEADERS_REGISTRY_DIRECTORY - NO_SET_AND_CHECK_MACRO - NO_CHECK_REQUIRED_COMPONENTS_MACRO - ) - - set(config_version "${CMAKE_CURRENT_BINARY_DIR}/VulkanHeadersConfigVersion.cmake") - - write_basic_package_version_file(${config_version} COMPATIBILITY SameMajorVersion ARCH_INDEPENDENT) + install(TARGETS Vulkan-Headers EXPORT VulkanHeadersConfig INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(EXPORT VulkanHeadersConfig NAMESPACE "Vulkan::" DESTINATION "share/cmake/VulkanHeaders") - install(FILES ${config_version} ${vulkan_headers_config} DESTINATION ${cmake_files_install_dir}) + set(version_config "${CMAKE_CURRENT_BINARY_DIR}/generated/VulkanHeadersConfigVersion.cmake") + write_basic_package_version_file("${version_config}" COMPATIBILITY SameMajorVersion ARCH_INDEPENDENT) + install(FILES "${version_config}" DESTINATION "share/cmake/VulkanHeaders") endif() diff --git a/CODE_OF_CONDUCT.adoc b/CODE_OF_CONDUCT.adoc new file mode 100644 index 0000000..bd635bb --- /dev/null +++ b/CODE_OF_CONDUCT.adoc @@ -0,0 +1,10 @@ +// Copyright 2018-2023 The Khronos Group Inc. +// SPDX-License-Identifier: MIT + += Code of Conduct + +A reminder that this repository is managed by the Khronos Group. +Interactions here should follow the +https://www.khronos.org/about/code-of-conduct[Khronos Code of Conduct], +which prohibits aggressive or derogatory language. Please keep the +discussion friendly and civil. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index a11610b..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1 +0,0 @@ -A reminder that this issue tracker is managed by the Khronos Group. Interactions here should follow the Khronos Code of Conduct (https://www.khronos.org/developers/code-of-conduct), which prohibits aggressive or derogatory language. Please keep the discussion friendly and civil. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f5d407c..0a45641 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,9 @@ + + # CONTRIBUTING Please note when contributing what files this repository actually is responsible for. @@ -8,11 +14,10 @@ The majority for the Vulkan SC headers come from [VulkanSC-Docs](https://github. * BUILD.gn * BUILD.md -* cmake/ +* cmake/* * CMakeLists.txt * tests/* * CODE_OF_CONDUCT.md -* INTEGRATION.md * LICENSE.txt * README.md * Non-API headers diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..d6a0648 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,18 @@ +Copyright 2015-2023 The Khronos Group Inc. + +Files in this repository fall under one of these licenses: + +- `Apache-2.0` +- `MIT` + +Note: With the exception of `parse_dependency.py` the files using `MIT` license +also fall under `Apache-2.0`. Example: + +``` +SPDX-License-Identifier: Apache-2.0 OR MIT +``` + +Full license text of these licenses is available at: + + * Apache-2.0: https://opensource.org/licenses/Apache-2.0 + * MIT: https://opensource.org/licenses/MIT diff --git a/LICENSE.txt b/LICENSES/Apache-2.0.txt similarity index 100% rename from LICENSE.txt rename to LICENSES/Apache-2.0.txt diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 0000000..8495fe9 --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2015-2023 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +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 AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index e44b957..5264a8b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ + + # VulkanSC-Headers Vulkan SC header files and API registry diff --git a/cmake/GenVulkanSCCombined.cmake b/cmake/GenVulkanSCCombined.cmake index de647ae..45cc689 100644 --- a/cmake/GenVulkanSCCombined.cmake +++ b/cmake/GenVulkanSCCombined.cmake @@ -47,7 +47,9 @@ if(GEN_VULKANSC_COMBINED) ${CMAKE_CURRENT_BINARY_DIR}/include/vk_video/vulkan_video_codec_h264std_encode.h ${CMAKE_CURRENT_BINARY_DIR}/include/vk_video/vulkan_video_codec_h265std.h ${CMAKE_CURRENT_BINARY_DIR}/include/vk_video/vulkan_video_codec_h265std_decode.h - ${CMAKE_CURRENT_BINARY_DIR}/include/vk_video/vulkan_video_codec_h265std_encode.h) + ${CMAKE_CURRENT_BINARY_DIR}/include/vk_video/vulkan_video_codec_h265std_encode.h + ${CMAKE_CURRENT_BINARY_DIR}/include/vk_video/vulkan_video_codec_av1std.h + ${CMAKE_CURRENT_BINARY_DIR}/include/vk_video/vulkan_video_codec_av1std_decode.h) foreach(COMBINED_VK_VIDEO_HEADER ${COMBINED_VK_VIDEO_HEADERS}) get_filename_component(COMBINED_VK_VIDEO_HEADER_FILENAME ${COMBINED_VK_VIDEO_HEADER} NAME) diff --git a/cmake/vksc_combined.h.in b/cmake/vksc_combined.h.in index c1ce409..ef94006 100644 --- a/cmake/vksc_combined.h.in +++ b/cmake/vksc_combined.h.in @@ -2,7 +2,7 @@ #define VULKAN_H_ 1 /* -** Copyright 2015-2022 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/include/vulkan/vk_icd.h b/include/vulkan/vk_icd.h index 72eaaab..ab61ec4 100644 --- a/include/vulkan/vk_icd.h +++ b/include/vulkan/vk_icd.h @@ -1,23 +1,9 @@ -// -// File: vk_icd.h -// /* - * Copyright (c) 2015-2023 LunarG, Inc. - * Copyright (c) 2015-2023 The Khronos Group Inc. - * Copyright (c) 2015-2023 Valve Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2015-2023 The Khronos Group Inc. + * Copyright 2015-2023 Valve Corporation + * Copyright 2015-2023 LunarG, Inc. * + * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -83,7 +69,7 @@ extern "C" { #endif VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pVersion); VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(VkInstance instance, const char* pName); - VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance isntance, const char* pName); + VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance instance, const char* pName); #if defined(VK_USE_PLATFORM_WIN32_KHR) VKAPI_ATTR VkResult VKAPI_CALL vk_icdEnumerateAdapterPhysicalDevices(VkInstance instance, LUID adapterLUID, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices); diff --git a/include/vulkan/vk_layer.h b/include/vulkan/vk_layer.h index e22b277..d400f1d 100644 --- a/include/vulkan/vk_layer.h +++ b/include/vulkan/vk_layer.h @@ -1,23 +1,9 @@ -// -// File: vk_layer.h -// /* - * Copyright (c) 2015-2023 LunarG, Inc. - * Copyright (c) 2015-2023 The Khronos Group Inc. - * Copyright (c) 2015-2023 Valve Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Copyright 2015-2023 The Khronos Group Inc. + * Copyright 2015-2023 Valve Corporation + * Copyright 2015-2023 LunarG, Inc. * + * SPDX-License-Identifier: Apache-2.0 */ #pragma once @@ -32,14 +18,6 @@ #include "vulkan.h" #endif -#if defined(__GNUC__) && __GNUC__ >= 4 -#define VK_LAYER_EXPORT __attribute__((visibility("default"))) -#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590) -#define VK_LAYER_EXPORT __attribute__((visibility("default"))) -#else -#define VK_LAYER_EXPORT -#endif - #define MAX_NUM_UNKNOWN_EXTS 250 // Loader-Layer version negotiation API. Versions add the following features: diff --git a/include/vulkan/vk_platform.h b/include/vulkan/vk_platform.h index ed67a60..0ecd4f6 100644 --- a/include/vulkan/vk_platform.h +++ b/include/vulkan/vk_platform.h @@ -2,7 +2,7 @@ // File: vk_platform.h // /* -** Copyright 2014-2023 The Khronos Group Inc. +** Copyright 2014-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/registry/apiconventions.py b/registry/apiconventions.py index 8d387ae..7efd609 100644 --- a/registry/apiconventions.py +++ b/registry/apiconventions.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -i # -# Copyright 2021-2023 The Khronos Group Inc. +# Copyright 2021-2024 The Khronos Group Inc. # SPDX-License-Identifier: Apache-2.0 # Generic alias for working group-specific API conventions interface. diff --git a/registry/cgenerator.py b/registry/cgenerator.py index ef8d681..f86658e 100644 --- a/registry/cgenerator.py +++ b/registry/cgenerator.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -i # -# Copyright 2013-2023 The Khronos Group Inc. +# Copyright 2013-2024 The Khronos Group Inc. # # SPDX-License-Identifier: Apache-2.0 diff --git a/registry/generator.py b/registry/generator.py index 5fb6370..dea2ffa 100644 --- a/registry/generator.py +++ b/registry/generator.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -i # -# Copyright 2013-2023 The Khronos Group Inc. +# Copyright 2013-2024 The Khronos Group Inc. # # SPDX-License-Identifier: Apache-2.0 """Base class for source/header/doc generators, as well as some utility functions.""" diff --git a/registry/genvk.py b/registry/genvk.py index 676c78c..7f2ec92 100755 --- a/registry/genvk.py +++ b/registry/genvk.py @@ -16,28 +16,8 @@ sys.path.append(os.path.abspath(os.path.dirname(__file__))) from cgenerator import CGeneratorOptions, COutputGenerator -# Vulkan SC modules -from json_parser import JSONParserGenerator, JSONParserOptions -from schema_generator import SchemaGeneratorOptions, SchemaOutputGenerator -from json_generator import JSONGeneratorOptions, JSONOutputGenerator -from json_h_generator import JSONHeaderOutputGenerator, JSONHeaderGeneratorOptions -from json_c_generator import JSONCOutputGenerator, JSONCGeneratorOptions - -from docgenerator import DocGeneratorOptions, DocOutputGenerator -from extensionmetadocgenerator import (ExtensionMetaDocGeneratorOptions, - ExtensionMetaDocOutputGenerator) -from interfacedocgenerator import InterfaceDocGenerator -from generator import write -from spirvcapgenerator import SpirvCapabilityOutputGenerator -from hostsyncgenerator import HostSynchronizationOutputGenerator -from formatsgenerator import FormatsOutputGenerator -from syncgenerator import SyncOutputGenerator -from jsgenerator import JSOutputGenerator -from pygenerator import PyOutputGenerator -from rubygenerator import RubyOutputGenerator from reflib import logDiag, logWarn, logErr, setLogFile from reg import Registry -from validitygenerator import ValidityOutputGenerator from apiconventions import APIConventions # Simple timer functions @@ -72,7 +52,7 @@ def makeGenOpts(args): by specified short names. The generator options incorporate the following parameters: - args is an parsed argument object; see below for the fields that are used.""" + args is a parsed argument object; see below for the fields that are used.""" global genOpts genOpts = {} @@ -107,10 +87,10 @@ def makeGenOpts(args): genpath = args.genpath # Generate MISRA C-friendly headers - misracstyle = args.misracstyle; + misracstyle = args.misracstyle # Generate MISRA C++-friendly headers - misracppstyle = args.misracppstyle; + misracppstyle = args.misracppstyle # Descriptive names for various regexp patterns used to select # versions and extensions @@ -128,7 +108,7 @@ def makeGenOpts(args): # The SPDX formatting below works around constraints of the 'reuse' tool prefixStrings = [ '/*', - '** Copyright 2015-2023 The Khronos Group Inc.', + '** Copyright 2015-2024 The Khronos Group Inc.', '**', '** SPDX-License-Identifier' + ': Apache-2.0', '*/', @@ -162,234 +142,252 @@ def makeGenOpts(args): isCTS = args.isCTS - # API include files for spec and ref pages - # Overwrites include subdirectories in spec source tree - # The generated include files do not include the calling convention - # macros (apientry etc.), unlike the header files. - # Because the 1.0 core branch includes ref pages for extensions, - # all the extension interfaces need to be generated, even though - # none are used by the core spec itself. - genOpts['apiinc'] = [ - DocOutputGenerator, - DocGeneratorOptions( - conventions = conventions, - filename = 'timeMarker', - directory = directory, - genpath = genpath, - apiname = defaultAPIName, - profile = None, - versions = featuresPat, - emitversions = featuresPat, - defaultExtensions = None, - addExtensions = addExtensionsPat, - removeExtensions = removeExtensionsPat, - emitExtensions = emitExtensionsPat, - prefixText = prefixStrings + vkPrefixStrings, - apicall = '', - apientry = '', - apientryp = '*', - alignFuncParam = 48, - expandEnumerants = False) - ] + # Try to set up specification generators if the needed modules are available + try: + from docgenerator import DocGeneratorOptions, DocOutputGenerator + from jsgenerator import JSOutputGenerator + from pygenerator import PyOutputGenerator + from rubygenerator import RubyOutputGenerator + from validitygenerator import ValidityOutputGenerator + from hostsyncgenerator import HostSynchronizationOutputGenerator + from extensionmetadocgenerator import (ExtensionMetaDocGeneratorOptions, + ExtensionMetaDocOutputGenerator) + from interfacedocgenerator import InterfaceDocGenerator + from spirvcapgenerator import SpirvCapabilityOutputGenerator + from formatsgenerator import FormatsOutputGenerator + from syncgenerator import SyncOutputGenerator + + # API include files for spec and ref pages + # Overwrites include subdirectories in spec source tree + # The generated include files do not include the calling convention + # macros (apientry etc.), unlike the header files. + # Because the 1.0 core branch includes ref pages for extensions, + # all the extension interfaces need to be generated, even though + # none are used by the core spec itself. + genOpts['apiinc'] = [ + DocOutputGenerator, + DocGeneratorOptions( + conventions = conventions, + filename = 'timeMarker', + directory = directory, + genpath = genpath, + apiname = defaultAPIName, + profile = None, + versions = featuresPat, + emitversions = featuresPat, + defaultExtensions = None, + addExtensions = addExtensionsPat, + removeExtensions = removeExtensionsPat, + emitExtensions = emitExtensionsPat, + prefixText = prefixStrings + vkPrefixStrings, + apicall = '', + apientry = '', + apientryp = '*', + alignFuncParam = 48, + expandEnumerants = False) + ] - # JavaScript, Python, and Ruby representations of API information, used - # by scripts that do not need to load the full XML. - genOpts['apimap.cjs'] = [ - JSOutputGenerator, - DocGeneratorOptions( - conventions = conventions, - filename = 'apimap.cjs', - directory = directory, - genpath = None, - apiname = defaultAPIName, - profile = None, - versions = featuresPat, - emitversions = featuresPat, - defaultExtensions = None, - addExtensions = addExtensionsPat, - removeExtensions = removeExtensionsPat, - emitExtensions = emitExtensionsPat, - reparentEnums = False) - ] + # JavaScript, Python, and Ruby representations of API information, used + # by scripts that do not need to load the full XML. + genOpts['apimap.cjs'] = [ + JSOutputGenerator, + DocGeneratorOptions( + conventions = conventions, + filename = 'apimap.cjs', + directory = directory, + genpath = None, + apiname = defaultAPIName, + profile = None, + versions = featuresPat, + emitversions = featuresPat, + defaultExtensions = None, + addExtensions = addExtensionsPat, + removeExtensions = removeExtensionsPat, + emitExtensions = emitExtensionsPat, + reparentEnums = False) + ] - genOpts['apimap.py'] = [ - PyOutputGenerator, - DocGeneratorOptions( - conventions = conventions, - filename = 'apimap.py', - directory = directory, - genpath = None, - apiname = defaultAPIName, - profile = None, - versions = featuresPat, - emitversions = featuresPat, - defaultExtensions = None, - addExtensions = addExtensionsPat, - removeExtensions = removeExtensionsPat, - emitExtensions = emitExtensionsPat, - reparentEnums = False) - ] + genOpts['apimap.py'] = [ + PyOutputGenerator, + DocGeneratorOptions( + conventions = conventions, + filename = 'apimap.py', + directory = directory, + genpath = None, + apiname = defaultAPIName, + profile = None, + versions = featuresPat, + emitversions = featuresPat, + defaultExtensions = None, + addExtensions = addExtensionsPat, + removeExtensions = removeExtensionsPat, + emitExtensions = emitExtensionsPat, + reparentEnums = False) + ] - genOpts['apimap.rb'] = [ - RubyOutputGenerator, - DocGeneratorOptions( - conventions = conventions, - filename = 'apimap.rb', - directory = directory, - genpath = None, - apiname = defaultAPIName, - profile = None, - versions = featuresPat, - emitversions = featuresPat, - defaultExtensions = None, - addExtensions = addExtensionsPat, - removeExtensions = removeExtensionsPat, - emitExtensions = emitExtensionsPat, - reparentEnums = False) - ] + genOpts['apimap.rb'] = [ + RubyOutputGenerator, + DocGeneratorOptions( + conventions = conventions, + filename = 'apimap.rb', + directory = directory, + genpath = None, + apiname = defaultAPIName, + profile = None, + versions = featuresPat, + emitversions = featuresPat, + defaultExtensions = None, + addExtensions = addExtensionsPat, + removeExtensions = removeExtensionsPat, + emitExtensions = emitExtensionsPat, + reparentEnums = False) + ] + # API validity files for spec + # + # requireCommandAliases is set to True because we need validity files + # for the command something is promoted to even when the promoted-to + # feature is not included. This avoids wordy includes of validity files. + genOpts['validinc'] = [ + ValidityOutputGenerator, + DocGeneratorOptions( + conventions = conventions, + filename = 'timeMarker', + directory = directory, + genpath = None, + apiname = defaultAPIName, + profile = None, + versions = featuresPat, + emitversions = featuresPat, + defaultExtensions = None, + addExtensions = addExtensionsPat, + removeExtensions = removeExtensionsPat, + emitExtensions = emitExtensionsPat, + requireCommandAliases = True, + ) + ] - # API validity files for spec - # - # requireCommandAliases is set to True because we need validity files - # for the command something is promoted to even when the promoted-to - # feature is not included. This avoids wordy includes of validity files. - genOpts['validinc'] = [ - ValidityOutputGenerator, - DocGeneratorOptions( - conventions = conventions, - filename = 'timeMarker', - directory = directory, - genpath = None, - apiname = defaultAPIName, - profile = None, - versions = featuresPat, - emitversions = featuresPat, - defaultExtensions = None, - addExtensions = addExtensionsPat, - removeExtensions = removeExtensionsPat, - emitExtensions = emitExtensionsPat, - requireCommandAliases = True, - ) - ] + # API host sync table files for spec + genOpts['hostsyncinc'] = [ + HostSynchronizationOutputGenerator, + DocGeneratorOptions( + conventions = conventions, + filename = 'timeMarker', + directory = directory, + genpath = None, + apiname = defaultAPIName, + profile = None, + versions = featuresPat, + emitversions = featuresPat, + defaultExtensions = None, + addExtensions = addExtensionsPat, + removeExtensions = removeExtensionsPat, + emitExtensions = emitExtensionsPat, + reparentEnums = False) + ] - # API host sync table files for spec - genOpts['hostsyncinc'] = [ - HostSynchronizationOutputGenerator, - DocGeneratorOptions( - conventions = conventions, - filename = 'timeMarker', - directory = directory, - genpath = None, - apiname = defaultAPIName, - profile = None, - versions = featuresPat, - emitversions = featuresPat, - defaultExtensions = None, - addExtensions = addExtensionsPat, - removeExtensions = removeExtensionsPat, - emitExtensions = emitExtensionsPat, - reparentEnums = False) - ] + # Extension metainformation for spec extension appendices + # Includes all extensions by default, but only so that the generated + # 'promoted_extensions_*' files refer to all extensions that were + # promoted to a core version. + genOpts['extinc'] = [ + ExtensionMetaDocOutputGenerator, + ExtensionMetaDocGeneratorOptions( + conventions = conventions, + filename = 'timeMarker', + directory = directory, + genpath = None, + apiname = defaultAPIName, + profile = None, + versions = featuresPat, + emitversions = None, + defaultExtensions = defaultExtensions, + addExtensions = addExtensionsPat, + removeExtensions = None, + emitExtensions = emitExtensionsPat) + ] - # Extension metainformation for spec extension appendices - # Includes all extensions by default, but only so that the generated - # 'promoted_extensions_*' files refer to all extensions that were - # promoted to a core version. - genOpts['extinc'] = [ - ExtensionMetaDocOutputGenerator, - ExtensionMetaDocGeneratorOptions( - conventions = conventions, - filename = 'timeMarker', - directory = directory, - genpath = None, - apiname = defaultAPIName, - profile = None, - versions = featuresPat, - emitversions = None, - defaultExtensions = defaultExtensions, - addExtensions = addExtensionsPat, - removeExtensions = None, - emitExtensions = emitExtensionsPat) - ] + # Version and extension interface docs for version/extension appendices + # Includes all extensions by default. + genOpts['interfaceinc'] = [ + InterfaceDocGenerator, + DocGeneratorOptions( + conventions = conventions, + filename = 'timeMarker', + directory = directory, + genpath = None, + apiname = defaultAPIName, + profile = None, + versions = featuresPat, + emitversions = featuresPat, + defaultExtensions = None, + addExtensions = addExtensionsPat, + removeExtensions = removeExtensionsPat, + emitExtensions = emitExtensionsPat, + reparentEnums = False) + ] - # Version and extension interface docs for version/extension appendices - # Includes all extensions by default. - genOpts['interfaceinc'] = [ - InterfaceDocGenerator, - DocGeneratorOptions( - conventions = conventions, - filename = 'timeMarker', - directory = directory, - genpath = None, - apiname = defaultAPIName, - profile = None, - versions = featuresPat, - emitversions = featuresPat, - defaultExtensions = None, - addExtensions = addExtensionsPat, - removeExtensions = removeExtensionsPat, - emitExtensions = emitExtensionsPat, - reparentEnums = False) - ] + genOpts['spirvcapinc'] = [ + SpirvCapabilityOutputGenerator, + DocGeneratorOptions( + conventions = conventions, + filename = 'timeMarker', + directory = directory, + genpath = None, + apiname = defaultAPIName, + profile = None, + versions = featuresPat, + emitversions = featuresPat, + defaultExtensions = None, + addExtensions = addExtensionsPat, + removeExtensions = removeExtensionsPat, + emitExtensions = emitExtensionsPat, + emitSpirv = emitSpirvPat, + reparentEnums = False) + ] - genOpts['spirvcapinc'] = [ - SpirvCapabilityOutputGenerator, - DocGeneratorOptions( - conventions = conventions, - filename = 'timeMarker', - directory = directory, - genpath = None, - apiname = defaultAPIName, - profile = None, - versions = featuresPat, - emitversions = featuresPat, - defaultExtensions = None, - addExtensions = addExtensionsPat, - removeExtensions = removeExtensionsPat, - emitExtensions = emitExtensionsPat, - emitSpirv = emitSpirvPat, - reparentEnums = False) - ] + # Used to generate various format chapter tables + genOpts['formatsinc'] = [ + FormatsOutputGenerator, + DocGeneratorOptions( + conventions = conventions, + filename = 'timeMarker', + directory = directory, + genpath = None, + apiname = defaultAPIName, + profile = None, + versions = featuresPat, + emitversions = featuresPat, + defaultExtensions = None, + addExtensions = addExtensionsPat, + removeExtensions = removeExtensionsPat, + emitExtensions = emitExtensionsPat, + emitFormats = emitFormatsPat, + reparentEnums = False) + ] - # Used to generate various format chapter tables - genOpts['formatsinc'] = [ - FormatsOutputGenerator, - DocGeneratorOptions( - conventions = conventions, - filename = 'timeMarker', - directory = directory, - genpath = None, - apiname = defaultAPIName, - profile = None, - versions = featuresPat, - emitversions = featuresPat, - defaultExtensions = None, - addExtensions = addExtensionsPat, - removeExtensions = removeExtensionsPat, - emitExtensions = emitExtensionsPat, - emitFormats = emitFormatsPat, - reparentEnums = False) - ] + # Used to generate various synchronization chapter tables + genOpts['syncinc'] = [ + SyncOutputGenerator, + DocGeneratorOptions( + conventions = conventions, + filename = 'timeMarker', + directory = directory, + genpath = None, + apiname = defaultAPIName, + profile = None, + versions = featuresPat, + emitversions = featuresPat, + defaultExtensions = None, + addExtensions = addExtensionsPat, + removeExtensions = removeExtensionsPat, + emitExtensions = emitExtensionsPat, + reparentEnums = False) + ] - # Used to generate various synchronization chapter tables - genOpts['syncinc'] = [ - SyncOutputGenerator, - DocGeneratorOptions( - conventions = conventions, - filename = 'timeMarker', - directory = directory, - genpath = None, - apiname = defaultAPIName, - profile = None, - versions = featuresPat, - emitversions = featuresPat, - defaultExtensions = None, - addExtensions = addExtensionsPat, - removeExtensions = removeExtensionsPat, - emitExtensions = emitExtensionsPat, - reparentEnums = False) - ] + except ImportError: + # Module dependencies are not available for spec generation + pass # Platform extensions, in their own header files # Each element of the platforms[] array defines information for @@ -413,9 +411,6 @@ def makeGenOpts(args): # the extension blocks. betaRequireExtensions = [ 'VK_KHR_portability_subset', - 'VK_KHR_video_encode_queue', - 'VK_EXT_video_encode_h264', - 'VK_EXT_video_encode_h265', 'VK_NV_displacement_micromap', 'VK_AMDX_shader_enqueue', ] @@ -605,47 +600,82 @@ def makeGenOpts(args): misracppstyle = misracppstyle) ] - genOpts['vk.json'] = [ - SchemaOutputGenerator, - SchemaGeneratorOptions( - conventions = conventions, - filename = 'vk.json', - directory = directory, - apiname = 'vulkansc', - profile = None, - versions = scVersions, - emitversions = scVersions, - defaultExtensions = 'vulkansc', - addExtensions = addExtensionsPat, - removeExtensions = removeExtensionsPat, - emitExtensions = emitExtensionsPat, - prefixText = prefixStrings + vkPrefixStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = False, - protectProto = '#ifndef', - protectProtoStr = 'VK_NO_PROTOTYPES', - apicall = 'VKAPI_ATTR ', - apientry = 'VKAPI_CALL ', - apientryp = 'VKAPI_PTR *', - alignFuncParam = 48) - ] + # Try to set up Vulkan SC JSON generators if the needed modules are available + try: + from json_parser import JSONParserGenerator, JSONParserOptions + from schema_generator import SchemaGeneratorOptions, SchemaOutputGenerator + from json_generator import JSONGeneratorOptions, JSONOutputGenerator + from json_h_generator import JSONHeaderOutputGenerator, JSONHeaderGeneratorOptions + from json_c_generator import JSONCOutputGenerator, JSONCGeneratorOptions + + genOpts['vk.json'] = [ + SchemaOutputGenerator, + SchemaGeneratorOptions( + conventions = conventions, + filename = 'vk.json', + directory = directory, + apiname = 'vulkansc', + profile = None, + versions = scVersions, + emitversions = scVersions, + defaultExtensions = 'vulkansc', + addExtensions = addExtensionsPat, + removeExtensions = removeExtensionsPat, + emitExtensions = emitExtensionsPat, + prefixText = prefixStrings + vkPrefixStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = False, + protectProto = '#ifndef', + protectProtoStr = 'VK_NO_PROTOTYPES', + apicall = 'VKAPI_ATTR ', + apientry = 'VKAPI_CALL ', + apientryp = 'VKAPI_PTR *', + alignFuncParam = 48) + ] - if vulkanLayer: - genOpts['vulkan_json_data.hpp'] = [ + if vulkanLayer: + genOpts['vulkan_json_data.hpp'] = [ + JSONOutputGenerator, + JSONGeneratorOptions( + conventions = conventions, + filename = 'vulkan_json_data.hpp', + directory = directory, + apiname = 'vulkan', + profile = None, + versions = featuresPat, + emitversions = featuresPat, + defaultExtensions = None, + addExtensions = addExtensionsPat, + removeExtensions = None, + emitExtensions = None, + vulkanLayer = vulkanLayer, + prefixText = prefixStrings + vkPrefixStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = False, + protectProto = '#ifndef', + protectProtoStr = 'VK_NO_PROTOTYPES', + apicall = 'VKAPI_ATTR ', + apientry = 'VKAPI_CALL ', + apientryp = 'VKAPI_PTR *', + alignFuncParam = 48) + ] + else: + genOpts['vulkan_json_data.hpp'] = [ JSONOutputGenerator, JSONGeneratorOptions( conventions = conventions, filename = 'vulkan_json_data.hpp', directory = directory, - apiname = 'vulkan', + apiname = 'vulkansc', profile = None, - versions = featuresPat, - emitversions = featuresPat, - defaultExtensions = None, + versions = scVersions, + emitversions = scVersions, + defaultExtensions = 'vulkansc', addExtensions = addExtensionsPat, - removeExtensions = None, - emitExtensions = None, + removeExtensions = removeExtensionsPat, + emitExtensions = emitExtensionsPat, vulkanLayer = vulkanLayer, prefixText = prefixStrings + vkPrefixStrings, genFuncPointers = True, @@ -656,122 +686,98 @@ def makeGenOpts(args): apicall = 'VKAPI_ATTR ', apientry = 'VKAPI_CALL ', apientryp = 'VKAPI_PTR *', + isCTS = isCTS, alignFuncParam = 48) ] - else: - genOpts['vulkan_json_data.hpp'] = [ - JSONOutputGenerator, - JSONGeneratorOptions( - conventions = conventions, - filename = 'vulkan_json_data.hpp', - directory = directory, - apiname = 'vulkansc', - profile = None, - versions = scVersions, - emitversions = scVersions, - defaultExtensions = 'vulkansc', - addExtensions = addExtensionsPat, - removeExtensions = removeExtensionsPat, - emitExtensions = emitExtensionsPat, - vulkanLayer = vulkanLayer, - prefixText = prefixStrings + vkPrefixStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = False, - protectProto = '#ifndef', - protectProtoStr = 'VK_NO_PROTOTYPES', - apicall = 'VKAPI_ATTR ', - apientry = 'VKAPI_CALL ', - apientryp = 'VKAPI_PTR *', - isCTS = isCTS, - alignFuncParam = 48) - ] - # keep any relevant platform extensions for the following generators - # (needed for e.g. the vulkan_sci extensions) - explicitRemoveExtensionsPat = makeREstring( - removeExtensions, None, strings_are_regex=True) + # keep any relevant platform extensions for the following generators + # (needed for e.g. the vulkan_sci extensions) + explicitRemoveExtensionsPat = makeREstring( + removeExtensions, None, strings_are_regex=True) - # Raw C header file generator. - genOpts['vulkan_json_gen.h'] = [ - JSONHeaderOutputGenerator, - JSONHeaderGeneratorOptions( - conventions = conventions, - filename = 'vulkan_json_gen.h', - directory = directory, - apiname = 'vulkansc', - profile = None, - versions = scVersions, - emitversions = scVersions, - defaultExtensions = 'vulkansc', - addExtensions = addExtensionsPat, - removeExtensions = explicitRemoveExtensionsPat, - emitExtensions = emitExtensionsPat, - prefixText = prefixStrings + vkPrefixStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = False, - protectProto = '#ifndef', - protectProtoStr = 'VK_NO_PROTOTYPES', - apicall = 'VKAPI_ATTR ', - apientry = 'VKAPI_CALL ', - apientryp = 'VKAPI_PTR *', - alignFuncParam = 48) - ] + # Raw C header file generator. + genOpts['vulkan_json_gen.h'] = [ + JSONHeaderOutputGenerator, + JSONHeaderGeneratorOptions( + conventions = conventions, + filename = 'vulkan_json_gen.h', + directory = directory, + apiname = 'vulkansc', + profile = None, + versions = scVersions, + emitversions = scVersions, + defaultExtensions = 'vulkansc', + addExtensions = addExtensionsPat, + removeExtensions = explicitRemoveExtensionsPat, + emitExtensions = emitExtensionsPat, + prefixText = prefixStrings + vkPrefixStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = False, + protectProto = '#ifndef', + protectProtoStr = 'VK_NO_PROTOTYPES', + apicall = 'VKAPI_ATTR ', + apientry = 'VKAPI_CALL ', + apientryp = 'VKAPI_PTR *', + alignFuncParam = 48) + ] - # Raw C source file generator. - genOpts['vulkan_json_gen.c'] = [ - JSONCOutputGenerator, - JSONCGeneratorOptions( - conventions = conventions, - filename = 'vulkan_json_gen.c', - directory = directory, - apiname = 'vulkansc', - profile = None, - versions = scVersions, - emitversions = scVersions, - defaultExtensions = 'vulkansc', - addExtensions = addExtensionsPat, - removeExtensions = explicitRemoveExtensionsPat, - emitExtensions = emitExtensionsPat, - prefixText = prefixStrings + vkPrefixStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = False, - protectProto = '#ifndef', - protectProtoStr = 'VK_NO_PROTOTYPES', - apicall = 'VKAPI_ATTR ', - apientry = 'VKAPI_CALL ', - apientryp = 'VKAPI_PTR *', - alignFuncParam = 48) - ] + # Raw C source file generator. + genOpts['vulkan_json_gen.c'] = [ + JSONCOutputGenerator, + JSONCGeneratorOptions( + conventions = conventions, + filename = 'vulkan_json_gen.c', + directory = directory, + apiname = 'vulkansc', + profile = None, + versions = scVersions, + emitversions = scVersions, + defaultExtensions = 'vulkansc', + addExtensions = addExtensionsPat, + removeExtensions = explicitRemoveExtensionsPat, + emitExtensions = emitExtensionsPat, + prefixText = prefixStrings + vkPrefixStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = False, + protectProto = '#ifndef', + protectProtoStr = 'VK_NO_PROTOTYPES', + apicall = 'VKAPI_ATTR ', + apientry = 'VKAPI_CALL ', + apientryp = 'VKAPI_PTR *', + alignFuncParam = 48) + ] - genOpts['vulkan_json_parser.hpp'] = [ - JSONParserGenerator, - JSONParserOptions( - conventions = conventions, - filename = 'vulkan_json_parser.hpp', - directory = directory, - apiname = 'vulkansc', - profile = None, - versions = scVersions, - emitversions = scVersions, - defaultExtensions = 'vulkansc', - addExtensions = addExtensionsPat, - removeExtensions = explicitRemoveExtensionsPat, - emitExtensions = emitExtensionsPat, - prefixText = prefixStrings + vkPrefixStrings, - genFuncPointers = True, - protectFile = protectFile, - protectFeature = False, - protectProto = '#ifndef', - protectProtoStr = 'VK_NO_PROTOTYPES', - apicall = 'VKAPI_ATTR ', - apientry = 'VKAPI_CALL ', - apientryp = 'VKAPI_PTR *', - isCTS = isCTS, - alignFuncParam = 48) - ] + genOpts['vulkan_json_parser.hpp'] = [ + JSONParserGenerator, + JSONParserOptions( + conventions = conventions, + filename = 'vulkan_json_parser.hpp', + directory = directory, + apiname = 'vulkansc', + profile = None, + versions = scVersions, + emitversions = scVersions, + defaultExtensions = 'vulkansc', + addExtensions = addExtensionsPat, + removeExtensions = explicitRemoveExtensionsPat, + emitExtensions = emitExtensionsPat, + prefixText = prefixStrings + vkPrefixStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = False, + protectProto = '#ifndef', + protectProtoStr = 'VK_NO_PROTOTYPES', + apicall = 'VKAPI_ATTR ', + apientry = 'VKAPI_CALL ', + apientryp = 'VKAPI_PTR *', + isCTS = isCTS, + alignFuncParam = 48) + ] + except ImportError: + # Module dependencies are not available for Vulkan SC JSON generation + pass # Unused - vulkan10.h target. # It is possible to generate a header with just the Vulkan 1.0 + @@ -854,6 +860,8 @@ def makeGenOpts(args): 'vulkan_video_codec_h265std', 'vulkan_video_codec_h265std_decode', 'vulkan_video_codec_h265std_encode', + 'vulkan_video_codec_av1std', + 'vulkan_video_codec_av1std_decode', ] # Unused at present @@ -955,7 +963,7 @@ def genTarget(args): the requested target and command line options. This is encapsulated in a function so it can be profiled and/or timed. - The args parameter is an parsed argument object containing the following + The args parameter is a parsed argument object containing the following fields that are used: - target - target to generate @@ -972,6 +980,7 @@ def genTarget(args): options = genOpts[args.target][1] logDiag('* Building', options.filename) + logDiag('* options.apiname =', options.apiname) logDiag('* options.versions =', options.versions) logDiag('* options.emitversions =', options.emitversions) logDiag('* options.defaultExtensions =', options.defaultExtensions) diff --git a/registry/parse_dependency.py b/registry/parse_dependency.py index b3ef841..5d20495 100755 --- a/registry/parse_dependency.py +++ b/registry/parse_dependency.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -# Copyright 2022-2023 The Khronos Group Inc. +# Copyright 2022-2024 The Khronos Group Inc. # Copyright 2003-2019 Paul McGuire # SPDX-License-Identifier: MIT @@ -83,7 +83,7 @@ def leafMarkupC(name): opMarkupAsciidocMap = { '+' : 'and', ',' : 'or' } def opMarkupAsciidoc(op): - """Markup a operator as an asciidoc spec markup equivalent + """Markup an operator as an asciidoc spec markup equivalent - op - operator ('+' or ',')""" @@ -92,7 +92,7 @@ def opMarkupAsciidoc(op): opMarkupCMap = { '+' : '&&', ',' : '||' } def opMarkupC(op): - """Markup a operator as an C language equivalent + """Markup an operator as a C language equivalent - op - operator ('+' or ',')""" diff --git a/registry/reg.py b/registry/reg.py index 4b5a80f..b8f8af7 100644 --- a/registry/reg.py +++ b/registry/reg.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -i # -# Copyright 2013-2023 The Khronos Group Inc. +# Copyright 2013-2024 The Khronos Group Inc. # # SPDX-License-Identifier: Apache-2.0 diff --git a/registry/spec_tools/conventions.py b/registry/spec_tools/conventions.py index faca3a2..4a2f056 100644 --- a/registry/spec_tools/conventions.py +++ b/registry/spec_tools/conventions.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -i # -# Copyright 2013-2023 The Khronos Group Inc. +# Copyright 2013-2024 The Khronos Group Inc. # # SPDX-License-Identifier: Apache-2.0 @@ -32,12 +32,12 @@ )) # Split an extension name into vendor ID and name portions -EXT_NAME_DECOMPOSE_RE = re.compile(r'[A-Z]+_(?P[A-Z]+)_(?P[\w_]+)') +EXT_NAME_DECOMPOSE_RE = re.compile(r'(?P[A-Za-z]+)_(?P[A-Za-z]+)_(?P[\w_]+)') # Match an API version name. +# Match object includes API prefix, major, and minor version numbers. # This could be refined further for specific APIs. -API_VERSION_NAME_RE = re.compile(r'[A-Z]+_VERSION_[0-9]') - +API_VERSION_NAME_RE = re.compile(r'(?P[A-Za-z]+)_VERSION_(?P[0-9]+)_(?P[0-9]+)') class ProseListFormats(Enum): """A connective, possibly with a quantifier.""" @@ -80,10 +80,39 @@ def __init__(self): self._command_prefix = None self._type_prefix = None + def formatVersionOrExtension(self, name): + """Mark up an API version or extension name as a link in the spec.""" + + # Is this a version name? + match = API_VERSION_NAME_RE.match(name) + if match is not None: + return self.formatVersion(name, + match.group('apivariant'), + match.group('major'), + match.group('minor')) + else: + # If not, assumed to be an extension name. Might be worth checking. + return self.formatExtension(name) + + def formatVersion(self, name, apivariant, major, minor): + """Mark up an API version name as a link in the spec.""" + return '`<<{}>>`'.format(name) + def formatExtension(self, name): - """Mark up an extension name as a link the spec.""" + """Mark up an extension name as a link in the spec.""" return '`<<{}>>`'.format(name) + def formatSPIRVlink(self, name): + """Mark up a SPIR-V extension name as an external link in the spec. + Since these are external links, the formatting probably will be + the same for all APIs creating such links, so long as they use + the asciidoctor {spirv} attribute for the base path to the SPIR-V + extensions.""" + + (vendor, _) = self.extension_name_split(name) + + return f'{{spirv}}/{vendor}/{name}.html[{name}]' + @property @abc.abstractmethod def null(self): @@ -260,6 +289,42 @@ def api_prefix(self): Must implement.""" raise NotImplementedError + @property + def extension_name_prefix(self): + """Return extension name prefix. + + Typically two uppercase letters followed by an underscore. + + Assumed to be the same as api_prefix, but some APIs use different + case conventions.""" + + return self.api_prefix + + @property + def write_contacts(self): + """Return whether contact list should be written to extension appendices""" + return False + + @property + def write_extension_type(self): + """Return whether extension type should be written to extension appendices""" + return True + + @property + def write_extension_number(self): + """Return whether extension number should be written to extension appendices""" + return True + + @property + def write_extension_revision(self): + """Return whether extension revision number should be written to extension appendices""" + return True + + @property + def write_refpage_include(self): + """Return whether refpage include should be written to extension appendices""" + return True + @property def api_version_prefix(self): """Return API core version token prefix. @@ -375,6 +440,16 @@ def generate_max_enum_in_docs(self): documentation includes.""" return False + def extension_name_split(self, name): + """Split an extension name, returning (vendor, rest of name). + The API prefix of the name is ignored.""" + + match = EXT_NAME_DECOMPOSE_RE.match(name) + vendor = match.group('vendor') + bare_name = match.group('name') + + return (vendor, bare_name) + @abc.abstractmethod def extension_file_path(self, name): """Return file path to an extension appendix relative to a directory @@ -452,3 +527,10 @@ def is_api_version_name(self, name): """Return True if name is an API version name.""" return API_VERSION_NAME_RE.match(name) is not None + + @property + def docgen_language(self): + """Return the language to be used in docgenerator [source] + blocks.""" + + return 'c++' diff --git a/registry/spec_tools/util.py b/registry/spec_tools/util.py index b4b4569..e67038a 100644 --- a/registry/spec_tools/util.py +++ b/registry/spec_tools/util.py @@ -1,6 +1,6 @@ """Utility functions not closely tied to other spec_tools types.""" # Copyright (c) 2018-2019 Collabora, Ltd. -# Copyright 2013-2023 The Khronos Group Inc. +# Copyright 2013-2024 The Khronos Group Inc. # SPDX-License-Identifier: Apache-2.0 diff --git a/registry/stripAPI.py b/registry/stripAPI.py new file mode 100755 index 0000000..ea37f59 --- /dev/null +++ b/registry/stripAPI.py @@ -0,0 +1,42 @@ +#!/usr/bin/python3 +# +# Copyright 2023 The Khronos Group Inc. +# SPDX-License-Identifier: Apache-2.0 + +import argparse +import xml.etree.ElementTree as etree +from reg import stripNonmatchingAPIs + +if __name__ == '__main__': + parser = argparse.ArgumentParser(prog='stripAPI', + formatter_class=argparse.RawDescriptionHelpFormatter, + description='''\ +Filters out elements with non-matching explicit 'api' attributes from API XML. +To remove Vulkan SC-only elements from the combined API XML: + python3 scripts/stripAPI.py -input xml/vk.xml -output vulkan-only.xml -keepAPI vulkan +To remove Vulkan-only elements: + python3 scripts/stripAPI.py -input xml/vk.xml -output vulkansc-only.xml -keepAPI vulkansc +If you are parsing the XML yourself but using the xml.etree package, the +equivalent runtime code is: + import reg + reg.stripNonmatchingAPIs(tree.getroot(), keepAPI, actuallyDelete=True) +where 'tree' is an ElementTree created from the XML file using + etree.parse(filename)''') + + parser.add_argument('-input', action='store', + required=True, + help='Specify input registry XML') + parser.add_argument('-output', action='store', + required=True, + help='Specify output registry XML') + parser.add_argument('-keepAPI', action='store', + default=None, + help='Specify API name whose \'api\' tags are kept') + + args = parser.parse_args() + + tree = etree.parse(args.input) + if args.keepAPI is not None: + stripNonmatchingAPIs(tree.getroot(), args.keepAPI, actuallyDelete = True) + tree.write(args.output) + diff --git a/registry/video.xml b/registry/video.xml index a7e66db..d570742 100644 --- a/registry/video.xml +++ b/registry/video.xml @@ -1,7 +1,7 @@ -Copyright 2021-2023 The Khronos Group Inc. +Copyright 2021-2024 The Khronos Group Inc. SPDX-License-Identifier: Apache-2.0 OR MIT @@ -23,11 +23,13 @@ The current public version of video.xml is maintained in the default branch + #include "vulkan_video_codecs_common.h" #include "vulkan_video_codec_h264std.h" #include "vulkan_video_codec_h265std.h" + #include "vulkan_video_codec_av1std.h" #define VK_MAKE_VIDEO_STD_VERSION(major, minor, patch) \ @@ -38,16 +40,20 @@ The current public version of video.xml is maintained in the default branch #define VK_STD_VULKAN_VIDEO_CODEC_H264_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) - // Vulkan 0.9 provisional Vulkan video H.264 encode std specification version number -#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_0_9_11 VK_MAKE_VIDEO_STD_VERSION(0, 9, 11) + +#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) #define VK_STD_VULKAN_VIDEO_CODEC_H265_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) - // Vulkan 0.9 provisional Vulkan video H.265 encode std specification version number -#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_0_9_12 VK_MAKE_VIDEO_STD_VERSION(0, 9, 12) + +#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) + + + +#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) @@ -832,6 +838,277 @@ The current public version of video.xml is maintained in the default branch int32_t PicOrderCntValPicture order count derived as specified in 8.3.1 uint8_t TemporalIdTemporal ID, as defined in 7.4.2.2 + + + + + + + + + + + + + + + + Syntax defined in section 5.5.2, semantics defined in section 6.4.2 + uint32_t mono_chrome : 1 + uint32_t color_range : 1 + uint32_t separate_uv_delta_q : 1 + uint32_t color_description_present_flag : 1 + uint32_t reserved : 28 + + + Syntax defined in section 5.5.2, semantics defined in section 6.4.2 + StdVideoAV1ColorConfigFlags flags + uint8_t BitDepth + uint8_t subsampling_x + uint8_t subsampling_y + uint8_t reserved1Reserved for future use and must be initialized with 0. + StdVideoAV1ColorPrimaries color_primaries + StdVideoAV1TransferCharacteristics transfer_characteristics + StdVideoAV1MatrixCoefficients matrix_coefficients + StdVideoAV1ChromaSamplePosition chroma_sample_position + + + Syntax defined in section 5.5.3, semantics defined in section 6.4.3 + uint32_t equal_picture_interval : 1 + uint32_t reserved : 31 + + + Syntax defined in section 5.5.3, semantics defined in section 6.4.3 + StdVideoAV1TimingInfoFlags flags + uint32_t num_units_in_display_tick + uint32_t time_scale + uint32_t num_ticks_per_picture_minus_1 + + + Syntax defined in section 5.5, semantics defined in section 6.4 + uint32_t still_picture : 1 + uint32_t reduced_still_picture_header : 1 + uint32_t use_128x128_superblock : 1 + uint32_t enable_filter_intra : 1 + uint32_t enable_intra_edge_filter : 1 + uint32_t enable_interintra_compound : 1 + uint32_t enable_masked_compound : 1 + uint32_t enable_warped_motion : 1 + uint32_t enable_dual_filter : 1 + uint32_t enable_order_hint : 1 + uint32_t enable_jnt_comp : 1 + uint32_t enable_ref_frame_mvs : 1 + uint32_t frame_id_numbers_present_flag : 1 + uint32_t enable_superres : 1 + uint32_t enable_cdef : 1 + uint32_t enable_restoration : 1 + uint32_t film_grain_params_present : 1 + uint32_t timing_info_present_flag : 1 + uint32_t initial_display_delay_present_flag : 1 + uint32_t reserved : 13 + + + Syntax defined in section 5.5, semantics defined in section 6.4 + StdVideoAV1SequenceHeaderFlags flags + StdVideoAV1Profile seq_profile + uint8_t frame_width_bits_minus_1 + uint8_t frame_height_bits_minus_1 + uint16_t max_frame_width_minus_1 + uint16_t max_frame_height_minus_1 + uint8_t delta_frame_id_length_minus_2 + uint8_t additional_frame_id_length_minus_1 + uint8_t order_hint_bits_minus_1 + uint8_t seq_force_integer_mvThe final value of of seq_force_integer_mv per the value of seq_choose_integer_mv. + uint8_t seq_force_screen_content_toolsThe final value of of seq_force_screen_content_tools per the value of seq_choose_screen_content_tools. + uint8_t reserved1[5]Reserved for future use and must be initialized with 0. + const StdVideoAV1ColorConfig* pColorConfig + const StdVideoAV1TimingInfo* pTimingInfo + + + Syntax defined in section 5.9.11, semantics defined in section 6.8.10 + uint32_t loop_filter_delta_enabled : 1 + uint32_t loop_filter_delta_update : 1 + uint32_t reserved : 30 + + + Syntax defined in section 5.9.11, semantics defined in section 6.8.10 + StdVideoAV1LoopFilterFlags flags + uint8_t loop_filter_level[STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS] + uint8_t loop_filter_sharpness + uint8_t update_ref_delta + int8_t loop_filter_ref_deltas[STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME] + uint8_t update_mode_delta + int8_t loop_filter_mode_deltas[STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS] + + + Syntax defined in section 5.9.12, semantics defined in section 6.8.11 + uint32_t using_qmatrix : 1 + uint32_t diff_uv_delta : 1 + uint32_t reserved : 30 + + + Syntax defined in section 5.9.12, semantics defined in section 6.8.11 + StdVideoAV1QuantizationFlags flags + uint8_t base_q_idx + int8_t DeltaQYDc + int8_t DeltaQUDc + int8_t DeltaQUAc + int8_t DeltaQVDc + int8_t DeltaQVAc + uint8_t qm_y + uint8_t qm_u + uint8_t qm_v + + + Syntax defined in section 5.9.14, semantics defined in section 6.8.13 + uint8_t FeatureEnabled[STD_VIDEO_AV1_MAX_SEGMENTS]Each element contains 8 (SEG_LVL_MAX) bits, one bit for each feature within the segment + int16_t FeatureData[STD_VIDEO_AV1_MAX_SEGMENTS][STD_VIDEO_AV1_SEG_LVL_MAX] + + + Syntax defined in section 5.9.15, semantics defined in section 6.8.14 + uint32_t uniform_tile_spacing_flag : 1 + uint32_t reserved : 31 + + + Syntax defined in section 5.9.15, semantics defined in section 6.8.14 + StdVideoAV1TileInfoFlags flags + uint8_t TileCols + uint8_t TileRows + uint16_t context_update_tile_id + uint8_t tile_size_bytes_minus_1 + uint8_t reserved1[7]Reserved for future use and must be initialized with 0. + const uint16_t* pMiColStartsTileCols number of elements + const uint16_t* pMiRowStartsTileRows number of elements + const uint16_t* pWidthInSbsMinus1TileCols number of elements + const uint16_t* pHeightInSbsMinus1TileRows number of elements + + + Syntax defined in section 5.9.19, semantics defined in section 6.10.14 + uint8_t cdef_damping_minus_3 + uint8_t cdef_bits + uint8_t cdef_y_pri_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS] + uint8_t cdef_y_sec_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS] + uint8_t cdef_uv_pri_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS] + uint8_t cdef_uv_sec_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS] + + + Syntax defined in section 5.9.20, semantics defined in section 6.10.15 + StdVideoAV1FrameRestorationType FrameRestorationType[STD_VIDEO_AV1_MAX_NUM_PLANES] + uint16_t LoopRestorationSize[STD_VIDEO_AV1_MAX_NUM_PLANES] + + + Syntax defined in section 5.9.24, semantics defined in section 7.10 + uint8_t GmType[STD_VIDEO_AV1_NUM_REF_FRAMES] + int32_t gm_params[STD_VIDEO_AV1_NUM_REF_FRAMES][STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS] + + + Syntax defined in section 5.9.30, semantics defined in section 6.8.20 + uint32_t chroma_scaling_from_luma : 1 + uint32_t overlap_flag : 1 + uint32_t clip_to_restricted_range : 1 + uint32_t update_grain : 1 + uint32_t reserved : 28 + + + Syntax defined in section 5.9.30, semantics defined in section 6.8.20 + StdVideoAV1FilmGrainFlags flags + uint8_t grain_scaling_minus_8 + uint8_t ar_coeff_lag + uint8_t ar_coeff_shift_minus_6 + uint8_t grain_scale_shift + uint16_t grain_seed + uint8_t film_grain_params_ref_idx + uint8_t num_y_points + uint8_t point_y_value[STD_VIDEO_AV1_MAX_NUM_Y_POINTS] + uint8_t point_y_scaling[STD_VIDEO_AV1_MAX_NUM_Y_POINTS] + uint8_t num_cb_points + uint8_t point_cb_value[STD_VIDEO_AV1_MAX_NUM_CB_POINTS] + uint8_t point_cb_scaling[STD_VIDEO_AV1_MAX_NUM_CB_POINTS] + uint8_t num_cr_points + uint8_t point_cr_value[STD_VIDEO_AV1_MAX_NUM_CR_POINTS] + uint8_t point_cr_scaling[STD_VIDEO_AV1_MAX_NUM_CR_POINTS] + int8_t ar_coeffs_y_plus_128[STD_VIDEO_AV1_MAX_NUM_POS_LUMA] + int8_t ar_coeffs_cb_plus_128[STD_VIDEO_AV1_MAX_NUM_POS_CHROMA] + int8_t ar_coeffs_cr_plus_128[STD_VIDEO_AV1_MAX_NUM_POS_CHROMA] + uint8_t cb_mult + uint8_t cb_luma_mult + uint16_t cb_offset + uint8_t cr_mult + uint8_t cr_luma_mult + uint16_t cr_offset + + + Syntax defined in section 5.9, semantics defined in section 6.8 + uint32_t error_resilient_mode : 1 + uint32_t disable_cdf_update : 1 + uint32_t use_superres : 1 + uint32_t render_and_frame_size_different : 1 + uint32_t allow_screen_content_tools : 1 + uint32_t is_filter_switchable : 1 + uint32_t force_integer_mv : 1 + uint32_t frame_size_override_flag : 1 + uint32_t buffer_removal_time_present_flag : 1 + uint32_t allow_intrabc : 1 + uint32_t frame_refs_short_signaling : 1 + uint32_t allow_high_precision_mv : 1 + uint32_t is_motion_mode_switchable : 1 + uint32_t use_ref_frame_mvs : 1 + uint32_t disable_frame_end_update_cdf : 1 + uint32_t allow_warped_motion : 1 + uint32_t reduced_tx_set : 1 + uint32_t reference_select : 1 + uint32_t skip_mode_present : 1 + uint32_t delta_q_present : 1 + uint32_t delta_lf_present : 1 + uint32_t delta_lf_multi : 1 + uint32_t segmentation_enabled : 1 + uint32_t segmentation_update_map : 1 + uint32_t segmentation_temporal_update : 1 + uint32_t segmentation_update_data : 1 + uint32_t UsesLr : 1 + uint32_t usesChromaLr : 1 + uint32_t apply_grain : 1 + uint32_t reserved : 3 + + + Syntax defined in sections 5.9 and 5.11.1, semantics defined in sections 6.8 and 6.10.1 + StdVideoDecodeAV1PictureInfoFlags flags + StdVideoAV1FrameType frame_type + uint32_t current_frame_id + uint8_t OrderHint + uint8_t primary_ref_frame + uint8_t refresh_frame_flags + uint8_t reserved1Reserved for future use and must be initialized with 0. + StdVideoAV1InterpolationFilter interpolation_filter + StdVideoAV1TxMode TxMode + uint8_t delta_q_res + uint8_t delta_lf_res + uint8_t SkipModeFrame[STD_VIDEO_AV1_SKIP_MODE_FRAMES] + uint8_t coded_denom + uint8_t reserved2[3]Reserved for future use and must be initialized with 0. + uint8_t OrderHints[STD_VIDEO_AV1_NUM_REF_FRAMES] + uint32_t expectedFrameId[STD_VIDEO_AV1_NUM_REF_FRAMES] + const StdVideoAV1TileInfo* pTileInfo + const StdVideoAV1Quantization* pQuantization + const StdVideoAV1Segmentation* pSegmentation + const StdVideoAV1LoopFilter* pLoopFilter + const StdVideoAV1CDEF* pCDEF + const StdVideoAV1LoopRestoration* pLoopRestoration + const StdVideoAV1GlobalMotion* pGlobalMotion + const StdVideoAV1FilmGrain* pFilmGrain + + + uint32_t disable_frame_end_update_cdf : 1 + uint32_t segmentation_enabled : 1 + uint32_t reserved : 30 + + + StdVideoDecodeAV1ReferenceInfoFlags flags + uint8_t frame_type + uint8_t RefFrameSignBias + uint8_t OrderHint + uint8_t SavedOrderHints[STD_VIDEO_AV1_NUM_REF_FRAMES] + @@ -1039,6 +1316,142 @@ The current public version of video.xml is maintained in the default branch + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1104,8 +1517,8 @@ The current public version of video.xml is maintained in the default branch - - + + @@ -1197,8 +1610,8 @@ The current public version of video.xml is maintained in the default branch - - + + @@ -1214,5 +1627,77 @@ The current public version of video.xml is maintained in the default branch + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/registry/vk.xml b/registry/vk.xml old mode 100644 new mode 100755 index de58fb6..c8464a2 --- a/registry/vk.xml +++ b/registry/vk.xml @@ -1,7 +1,7 @@ -Copyright 2015-2023 The Khronos Group Inc. +Copyright 2015-2024 The Khronos Group Inc. SPDX-License-Identifier: Apache-2.0 OR MIT @@ -175,7 +175,7 @@ branch of the member gitlab server. #define VKSC_API_VERSION_1_0 VK_MAKE_API_VERSION(VKSC_API_VARIANT, 1, 0, 0)// Patch version should always be set to 0 // Version of this file -#define VK_HEADER_VERSION 272 +#define VK_HEADER_VERSION 278 // Complete version of this file #define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 3, VK_HEADER_VERSION) // Version of this file @@ -338,8 +338,8 @@ typedef void* MTLSharedEvent_id; typedef VkFlags VkCommandBufferResetFlags; typedef VkFlags VkCommandBufferUsageFlags; typedef VkFlags VkQueryPipelineStatisticFlags; - typedef VkFlags VkMemoryMapFlags; - typedef VkFlags VkMemoryUnmapFlagsKHR; + typedef VkFlags VkMemoryMapFlags; + typedef VkFlags VkMemoryUnmapFlagsKHR; typedef VkFlags VkImageAspectFlags; typedef VkFlags VkSparseMemoryBindFlags; typedef VkFlags VkSparseImageFormatFlags; @@ -502,7 +502,7 @@ typedef void* MTLSharedEvent_id; typedef VkFlags VkVideoDecodeH264PictureLayoutFlagsKHR; Video Encode Core extension - typedef VkFlags VkVideoEncodeFlagsKHR; + typedef VkFlags VkVideoEncodeFlagsKHR; typedef VkFlags VkVideoEncodeUsageFlagsKHR; typedef VkFlags VkVideoEncodeContentFlagsKHR; typedef VkFlags VkVideoEncodeCapabilityFlagsKHR; @@ -513,16 +513,16 @@ typedef void* MTLSharedEvent_id; typedef VkFlags VkVideoComponentBitDepthFlagsKHR; Video Encode H.264 extension - typedef VkFlags VkVideoEncodeH264CapabilityFlagsEXT; - typedef VkFlags VkVideoEncodeH264StdFlagsEXT; - typedef VkFlags VkVideoEncodeH264RateControlFlagsEXT; + typedef VkFlags VkVideoEncodeH264CapabilityFlagsKHR; + typedef VkFlags VkVideoEncodeH264StdFlagsKHR; + typedef VkFlags VkVideoEncodeH264RateControlFlagsKHR; Video Encode H.265 extension - typedef VkFlags VkVideoEncodeH265CapabilityFlagsEXT; - typedef VkFlags VkVideoEncodeH265StdFlagsEXT; - typedef VkFlags VkVideoEncodeH265RateControlFlagsEXT; - typedef VkFlags VkVideoEncodeH265CtbSizeFlagsEXT; - typedef VkFlags VkVideoEncodeH265TransformBlockSizeFlagsEXT; + typedef VkFlags VkVideoEncodeH265CapabilityFlagsKHR; + typedef VkFlags VkVideoEncodeH265StdFlagsKHR; + typedef VkFlags VkVideoEncodeH265RateControlFlagsKHR; + typedef VkFlags VkVideoEncodeH265CtbSizeFlagsKHR; + typedef VkFlags VkVideoEncodeH265TransformBlockSizeFlagsKHR; Types which can be void pointers or class pointers, selected at compile time VK_DEFINE_HANDLE(VkInstance) @@ -619,6 +619,7 @@ typedef void* MTLSharedEvent_id; + @@ -686,7 +687,8 @@ typedef void* MTLSharedEvent_id; - + + @@ -731,7 +733,8 @@ typedef void* MTLSharedEvent_id; - + + @@ -870,6 +873,7 @@ typedef void* MTLSharedEvent_id; + Enumerated types in the header, but not used by the API @@ -898,6 +902,7 @@ typedef void* MTLSharedEvent_id; Video H.265 Decode extensions Video Encode extensions + @@ -906,16 +911,16 @@ typedef void* MTLSharedEvent_id; Video H.264 Encode extensions - - - + + + Video H.265 Encode extensions - - - - - + + + + + The PFN_vk*Function types are used by VkAllocationCallbacks below typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)( @@ -1040,20 +1045,20 @@ typedef void* MTLSharedEvent_id; uint32_t vendorID uint32_t deviceID VkPhysicalDeviceType deviceType - char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] + char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] uint8_t pipelineCacheUUID[VK_UUID_SIZE] VkPhysicalDeviceLimits limits VkPhysicalDeviceSparseProperties sparseProperties - char extensionName[VK_MAX_EXTENSION_NAME_SIZE]extension name - uint32_t specVersionversion of the extension specification implemented + char extensionName[VK_MAX_EXTENSION_NAME_SIZE]extension name + uint32_t specVersionversion of the extension specification implemented - char layerName[VK_MAX_EXTENSION_NAME_SIZE]layer name - uint32_t specVersionversion of the layer specification implemented - uint32_t implementationVersionbuild or release version of the layer's library - char description[VK_MAX_DESCRIPTION_SIZE]Free-form description of the layer + char layerName[VK_MAX_EXTENSION_NAME_SIZE]layer name + uint32_t specVersionversion of the layer specification implemented + uint32_t implementationVersionbuild or release version of the layer's library + char description[VK_MAX_DESCRIPTION_SIZE]Free-form description of the layer VkStructureType sType @@ -1109,10 +1114,10 @@ typedef void* MTLSharedEvent_id; VkExtent3D minImageTransferGranularityMinimum alignment requirement for image transfers - uint32_t memoryTypeCount - VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES] - uint32_t memoryHeapCount - VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS] + uint32_t memoryTypeCount + VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES] + uint32_t memoryHeapCount + VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS] VkStructureType sType @@ -1456,7 +1461,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType const void* pNext - VkPipelineCreateFlags flagsPipeline creation flags + VkPipelineCreateFlags flagsPipeline creation flags VkPipelineShaderStageCreateInfo stage VkPipelineLayout layoutInterface layout of the pipeline VkPipeline basePipelineHandleIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of @@ -1595,7 +1600,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType const void* pNext - VkPipelineCreateFlags flagsPipeline creation flags + VkPipelineCreateFlags flagsPipeline creation flags uint32_t stageCount const VkPipelineShaderStageCreateInfo* pStagesOne entry for each active shader stage const VkPipelineShaderStageCreateInfo* pStagesOne entry for each active shader stage @@ -1659,7 +1664,7 @@ typedef void* MTLSharedEvent_id; uint32_t offsetStart of the range, in bytes uint32_t sizeSize of the range, in bytes - + VkStructureType sType const void* pNext VkPipelineLayoutCreateFlags flags @@ -2591,8 +2596,8 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext VkDriverId driverID - char driverName[VK_MAX_DRIVER_NAME_SIZE] - char driverInfo[VK_MAX_DRIVER_INFO_SIZE] + char driverName[VK_MAX_DRIVER_NAME_SIZE] + char driverInfo[VK_MAX_DRIVER_INFO_SIZE] VkConformanceVersion conformanceVersion @@ -2642,7 +2647,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType const void* pNext VkBufferCreateFlags flags - VkBufferUsageFlags usage + VkBufferUsageFlags usage VkExternalMemoryHandleTypeFlagBits handleType @@ -3023,7 +3028,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext uint32_t physicalDeviceCount - VkPhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE] + VkPhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE] VkBool32 subsetAllocation @@ -3306,7 +3311,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType const void* pNext - VkSurfaceKHR surface + VkSurfaceKHR surface VkStructureType sType @@ -3717,6 +3722,18 @@ typedef void* MTLSharedEvent_id; VkBool32 nonStrictSinglePixelWideLinesUseParallelogram VkBool32 nonStrictWideLinesUseParallelogram + + VkStructureType sType + void* pNext + VkBool32 maintenance6 + + + VkStructureType sType + void* pNext + VkBool32 blockTexelViewCompatibleMultipleLayers + uint32_t maxCombinedImageSamplerDescriptorCount + VkBool32 fragmentShadingRateClampCombinerInputs + VkStructureType sType const void* pNext @@ -3825,11 +3842,11 @@ typedef void* MTLSharedEvent_id; VkBool32 globalPriorityQuery - + VkStructureType sType - void* pNext - uint32_t priorityCount - VkQueueGlobalPriorityKHR priorities[VK_MAX_GLOBAL_PRIORITY_SIZE_KHR] + void* pNext + uint32_t priorityCount + VkQueueGlobalPriorityKHR priorities[VK_MAX_GLOBAL_PRIORITY_SIZE_KHR] @@ -3869,7 +3886,7 @@ typedef void* MTLSharedEvent_id; VkDebugUtilsMessengerCallbackDataFlagsEXT flags const char* pMessageIdName int32_t messageIdNumber - const char* pMessage + const char* pMessage uint32_t queueLabelCount const VkDebugUtilsLabelEXT* pQueueLabels uint32_t cmdBufLabelCount @@ -3929,11 +3946,12 @@ typedef void* MTLSharedEvent_id; VkBool32 fullyCoveredFragmentShaderInputVariabletrue if the implementation supports the FullyCoveredEXT SPIR-V builtin fragment shader input variable VkBool32 conservativeRasterizationPostDepthCoveragetrue if the implementation supports both conservative rasterization and post depth coverage sample coverage mask - - VkStructureType sType + + VkStructureType sType const void* pNext - VkTimeDomainEXT timeDomain + VkTimeDomainKHR timeDomain + VkStructureType sType void* pNext @@ -4158,21 +4176,29 @@ typedef void* MTLSharedEvent_id; uint64_t value - + uint32_t binding uint32_t divisor - - VkStructureType sType + + + VkStructureType sType const void* pNext uint32_t vertexBindingDivisorCount - const VkVertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors + const VkVertexInputBindingDivisorDescriptionKHR* pVertexBindingDivisors + VkStructureType sType void* pNext uint32_t maxVertexAttribDivisormax value of vertex attribute divisor + + VkStructureType sType + void* pNext + uint32_t maxVertexAttribDivisormax value of vertex attribute divisor + VkBool32 supportsNonZeroFirstInstance + VkStructureType sType void* pNext @@ -4285,12 +4311,13 @@ typedef void* MTLSharedEvent_id; VkBool32 shaderImageFloat32AtomicMinMax VkBool32 sparseImageFloat32AtomicMinMax - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 vertexAttributeInstanceRateDivisor VkBool32 vertexAttributeInstanceRateZeroDivisor + VkStructureType sType void* pNext @@ -4561,7 +4588,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType const void* pNext - VkPipelineCreateFlags flagsPipeline creation flags + VkPipelineCreateFlags flagsPipeline creation flags uint32_t stageCount const VkPipelineShaderStageCreateInfo* pStagesOne entry for each active shader stage uint32_t groupCount @@ -4574,7 +4601,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType const void* pNext - VkPipelineCreateFlags flagsPipeline creation flags + VkPipelineCreateFlags flagsPipeline creation flags uint32_t stageCount const VkPipelineShaderStageCreateInfo* pStagesOne entry for each active shader stage uint32_t groupCount @@ -4993,7 +5020,7 @@ typedef void* MTLSharedEvent_id; void* pNext VkShaderStageFlags cooperativeMatrixSupportedStages - + VkStructureType sType void* pNext uint32_t MSize @@ -5094,9 +5121,9 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext VkPerformanceCounterDescriptionFlagsKHR flags - char name[VK_MAX_DESCRIPTION_SIZE] - char category[VK_MAX_DESCRIPTION_SIZE] - char description[VK_MAX_DESCRIPTION_SIZE] + char name[VK_MAX_DESCRIPTION_SIZE] + char category[VK_MAX_DESCRIPTION_SIZE] + char description[VK_MAX_DESCRIPTION_SIZE] VkStructureType sType @@ -5165,7 +5192,7 @@ typedef void* MTLSharedEvent_id; VkBool32 valueBool const char* valueString - + VkPerformanceValueTypeINTEL type VkPerformanceValueDataINTEL data @@ -5208,11 +5235,12 @@ typedef void* MTLSharedEvent_id; VkBool32 shaderSubgroupClock VkBool32 shaderDeviceClock - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 indexTypeUint8 + VkStructureType sType void* pNext @@ -5270,10 +5298,10 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext - VkShaderStageFlags stages - char name[VK_MAX_DESCRIPTION_SIZE] - char description[VK_MAX_DESCRIPTION_SIZE] - uint32_t subgroupSize + VkShaderStageFlags stages + char name[VK_MAX_DESCRIPTION_SIZE] + char description[VK_MAX_DESCRIPTION_SIZE] + uint32_t subgroupSize VkStructureType sType @@ -5289,19 +5317,19 @@ typedef void* MTLSharedEvent_id; VkStructureType sType - void* pNext - char name[VK_MAX_DESCRIPTION_SIZE] - char description[VK_MAX_DESCRIPTION_SIZE] + void* pNext + char name[VK_MAX_DESCRIPTION_SIZE] + char description[VK_MAX_DESCRIPTION_SIZE] VkPipelineExecutableStatisticFormatKHR format VkPipelineExecutableStatisticValueKHR value VkStructureType sType - void* pNext - char name[VK_MAX_DESCRIPTION_SIZE] - char description[VK_MAX_DESCRIPTION_SIZE] - VkBool32 isText - size_t dataSize + void* pNext + char name[VK_MAX_DESCRIPTION_SIZE] + char description[VK_MAX_DESCRIPTION_SIZE] + VkBool32 isText + size_t dataSize void* pData @@ -5347,7 +5375,7 @@ typedef void* MTLSharedEvent_id; - + VkStructureType sType void* pNext VkRenderPass renderPass @@ -5378,8 +5406,8 @@ typedef void* MTLSharedEvent_id; VkDeviceMemory memory - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 rectangularLines VkBool32 bresenhamLines @@ -5388,19 +5416,22 @@ typedef void* MTLSharedEvent_id; VkBool32 stippledBresenhamLines VkBool32 stippledSmoothLines - - VkStructureType sType + + + VkStructureType sType void* pNext uint32_t lineSubPixelPrecisionBits - - VkStructureType sType - const void* pNext - VkLineRasterizationModeEXT lineRasterizationMode + + + VkStructureType sType + const void* pNext + VkLineRasterizationModeKHR lineRasterizationMode VkBool32 stippledLineEnable uint32_t lineStippleFactor uint16_t lineStipplePattern + VkStructureType sType void* pNext @@ -5497,56 +5528,56 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext VkDriverId driverID - char driverName[VK_MAX_DRIVER_NAME_SIZE] - char driverInfo[VK_MAX_DRIVER_INFO_SIZE] + char driverName[VK_MAX_DRIVER_NAME_SIZE] + char driverInfo[VK_MAX_DRIVER_INFO_SIZE] VkConformanceVersion conformanceVersion VkShaderFloatControlsIndependence denormBehaviorIndependence VkShaderFloatControlsIndependence roundingModeIndependence - VkBool32 shaderSignedZeroInfNanPreserveFloat16An implementation can preserve signed zero, nan, inf - VkBool32 shaderSignedZeroInfNanPreserveFloat32An implementation can preserve signed zero, nan, inf - VkBool32 shaderSignedZeroInfNanPreserveFloat64An implementation can preserve signed zero, nan, inf - VkBool32 shaderDenormPreserveFloat16An implementation can preserve denormals - VkBool32 shaderDenormPreserveFloat32An implementation can preserve denormals - VkBool32 shaderDenormPreserveFloat64An implementation can preserve denormals - VkBool32 shaderDenormFlushToZeroFloat16An implementation can flush to zero denormals - VkBool32 shaderDenormFlushToZeroFloat32An implementation can flush to zero denormals - VkBool32 shaderDenormFlushToZeroFloat64An implementation can flush to zero denormals - VkBool32 shaderRoundingModeRTEFloat16An implementation can support RTE - VkBool32 shaderRoundingModeRTEFloat32An implementation can support RTE - VkBool32 shaderRoundingModeRTEFloat64An implementation can support RTE - VkBool32 shaderRoundingModeRTZFloat16An implementation can support RTZ - VkBool32 shaderRoundingModeRTZFloat32An implementation can support RTZ - VkBool32 shaderRoundingModeRTZFloat64An implementation can support RTZ - uint32_t maxUpdateAfterBindDescriptorsInAllPools - VkBool32 shaderUniformBufferArrayNonUniformIndexingNative - VkBool32 shaderSampledImageArrayNonUniformIndexingNative - VkBool32 shaderStorageBufferArrayNonUniformIndexingNative - VkBool32 shaderStorageImageArrayNonUniformIndexingNative - VkBool32 shaderInputAttachmentArrayNonUniformIndexingNative - VkBool32 robustBufferAccessUpdateAfterBind - VkBool32 quadDivergentImplicitLod - uint32_t maxPerStageDescriptorUpdateAfterBindSamplers - uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers - uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers - uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages - uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages - uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments - uint32_t maxPerStageUpdateAfterBindResources - uint32_t maxDescriptorSetUpdateAfterBindSamplers - uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers - uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic - uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers - uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic - uint32_t maxDescriptorSetUpdateAfterBindSampledImages - uint32_t maxDescriptorSetUpdateAfterBindStorageImages - uint32_t maxDescriptorSetUpdateAfterBindInputAttachments - VkResolveModeFlags supportedDepthResolveModessupported depth resolve modes - VkResolveModeFlags supportedStencilResolveModessupported stencil resolve modes - VkBool32 independentResolveNonedepth and stencil resolve modes can be set independently if one of them is none - VkBool32 independentResolvedepth and stencil resolve modes can be set independently - VkBool32 filterMinmaxSingleComponentFormats - VkBool32 filterMinmaxImageComponentMapping - uint64_t maxTimelineSemaphoreValueDifference + VkBool32 shaderSignedZeroInfNanPreserveFloat16An implementation can preserve signed zero, nan, inf + VkBool32 shaderSignedZeroInfNanPreserveFloat32An implementation can preserve signed zero, nan, inf + VkBool32 shaderSignedZeroInfNanPreserveFloat64An implementation can preserve signed zero, nan, inf + VkBool32 shaderDenormPreserveFloat16An implementation can preserve denormals + VkBool32 shaderDenormPreserveFloat32An implementation can preserve denormals + VkBool32 shaderDenormPreserveFloat64An implementation can preserve denormals + VkBool32 shaderDenormFlushToZeroFloat16An implementation can flush to zero denormals + VkBool32 shaderDenormFlushToZeroFloat32An implementation can flush to zero denormals + VkBool32 shaderDenormFlushToZeroFloat64An implementation can flush to zero denormals + VkBool32 shaderRoundingModeRTEFloat16An implementation can support RTE + VkBool32 shaderRoundingModeRTEFloat32An implementation can support RTE + VkBool32 shaderRoundingModeRTEFloat64An implementation can support RTE + VkBool32 shaderRoundingModeRTZFloat16An implementation can support RTZ + VkBool32 shaderRoundingModeRTZFloat32An implementation can support RTZ + VkBool32 shaderRoundingModeRTZFloat64An implementation can support RTZ + uint32_t maxUpdateAfterBindDescriptorsInAllPools + VkBool32 shaderUniformBufferArrayNonUniformIndexingNative + VkBool32 shaderSampledImageArrayNonUniformIndexingNative + VkBool32 shaderStorageBufferArrayNonUniformIndexingNative + VkBool32 shaderStorageImageArrayNonUniformIndexingNative + VkBool32 shaderInputAttachmentArrayNonUniformIndexingNative + VkBool32 robustBufferAccessUpdateAfterBind + VkBool32 quadDivergentImplicitLod + uint32_t maxPerStageDescriptorUpdateAfterBindSamplers + uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers + uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers + uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages + uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages + uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments + uint32_t maxPerStageUpdateAfterBindResources + uint32_t maxDescriptorSetUpdateAfterBindSamplers + uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers + uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic + uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers + uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic + uint32_t maxDescriptorSetUpdateAfterBindSampledImages + uint32_t maxDescriptorSetUpdateAfterBindStorageImages + uint32_t maxDescriptorSetUpdateAfterBindInputAttachments + VkResolveModeFlags supportedDepthResolveModessupported depth resolve modes + VkResolveModeFlags supportedStencilResolveModessupported stencil resolve modes + VkBool32 independentResolveNonedepth and stencil resolve modes can be set independently if one of them is none + VkBool32 independentResolvedepth and stencil resolve modes can be set independently + VkBool32 filterMinmaxSingleComponentFormats + VkBool32 filterMinmaxImageComponentMapping + uint64_t maxTimelineSemaphoreValueDifference VkSampleCountFlags framebufferIntegerColorSampleCounts @@ -5642,12 +5673,12 @@ typedef void* MTLSharedEvent_id; VkStructureType sType - void* pNext - char name[VK_MAX_EXTENSION_NAME_SIZE] - char version[VK_MAX_EXTENSION_NAME_SIZE] - VkToolPurposeFlags purposes - char description[VK_MAX_DESCRIPTION_SIZE] - char layer[VK_MAX_EXTENSION_NAME_SIZE] + void* pNext + char name[VK_MAX_EXTENSION_NAME_SIZE] + char version[VK_MAX_EXTENSION_NAME_SIZE] + VkToolPurposeFlags purposes + char description[VK_MAX_DESCRIPTION_SIZE] + char layer[VK_MAX_EXTENSION_NAME_SIZE] @@ -6009,11 +6040,11 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void*pNext VkBool32 clustercullingShader - VkBool32 multiviewClusterCullingShader + VkBool32 multiviewClusterCullingShader - VkStructureType sType - void*pNext + VkStructureType sType + void*pNext VkBool32 clusterShadingRate @@ -6204,7 +6235,7 @@ typedef void* MTLSharedEvent_id; VkFragmentShadingRateNV shadingRate VkFragmentShadingRateCombinerOpKHR combinerOps[2] - + VkStructureType sType const void* pNext VkDeviceSize accelerationStructureSize @@ -6695,6 +6726,18 @@ typedef void* MTLSharedEvent_id; const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot uint32_t referenceSlotCount const VkVideoReferenceSlotInfoKHR* pReferenceSlots + + + VkStructureType sType + void* pNext + VkBool32 videoMaintenance1 + + + VkStructureType sType + const void* pNext + VkQueryPool queryPool + uint32_t firstQuery + uint32_t queryCount Video Decode Codec Standard specific structures #include "vk_video/vulkan_video_codec_h264std.h" @@ -6826,6 +6869,44 @@ typedef void* MTLSharedEvent_id; const void* pNext const StdVideoDecodeH265ReferenceInfo* pStdReferenceInfo + #include "vk_video/vulkan_video_codec_av1std.h" + + + + #include "vk_video/vulkan_video_codec_av1std_decode.h" + + + + VkStructureType sType + const void* pNext + StdVideoAV1Profile stdProfile + VkBool32 filmGrainSupport + + + VkStructureType sType + void* pNext + StdVideoAV1Level maxLevel + + + VkStructureType sType + const void* pNext + const StdVideoAV1SequenceHeader* pStdSequenceHeader + + + VkStructureType sType + const void* pNext + const StdVideoDecodeAV1PictureInfo* pStdPictureInfo + int32_t referenceNameSlotIndices[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR] + uint32_t frameHeaderOffset + uint32_t tileCount + const uint32_t* pTileOffsets + const uint32_t* pTileSizes + + + VkStructureType sType + const void* pNext + const StdVideoDecodeAV1ReferenceInfo* pStdReferenceInfo + VkStructureType sType const void* pNext @@ -6878,7 +6959,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType const void* pNext - VkVideoCodingControlFlagsKHR flags + VkVideoCodingControlFlagsKHR flags VkStructureType sType @@ -6951,10 +7032,10 @@ typedef void* MTLSharedEvent_id; VkExtent2D encodeInputPictureGranularity VkVideoEncodeFeedbackFlagsKHR supportedEncodeFeedbackFlags - - VkStructureType sType + + VkStructureType sType void* pNext - VkVideoEncodeH264CapabilityFlagsEXT flags + VkVideoEncodeH264CapabilityFlagsKHR flags StdVideoH264LevelIdc maxLevelIdc uint32_t maxSliceCount uint32_t maxPPictureL0ReferenceCount @@ -6966,17 +7047,17 @@ typedef void* MTLSharedEvent_id; int32_t maxQp VkBool32 prefersGopRemainingFrames VkBool32 requiresGopRemainingFrames - VkVideoEncodeH264StdFlagsEXT stdSyntaxFlags + VkVideoEncodeH264StdFlagsKHR stdSyntaxFlags - - VkStructureType sType + + VkStructureType sType void* pNext - VkVideoEncodeH264RateControlFlagsEXT preferredRateControlFlags + VkVideoEncodeH264RateControlFlagsKHR preferredRateControlFlags uint32_t preferredGopFrameCount uint32_t preferredIdrPeriod uint32_t preferredConsecutiveBFrameCount uint32_t preferredTemporalLayerCount - VkVideoEncodeH264QpEXT preferredConstantQp + VkVideoEncodeH264QpKHR preferredConstantQp uint32_t preferredMaxL0ReferenceCount uint32_t preferredMaxL1ReferenceCount VkBool32 preferredStdEntropyCodingModeFlag @@ -6992,111 +7073,111 @@ typedef void* MTLSharedEvent_id; - - VkStructureType sType + + VkStructureType sType const void* pNext VkBool32 useMaxLevelIdc StdVideoH264LevelIdc maxLevelIdc - - VkStructureType sType + + VkStructureType sType const void* pNext uint32_t stdSPSCount const StdVideoH264SequenceParameterSet* pStdSPSs uint32_t stdPPSCount const StdVideoH264PictureParameterSet* pStdPPSsList of Picture Parameters associated with the spsStd, above - - VkStructureType sType + + VkStructureType sType const void* pNext uint32_t maxStdSPSCount uint32_t maxStdPPSCount - const VkVideoEncodeH264SessionParametersAddInfoEXT* pParametersAddInfo + const VkVideoEncodeH264SessionParametersAddInfoKHR* pParametersAddInfo - - VkStructureType sType + + VkStructureType sType const void* pNext VkBool32 writeStdSPS VkBool32 writeStdPPS uint32_t stdSPSId uint32_t stdPPSId - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 hasStdSPSOverrides VkBool32 hasStdPPSOverrides - - VkStructureType sType + + VkStructureType sType const void* pNext const StdVideoEncodeH264ReferenceInfo* pStdReferenceInfo - - VkStructureType sType + + VkStructureType sType const void* pNext uint32_t naluSliceEntryCount - const VkVideoEncodeH264NaluSliceInfoEXT* pNaluSliceEntries + const VkVideoEncodeH264NaluSliceInfoKHR* pNaluSliceEntries const StdVideoEncodeH264PictureInfo* pStdPictureInfo VkBool32 generatePrefixNalu - - VkStructureType sType + + VkStructureType sType const void* pNext StdVideoH264ProfileIdc stdProfileIdc - - VkStructureType sType + + VkStructureType sType const void* pNext int32_t constantQp const StdVideoEncodeH264SliceHeader* pStdSliceHeader - - VkStructureType sType + + VkStructureType sType const void* pNext - VkVideoEncodeH264RateControlFlagsEXT flags + VkVideoEncodeH264RateControlFlagsKHR flags uint32_t gopFrameCount uint32_t idrPeriod uint32_t consecutiveBFrameCount uint32_t temporalLayerCount - + int32_t qpI int32_t qpP int32_t qpB - + uint32_t frameISize uint32_t framePSize uint32_t frameBSize - - VkStructureType sType + + VkStructureType sType const void* pNext VkBool32 useGopRemainingFrames uint32_t gopRemainingI uint32_t gopRemainingP uint32_t gopRemainingB - - VkStructureType sType + + VkStructureType sType const void* pNext VkBool32 useMinQp - VkVideoEncodeH264QpEXT minQp + VkVideoEncodeH264QpKHR minQp VkBool32 useMaxQp - VkVideoEncodeH264QpEXT maxQp + VkVideoEncodeH264QpKHR maxQp VkBool32 useMaxFrameSize - VkVideoEncodeH264FrameSizeEXT maxFrameSize + VkVideoEncodeH264FrameSizeKHR maxFrameSize - - VkStructureType sType + + VkStructureType sType void* pNext - VkVideoEncodeH265CapabilityFlagsEXT flags + VkVideoEncodeH265CapabilityFlagsKHR flags StdVideoH265LevelIdc maxLevelIdc uint32_t maxSliceSegmentCount VkExtent2D maxTiles - VkVideoEncodeH265CtbSizeFlagsEXT ctbSizes - VkVideoEncodeH265TransformBlockSizeFlagsEXT transformBlockSizes + VkVideoEncodeH265CtbSizeFlagsKHR ctbSizes + VkVideoEncodeH265TransformBlockSizeFlagsKHR transformBlockSizes uint32_t maxPPictureL0ReferenceCount uint32_t maxBPictureL0ReferenceCount uint32_t maxL1ReferenceCount @@ -7106,17 +7187,17 @@ typedef void* MTLSharedEvent_id; int32_t maxQp VkBool32 prefersGopRemainingFrames VkBool32 requiresGopRemainingFrames - VkVideoEncodeH265StdFlagsEXT stdSyntaxFlags + VkVideoEncodeH265StdFlagsKHR stdSyntaxFlags - - VkStructureType sType + + VkStructureType sType void* pNext - VkVideoEncodeH265RateControlFlagsEXT preferredRateControlFlags + VkVideoEncodeH265RateControlFlagsKHR preferredRateControlFlags uint32_t preferredGopFrameCount uint32_t preferredIdrPeriod uint32_t preferredConsecutiveBFrameCount uint32_t preferredSubLayerCount - VkVideoEncodeH265QpEXT preferredConstantQp + VkVideoEncodeH265QpKHR preferredConstantQp uint32_t preferredMaxL0ReferenceCount uint32_t preferredMaxL1ReferenceCount @@ -7129,14 +7210,14 @@ typedef void* MTLSharedEvent_id; - - VkStructureType sType + + VkStructureType sType const void* pNext VkBool32 useMaxLevelIdc StdVideoH265LevelIdc maxLevelIdc - - VkStructureType sType + + VkStructureType sType const void* pNext uint32_t stdVPSCount const StdVideoH265VideoParameterSet* pStdVPSs @@ -7145,16 +7226,16 @@ typedef void* MTLSharedEvent_id; uint32_t stdPPSCount const StdVideoH265PictureParameterSet* pStdPPSsList of Picture Parameters associated with the spsStd, above - - VkStructureType sType + + VkStructureType sType const void* pNext uint32_t maxStdVPSCount uint32_t maxStdSPSCount uint32_t maxStdPPSCount - const VkVideoEncodeH265SessionParametersAddInfoEXT* pParametersAddInfo + const VkVideoEncodeH265SessionParametersAddInfoKHR* pParametersAddInfo - - VkStructureType sType + + VkStructureType sType const void* pNext VkBool32 writeStdVPS VkBool32 writeStdSPS @@ -7163,70 +7244,70 @@ typedef void* MTLSharedEvent_id; uint32_t stdSPSId uint32_t stdPPSId - - VkStructureType sType + + VkStructureType sType void* pNext VkBool32 hasStdVPSOverrides VkBool32 hasStdSPSOverrides VkBool32 hasStdPPSOverrides - - VkStructureType sType + + VkStructureType sType const void* pNext uint32_t naluSliceSegmentEntryCount - const VkVideoEncodeH265NaluSliceSegmentInfoEXT* pNaluSliceSegmentEntries + const VkVideoEncodeH265NaluSliceSegmentInfoKHR* pNaluSliceSegmentEntries const StdVideoEncodeH265PictureInfo* pStdPictureInfo - - VkStructureType sType + + VkStructureType sType const void* pNext int32_t constantQp const StdVideoEncodeH265SliceSegmentHeader* pStdSliceSegmentHeader - - VkStructureType sType + + VkStructureType sType const void* pNext - VkVideoEncodeH265RateControlFlagsEXT flags + VkVideoEncodeH265RateControlFlagsKHR flags uint32_t gopFrameCount uint32_t idrPeriod uint32_t consecutiveBFrameCount uint32_t subLayerCount - + int32_t qpI int32_t qpP int32_t qpB - + uint32_t frameISize uint32_t framePSize uint32_t frameBSize - - VkStructureType sType + + VkStructureType sType const void* pNext VkBool32 useGopRemainingFrames uint32_t gopRemainingI uint32_t gopRemainingP uint32_t gopRemainingB - - VkStructureType sType + + VkStructureType sType const void* pNext VkBool32 useMinQp - VkVideoEncodeH265QpEXT minQp + VkVideoEncodeH265QpKHR minQp VkBool32 useMaxQp - VkVideoEncodeH265QpEXT maxQp + VkVideoEncodeH265QpKHR maxQp VkBool32 useMaxFrameSize - VkVideoEncodeH265FrameSizeEXT maxFrameSize + VkVideoEncodeH265FrameSizeKHR maxFrameSize - - VkStructureType sType + + VkStructureType sType const void* pNext StdVideoH265ProfileIdc stdProfileIdc - - VkStructureType sType + + VkStructureType sType const void* pNext const StdVideoEncodeH265ReferenceInfo* pStdReferenceInfo @@ -7353,7 +7434,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext VkDeviceAddress address - VkBufferUsageFlags usage + VkBufferUsageFlags usage VkStructureType sType @@ -7566,7 +7647,7 @@ typedef void* MTLSharedEvent_id; const void* pNext zx_handle_t collectionToken - + VkStructureType sType void* pNext uint32_t memoryTypeBits @@ -7645,10 +7726,10 @@ typedef void* MTLSharedEvent_id; uint32_t blockDimY uint32_t blockDimZ uint32_t sharedMemBytes - size_t paramCount - const void* const * pParams - size_t extraCount - const void* const * pExtras + size_t paramCount + const void* const * pParams + size_t extraCount + const void* const * pExtras VkStructureType sType @@ -7856,7 +7937,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType void* pNext uint32_t identifierSize - uint8_t identifier[VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT] + uint8_t identifier[VK_MAX_SHADER_MODULE_IDENTIFIER_SIZE_EXT] VkStructureType sType @@ -7908,7 +7989,7 @@ typedef void* MTLSharedEvent_id; VkSubpassMergeStatusEXT subpassMergeStatus - char description[VK_MAX_DESCRIPTION_SIZE] + char description[VK_MAX_DESCRIPTION_SIZE] uint32_t postMergeIndex @@ -8049,7 +8130,7 @@ typedef void* MTLSharedEvent_id; VkMicromapEXT micromap - + VkStructureType sType void* pNext uint8_t pipelineIdentifier[VK_UUID_SIZE] @@ -8301,9 +8382,9 @@ typedef void* MTLSharedEvent_id; VkDeviceSize addressPrecision - char description[VK_MAX_DESCRIPTION_SIZE]Free-form description of the fault - uint64_t vendorFaultCode - uint64_t vendorFaultData + char description[VK_MAX_DESCRIPTION_SIZE]Free-form description of the fault + uint64_t vendorFaultCode + uint64_t vendorFaultData VkStructureType sType @@ -8312,13 +8393,13 @@ typedef void* MTLSharedEvent_id; uint32_t vendorInfoCount VkDeviceSize vendorBinarySizeSpecified in bytes - + VkStructureType sType - void* pNext - char description[VK_MAX_DESCRIPTION_SIZE]Free-form description of the fault - VkDeviceFaultAddressInfoEXT* pAddressInfos - VkDeviceFaultVendorInfoEXT* pVendorInfos - void* pVendorBinaryData + void* pNext + char description[VK_MAX_DESCRIPTION_SIZE]Free-form description of the fault + VkDeviceFaultAddressInfoEXT* pAddressInfos + VkDeviceFaultVendorInfoEXT* pVendorInfos + void* pVendorBinaryData The fields in this structure are non-normative since structure packing is implementation-defined in C. The specification defines the normative layout. @@ -8628,7 +8709,7 @@ typedef void* MTLSharedEvent_id; VkBool32 cooperativeMatrix VkBool32 cooperativeMatrixRobustBufferAccess - + VkStructureType sType void* pNext uint32_t MSize @@ -8663,7 +8744,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType const void* pNext - VkPipelineCreateFlags flags + VkPipelineCreateFlags flags uint32_t stageCount const VkPipelineShaderStageCreateInfo* pStages const VkPipelineLibraryCreateInfoKHR* pLibraryInfo @@ -8693,6 +8774,65 @@ typedef void* MTLSharedEvent_id; VkDeviceOrHostAddressConstAMDX infos uint64_t stride + + VkStructureType sType + const void* pNext + VkResult* pResult + + + VkStructureType sType + const void* pNext + VkShaderStageFlags stageFlags + VkPipelineLayout layout + uint32_t firstSet + uint32_t descriptorSetCount + const VkDescriptorSet* pDescriptorSets + uint32_t dynamicOffsetCount + const uint32_t* pDynamicOffsets + + + VkStructureType sType + const void* pNext + VkPipelineLayout layout + VkShaderStageFlags stageFlags + uint32_t offset + uint32_t size + const void* pValues + + + VkStructureType sType + const void* pNext + VkShaderStageFlags stageFlags + VkPipelineLayout layout + uint32_t set + uint32_t descriptorWriteCount + const VkWriteDescriptorSet* pDescriptorWrites + + + VkStructureType sType + const void* pNext + VkDescriptorUpdateTemplate descriptorUpdateTemplate + VkPipelineLayout layout + uint32_t set + const void* pData + + + VkStructureType sType + const void* pNext + VkShaderStageFlags stageFlags + VkPipelineLayout layout + uint32_t firstSet + uint32_t setCount + const uint32_t* pBufferIndices + const VkDeviceSize* pOffsets + + + VkStructureType sType + const void* pNext + VkShaderStageFlags stageFlags + VkPipelineLayout layout + uint32_t set + VkStructureType sType void* pNext @@ -8750,6 +8890,12 @@ typedef void* MTLSharedEvent_id; void* pNext VkLayeredDriverUnderlyingApiMSFT underlyingAPI + + VkStructureType sType + void* pNext + VkBool32 perStageDescriptorSet + VkBool32 dynamicPipelineLayout + VkStructureType sType void* pNext @@ -8792,7 +8938,7 @@ typedef void* MTLSharedEvent_id; uint32_t timingCount VkLatencyTimingsFrameReportNV* pTimings - + VkStructureType sType const void* pNext uint64_t presentID @@ -8882,7 +9028,7 @@ typedef void* MTLSharedEvent_id; VkStructureType sType const void* pNext uint32_t stripeInfoCount - VkRenderPassStripeInfoARM* pStripeInfos + const VkRenderPassStripeInfoARM* pStripeInfos VkStructureType sType @@ -8890,6 +9036,73 @@ typedef void* MTLSharedEvent_id; uint32_t stripeSemaphoreInfoCount const VkSemaphoreSubmitInfo* pStripeSemaphoreInfos + + VkStructureType sType + void* pNext + VkBool32 shaderMaximalReconvergence + + + VkStructureType sType + void* pNext + VkBool32 shaderSubgroupRotate + VkBool32 shaderSubgroupRotateClustered + + + VkStructureType sType + void* pNext + VkBool32 shaderExpectAssume + + + VkStructureType sType + void* pNext + VkBool32 shaderFloatControls2 + + + VkStructureType sType + void* pNext + VkBool32 dynamicRenderingLocalRead + + + VkStructureType sType + const void* pNext + uint32_t colorAttachmentCount + const uint32_t* pColorAttachmentLocations + + + VkStructureType sType + const void* pNext + uint32_t colorAttachmentCount + const uint32_t* pColorAttachmentInputIndices + const uint32_t* pDepthInputAttachmentIndex + const uint32_t* pStencilInputAttachmentIndex + + + VkStructureType sType + void* pNext + VkBool32 shaderQuadControl + + + VkStructureType sType + void* pNext + VkBool32 shaderFloat16VectorAtomics + + + VkStructureType sType + void* pNext + VkBool32 memoryMapPlaced + VkBool32 memoryMapRangePlaced + VkBool32 memoryUnmapReserve + + + VkStructureType sType + void* pNext + VkDeviceSize minPlacedMemoryMapAlignment + + + VkStructureType sType + const void* pNext + void* pPlacedAddress + @@ -8928,6 +9141,7 @@ typedef void* MTLSharedEvent_id; + @@ -9648,6 +9862,8 @@ typedef void* MTLSharedEvent_id; + + @@ -9760,11 +9976,11 @@ typedef void* MTLSharedEvent_id; - - - - - + + + + + @@ -10314,11 +10530,15 @@ typedef void* MTLSharedEvent_id; - - - - - + + + + + + + + + @@ -10557,7 +10777,7 @@ typedef void* MTLSharedEvent_id; - + @@ -10607,6 +10827,8 @@ typedef void* MTLSharedEvent_id; + + @@ -10642,45 +10864,45 @@ typedef void* MTLSharedEvent_id; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -10758,58 +10980,58 @@ typedef void* MTLSharedEvent_id; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -11018,6 +11240,8 @@ typedef void* MTLSharedEvent_id; + + @@ -11512,11 +11736,11 @@ typedef void* MTLSharedEvent_id; const VkAllocationCallbacks* pAllocator VkPipeline* pPipelines - + VkResult vkGetDeviceSubpassShadingMaxWorkgroupSizeHUAWEI VkDevice device VkRenderPass renderpass - VkExtent2D* pMaxWorkgroupSize + VkExtent2D* pMaxWorkgroupSize void vkDestroyPipeline @@ -11779,7 +12003,7 @@ typedef void* MTLSharedEvent_id; void vkCmdBindIndexBuffer VkCommandBuffer commandBuffer - VkBuffer buffer + VkBuffer buffer VkDeviceSize offset VkIndexType indexType @@ -13104,8 +13328,8 @@ typedef void* MTLSharedEvent_id; VkDevice device VkImage image int nativeFenceFd - VkSemaphore semaphore - VkFence fence + VkSemaphore semaphore + VkFence fence VkResult vkQueueSignalReleaseImageANDROID @@ -13131,19 +13355,21 @@ typedef void* MTLSharedEvent_id; VkBool32 localDimmingEnable - VkResult vkGetPhysicalDeviceCalibrateableTimeDomainsEXT + VkResult vkGetPhysicalDeviceCalibrateableTimeDomainsKHR VkPhysicalDevice physicalDevice uint32_t* pTimeDomainCount - VkTimeDomainEXT* pTimeDomains + VkTimeDomainKHR* pTimeDomains + - VkResult vkGetCalibratedTimestampsEXT + VkResult vkGetCalibratedTimestampsKHR VkDevice device uint32_t timestampCount - const VkCalibratedTimestampInfoEXT* pTimestampInfos + const VkCalibratedTimestampInfoKHR* pTimestampInfos uint64_t* pTimestamps uint64_t* pMaxDeviation + VkResult vkSetDebugUtilsObjectNameEXT VkDevice device @@ -13862,11 +14088,12 @@ typedef void* MTLSharedEvent_id; VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations - void vkCmdSetLineStippleEXT + void vkCmdSetLineStippleKHR VkCommandBuffer commandBuffer uint32_t lineStippleFactor uint16_t lineStipplePattern + VkResult vkGetFaultData VkDevice device @@ -13991,7 +14218,7 @@ typedef void* MTLSharedEvent_id; void vkCmdBindIndexBuffer2KHR VkCommandBuffer commandBuffer - VkBuffer buffer + VkBuffer buffer VkDeviceSize offset VkDeviceSize size VkIndexType indexType @@ -14979,12 +15206,12 @@ typedef void* MTLSharedEvent_id; const VkMemoryMapInfoKHR* pMemoryMapInfo void** ppData - + VkResult vkUnmapMemory2KHR VkDevice device const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo - + VkResult vkCreateShadersEXT VkDevice device uint32_t createInfoCount @@ -14995,7 +15222,7 @@ typedef void* MTLSharedEvent_id; void vkDestroyShaderEXT VkDevice device - VkShaderEXT shader + VkShaderEXT shader const VkAllocationCallbacks* pAllocator @@ -15069,6 +15296,36 @@ typedef void* MTLSharedEvent_id; VkDeviceAddress scratch VkDeviceAddress countInfo + + void vkCmdBindDescriptorSets2KHR + VkCommandBuffer commandBuffer + const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo + + + void vkCmdPushConstants2KHR + VkCommandBuffer commandBuffer + const VkPushConstantsInfoKHR* pPushConstantsInfo + + + void vkCmdPushDescriptorSet2KHR + VkCommandBuffer commandBuffer + const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo + + + void vkCmdPushDescriptorSetWithTemplate2KHR + VkCommandBuffer commandBuffer + const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo + + + void vkCmdSetDescriptorBufferOffsets2EXT + VkCommandBuffer commandBuffer + const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo + + + void vkCmdBindDescriptorBufferEmbeddedSamplers2EXT + VkCommandBuffer commandBuffer + const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo + VkResult vkSetLatencySleepModeNV VkDevice device @@ -15098,6 +15355,16 @@ typedef void* MTLSharedEvent_id; VkQueue queue const VkOutOfBandQueueTypeInfoNV* pQueueTypeInfo + + void vkCmdSetRenderingAttachmentLocationsKHR + VkCommandBuffer commandBuffer + const VkRenderingAttachmentLocationInfoKHR* pLocationInfo + + + void vkCmdSetRenderingInputAttachmentIndicesKHR + VkCommandBuffer commandBuffer + const VkRenderingInputAttachmentIndexInfoKHR* pLocationInfo + @@ -15255,6 +15522,7 @@ typedef void* MTLSharedEvent_id; + @@ -16934,7 +17202,7 @@ typedef void* MTLSharedEvent_id; - + @@ -17111,101 +17379,101 @@ typedef void* MTLSharedEvent_id; - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -19229,7 +19497,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19241,7 +19509,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19249,13 +19517,13 @@ typedef void* MTLSharedEvent_id; - + - + @@ -19347,11 +19615,15 @@ typedef void* MTLSharedEvent_id; - + - + + + + + @@ -19374,7 +19646,7 @@ typedef void* MTLSharedEvent_id; - + @@ -19417,13 +19689,13 @@ typedef void* MTLSharedEvent_id; - + - - - - - + + + + + @@ -19890,10 +20162,19 @@ typedef void* MTLSharedEvent_id; - + - - + + + + + + + + + + + @@ -19910,10 +20191,12 @@ typedef void* MTLSharedEvent_id; - + - - + + + + @@ -20202,14 +20485,14 @@ typedef void* MTLSharedEvent_id; - + - - - - + + + + @@ -20252,12 +20535,12 @@ typedef void* MTLSharedEvent_id; - + - - + + @@ -20387,15 +20670,24 @@ typedef void* MTLSharedEvent_id; + - + - - + + + + + + + + + + @@ -20534,9 +20826,9 @@ typedef void* MTLSharedEvent_id; - + - + @@ -20742,43 +21034,43 @@ typedef void* MTLSharedEvent_id; - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -20816,8 +21108,8 @@ typedef void* MTLSharedEvent_id; - - + + @@ -20832,38 +21124,38 @@ typedef void* MTLSharedEvent_id; - + - + - + - + - + - + @@ -20912,7 +21204,7 @@ typedef void* MTLSharedEvent_id; - + @@ -21329,9 +21621,9 @@ typedef void* MTLSharedEvent_id; - + - + @@ -22128,11 +22420,11 @@ typedef void* MTLSharedEvent_id; - + - - + + @@ -22159,16 +22451,16 @@ typedef void* MTLSharedEvent_id; - - + + - - + + @@ -22258,10 +22550,14 @@ typedef void* MTLSharedEvent_id; - + - - + + + + + + @@ -22445,10 +22741,12 @@ typedef void* MTLSharedEvent_id; - + - - + + + + @@ -22479,7 +22777,7 @@ typedef void* MTLSharedEvent_id; - + @@ -22487,7 +22785,7 @@ typedef void* MTLSharedEvent_id; - + @@ -22615,7 +22913,6 @@ typedef void* MTLSharedEvent_id; - @@ -22626,21 +22923,10 @@ typedef void* MTLSharedEvent_id; - - - - - - - - - - - @@ -22651,15 +22937,45 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -23060,6 +23376,7 @@ typedef void* MTLSharedEvent_id; + @@ -23094,7 +23411,8 @@ typedef void* MTLSharedEvent_id; - + + @@ -23140,15 +23458,31 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + + + + + + + + @@ -23199,7 +23533,7 @@ typedef void* MTLSharedEvent_id; - + @@ -23236,7 +23570,7 @@ typedef void* MTLSharedEvent_id; - + @@ -23298,6 +23632,7 @@ typedef void* MTLSharedEvent_id; + @@ -23471,7 +23806,7 @@ typedef void* MTLSharedEvent_id; - + @@ -23487,10 +23822,22 @@ typedef void* MTLSharedEvent_id; - + - - + + + + + + + + + + + + + + @@ -23505,19 +23852,26 @@ typedef void* MTLSharedEvent_id; - + - - - - + + + + + + + + + - + - - - + + + + + @@ -23526,7 +23880,7 @@ typedef void* MTLSharedEvent_id; - + @@ -23539,7 +23893,7 @@ typedef void* MTLSharedEvent_id; - + @@ -23552,7 +23906,7 @@ typedef void* MTLSharedEvent_id; - + @@ -23562,7 +23916,7 @@ typedef void* MTLSharedEvent_id; - + @@ -23593,16 +23947,25 @@ typedef void* MTLSharedEvent_id; - + - - + + + + + + + + + - + - - + + + + @@ -23611,10 +23974,12 @@ typedef void* MTLSharedEvent_id; - + - - + + + + @@ -23656,19 +24021,31 @@ typedef void* MTLSharedEvent_id; - + - - + + + + + - + - - + + + + + + + + + + + - + @@ -23716,22 +24093,59 @@ typedef void* MTLSharedEvent_id; - + - - + + + + + + + - + - - + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -23784,6 +24198,16 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + + @@ -23792,6 +24216,86 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -25370,6 +25874,9 @@ typedef void* MTLSharedEvent_id; + + + @@ -25420,6 +25927,21 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + + + + + + + @@ -25492,6 +26014,9 @@ typedef void* MTLSharedEvent_id; + + + @@ -25915,6 +26440,21 @@ typedef void* MTLSharedEvent_id; + + + + + + + + + + + + + + + diff --git a/registry/vkconventions.py b/registry/vkconventions.py index 6f0edd7..cf0803b 100755 --- a/registry/vkconventions.py +++ b/registry/vkconventions.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -i # -# Copyright 2013-2023 The Khronos Group Inc. +# Copyright 2013-2024 The Khronos Group Inc. # # SPDX-License-Identifier: Apache-2.0 @@ -119,6 +119,7 @@ def generate_structure_type_from_name(self, structname): # The simple-minded rules need modification for some structure names subpats = [ [ r'_H_(26[45])_', r'_H\1_' ], + [ r'_AV_1_', r'_AV1_' ], [ r'_VULKAN_([0-9])([0-9])_', r'_VULKAN_\1_\2_' ], [ r'_VULKAN_SC_([0-9])([0-9])_',r'_VULKAN_SC_\1_\2_' ], [ r'_DIRECT_FB_', r'_DIRECTFB_' ], diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e24f3d2..5022538 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,46 +1,35 @@ # ~~~ -# Copyright (c) 2022-2023 LunarG, Inc. +# Copyright 2022-2023 The Khronos Group Inc. +# Copyright 2022-2023 Valve Corporation +# Copyright 2022-2023 LunarG, Inc. # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 # ~~~ -# Test the non-API headers provided by this repo -# NOTE: For us testing just means that these header files compile -# with reasonable warnings. - -message(STATUS "${PROJECT_NAME} = ${PROJECT_VERSION}") - -set(CMAKE_C_STANDARD 99) -set(CMAKE_C_STANDARD_REQUIRED ON) -set(CMAKE_C_EXTENSIONS OFF) - -if(${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)") - add_compile_options( - -Wpedantic - -Wall - -Wextra - -Werror - ) -endif() +# Test add_subdirectory suppport +add_test(NAME integration.add_subdirectory + COMMAND ${CMAKE_CTEST_COMMAND} + --build-and-test ${CMAKE_CURRENT_LIST_DIR}/integration + ${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory + --build-generator ${CMAKE_GENERATOR} + --build-options -DFIND_PACKAGE_TESTING=OFF + -DVULKANSC=${VULKANSC} +) -# vk_icd.h -add_executable(vk_icd vk_icd.c) -target_link_libraries(vk_icd PRIVATE Vulkan::Headers) +set(test_install_dir "${CMAKE_CURRENT_BINARY_DIR}/install") +add_test(NAME integration.install + COMMAND ${CMAKE_COMMAND} --install ${VULKAN_HEADERS_BINARY_DIR} --prefix ${test_install_dir} --config $ +) -# vk_layer.h -add_library(vk_layer MODULE vk_layer.c) -target_link_libraries(vk_layer PRIVATE Vulkan::Headers) +# Test find_package suppport +add_test(NAME integration.find_package + COMMAND ${CMAKE_CTEST_COMMAND} + --build-and-test ${CMAKE_CURRENT_LIST_DIR}/integration + ${CMAKE_CURRENT_BINARY_DIR}/find_package + --build-generator ${CMAKE_GENERATOR} + --build-options -DFIND_PACKAGE_TESTING=ON -DCMAKE_PREFIX_PATH=${test_install_dir} + -DVULKANSC=${VULKANSC} +) -if (NOT TARGET Vulkan-Headers) - message(FATAL_ERROR "Backcompat for Vulkan-Headers target broken!") -endif() +# Installing comes before testing +set_tests_properties(integration.find_package PROPERTIES DEPENDS integration.install) diff --git a/tests/find_package/CMakeLists.txt b/tests/find_package/CMakeLists.txt index d9f32a4..d6f803c 100644 --- a/tests/find_package/CMakeLists.txt +++ b/tests/find_package/CMakeLists.txt @@ -4,6 +4,10 @@ project(TEST_VULKAN_HEADERS_FIND_PACKAGE_SUPPORT LANGUAGES C) find_package(VulkanHeaders REQUIRED CONFIG) +if(VULKANSC) + add_definitions(-DVULKANSC) +endif() + if (NOT TARGET Vulkan::Headers) message(FATAL_ERROR "Vulkan::Headers target not defined") endif() diff --git a/tests/integration/CMakeLists.txt b/tests/integration/CMakeLists.txt new file mode 100644 index 0000000..415a07a --- /dev/null +++ b/tests/integration/CMakeLists.txt @@ -0,0 +1,77 @@ +# ~~~ +# Copyright 2022-2023 The Khronos Group Inc. +# Copyright 2022-2023 Valve Corporation +# Copyright 2022-2023 LunarG, Inc. +# +# SPDX-License-Identifier: Apache-2.0 +# ~~~ +cmake_minimum_required(VERSION 3.14.2) + +project(API LANGUAGES C) + +if(VULKANSC) + add_definitions(-DVULKANSC) +endif() + +if (FIND_PACKAGE_TESTING) + find_package(VulkanHeaders REQUIRED CONFIG) +else() + add_subdirectory(../../ ${CMAKE_CURRENT_BINARY_DIR}/headers) +endif() + +if (NOT TARGET Vulkan::Headers) + message(FATAL_ERROR "Vulkan::Headers target not defined") +endif() + +if (FIND_PACKAGE_TESTING) + if (NOT DEFINED VulkanHeaders_VERSION) + message(FATAL_ERROR "VulkanHeaders_VERSION not defined!") + endif() + message(STATUS "VulkanHeaders_VERSION = ${VulkanHeaders_VERSION}") +endif() + +if (NOT FIND_PACKAGE_TESTING) + # Consuming vulkan-headers via add_subdirectory should NOT add installation code to the parent CMake project. + if (DEFINED CMAKE_INSTALL_INCLUDEDIR) + message(FATAL_ERROR "CMAKE_INSTALL_INCLUDEDIR was defined!") + endif() + + # NOTE: Some users may not be using the namespace target. + # Don't accidentally break them unless we have to. + if (NOT TARGET Vulkan-Headers) + message(FATAL_ERROR "Backcompat for Vulkan-Headers target broken!") + endif() +endif() + +set(CMAKE_C_STANDARD 99) +set(CMAKE_C_STANDARD_REQUIRED ON) +set(CMAKE_C_EXTENSIONS OFF) + +if(${CMAKE_C_COMPILER_ID} MATCHES "(GNU|Clang)") + add_compile_options( + -Wpedantic + -Wall + -Wextra + -Werror + ) +endif() + +if (MSVC) + add_compile_options( + /W4 + /permissive- + /WX + ) +endif() + +# Test the non-API headers provided by this repo +# NOTE: For us testing just means that these header files compile +# with reasonable warnings. + +# vk_icd.h +add_library(vk_icd MODULE ../vk_icd.c) +target_link_libraries(vk_icd PRIVATE Vulkan::Headers) + +# vk_layer.h +add_library(vk_layer MODULE ../vk_layer.c) +target_link_libraries(vk_layer PRIVATE Vulkan::Headers) diff --git a/tests/vk_icd.c b/tests/vk_icd.c index 23766e5..48f5ef8 100644 --- a/tests/vk_icd.c +++ b/tests/vk_icd.c @@ -1,6 +1,14 @@ +/* + * Copyright 2022-2023 The Khronos Group Inc. + * Copyright 2022-2023 Valve Corporation + * Copyright 2022-2023 LunarG, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + #include "vulkan/vk_icd.h" -int main() +int square(int i) { - return 0; + return i * i; } diff --git a/tests/vk_layer.c b/tests/vk_layer.c index df2bc09..a87e324 100644 --- a/tests/vk_layer.c +++ b/tests/vk_layer.c @@ -1,6 +1,14 @@ +/* + * Copyright 2022-2023 The Khronos Group Inc. + * Copyright 2022-2023 Valve Corporation + * Copyright 2022-2023 LunarG, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + #include "vulkan/vk_layer.h" -int foobar() +int square(int i) { - return 0; + return i * i; }