Compare commits

...

70 commits

Author SHA1 Message Date
Jon Leech
5ceb9ed481 Update for Vulkan-Docs 1.4.312
Some checks failed
ci / cmake-unix (3.22.1, ubuntu-latest) (push) Failing after 1s
ci / cmake-unix (latest, ubuntu-latest) (push) Failing after 1s
ci / cmake-unix-modules (latest, clang++-18, ubuntu-latest) (push) Failing after 1s
ci / reuse (push) Failing after 1s
ci / cmake-unix (3.22.1, macos-latest) (push) Has been cancelled
ci / cmake-unix (latest, macos-latest) (push) Has been cancelled
ci / cmake-windows (3.22.1) (push) Has been cancelled
ci / cmake-windows (latest) (push) Has been cancelled
ci / windows_clang (clang) (push) Has been cancelled
ci / windows_clang (clang-cl) (push) Has been cancelled
ci / cmake-windows-modules (latest, windows-latest) (push) Has been cancelled
2025-04-04 04:45:22 -07:00
Jan Kuhlmann
2ac81691ba adjusted fnc name
Some checks failed
ci / windows_clang (clang-cl) (push) Has been cancelled
ci / cmake-unix (3.22.1, ubuntu-latest) (push) Failing after 2s
ci / cmake-unix (latest, ubuntu-latest) (push) Failing after 2s
ci / cmake-unix-modules (latest, clang++-18, ubuntu-latest) (push) Failing after 1s
ci / reuse (push) Failing after 1s
ci / cmake-unix (latest, macos-latest) (push) Has been cancelled
ci / cmake-windows (3.22.1) (push) Has been cancelled
ci / cmake-windows-modules (latest, windows-latest) (push) Has been cancelled
ci / cmake-windows (latest) (push) Has been cancelled
ci / cmake-unix (3.22.1, macos-latest) (push) Has been cancelled
ci / windows_clang (clang) (push) Has been cancelled
2025-03-31 09:52:53 -06:00
Jan Kuhlmann
a523083f72 simplified cpp module to not require function loading 2025-03-31 09:52:53 -06:00
Jan Kuhlmann
cb28cd1819 replaced minimal example for modules 2025-03-31 09:52:53 -06:00
Jan Kuhlmann
24ce771ec1 fixed linewrap on windows and CXX compiler on ubuntu 2025-03-31 09:52:53 -06:00
Jan Kuhlmann
cafcda9360 Added licenses and used included headers in minimal examples
Co-authored-by: jpr42 <109434725+jpr42@users.noreply.github.com>
2025-03-31 09:52:53 -06:00
Jan Kuhlmann
2b1e9e7409 added c++20 workflows for modules in ubuntu and windows 2025-03-31 09:52:53 -06:00
Jan Kuhlmann
a72b4466b3 minimal compilation setups for Vulkan::Hpp and Vulkan::HppModule 2025-03-31 09:52:53 -06:00
Jan Kuhlmann
fdc7404466 merged subdirectory tests 2025-03-31 09:52:53 -06:00
Jan Kuhlmann
9417d66dcf integration tests for cxx modules 2025-03-31 09:52:53 -06:00
Jon Leech
78c359741d Update for Vulkan-Docs 1.4.311 2025-03-20 23:33:08 -07:00
Jan Kuhlmann
d64e9e156a cmake: Rename Vulkan-Module to Vulkan-HppModule
The new name better indicates that the target is for Vulkan-Hpp.
The old Vulkan-Module and Vulkan::Module targets are now
deprecated and users should switch to Vulkan-HppModule.

Vulkan-HppModule now supports `import std` when available.

The commit disables cxx_extensions when using clang-16 due to
known issues.
2025-03-17 15:44:30 -06:00
Jon Leech
cacef3039d Update for Vulkan-Docs 1.4.310 2025-03-07 05:15:59 -08:00
Tom Anderson
0f0cfd88d7 GN build: Define VK_USE_PLATFORM_XLIB_KHR
This is required to define vkCreateXlibSurfaceKHR, which is required
by GTK4.

Depends on Dawn CL:
https://dawn-review.googlesource.com/c/dawn/+/229494

Needed to fix this Chromium issue:
https://g-issues.chromium.org/issues/345261080
2025-03-06 15:49:41 -06:00
Jon Leech
952f776f65 Update for Vulkan-Docs 1.4.309 2025-02-21 03:24:08 -08:00
Juan Ramos
234c4b7370 cmake: Update minimum version to 3.22.1
Matches Vulkan Validation Layers and SPIRV-Tools.
2025-02-04 16:44:38 -07:00
Jon Leech
39f924b810 Update for Vulkan-Docs 1.4.307 2025-01-30 01:57:39 -08:00
Jon Leech
e43027aa41 Update for Vulkan-Docs 1.4.306 2025-01-24 05:52:25 -08:00
Jon Leech
a03d2f6d57 Update for Vulkan-Docs 1.4.305 2025-01-17 03:16:54 -08:00
Jon Leech
d4a196d8c8 Update for Vulkan-Docs 1.4.304 2024-12-19 21:43:52 -08:00
Jon Leech
6a74a7d65c Add missing validusage.json and fix Makefile.release for new registry structure 2024-12-04 00:19:07 -08:00
Jon Leech
49af1bfe46 Update for Vulkan-Docs 1.4.303 2024-12-02 01:48:54 -08:00
Shahbaz Youssefi
9dff1f571c Fix GN include checks 2024-11-28 09:13:14 -07:00
Jon Leech
36872f9062 Update for Vulkan-Docs 1.3.302 2024-11-20 22:40:11 -08:00
dependabot[bot]
f864bc6dfe build(deps): bump fsfe/reuse-action from 4 to 5
Bumps [fsfe/reuse-action](https://github.com/fsfe/reuse-action) from 4 to 5.
- [Release notes](https://github.com/fsfe/reuse-action/releases)
- [Commits](https://github.com/fsfe/reuse-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: fsfe/reuse-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-19 12:56:41 -07:00
Jon Leech
cbcad3c058 Update for Vulkan-Docs 1.3.301 2024-11-01 19:52:35 -07:00
Charles Giessen
f2eb740f3f build: Disable Vulkan-Module by default
After numerous reports of builds being broken due to the addition of the
Vulkan-Module support code in CMake, the option is being set to OFF by
default. This prevents projects which do not use the module from not being
able to build due to compiler, build system, and platform issues. Projects
wishing to enable modules can set the cmake option
VULKAN_HEADERS_ENABLE_MODULE=ON to re-enable the module support.

Add a warning in case a user decides to enable the module but the platform
doesn't support modules.
2024-10-29 13:14:06 -06:00
Jon Leech
ab1ea9059d Update for Vulkan-Docs 1.3.300 2024-10-25 07:05:29 -07:00
Charles Giessen
e271cfd480 ci: Only run once if pushing to main repo branch 2024-10-22 10:42:45 -06:00
Jon Leech
b955ae0edb Update for Vulkan-Docs 1.3.299 2024-10-18 04:46:17 -07:00
Jon Leech
d91597a82f Update for Vulkan-Docs 1.3.298 2024-10-11 01:41:38 -07:00
Jon Leech
14345dab23 Update for Vulkan-Docs 1.3.297 2024-10-04 07:10:10 -07:00
Jon Leech
29f979ee5a Update for Vulkan-Docs 1.3.296 2024-09-26 00:50:55 -07:00
Mike Schuchardt
c6391a7b8c Fix MSVC identification for modules support
Can't use `MSVC` var because it is also true for clang-cl. Fixes #500.
2024-08-30 10:54:22 -06:00
Jon Leech
fbda05468e Update for Vulkan-Docs 1.3.295 2024-08-30 02:52:20 -07:00
Jon Leech
a6a5dc0d07 Update for Vulkan-Docs 1.3.294 2024-08-23 04:06:14 -07:00
Jon Leech
d205aff40b Update for Vulkan-Docs 1.3.293 2024-08-16 04:12:03 -07:00
Jon Leech
595c8d4794 Update for Vulkan-Docs 1.3.292 2024-07-27 05:26:27 -07:00
Jon Leech
fabe9e2672 Update for Vulkan-Docs 1.3.291 2024-07-19 02:38:51 -07:00
Charles Giessen
b379292b2a cmake: Disable modules if clang-scan-deps is missing
clang ships the clang-scan-deps tool separately from the compiler, making it possible
that the clang compiler supports modules but cannot be used by CMake for VulkanHppModule.

The straightforward solution is to, when using clang, check that the scan deps tools was
located. This prevents people who are using clang but not the modules from being unable
to use Vulkan-Headers when the clang-scan-deps tools is missing.
2024-07-16 01:13:21 -05:00
Charles Giessen
fc6c06ac52 Disable VulkanHppModule support in clang-cl
The current released versions of clang-cl does not work with CMakes
module implementation. Rather than break downstream users, just disable
the module support for the time being.
2024-07-12 14:13:48 -05:00
Charles Giessen
5952791798 Add windows clang & clang-cl CI jobs 2024-07-12 14:13:48 -05:00
Jon Leech
f41928bd4a Update for Vulkan-Docs 1.3.290 2024-07-12 00:13:36 -07:00
Charles Giessen
78a92e2c7c build: Require MSVC 17.11 for module support
17.10 and before has a bug that prevents the vulkan.cppm module from
compiling. The module support wont be enabled unless the MSVC version
contains the fix.
2024-07-10 11:12:48 -05:00
dependabot[bot]
6c539b2ed2 build(deps): bump fsfe/reuse-action from 3 to 4
Bumps [fsfe/reuse-action](https://github.com/fsfe/reuse-action) from 3 to 4.
- [Release notes](https://github.com/fsfe/reuse-action/releases)
- [Commits](https://github.com/fsfe/reuse-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: fsfe/reuse-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-08 13:11:15 -05:00
Jon Leech
4b9ea26d48 Change name of update to Makefile.release
Per https://github.com/KhronosGroup/Vulkan-Headers/pull/487#issuecomment-2187478137
2024-07-07 14:05:33 -05:00
Jon Leech
67dcf5647c Makefile to import generated scripts and headers when doing a spec update
Motivated by recent problems building the SC 1.0.15 spec update - will
import to VulkanSC-Headers and tweak once it's proven out for
Vulkan-Headers.

The Makefile may need to be modified when directory structure is changed
or new files are added.
2024-07-07 14:05:33 -05:00
Jon Leech
190d2cb24e Update for Vulkan-Docs 1.3.289 2024-06-28 02:50:56 -07:00
Charles Giessen
e3c37e6e18 cmake: Workaround MSVC module support compiler bug
Adds the VULKAN_HEADERS_ENABLE_MODULE option to control whether to build the Vulkan-Hpp module.
This is necessary to allow CI to pass while waiting for the MSVC version 17.11, which fixes an
internal compiler bug, to be added to github actions runners.
2024-06-18 14:25:22 -06:00
Charles Giessen
cde27c9456 ci: Add explicit build step
This tests the Vulkan Module building without needing to run inside an integration
test. While theoretically the integration tests will exercise the build, the nature
of running the build inside of a test makes it more difficult to diagnose if the test
is poorly setup or if the build itself isn't working.
2024-06-18 14:25:22 -06:00
Charles Giessen
7dacb97fba cmake: Remove explicit install of Vulkan-Module
Installing a C++ module in CMake isn't something which is well defined currently.
Rather than add code which behaves poorly or flat out wrong, it is better to not
try to install a binary module for the time being. The vulkan.cppm file is still
included in the install so downstream users can still create a module from it.
2024-06-18 14:25:22 -06:00
Charles Giessen
a692a9c939 ci: Add install step 2024-06-18 14:25:22 -06:00
Sharadh Rajaraman
85256c712c Add vulkan.cppm as a separate library: Vulkan::VulkanHppModule
- Guarded behind `if()` version and compiler test
- Linked to `Vulkan-Headers` as a dependency
- Also added `CXX` to the `LANGUAGES` property of the project
2024-06-18 14:25:22 -06:00
David Neto
8f034f6b48 cmake: Allow external control of whether to test or install
This makes the project more composable: It can be built and
tested as part of a larger set of projects, from source.
2024-06-14 14:42:51 -06:00
Jon Leech
05fe2cc910 Update for Vulkan-Docs 1.3.288 2024-06-14 05:46:24 -07:00
Jon Leech
d192041a2f Update for Vulkan-Docs 1.3.287 2024-06-07 05:09:34 -07:00
Jon Leech
192d051db3 Update for Vulkan-Docs 1.3.286 2024-05-31 03:06:51 -07:00
Jon Leech
5677bafb82 Update for Vulkan-Docs 1.3.285 2024-05-10 01:39:29 -07:00
Jon Leech
4bc77c26ff Update for Vulkan-Docs 1.3.284 2024-05-05 22:35:37 -07:00
Jon Leech
eaa319dade Update for Vulkan-Docs 1.3.283 2024-04-18 23:54:17 -07:00
Jon Leech
1e7b8a6d03 Update for Vulkan-Docs 1.3.282 2024-04-14 00:28:51 -07:00
Jon Leech
cfebfc96b2 Update for Vulkan-Docs 1.3.281 2024-03-22 04:06:02 -07:00
Jon Leech
577baa0503 Update for Vulkan-Docs 1.3.280 2024-03-08 05:16:31 -08:00
dependabot[bot]
f030d9dd8c build(deps): bump fsfe/reuse-action from 2 to 3
Bumps [fsfe/reuse-action](https://github.com/fsfe/reuse-action) from 2 to 3.
- [Release notes](https://github.com/fsfe/reuse-action/releases)
- [Commits](https://github.com/fsfe/reuse-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: fsfe/reuse-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 10:37:11 -07:00
Jon Leech
46dc0f6e51 Update for Vulkan-Docs 1.3.279 2024-03-01 06:26:07 -08:00
Jon Leech
31aa7f634b Update for Vulkan-Docs 1.3.278 2024-02-16 02:34:38 -08:00
unknown
5ac36269f5 build: Update build.gn with AV1 headers
av1std_decode.h & av1std.h were added recently and needed adding to the
build.gn build.
2024-02-09 08:18:46 -08:00
Jon Leech
5a5c9a6434 Update for Vulkan-Docs 1.3.277 2024-02-01 05:51:47 -08:00
Jon Leech
ea45703eff Fix REUSE 2024-01-25 03:53:51 -08:00
Jon Leech
170cde531f Update for Vulkan-Docs 1.3.276
Note that `registry/profiles/VP_KHR_roadmap.json` was renamed from
`registry/profiles/VP_KHR_roadmap_2022.json`, now that the file contains
multiple roadmap profiles.
2024-01-25 03:53:51 -08:00
67 changed files with 195482 additions and 113130 deletions

View file

@ -7,35 +7,129 @@ name: ci
on:
push:
pull_request:
branches:
- main
env:
CMAKE_GENERATOR: Ninja
permissions:
contents: read
jobs:
cmake:
cmake-unix:
runs-on: ${{ matrix.os }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
cmake-version: [ '3.15', 'latest']
os: [ ubuntu-latest, macos-latest ]
cmake-version: [ '3.22.1', 'latest']
steps:
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
with:
cmakeVersion: ${{ matrix.cmake-version }}
cmakeVersion: ${{ matrix.cmake-version }}
- uses: ilammy/msvc-dev-cmd@v1
- run: cmake -S . -B build -D BUILD_TESTS=ON -G Ninja
- run: cmake -S . -B build -D VULKAN_HEADERS_ENABLE_TESTS=ON -D VULKAN_HEADERS_ENABLE_INSTALL=ON -G Ninja
- run: cmake --build ./build
- run: cmake --install build/ --prefix build/install
- run: ctest --output-on-failure
working-directory: build
cmake-windows:
runs-on: windows-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy:
matrix:
cmake-version: [ '3.22.1', '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 VULKAN_HEADERS_ENABLE_TESTS=ON -D VULKAN_HEADERS_ENABLE_INSTALL=ON -G Ninja
- run: cmake --build ./build
- run: cmake --install build/ --prefix build/install
- run: ctest --output-on-failure
working-directory: build
windows_clang:
runs-on: windows-2022
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy:
matrix:
compiler: [ clang, clang-cl ]
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- run: |
cmake -S . -B build `
-D CMAKE_C_COMPILER=${{matrix.compiler}} `
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} `
-D CMAKE_BUILD_TYPE=Release `
-D VULKAN_HEADERS_ENABLE_TESTS=ON `
-D VULKAN_HEADERS_ENABLE_INSTALL=ON `
-G Ninja
- run: cmake --build ./build
- run: cmake --install build/ --prefix build/install
- run: ctest --output-on-failure
working-directory: build
cmake-unix-modules:
runs-on: ${{ matrix.os }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy:
matrix:
os: [ ubuntu-latest ]
cmake-version: [ 'latest' ]
compiler: [ clang++-18 ]
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 VULKAN_HEADERS_ENABLE_TESTS=ON \
-D VULKAN_HEADERS_ENABLE_INSTALL=ON \
-D VULKAN_HEADERS_ENABLE_MODULE=ON \
-D VULKAN_HEADERS_ENABLE_MODULE_STD=OFF \
-D CMAKE_CXX_COMPILER=${{ matrix.compiler }} \
-G Ninja
- run: cmake --build ./build
- run: cmake --install build/ --prefix build/install
- run: CXX=${{ matrix.compiler }} ctest --output-on-failure
working-directory: build
cmake-windows-modules:
runs-on: ${{ matrix.os }}
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
strategy:
matrix:
os: [ windows-latest ]
cmake-version: [ '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 VULKAN_HEADERS_ENABLE_TESTS=ON `
-D VULKAN_HEADERS_ENABLE_INSTALL=ON `
-D VULKAN_HEADERS_ENABLE_MODULE=ON `
-D VULKAN_HEADERS_ENABLE_MODULE_STD=OFF `
-G Ninja
- run: cmake --build ./build
- run: cmake --install build/ --prefix build/install
- run: ctest --output-on-failure
working-directory: build
reuse:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@v4
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v2
uses: fsfe/reuse-action@v5

View file

@ -2,14 +2,14 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Vulkan-Headers
Source: https://github.com/KhronosGroup/Vulkan-Headers
Files: registry/profiles/VP_KHR_roadmap_2022.json
Copyright: 2022-2023 The Khronos Group Inc.
Files: registry/profiles/VP_KHR_roadmap.json
Copyright: 2022-2024 The Khronos Group Inc.
License: Apache-2.0
Files: registry/validusage.json
Copyright: 2018-2023 The Khronos Group Inc.
Copyright: 2018-2024 The Khronos Group Inc.
License: Apache-2.0
Files: .github/ISSUE_TEMPLATE/bug_report.md .github/pull_request_template.md
Copyright: 2022-2023 The Khronos Group Inc.
Copyright: 2022-2024 The Khronos Group Inc.
License: Apache-2.0

View file

@ -13,7 +13,10 @@ config("vulkan_headers_config") {
defines += [ "VK_USE_PLATFORM_WIN32_KHR" ]
}
if (defined(vulkan_use_x11) && vulkan_use_x11) {
defines += [ "VK_USE_PLATFORM_XCB_KHR" ]
defines += [
"VK_USE_PLATFORM_XCB_KHR",
"VK_USE_PLATFORM_XLIB_KHR",
]
}
if (defined(vulkan_use_wayland) && vulkan_use_wayland) {
defines += [ "VK_USE_PLATFORM_WAYLAND_KHR" ]
@ -56,6 +59,9 @@ 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_encode.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",

View file

@ -5,7 +5,7 @@
#
# SPDX-License-Identifier: Apache-2.0
# ~~~
cmake_minimum_required(VERSION 3.15...3.25)
cmake_minimum_required(VERSION 3.22.1)
# NOTE: Parsing the version like this is suboptimal but neccessary due to our release process:
# https://github.com/KhronosGroup/Vulkan-Headers/pull/346
@ -36,24 +36,76 @@ function(vlk_get_header_version)
endfunction()
vlk_get_header_version()
project(VULKAN_HEADERS LANGUAGES C VERSION ${VK_VERSION_STRING})
project(VULKAN_HEADERS LANGUAGES C CXX VERSION ${VK_VERSION_STRING})
# options for Vulkan-Headers and the Vulkan-Hpp C++20 module
option(VULKAN_HEADERS_ENABLE_TESTS "Test Vulkan-Headers" ${PROJECT_IS_TOP_LEVEL})
option(VULKAN_HEADERS_ENABLE_INSTALL "Install Vulkan-Headers" ${PROJECT_IS_TOP_LEVEL})
option(VULKAN_HEADERS_ENABLE_MODULE "Enables building of the Vulkan C++20 module; requires minimum CMake version 3.28" OFF)
option(VULKAN_HEADERS_ENABLE_MODULE_STD "Enables building of the Vulkan C++20 module with import std; requires minimum CMake version 3.30" OFF)
# set up Vulkan-Headers
add_library(Vulkan-Headers INTERFACE)
add_library(Vulkan::Headers ALIAS Vulkan-Headers)
target_include_directories(Vulkan-Headers INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
if (CMAKE_VERSION VERSION_LESS "3.21")
# https://cmake.org/cmake/help/latest/variable/PROJECT_IS_TOP_LEVEL.html
string(COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} PROJECT_IS_TOP_LEVEL)
if (VULKAN_HEADERS_ENABLE_MODULE)
# check for compiler support
if ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND (MSVC_VERSION GREATER_EQUAL "1941")) OR
# clang-cl doesn't currently support modules
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "16.0"
AND (NOT CMAKE_C_COMPILER_FRONTEND_VARIANT MATCHES "MSVC")
AND (NOT CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS STREQUAL CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS-NOTFOUND)) OR
(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "14.0")
)
# check for CMake support
if(VULKAN_HEADERS_ENABLE_MODULE_STD AND CMAKE_VERSION VERSION_LESS "3.30")
message(FATAL_ERROR "Vulkan-Hpp: C++20 module with import std requires CMake 3.30 or later")
elseif (CMAKE_VERSION VERSION_LESS "3.28")
message(FATAL_ERROR "Vulkan-Hpp: C++20 module requires CMake 3.28 or later")
endif()
# set up Vulkan-HppModule
add_library(Vulkan-HppModule)
add_library(Vulkan::HppModule ALIAS Vulkan-HppModule)
target_sources(Vulkan-HppModule
PUBLIC
FILE_SET module
TYPE CXX_MODULES
FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan/vulkan.cppm")
if (VULKAN_HEADERS_ENABLE_MODULE_STD)
target_compile_features(Vulkan-HppModule
PRIVATE cxx_std_23
INTERFACE cxx_std_20) # only C++20 is required to consume this module
set_target_properties(Vulkan-HppModule PROPERTIES CXX_MODULE_STD ON)
else()
target_compile_features(Vulkan-HppModule PUBLIC cxx_std_20)
endif()
target_link_libraries(Vulkan-HppModule PUBLIC Vulkan::Headers)
# Clang 16's module support can be broken with extensions enabled
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "16.0")
set_target_properties(Vulkan-HppModule PROPERTIES CXX_EXTENSIONS OFF)
endif()
# set up fallback targets to notify about name deprecation
add_library(Vulkan-Module INTERFACE)
add_library(Vulkan::Module ALIAS Vulkan-Module)
target_link_libraries(Vulkan-Module INTERFACE Vulkan::HppModule)
set_target_properties(Vulkan-Module PROPERTIES
DEPRECATION "The Vulkan-Module and Vulkan::Module targets have been deprecated by the Vulkan-HppModule and Vulkan::HppModule targets respectively and will be removed at a future date.")
else()
message(FATAL_ERROR "Vulkan-Hpp: C++20 module support is requested but was disabled due to lacking compiler support on this platform")
endif()
endif()
if (PROJECT_IS_TOP_LEVEL)
option(BUILD_TESTS "Build the tests")
if (BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif()
if (VULKAN_HEADERS_ENABLE_TESTS)
enable_testing() # This is only effective in the top level CMakeLists.txt file.
add_subdirectory(tests)
endif()
if (VULKAN_HEADERS_ENABLE_INSTALL)
include(GNUInstallDirs)
include(CMakePackageConfigHelpers)
@ -63,8 +115,8 @@ if (PROJECT_IS_TOP_LEVEL)
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 VulkanHeadersConfig INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(EXPORT VulkanHeadersConfig NAMESPACE "Vulkan::" DESTINATION "share/cmake/VulkanHeaders")
set(version_config "${CMAKE_CURRENT_BINARY_DIR}/generated/VulkanHeadersConfigVersion.cmake")

110
Makefile.release Normal file
View file

@ -0,0 +1,110 @@
# Copyright 2024 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
# Makefile.release - update external files generated in Vulkan spec
# repository when a public specification update is done.
# Needed to get the right version of test, apparently
SHELL = /bin/bash
REVISION = 999
# Location of other repository clones
GIT = ..
SPEC = $(GIT)/Vulkan-Docs
HPP = $(GIT)/Vulkan-Hpp
REGISTRY = $(GIT)/registry/vulkan
update: version-check create-branch update-files push-branch
# Working branch for the update, and a test if it exists
BRANCH = update-$(REVISION)
# Switch to new branch which will contain the update
create-branch: version-check
git switch -q main
git pull -q
# If branch already exists, do nothing
@if test `git branch -l $(BRANCH) | wc -l` == 1 ; then \
echo "Branch $(BRANCH) already exists" ; \
git switch $(BRANCH) ; \
else \
echo "Creating branch $(BRANCH)" ; \
git switch -c $(BRANCH) ; \
fi
# Update headers and scripts in the new branch
update-files: remove-files update-headers update-scripts
# Vulkan SC Vulkan-Hpp headers not published in the Vulkan-Headers repository
SCHPPFILES = \
include/vulkan/vulkansc.hpp \
include/vulkan/vulkansc.cppm \
include/vulkan/vulkansc_*.hpp
update-headers:
if test ! -d $(SPEC)/gen/include/ ; then \
echo "No C header file source directory $(SPEC)/gen/include" ; \
exit 1 ; \
fi
if test ! -d $(HPP)/vulkan ; then \
echo "No C++ header file source directory $(HPP)/vulkan" ; \
exit 1 ; \
fi
cp -r $(SPEC)/gen/include/* include/
cp -r $(HPP)/vulkan/* include/vulkan/
rm -f $(SCHPPFILES)
# Top-level scripts / XML to install
SCRIPTS = \
$(SPEC)/scripts/base_generator.py \
$(SPEC)/scripts/cgenerator.py \
$(SPEC)/scripts/generator.py \
$(SPEC)/scripts/parse_dependency.py \
$(SPEC)/scripts/reg.py \
$(SPEC)/scripts/stripAPI.py \
$(SPEC)/scripts/apiconventions.py \
$(SPEC)/scripts/vkconventions.py \
$(SPEC)/scripts/vulkan_object.py \
$(SPEC)/xml/vk.xml \
$(SPEC)/xml/video.xml \
$(REGISTRY)/specs/latest/validation/validusage.json
# Scripts in registry/spec_tools to install
SCRIPT_TOOLS = \
$(SPEC)/scripts/spec_tools/conventions.py \
$(SPEC)/scripts/spec_tools/util.py
# Profiles to install
PROFILES = \
$(wildcard $(SPEC)/xml/profiles/*)
update-scripts:
cp $(SCRIPTS) registry/
cp $(PROFILES) registry/profiles/
cp $(SCRIPT_TOOLS) registry/spec_tools/
# To ensure updates are caught, old versions of installed files are
# removed.
# Files in include/ to keep
HEADERS_KEEP = \
include/vulkan/vk_icd.h \
include/vulkan/vk_layer.h
remove-files:
rm -rf $(filter-out $(HEADERS_KEEP), $(wildcard include/vulkan/*))
rm -rf include/vk_video
rm -rf registry
mkdir include/vk_video registry registry/profiles registry/spec_tools
# Once the branch is updated, push it to upstream
# This does not actually push it for safety reasons
push-branch:
@echo Verify that all new files are 'git add'ed and obsolete files removed, then:
@echo git commit -m \"Update for Vulkan-Docs 1.3.$(REVISION)\"
@echo git push --set-upstream origin $(BRANCH)
@echo git switch main
version-check:
@if test $(REVISION) = 999 ; then echo "Must specify explicit REVISION= in make invocation" ; exit 1 ; fi

View file

@ -0,0 +1,394 @@
#ifndef VULKAN_VIDEO_CODEC_AV1STD_H_
#define VULKAN_VIDEO_CODEC_AV1STD_H_ 1
/*
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
// vulkan_video_codec_av1std is a preprocessor guard. Do not pass it to API calls.
#define vulkan_video_codec_av1std 1
#include "vulkan_video_codecs_common.h"
#define STD_VIDEO_AV1_NUM_REF_FRAMES 8
#define STD_VIDEO_AV1_REFS_PER_FRAME 7
#define STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME 8
#define STD_VIDEO_AV1_MAX_TILE_COLS 64
#define STD_VIDEO_AV1_MAX_TILE_ROWS 64
#define STD_VIDEO_AV1_MAX_SEGMENTS 8
#define STD_VIDEO_AV1_SEG_LVL_MAX 8
#define STD_VIDEO_AV1_PRIMARY_REF_NONE 7
#define STD_VIDEO_AV1_SELECT_INTEGER_MV 2
#define STD_VIDEO_AV1_SELECT_SCREEN_CONTENT_TOOLS 2
#define STD_VIDEO_AV1_SKIP_MODE_FRAMES 2
#define STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS 4
#define STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS 2
#define STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS 8
#define STD_VIDEO_AV1_MAX_NUM_PLANES 3
#define STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS 6
#define STD_VIDEO_AV1_MAX_NUM_Y_POINTS 14
#define STD_VIDEO_AV1_MAX_NUM_CB_POINTS 10
#define STD_VIDEO_AV1_MAX_NUM_CR_POINTS 10
#define STD_VIDEO_AV1_MAX_NUM_POS_LUMA 24
#define STD_VIDEO_AV1_MAX_NUM_POS_CHROMA 25
typedef enum StdVideoAV1Profile {
STD_VIDEO_AV1_PROFILE_MAIN = 0,
STD_VIDEO_AV1_PROFILE_HIGH = 1,
STD_VIDEO_AV1_PROFILE_PROFESSIONAL = 2,
STD_VIDEO_AV1_PROFILE_INVALID = 0x7FFFFFFF,
STD_VIDEO_AV1_PROFILE_MAX_ENUM = 0x7FFFFFFF
} StdVideoAV1Profile;
typedef enum StdVideoAV1Level {
STD_VIDEO_AV1_LEVEL_2_0 = 0,
STD_VIDEO_AV1_LEVEL_2_1 = 1,
STD_VIDEO_AV1_LEVEL_2_2 = 2,
STD_VIDEO_AV1_LEVEL_2_3 = 3,
STD_VIDEO_AV1_LEVEL_3_0 = 4,
STD_VIDEO_AV1_LEVEL_3_1 = 5,
STD_VIDEO_AV1_LEVEL_3_2 = 6,
STD_VIDEO_AV1_LEVEL_3_3 = 7,
STD_VIDEO_AV1_LEVEL_4_0 = 8,
STD_VIDEO_AV1_LEVEL_4_1 = 9,
STD_VIDEO_AV1_LEVEL_4_2 = 10,
STD_VIDEO_AV1_LEVEL_4_3 = 11,
STD_VIDEO_AV1_LEVEL_5_0 = 12,
STD_VIDEO_AV1_LEVEL_5_1 = 13,
STD_VIDEO_AV1_LEVEL_5_2 = 14,
STD_VIDEO_AV1_LEVEL_5_3 = 15,
STD_VIDEO_AV1_LEVEL_6_0 = 16,
STD_VIDEO_AV1_LEVEL_6_1 = 17,
STD_VIDEO_AV1_LEVEL_6_2 = 18,
STD_VIDEO_AV1_LEVEL_6_3 = 19,
STD_VIDEO_AV1_LEVEL_7_0 = 20,
STD_VIDEO_AV1_LEVEL_7_1 = 21,
STD_VIDEO_AV1_LEVEL_7_2 = 22,
STD_VIDEO_AV1_LEVEL_7_3 = 23,
STD_VIDEO_AV1_LEVEL_INVALID = 0x7FFFFFFF,
STD_VIDEO_AV1_LEVEL_MAX_ENUM = 0x7FFFFFFF
} StdVideoAV1Level;
typedef enum StdVideoAV1FrameType {
STD_VIDEO_AV1_FRAME_TYPE_KEY = 0,
STD_VIDEO_AV1_FRAME_TYPE_INTER = 1,
STD_VIDEO_AV1_FRAME_TYPE_INTRA_ONLY = 2,
STD_VIDEO_AV1_FRAME_TYPE_SWITCH = 3,
STD_VIDEO_AV1_FRAME_TYPE_INVALID = 0x7FFFFFFF,
STD_VIDEO_AV1_FRAME_TYPE_MAX_ENUM = 0x7FFFFFFF
} StdVideoAV1FrameType;
typedef enum StdVideoAV1ReferenceName {
STD_VIDEO_AV1_REFERENCE_NAME_INTRA_FRAME = 0,
STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME = 1,
STD_VIDEO_AV1_REFERENCE_NAME_LAST2_FRAME = 2,
STD_VIDEO_AV1_REFERENCE_NAME_LAST3_FRAME = 3,
STD_VIDEO_AV1_REFERENCE_NAME_GOLDEN_FRAME = 4,
STD_VIDEO_AV1_REFERENCE_NAME_BWDREF_FRAME = 5,
STD_VIDEO_AV1_REFERENCE_NAME_ALTREF2_FRAME = 6,
STD_VIDEO_AV1_REFERENCE_NAME_ALTREF_FRAME = 7,
STD_VIDEO_AV1_REFERENCE_NAME_INVALID = 0x7FFFFFFF,
STD_VIDEO_AV1_REFERENCE_NAME_MAX_ENUM = 0x7FFFFFFF
} StdVideoAV1ReferenceName;
typedef enum StdVideoAV1InterpolationFilter {
STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP = 0,
STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH = 1,
STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP = 2,
STD_VIDEO_AV1_INTERPOLATION_FILTER_BILINEAR = 3,
STD_VIDEO_AV1_INTERPOLATION_FILTER_SWITCHABLE = 4,
STD_VIDEO_AV1_INTERPOLATION_FILTER_INVALID = 0x7FFFFFFF,
STD_VIDEO_AV1_INTERPOLATION_FILTER_MAX_ENUM = 0x7FFFFFFF
} StdVideoAV1InterpolationFilter;
typedef enum StdVideoAV1TxMode {
STD_VIDEO_AV1_TX_MODE_ONLY_4X4 = 0,
STD_VIDEO_AV1_TX_MODE_LARGEST = 1,
STD_VIDEO_AV1_TX_MODE_SELECT = 2,
STD_VIDEO_AV1_TX_MODE_INVALID = 0x7FFFFFFF,
STD_VIDEO_AV1_TX_MODE_MAX_ENUM = 0x7FFFFFFF
} StdVideoAV1TxMode;
typedef enum StdVideoAV1FrameRestorationType {
STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_NONE = 0,
STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_WIENER = 1,
STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SGRPROJ = 2,
STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SWITCHABLE = 3,
STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_INVALID = 0x7FFFFFFF,
STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_MAX_ENUM = 0x7FFFFFFF
} StdVideoAV1FrameRestorationType;
typedef enum StdVideoAV1ColorPrimaries {
STD_VIDEO_AV1_COLOR_PRIMARIES_BT_709 = 1,
STD_VIDEO_AV1_COLOR_PRIMARIES_UNSPECIFIED = 2,
STD_VIDEO_AV1_COLOR_PRIMARIES_BT_470_M = 4,
STD_VIDEO_AV1_COLOR_PRIMARIES_BT_470_B_G = 5,
STD_VIDEO_AV1_COLOR_PRIMARIES_BT_601 = 6,
STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_240 = 7,
STD_VIDEO_AV1_COLOR_PRIMARIES_GENERIC_FILM = 8,
STD_VIDEO_AV1_COLOR_PRIMARIES_BT_2020 = 9,
STD_VIDEO_AV1_COLOR_PRIMARIES_XYZ = 10,
STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_431 = 11,
STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_432 = 12,
STD_VIDEO_AV1_COLOR_PRIMARIES_EBU_3213 = 22,
STD_VIDEO_AV1_COLOR_PRIMARIES_INVALID = 0x7FFFFFFF,
// STD_VIDEO_AV1_COLOR_PRIMARIES_BT_UNSPECIFIED is a deprecated alias
STD_VIDEO_AV1_COLOR_PRIMARIES_BT_UNSPECIFIED = STD_VIDEO_AV1_COLOR_PRIMARIES_UNSPECIFIED,
STD_VIDEO_AV1_COLOR_PRIMARIES_MAX_ENUM = 0x7FFFFFFF
} StdVideoAV1ColorPrimaries;
typedef enum StdVideoAV1TransferCharacteristics {
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_RESERVED_0 = 0,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_709 = 1,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_UNSPECIFIED = 2,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_RESERVED_3 = 3,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_470_M = 4,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_470_B_G = 5,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_601 = 6,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_240 = 7,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LINEAR = 8,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LOG_100 = 9,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LOG_100_SQRT10 = 10,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_IEC_61966 = 11,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_1361 = 12,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SRGB = 13,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_2020_10_BIT = 14,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_2020_12_BIT = 15,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_2084 = 16,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_428 = 17,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_HLG = 18,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_INVALID = 0x7FFFFFFF,
STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_MAX_ENUM = 0x7FFFFFFF
} StdVideoAV1TransferCharacteristics;
typedef enum StdVideoAV1MatrixCoefficients {
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_IDENTITY = 0,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_709 = 1,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_UNSPECIFIED = 2,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_RESERVED_3 = 3,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_FCC = 4,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_470_B_G = 5,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_601 = 6,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_240 = 7,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_YCGCO = 8,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_2020_NCL = 9,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_2020_CL = 10,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_2085 = 11,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_CHROMAT_NCL = 12,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_CHROMAT_CL = 13,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_ICTCP = 14,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_INVALID = 0x7FFFFFFF,
STD_VIDEO_AV1_MATRIX_COEFFICIENTS_MAX_ENUM = 0x7FFFFFFF
} StdVideoAV1MatrixCoefficients;
typedef enum StdVideoAV1ChromaSamplePosition {
STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_UNKNOWN = 0,
STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_VERTICAL = 1,
STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_COLOCATED = 2,
STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_RESERVED = 3,
STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_INVALID = 0x7FFFFFFF,
STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_MAX_ENUM = 0x7FFFFFFF
} StdVideoAV1ChromaSamplePosition;
typedef struct StdVideoAV1ColorConfigFlags {
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;
} StdVideoAV1ColorConfigFlags;
typedef struct StdVideoAV1ColorConfig {
StdVideoAV1ColorConfigFlags flags;
uint8_t BitDepth;
uint8_t subsampling_x;
uint8_t subsampling_y;
uint8_t reserved1;
StdVideoAV1ColorPrimaries color_primaries;
StdVideoAV1TransferCharacteristics transfer_characteristics;
StdVideoAV1MatrixCoefficients matrix_coefficients;
StdVideoAV1ChromaSamplePosition chroma_sample_position;
} StdVideoAV1ColorConfig;
typedef struct StdVideoAV1TimingInfoFlags {
uint32_t equal_picture_interval : 1;
uint32_t reserved : 31;
} StdVideoAV1TimingInfoFlags;
typedef struct StdVideoAV1TimingInfo {
StdVideoAV1TimingInfoFlags flags;
uint32_t num_units_in_display_tick;
uint32_t time_scale;
uint32_t num_ticks_per_picture_minus_1;
} StdVideoAV1TimingInfo;
typedef struct StdVideoAV1LoopFilterFlags {
uint32_t loop_filter_delta_enabled : 1;
uint32_t loop_filter_delta_update : 1;
uint32_t reserved : 30;
} StdVideoAV1LoopFilterFlags;
typedef struct StdVideoAV1LoopFilter {
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];
} StdVideoAV1LoopFilter;
typedef struct StdVideoAV1QuantizationFlags {
uint32_t using_qmatrix : 1;
uint32_t diff_uv_delta : 1;
uint32_t reserved : 30;
} StdVideoAV1QuantizationFlags;
typedef struct StdVideoAV1Quantization {
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;
} StdVideoAV1Quantization;
typedef struct StdVideoAV1Segmentation {
uint8_t FeatureEnabled[STD_VIDEO_AV1_MAX_SEGMENTS];
int16_t FeatureData[STD_VIDEO_AV1_MAX_SEGMENTS][STD_VIDEO_AV1_SEG_LVL_MAX];
} StdVideoAV1Segmentation;
typedef struct StdVideoAV1TileInfoFlags {
uint32_t uniform_tile_spacing_flag : 1;
uint32_t reserved : 31;
} StdVideoAV1TileInfoFlags;
typedef struct StdVideoAV1TileInfo {
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];
const uint16_t* pMiColStarts;
const uint16_t* pMiRowStarts;
const uint16_t* pWidthInSbsMinus1;
const uint16_t* pHeightInSbsMinus1;
} StdVideoAV1TileInfo;
typedef struct StdVideoAV1CDEF {
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];
} StdVideoAV1CDEF;
typedef struct StdVideoAV1LoopRestoration {
StdVideoAV1FrameRestorationType FrameRestorationType[STD_VIDEO_AV1_MAX_NUM_PLANES];
uint16_t LoopRestorationSize[STD_VIDEO_AV1_MAX_NUM_PLANES];
} StdVideoAV1LoopRestoration;
typedef struct StdVideoAV1GlobalMotion {
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];
} StdVideoAV1GlobalMotion;
typedef struct StdVideoAV1FilmGrainFlags {
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;
} StdVideoAV1FilmGrainFlags;
typedef struct StdVideoAV1FilmGrain {
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;
} StdVideoAV1FilmGrain;
typedef struct StdVideoAV1SequenceHeaderFlags {
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;
} StdVideoAV1SequenceHeaderFlags;
typedef struct StdVideoAV1SequenceHeader {
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_mv;
uint8_t seq_force_screen_content_tools;
uint8_t reserved1[5];
const StdVideoAV1ColorConfig* pColorConfig;
const StdVideoAV1TimingInfo* pTimingInfo;
} StdVideoAV1SequenceHeader;
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,109 @@
#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_
#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ 1
/*
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
// vulkan_video_codec_av1std_decode is a preprocessor guard. Do not pass it to API calls.
#define vulkan_video_codec_av1std_decode 1
#include "vulkan_video_codec_av1std.h"
#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)
#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0
#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_av1_decode"
typedef struct StdVideoDecodeAV1PictureInfoFlags {
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;
} StdVideoDecodeAV1PictureInfoFlags;
typedef struct StdVideoDecodeAV1PictureInfo {
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 reserved1;
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];
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;
} StdVideoDecodeAV1PictureInfo;
typedef struct StdVideoDecodeAV1ReferenceInfoFlags {
uint32_t disable_frame_end_update_cdf : 1;
uint32_t segmentation_enabled : 1;
uint32_t reserved : 30;
} StdVideoDecodeAV1ReferenceInfoFlags;
typedef struct StdVideoDecodeAV1ReferenceInfo {
StdVideoDecodeAV1ReferenceInfoFlags flags;
uint8_t frame_type;
uint8_t RefFrameSignBias;
uint8_t OrderHint;
uint8_t SavedOrderHints[STD_VIDEO_AV1_NUM_REF_FRAMES];
} StdVideoDecodeAV1ReferenceInfo;
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,143 @@
#ifndef VULKAN_VIDEO_CODEC_AV1STD_ENCODE_H_
#define VULKAN_VIDEO_CODEC_AV1STD_ENCODE_H_ 1
/*
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/*
** This header is generated from the Khronos Vulkan XML API Registry.
**
*/
#ifdef __cplusplus
extern "C" {
#endif
// vulkan_video_codec_av1std_encode is a preprocessor guard. Do not pass it to API calls.
#define vulkan_video_codec_av1std_encode 1
#include "vulkan_video_codec_av1std.h"
#define VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0)
#define VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0
#define VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_av1_encode"
typedef struct StdVideoEncodeAV1DecoderModelInfo {
uint8_t buffer_delay_length_minus_1;
uint8_t buffer_removal_time_length_minus_1;
uint8_t frame_presentation_time_length_minus_1;
uint8_t reserved1;
uint32_t num_units_in_decoding_tick;
} StdVideoEncodeAV1DecoderModelInfo;
typedef struct StdVideoEncodeAV1ExtensionHeader {
uint8_t temporal_id;
uint8_t spatial_id;
} StdVideoEncodeAV1ExtensionHeader;
typedef struct StdVideoEncodeAV1OperatingPointInfoFlags {
uint32_t decoder_model_present_for_this_op : 1;
uint32_t low_delay_mode_flag : 1;
uint32_t initial_display_delay_present_for_this_op : 1;
uint32_t reserved : 29;
} StdVideoEncodeAV1OperatingPointInfoFlags;
typedef struct StdVideoEncodeAV1OperatingPointInfo {
StdVideoEncodeAV1OperatingPointInfoFlags flags;
uint16_t operating_point_idc;
uint8_t seq_level_idx;
uint8_t seq_tier;
uint32_t decoder_buffer_delay;
uint32_t encoder_buffer_delay;
uint8_t initial_display_delay_minus_1;
} StdVideoEncodeAV1OperatingPointInfo;
typedef struct StdVideoEncodeAV1PictureInfoFlags {
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 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 show_frame : 1;
uint32_t showable_frame : 1;
uint32_t reserved : 3;
} StdVideoEncodeAV1PictureInfoFlags;
typedef struct StdVideoEncodeAV1PictureInfo {
StdVideoEncodeAV1PictureInfoFlags flags;
StdVideoAV1FrameType frame_type;
uint32_t frame_presentation_time;
uint32_t current_frame_id;
uint8_t order_hint;
uint8_t primary_ref_frame;
uint8_t refresh_frame_flags;
uint8_t coded_denom;
uint16_t render_width_minus_1;
uint16_t render_height_minus_1;
StdVideoAV1InterpolationFilter interpolation_filter;
StdVideoAV1TxMode TxMode;
uint8_t delta_q_res;
uint8_t delta_lf_res;
uint8_t ref_order_hint[STD_VIDEO_AV1_NUM_REF_FRAMES];
int8_t ref_frame_idx[STD_VIDEO_AV1_REFS_PER_FRAME];
uint8_t reserved1[3];
uint32_t delta_frame_id_minus_1[STD_VIDEO_AV1_REFS_PER_FRAME];
const StdVideoAV1TileInfo* pTileInfo;
const StdVideoAV1Quantization* pQuantization;
const StdVideoAV1Segmentation* pSegmentation;
const StdVideoAV1LoopFilter* pLoopFilter;
const StdVideoAV1CDEF* pCDEF;
const StdVideoAV1LoopRestoration* pLoopRestoration;
const StdVideoAV1GlobalMotion* pGlobalMotion;
const StdVideoEncodeAV1ExtensionHeader* pExtensionHeader;
const uint32_t* pBufferRemovalTimes;
} StdVideoEncodeAV1PictureInfo;
typedef struct StdVideoEncodeAV1ReferenceInfoFlags {
uint32_t disable_frame_end_update_cdf : 1;
uint32_t segmentation_enabled : 1;
uint32_t reserved : 30;
} StdVideoEncodeAV1ReferenceInfoFlags;
typedef struct StdVideoEncodeAV1ReferenceInfo {
StdVideoEncodeAV1ReferenceInfoFlags flags;
uint32_t RefFrameId;
StdVideoAV1FrameType frame_type;
uint8_t OrderHint;
uint8_t reserved1[3];
const StdVideoEncodeAV1ExtensionHeader* pExtensionHeader;
} StdVideoEncodeAV1ReferenceInfo;
#ifdef __cplusplus
}
#endif
#endif

View file

@ -2,7 +2,7 @@
#define VULKAN_VIDEO_CODEC_H264STD_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -2,7 +2,7 @@
#define VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -2,7 +2,7 @@
#define VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -2,7 +2,7 @@
#define VULKAN_VIDEO_CODEC_H265STD_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -2,7 +2,7 @@
#define VULKAN_VIDEO_CODEC_H265STD_DECODE_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -2,7 +2,7 @@
#define VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -2,7 +2,7 @@
#define VULKAN_VIDEO_CODECS_COMMON_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -2,7 +2,7 @@
// File: vk_platform.h
//
/*
** Copyright 2014-2024 The Khronos Group Inc.
** Copyright 2014-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
#define VULKAN_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
#define VULKAN_ANDROID_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -2,7 +2,7 @@
#define VULKAN_BETA_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
@ -53,13 +53,14 @@ typedef struct VkPhysicalDevicePortabilitySubsetPropertiesKHR {
// VK_AMDX_shader_enqueue is a preprocessor guard. Do not pass it to API calls.
#define VK_AMDX_shader_enqueue 1
#define VK_AMDX_SHADER_ENQUEUE_SPEC_VERSION 1
#define VK_AMDX_SHADER_ENQUEUE_SPEC_VERSION 2
#define VK_AMDX_SHADER_ENQUEUE_EXTENSION_NAME "VK_AMDX_shader_enqueue"
#define VK_SHADER_INDEX_UNUSED_AMDX (~0U)
typedef struct VkPhysicalDeviceShaderEnqueueFeaturesAMDX {
VkStructureType sType;
void* pNext;
VkBool32 shaderEnqueue;
VkBool32 shaderMeshEnqueue;
} VkPhysicalDeviceShaderEnqueueFeaturesAMDX;
typedef struct VkPhysicalDeviceShaderEnqueuePropertiesAMDX {
@ -70,12 +71,16 @@ typedef struct VkPhysicalDeviceShaderEnqueuePropertiesAMDX {
uint32_t maxExecutionGraphShaderPayloadSize;
uint32_t maxExecutionGraphShaderPayloadCount;
uint32_t executionGraphDispatchAddressAlignment;
uint32_t maxExecutionGraphWorkgroupCount[3];
uint32_t maxExecutionGraphWorkgroups;
} VkPhysicalDeviceShaderEnqueuePropertiesAMDX;
typedef struct VkExecutionGraphPipelineScratchSizeAMDX {
VkStructureType sType;
void* pNext;
VkDeviceSize size;
VkDeviceSize minSize;
VkDeviceSize maxSize;
VkDeviceSize sizeGranularity;
} VkExecutionGraphPipelineScratchSizeAMDX;
typedef struct VkExecutionGraphPipelineCreateInfoAMDX {
@ -116,12 +121,12 @@ typedef struct VkPipelineShaderStageNodeCreateInfoAMDX {
} VkPipelineShaderStageNodeCreateInfoAMDX;
typedef VkResult (VKAPI_PTR *PFN_vkCreateExecutionGraphPipelinesAMDX)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkExecutionGraphPipelineCreateInfoAMDX* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines);
typedef VkResult (VKAPI_PTR *PFN_vkGetExecutionGraphPipelineScratchSizeAMDX)(VkDevice device, VkPipeline executionGraph, VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo);
typedef VkResult (VKAPI_PTR *PFN_vkGetExecutionGraphPipelineNodeIndexAMDX)(VkDevice device, VkPipeline executionGraph, const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, uint32_t* pNodeIndex);
typedef void (VKAPI_PTR *PFN_vkCmdInitializeGraphScratchMemoryAMDX)(VkCommandBuffer commandBuffer, VkDeviceAddress scratch);
typedef void (VKAPI_PTR *PFN_vkCmdDispatchGraphAMDX)(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, const VkDispatchGraphCountInfoAMDX* pCountInfo);
typedef void (VKAPI_PTR *PFN_vkCmdDispatchGraphIndirectAMDX)(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, const VkDispatchGraphCountInfoAMDX* pCountInfo);
typedef void (VKAPI_PTR *PFN_vkCmdDispatchGraphIndirectCountAMDX)(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceAddress countInfo);
typedef VkResult (VKAPI_PTR *PFN_vkGetExecutionGraphPipelineScratchSizeAMDX)(VkDevice device, VkPipeline executionGraph, VkExecutionGraphPipelineScratchSizeAMDX* pSizeInfo);
typedef VkResult (VKAPI_PTR *PFN_vkGetExecutionGraphPipelineNodeIndexAMDX)(VkDevice device, VkPipeline executionGraph, const VkPipelineShaderStageNodeCreateInfoAMDX* pNodeInfo, uint32_t* pNodeIndex);
typedef void (VKAPI_PTR *PFN_vkCmdInitializeGraphScratchMemoryAMDX)(VkCommandBuffer commandBuffer, VkPipeline executionGraph, VkDeviceAddress scratch, VkDeviceSize scratchSize);
typedef void (VKAPI_PTR *PFN_vkCmdDispatchGraphAMDX)(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo);
typedef void (VKAPI_PTR *PFN_vkCmdDispatchGraphIndirectAMDX)(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo);
typedef void (VKAPI_PTR *PFN_vkCmdDispatchGraphIndirectCountAMDX)(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, VkDeviceAddress countInfo);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkCreateExecutionGraphPipelinesAMDX(
@ -145,21 +150,26 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetExecutionGraphPipelineNodeIndexAMDX(
VKAPI_ATTR void VKAPI_CALL vkCmdInitializeGraphScratchMemoryAMDX(
VkCommandBuffer commandBuffer,
VkDeviceAddress scratch);
VkPipeline executionGraph,
VkDeviceAddress scratch,
VkDeviceSize scratchSize);
VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphAMDX(
VkCommandBuffer commandBuffer,
VkDeviceAddress scratch,
VkDeviceSize scratchSize,
const VkDispatchGraphCountInfoAMDX* pCountInfo);
VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphIndirectAMDX(
VkCommandBuffer commandBuffer,
VkDeviceAddress scratch,
VkDeviceSize scratchSize,
const VkDispatchGraphCountInfoAMDX* pCountInfo);
VKAPI_ATTR void VKAPI_CALL vkCmdDispatchGraphIndirectCountAMDX(
VkCommandBuffer commandBuffer,
VkDeviceAddress scratch,
VkDeviceSize scratchSize,
VkDeviceAddress countInfo);
#endif

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
#define VULKAN_DIRECTFB_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
// Copyright 2015-2024 The Khronos Group Inc.
// Copyright 2015-2025 The Khronos Group Inc.
//
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
@ -354,6 +354,8 @@ namespace VULKAN_HPP_NAMESPACE
case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: return 16;
case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: return 16;
case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: return 16;
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16: return 2;
case VULKAN_HPP_NAMESPACE::Format::eA8Unorm: return 1;
case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: return 8;
case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: return 8;
case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: return 8;
@ -362,9 +364,7 @@ namespace VULKAN_HPP_NAMESPACE
case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: return 8;
case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: return 8;
case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return 8;
case VULKAN_HPP_NAMESPACE::Format::eR16G16S105NV: return 4;
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16KHR: return 2;
case VULKAN_HPP_NAMESPACE::Format::eA8UnormKHR: return 1;
case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfixed5NV: return 4;
default: VULKAN_HPP_ASSERT( false ); return 0;
}
@ -613,6 +613,8 @@ namespace VULKAN_HPP_NAMESPACE
case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: return "ASTC_10x10";
case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: return "ASTC_12x10";
case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: return "ASTC_12x12";
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16: return "16-bit";
case VULKAN_HPP_NAMESPACE::Format::eA8Unorm: return "8-bit alpha";
case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: return "PVRTC1_2BPP";
case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: return "PVRTC1_4BPP";
case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: return "PVRTC2_2BPP";
@ -621,9 +623,7 @@ namespace VULKAN_HPP_NAMESPACE
case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: return "PVRTC1_4BPP";
case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: return "PVRTC2_2BPP";
case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return "PVRTC2_4BPP";
case VULKAN_HPP_NAMESPACE::Format::eR16G16S105NV: return "32-bit";
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16KHR: return "16-bit";
case VULKAN_HPP_NAMESPACE::Format::eA8UnormKHR: return "8-bit alpha";
case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfixed5NV: return "32-bit";
default: VULKAN_HPP_ASSERT( false ); return "";
}
@ -2005,14 +2005,7 @@ namespace VULKAN_HPP_NAMESPACE
case 3: return 4;
default: VULKAN_HPP_ASSERT( false ); return 0;
}
case VULKAN_HPP_NAMESPACE::Format::eR16G16S105NV:
switch ( component )
{
case 0: return 16;
case 1: return 16;
default: VULKAN_HPP_ASSERT( false ); return 0;
}
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16KHR:
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16:
switch ( component )
{
case 0: return 1;
@ -2021,12 +2014,19 @@ namespace VULKAN_HPP_NAMESPACE
case 3: return 5;
default: VULKAN_HPP_ASSERT( false ); return 0;
}
case VULKAN_HPP_NAMESPACE::Format::eA8UnormKHR:
case VULKAN_HPP_NAMESPACE::Format::eA8Unorm:
switch ( component )
{
case 0: return 8;
default: VULKAN_HPP_ASSERT( false ); return 0;
}
case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfixed5NV:
switch ( component )
{
case 0: return 16;
case 1: return 16;
default: VULKAN_HPP_ASSERT( false ); return 0;
}
default: return 0;
}
@ -2275,6 +2275,8 @@ namespace VULKAN_HPP_NAMESPACE
case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: return 4;
case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: return 4;
case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: return 4;
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16: return 4;
case VULKAN_HPP_NAMESPACE::Format::eA8Unorm: return 1;
case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: return 4;
case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: return 4;
case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: return 4;
@ -2283,9 +2285,7 @@ namespace VULKAN_HPP_NAMESPACE
case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: return 4;
case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: return 4;
case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return 4;
case VULKAN_HPP_NAMESPACE::Format::eR16G16S105NV: return 2;
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16KHR: return 4;
case VULKAN_HPP_NAMESPACE::Format::eA8UnormKHR: return 1;
case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfixed5NV: return 2;
default: return 0;
}
@ -4227,6 +4227,21 @@ namespace VULKAN_HPP_NAMESPACE
case 3: return "A";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16:
switch ( component )
{
case 0: return "A";
case 1: return "B";
case 2: return "G";
case 3: return "R";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eA8Unorm:
switch ( component )
{
case 0: return "A";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG:
switch ( component )
{
@ -4299,28 +4314,13 @@ namespace VULKAN_HPP_NAMESPACE
case 3: return "A";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eR16G16S105NV:
case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfixed5NV:
switch ( component )
{
case 0: return "R";
case 1: return "G";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16KHR:
switch ( component )
{
case 0: return "A";
case 1: return "B";
case 2: return "G";
case 3: return "R";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eA8UnormKHR:
switch ( component )
{
case 0: return "A";
default: VULKAN_HPP_ASSERT( false ); return "";
}
default: return "";
}
@ -4662,7 +4662,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eB8G8R8A8Unorm:
@ -4725,7 +4725,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8UnormPack32:
@ -4785,7 +4785,7 @@ namespace VULKAN_HPP_NAMESPACE
case VULKAN_HPP_NAMESPACE::Format::eA8B8G8R8SrgbPack32:
switch ( component )
{
case 0: return "SRGB";
case 0: return "UNORM";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
@ -5381,7 +5381,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eBc2UnormBlock:
@ -5399,7 +5399,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eBc3UnormBlock:
@ -5417,7 +5417,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eBc4UnormBlock:
@ -5477,7 +5477,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8UnormBlock:
@ -5511,7 +5511,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eEtc2R8G8B8A8UnormBlock:
@ -5529,7 +5529,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eEacR11UnormBlock:
@ -5573,7 +5573,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eAstc5x4UnormBlock:
@ -5591,7 +5591,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eAstc5x5UnormBlock:
@ -5609,7 +5609,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eAstc6x5UnormBlock:
@ -5627,7 +5627,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eAstc6x6UnormBlock:
@ -5645,7 +5645,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eAstc8x5UnormBlock:
@ -5663,7 +5663,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eAstc8x6UnormBlock:
@ -5681,7 +5681,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eAstc8x8UnormBlock:
@ -5699,7 +5699,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eAstc10x5UnormBlock:
@ -5717,7 +5717,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eAstc10x6UnormBlock:
@ -5735,7 +5735,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eAstc10x8UnormBlock:
@ -5753,7 +5753,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eAstc10x10UnormBlock:
@ -5771,7 +5771,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eAstc12x10UnormBlock:
@ -5789,7 +5789,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eAstc12x12UnormBlock:
@ -5807,7 +5807,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eG8B8G8R8422Unorm:
@ -6262,6 +6262,21 @@ namespace VULKAN_HPP_NAMESPACE
case 3: return "SFLOAT";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16:
switch ( component )
{
case 0: return "UNORM";
case 1: return "UNORM";
case 2: return "UNORM";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eA8Unorm:
switch ( component )
{
case 0: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG:
switch ( component )
{
@ -6304,7 +6319,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG:
@ -6313,7 +6328,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG:
@ -6322,7 +6337,7 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG:
@ -6331,29 +6346,14 @@ namespace VULKAN_HPP_NAMESPACE
case 0: return "SRGB";
case 1: return "SRGB";
case 2: return "SRGB";
case 3: return "SRGB";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eR16G16S105NV:
switch ( component )
{
case 0: return "SINT";
case 1: return "SINT";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16KHR:
switch ( component )
{
case 0: return "UNORM";
case 1: return "UNORM";
case 2: return "UNORM";
case 3: return "UNORM";
default: VULKAN_HPP_ASSERT( false ); return "";
}
case VULKAN_HPP_NAMESPACE::Format::eA8UnormKHR:
case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfixed5NV:
switch ( component )
{
case 0: return "UNORM";
case 0: return "SFIXED5";
case 1: return "SFIXED5";
default: VULKAN_HPP_ASSERT( false ); return "";
}
@ -6796,7 +6796,7 @@ namespace VULKAN_HPP_NAMESPACE
case VULKAN_HPP_NAMESPACE::Format::eG12X4B12X4R12X42Plane444Unorm3Pack16: return 16;
case VULKAN_HPP_NAMESPACE::Format::eA4R4G4B4UnormPack16: return 16;
case VULKAN_HPP_NAMESPACE::Format::eA4B4G4R4UnormPack16: return 16;
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16KHR: return 16;
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16: return 16;
default: return 0;
}
@ -7649,6 +7649,8 @@ namespace VULKAN_HPP_NAMESPACE
case VULKAN_HPP_NAMESPACE::Format::eAstc10x10SfloatBlock: return 100;
case VULKAN_HPP_NAMESPACE::Format::eAstc12x10SfloatBlock: return 120;
case VULKAN_HPP_NAMESPACE::Format::eAstc12x12SfloatBlock: return 144;
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16: return 1;
case VULKAN_HPP_NAMESPACE::Format::eA8Unorm: return 1;
case VULKAN_HPP_NAMESPACE::Format::ePvrtc12BppUnormBlockIMG: return 1;
case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppUnormBlockIMG: return 1;
case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppUnormBlockIMG: return 1;
@ -7657,9 +7659,7 @@ namespace VULKAN_HPP_NAMESPACE
case VULKAN_HPP_NAMESPACE::Format::ePvrtc14BppSrgbBlockIMG: return 1;
case VULKAN_HPP_NAMESPACE::Format::ePvrtc22BppSrgbBlockIMG: return 1;
case VULKAN_HPP_NAMESPACE::Format::ePvrtc24BppSrgbBlockIMG: return 1;
case VULKAN_HPP_NAMESPACE::Format::eR16G16S105NV: return 1;
case VULKAN_HPP_NAMESPACE::Format::eA1B5G5R5UnormPack16KHR: return 1;
case VULKAN_HPP_NAMESPACE::Format::eA8UnormKHR: return 1;
case VULKAN_HPP_NAMESPACE::Format::eR16G16Sfixed5NV: return 1;
default: VULKAN_HPP_ASSERT( false ); return 0;
}

View file

@ -2,7 +2,7 @@
#define VULKAN_FUCHSIA_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
#define VULKAN_GGP_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
// Copyright 2015-2024 The Khronos Group Inc.
// Copyright 2015-2025 The Khronos Group Inc.
//
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
@ -87,11 +87,25 @@
# define VULKAN_HPP_SUPPORT_SPAN
#endif
#if defined( __cpp_lib_modules ) && !defined( VULKAN_HPP_STD_MODULE ) && defined( VULKAN_HPP_ENABLE_STD_MODULE )
# define VULKAN_HPP_STD_MODULE std.compat
#endif
#ifndef VK_USE_64_BIT_PTR_DEFINES
# if defined( __LP64__ ) || defined( _WIN64 ) || ( defined( __x86_64__ ) && !defined( __ILP32__ ) ) || defined( _M_X64 ) || defined( __ia64 ) || \
defined( _M_IA64 ) || defined( __aarch64__ ) || defined( __powerpc64__ ) || ( defined( __riscv ) && __riscv_xlen == 64 )
# define VK_USE_64_BIT_PTR_DEFINES 1
# else
# define VK_USE_64_BIT_PTR_DEFINES 0
# endif
#endif
// 32-bit vulkan is not typesafe for non-dispatchable handles, so don't allow copy constructors on this platform by default.
// To enable this feature on 32-bit platforms please define VULKAN_HPP_TYPESAFE_CONVERSION
// To enable this feature on 32-bit platforms please #define VULKAN_HPP_TYPESAFE_CONVERSION 1
// To disable this feature on 64-bit platforms please #define VULKAN_HPP_TYPESAFE_CONVERSION 0
#if ( VK_USE_64_BIT_PTR_DEFINES == 1 )
# if !defined( VULKAN_HPP_TYPESAFE_CONVERSION )
# define VULKAN_HPP_TYPESAFE_CONVERSION
# define VULKAN_HPP_TYPESAFE_CONVERSION 1
# endif
#endif
@ -131,7 +145,7 @@
# endif
#endif
#if defined( VULKAN_HPP_TYPESAFE_CONVERSION )
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
# define VULKAN_HPP_TYPESAFE_EXPLICIT
#else
# define VULKAN_HPP_TYPESAFE_EXPLICIT explicit
@ -184,6 +198,12 @@
# define VULKAN_HPP_DEPRECATED( msg )
#endif
#if 17 <= VULKAN_HPP_CPP_VERSION
# define VULKAN_HPP_DEPRECATED_17( msg ) [[deprecated( msg )]]
#else
# define VULKAN_HPP_DEPRECATED_17( msg )
#endif
#if ( 17 <= VULKAN_HPP_CPP_VERSION ) && !defined( VULKAN_HPP_NO_NODISCARD_WARNINGS )
# define VULKAN_HPP_NODISCARD [[nodiscard]]
# if defined( VULKAN_HPP_NO_EXCEPTIONS )
@ -237,33 +257,40 @@
namespace VULKAN_HPP_NAMESPACE
{
class DispatchLoaderDynamic;
namespace detail
{
class DispatchLoaderDynamic;
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
extern VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic;
# endif
#endif
} // namespace detail
} // namespace VULKAN_HPP_NAMESPACE
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::defaultDispatchLoaderDynamic
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \
namespace VULKAN_HPP_NAMESPACE \
{ \
VULKAN_HPP_STORAGE_API ::VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic defaultDispatchLoaderDynamic; \
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::detail::defaultDispatchLoaderDynamic
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \
namespace VULKAN_HPP_NAMESPACE \
{ \
namespace detail \
{ \
VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic; \
} \
}
namespace VULKAN_HPP_NAMESPACE
{
extern VULKAN_HPP_STORAGE_API VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic defaultDispatchLoaderDynamic;
} // namespace VULKAN_HPP_NAMESPACE
# else
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::getDispatchLoaderStatic()
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::detail::getDispatchLoaderStatic()
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
# endif
#endif
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER_TYPE )
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::DispatchLoaderDynamic
# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderDynamic
# else
# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::DispatchLoaderStatic
# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderStatic
# endif
#endif
@ -278,7 +305,9 @@ namespace VULKAN_HPP_NAMESPACE
#endif
#if !defined( VULKAN_HPP_EXPECTED ) && ( 23 <= VULKAN_HPP_CPP_VERSION ) && defined( __cpp_lib_expected )
# include <expected>
# if !( defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) )
# include <expected>
# endif
# define VULKAN_HPP_EXPECTED std::expected
# define VULKAN_HPP_UNEXPECTED std::unexpected
#endif

View file

@ -2,7 +2,7 @@
#define VULKAN_IOS_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -2,7 +2,7 @@
#define VULKAN_MACOS_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -2,7 +2,7 @@
#define VULKAN_METAL_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
@ -52,28 +52,28 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT(
#define VK_EXT_metal_objects 1
#ifdef __OBJC__
@protocol MTLDevice;
typedef id<MTLDevice> MTLDevice_id;
typedef __unsafe_unretained id<MTLDevice> MTLDevice_id;
#else
typedef void* MTLDevice_id;
#endif
#ifdef __OBJC__
@protocol MTLCommandQueue;
typedef id<MTLCommandQueue> MTLCommandQueue_id;
typedef __unsafe_unretained id<MTLCommandQueue> MTLCommandQueue_id;
#else
typedef void* MTLCommandQueue_id;
#endif
#ifdef __OBJC__
@protocol MTLBuffer;
typedef id<MTLBuffer> MTLBuffer_id;
typedef __unsafe_unretained id<MTLBuffer> MTLBuffer_id;
#else
typedef void* MTLBuffer_id;
#endif
#ifdef __OBJC__
@protocol MTLTexture;
typedef id<MTLTexture> MTLTexture_id;
typedef __unsafe_unretained id<MTLTexture> MTLTexture_id;
#else
typedef void* MTLTexture_id;
#endif
@ -81,12 +81,12 @@ typedef void* MTLTexture_id;
typedef struct __IOSurface* IOSurfaceRef;
#ifdef __OBJC__
@protocol MTLSharedEvent;
typedef id<MTLSharedEvent> MTLSharedEvent_id;
typedef __unsafe_unretained id<MTLSharedEvent> MTLSharedEvent_id;
#else
typedef void* MTLSharedEvent_id;
#endif
#define VK_EXT_METAL_OBJECTS_SPEC_VERSION 1
#define VK_EXT_METAL_OBJECTS_SPEC_VERSION 2
#define VK_EXT_METAL_OBJECTS_EXTENSION_NAME "VK_EXT_metal_objects"
typedef enum VkExportMetalObjectTypeFlagBitsEXT {
@ -188,6 +188,47 @@ VKAPI_ATTR void VKAPI_CALL vkExportMetalObjectsEXT(
VkExportMetalObjectsInfoEXT* pMetalObjectsInfo);
#endif
// VK_EXT_external_memory_metal is a preprocessor guard. Do not pass it to API calls.
#define VK_EXT_external_memory_metal 1
#define VK_EXT_EXTERNAL_MEMORY_METAL_SPEC_VERSION 1
#define VK_EXT_EXTERNAL_MEMORY_METAL_EXTENSION_NAME "VK_EXT_external_memory_metal"
typedef struct VkImportMemoryMetalHandleInfoEXT {
VkStructureType sType;
const void* pNext;
VkExternalMemoryHandleTypeFlagBits handleType;
void* handle;
} VkImportMemoryMetalHandleInfoEXT;
typedef struct VkMemoryMetalHandlePropertiesEXT {
VkStructureType sType;
void* pNext;
uint32_t memoryTypeBits;
} VkMemoryMetalHandlePropertiesEXT;
typedef struct VkMemoryGetMetalHandleInfoEXT {
VkStructureType sType;
const void* pNext;
VkDeviceMemory memory;
VkExternalMemoryHandleTypeFlagBits handleType;
} VkMemoryGetMetalHandleInfoEXT;
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryMetalHandleEXT)(VkDevice device, const VkMemoryGetMetalHandleInfoEXT* pGetMetalHandleInfo, void** pHandle);
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryMetalHandlePropertiesEXT)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHandle, VkMemoryMetalHandlePropertiesEXT* pMemoryMetalHandleProperties);
#ifndef VK_NO_PROTOTYPES
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryMetalHandleEXT(
VkDevice device,
const VkMemoryGetMetalHandleInfoEXT* pGetMetalHandleInfo,
void** pHandle);
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryMetalHandlePropertiesEXT(
VkDevice device,
VkExternalMemoryHandleTypeFlagBits handleType,
const void* pHandle,
VkMemoryMetalHandlePropertiesEXT* pMemoryMetalHandleProperties);
#endif
#ifdef __cplusplus
}
#endif

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
#define VULKAN_SCREEN_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -1,4 +1,4 @@
// Copyright 2015-2024 The Khronos Group Inc.
// Copyright 2015-2025 The Khronos Group Inc.
//
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
@ -8,9 +8,12 @@
#ifndef VULKAN_SHARED_HPP
#define VULKAN_SHARED_HPP
#include <atomic> // std::atomic_size_t
#include <vulkan/vulkan.hpp>
#if !( defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) )
# include <atomic> // std::atomic_size_t
#endif
namespace VULKAN_HPP_NAMESPACE
{
#if !defined( VULKAN_HPP_NO_SMART_HANDLE )
@ -52,6 +55,28 @@ namespace VULKAN_HPP_NAMESPACE
{
};
template <typename HandleType, typename = void>
struct HasPoolType : std::false_type
{
};
template <typename HandleType>
struct HasPoolType<HandleType, decltype( (void)typename SharedHandleTraits<HandleType>::deleter::PoolTypeExport() )> : std::true_type
{
};
template <typename HandleType, typename Enable = void>
struct GetPoolType
{
using type = NoDestructor;
};
template <typename HandleType>
struct GetPoolType<HandleType, typename std::enable_if<HasPoolType<HandleType>::value>::type>
{
using type = typename SharedHandleTraits<HandleType>::deleter::PoolTypeExport;
};
//=====================================================================================================================
template <typename HandleType>
@ -182,6 +207,13 @@ namespace VULKAN_HPP_NAMESPACE
return bool( m_handle );
}
# if defined( VULKAN_HPP_SMART_HANDLE_IMPLICIT_CAST )
operator HandleType() const VULKAN_HPP_NOEXCEPT
{
return m_handle;
}
# endif
const HandleType * operator->() const VULKAN_HPP_NOEXCEPT
{
return &m_handle;
@ -250,12 +282,23 @@ namespace VULKAN_HPP_NAMESPACE
public:
SharedHandle() = default;
template <typename T = HandleType, typename = typename std::enable_if<HasDestructor<T>::value>::type>
template <typename T = HandleType, typename = typename std::enable_if<HasDestructor<T>::value && !HasPoolType<T>::value>::type>
explicit SharedHandle( HandleType handle, SharedHandle<DestructorTypeOf<HandleType>> parent, DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT
: BaseType( handle, std::move( parent ), std::move( deleter ) )
{
}
template <typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
typename T = HandleType,
typename = typename std::enable_if<HasDestructor<T>::value && HasPoolType<T>::value>::type>
explicit SharedHandle( HandleType handle,
SharedHandle<DestructorTypeOf<HandleType>> parent,
SharedHandle<typename GetPoolType<HandleType>::type> pool,
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT
: BaseType( handle, std::move( parent ), DeleterType{ std::move( pool ), dispatch } )
{
}
template <typename T = HandleType, typename = typename std::enable_if<!HasDestructor<T>::value>::type>
explicit SharedHandle( HandleType handle, DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT : BaseType( handle, std::move( deleter ) )
{
@ -265,157 +308,166 @@ namespace VULKAN_HPP_NAMESPACE
using BaseType::internalDestroy;
};
template <typename HandleType>
class SharedHandleTraits;
namespace detail
{
// Silence the function cast warnings.
# if defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __INTEL_COMPILER )
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wcast-function-type"
# elif defined( __clang__ ) && ( __clang_major__ >= 13 ) && !defined( __INTEL_COMPILER )
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wcast-function-type"
# endif
template <typename HandleType>
class ObjectDestroyShared
{
public:
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
template <class Dispatcher>
using DestroyFunctionPointerType =
typename std::conditional<HasDestructor<HandleType>::value,
void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const,
void ( HandleType::* )( const AllocationCallbacks *, const Dispatcher & ) const>::type;
using SelectorType = typename std::conditional<HasDestructor<HandleType>::value, DestructorType, HandleType>::type;
template <typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
ObjectDestroyShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &SelectorType::destroy ) ) )
, m_dispatch( &dispatch )
, m_allocationCallbacks( allocationCallbacks )
template <typename HandleType>
class ObjectDestroyShared
{
}
public:
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
public:
template <typename T = HandleType>
typename std::enable_if<HasDestructor<T>::value, void>::type destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT
template <class Dispatcher>
using DestroyFunctionPointerType =
typename std::conditional<HasDestructor<HandleType>::value,
void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const,
void ( HandleType::* )( const AllocationCallbacks *, const Dispatcher & ) const>::type;
using SelectorType = typename std::conditional<HasDestructor<HandleType>::value, DestructorType, HandleType>::type;
template <typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
ObjectDestroyShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &SelectorType::destroy ) ) )
, m_dispatch( &dispatch )
, m_allocationCallbacks( allocationCallbacks )
{
}
public:
template <typename T = HandleType>
typename std::enable_if<HasDestructor<T>::value, void>::type destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT
{
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
( parent.*m_destroy )( handle, m_allocationCallbacks, *m_dispatch );
}
template <typename T = HandleType>
typename std::enable_if<!HasDestructor<T>::value, void>::type destroy( HandleType handle ) const VULKAN_HPP_NOEXCEPT
{
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
( handle.*m_destroy )( m_allocationCallbacks, *m_dispatch );
}
private:
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const detail::DispatchLoaderBase * m_dispatch = nullptr;
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
};
template <typename HandleType>
class ObjectFreeShared
{
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
( parent.*m_destroy )( handle, m_allocationCallbacks, *m_dispatch );
}
public:
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
template <typename T = HandleType>
typename std::enable_if<!HasDestructor<T>::value, void>::type destroy( HandleType handle ) const VULKAN_HPP_NOEXCEPT
template <class Dispatcher>
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const;
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
ObjectFreeShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
, m_dispatch( &dispatch )
, m_allocationCallbacks( allocationCallbacks )
{
}
public:
void destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT
{
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
( parent.*m_destroy )( handle, m_allocationCallbacks, *m_dispatch );
}
private:
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const detail::DispatchLoaderBase * m_dispatch = nullptr;
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
};
template <typename HandleType>
class ObjectReleaseShared
{
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
( handle.*m_destroy )( m_allocationCallbacks, *m_dispatch );
}
public:
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr;
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
};
template <class Dispatcher>
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const Dispatcher & ) const;
template <typename HandleType>
class ObjectFreeShared
{
public:
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
ObjectReleaseShared( const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::release ) ) )
, m_dispatch( &dispatch )
{
}
template <class Dispatcher>
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const;
public:
void destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT
{
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
( parent.*m_destroy )( handle, *m_dispatch );
}
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
ObjectFreeShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
, m_dispatch( &dispatch )
, m_allocationCallbacks( allocationCallbacks )
private:
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const detail::DispatchLoaderBase * m_dispatch = nullptr;
};
template <typename HandleType, typename PoolType>
class PoolFreeShared
{
}
public:
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
public:
void destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT
{
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
( parent.*m_destroy )( handle, m_allocationCallbacks, *m_dispatch );
}
using PoolTypeExport = PoolType;
private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr;
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
};
template <class Dispatcher>
using ReturnType = decltype( std::declval<DestructorType>().free( PoolType(), 0u, nullptr, Dispatcher() ) );
template <typename HandleType>
class ObjectReleaseShared
{
public:
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
template <class Dispatcher>
using DestroyFunctionPointerType = ReturnType<Dispatcher> ( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const;
template <class Dispatcher>
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const Dispatcher & ) const;
PoolFreeShared() = default;
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
ObjectReleaseShared( const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::release ) ) )
, m_dispatch( &dispatch )
{
}
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
PoolFreeShared( SharedHandle<PoolType> pool, const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
, m_dispatch( &dispatch )
, m_pool( std::move( pool ) )
{
}
public:
void destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT
{
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
( parent.*m_destroy )( handle, *m_dispatch );
}
public:
void destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT
{
VULKAN_HPP_ASSERT( m_destroy && m_dispatch && m_pool );
( parent.*m_destroy )( m_pool.get(), 1u, &handle, *m_dispatch );
}
private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr;
};
template <typename HandleType, typename PoolType>
class PoolFreeShared
{
public:
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
template <class Dispatcher>
using ReturnType = decltype( std::declval<DestructorType>().free( PoolType(), 0u, nullptr, Dispatcher() ) );
template <class Dispatcher>
using DestroyFunctionPointerType = ReturnType<Dispatcher> ( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const;
PoolFreeShared() = default;
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
PoolFreeShared( SharedHandle<PoolType> pool, const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
, m_dispatch( &dispatch )
, m_pool( std::move( pool ) )
{
}
public:
void destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT
{
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
( parent.*m_destroy )( m_pool.get(), 1u, &handle, *m_dispatch );
}
private:
DestroyFunctionPointerType<DispatchLoaderBase> m_destroy = nullptr;
const DispatchLoaderBase * m_dispatch = nullptr;
SharedHandle<PoolType> m_pool{};
};
private:
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
const detail::DispatchLoaderBase * m_dispatch = nullptr;
SharedHandle<PoolType> m_pool{};
};
# if defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __INTEL_COMPILER )
# pragma GCC diagnostic pop
# elif defined( __clang__ ) && ( __clang_major__ >= 13 ) && !defined( __INTEL_COMPILER )
# pragma clang diagnostic pop
# endif
} // namespace detail
//======================
//=== SHARED HANDLEs ===
//======================
@ -426,7 +478,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = NoDestructor;
using deleter = ObjectDestroyShared<Instance>;
using deleter = detail::ObjectDestroyShared<Instance>;
};
using SharedInstance = SharedHandle<Instance>;
@ -436,7 +488,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = NoDestructor;
using deleter = ObjectDestroyShared<Device>;
using deleter = detail::ObjectDestroyShared<Device>;
};
using SharedDevice = SharedHandle<Device>;
@ -446,7 +498,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectFreeShared<DeviceMemory>;
using deleter = detail::ObjectFreeShared<DeviceMemory>;
};
using SharedDeviceMemory = SharedHandle<DeviceMemory>;
@ -456,7 +508,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<Fence>;
using deleter = detail::ObjectDestroyShared<Fence>;
};
using SharedFence = SharedHandle<Fence>;
@ -466,7 +518,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<Semaphore>;
using deleter = detail::ObjectDestroyShared<Semaphore>;
};
using SharedSemaphore = SharedHandle<Semaphore>;
@ -476,7 +528,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<Event>;
using deleter = detail::ObjectDestroyShared<Event>;
};
using SharedEvent = SharedHandle<Event>;
@ -486,7 +538,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<QueryPool>;
using deleter = detail::ObjectDestroyShared<QueryPool>;
};
using SharedQueryPool = SharedHandle<QueryPool>;
@ -496,7 +548,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<Buffer>;
using deleter = detail::ObjectDestroyShared<Buffer>;
};
using SharedBuffer = SharedHandle<Buffer>;
@ -506,7 +558,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<BufferView>;
using deleter = detail::ObjectDestroyShared<BufferView>;
};
using SharedBufferView = SharedHandle<BufferView>;
@ -516,7 +568,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<Image>;
using deleter = detail::ObjectDestroyShared<Image>;
};
using SharedImage = SharedHandle<Image>;
@ -526,7 +578,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<ImageView>;
using deleter = detail::ObjectDestroyShared<ImageView>;
};
using SharedImageView = SharedHandle<ImageView>;
@ -536,7 +588,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<ShaderModule>;
using deleter = detail::ObjectDestroyShared<ShaderModule>;
};
using SharedShaderModule = SharedHandle<ShaderModule>;
@ -546,7 +598,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<PipelineCache>;
using deleter = detail::ObjectDestroyShared<PipelineCache>;
};
using SharedPipelineCache = SharedHandle<PipelineCache>;
@ -556,7 +608,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<Pipeline>;
using deleter = detail::ObjectDestroyShared<Pipeline>;
};
using SharedPipeline = SharedHandle<Pipeline>;
@ -566,7 +618,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<PipelineLayout>;
using deleter = detail::ObjectDestroyShared<PipelineLayout>;
};
using SharedPipelineLayout = SharedHandle<PipelineLayout>;
@ -576,7 +628,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<Sampler>;
using deleter = detail::ObjectDestroyShared<Sampler>;
};
using SharedSampler = SharedHandle<Sampler>;
@ -586,7 +638,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<DescriptorPool>;
using deleter = detail::ObjectDestroyShared<DescriptorPool>;
};
using SharedDescriptorPool = SharedHandle<DescriptorPool>;
@ -596,7 +648,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = PoolFreeShared<DescriptorSet, DescriptorPool>;
using deleter = detail::PoolFreeShared<DescriptorSet, DescriptorPool>;
};
using SharedDescriptorSet = SharedHandle<DescriptorSet>;
@ -606,7 +658,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<DescriptorSetLayout>;
using deleter = detail::ObjectDestroyShared<DescriptorSetLayout>;
};
using SharedDescriptorSetLayout = SharedHandle<DescriptorSetLayout>;
@ -616,7 +668,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<Framebuffer>;
using deleter = detail::ObjectDestroyShared<Framebuffer>;
};
using SharedFramebuffer = SharedHandle<Framebuffer>;
@ -626,7 +678,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<RenderPass>;
using deleter = detail::ObjectDestroyShared<RenderPass>;
};
using SharedRenderPass = SharedHandle<RenderPass>;
@ -636,7 +688,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<CommandPool>;
using deleter = detail::ObjectDestroyShared<CommandPool>;
};
using SharedCommandPool = SharedHandle<CommandPool>;
@ -646,7 +698,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = PoolFreeShared<CommandBuffer, CommandPool>;
using deleter = detail::PoolFreeShared<CommandBuffer, CommandPool>;
};
using SharedCommandBuffer = SharedHandle<CommandBuffer>;
@ -657,7 +709,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<SamplerYcbcrConversion>;
using deleter = detail::ObjectDestroyShared<SamplerYcbcrConversion>;
};
using SharedSamplerYcbcrConversion = SharedHandle<SamplerYcbcrConversion>;
@ -668,7 +720,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<DescriptorUpdateTemplate>;
using deleter = detail::ObjectDestroyShared<DescriptorUpdateTemplate>;
};
using SharedDescriptorUpdateTemplate = SharedHandle<DescriptorUpdateTemplate>;
@ -680,7 +732,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<PrivateDataSlot>;
using deleter = detail::ObjectDestroyShared<PrivateDataSlot>;
};
using SharedPrivateDataSlot = SharedHandle<PrivateDataSlot>;
@ -692,7 +744,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Instance;
using deleter = ObjectDestroyShared<SurfaceKHR>;
using deleter = detail::ObjectDestroyShared<SurfaceKHR>;
};
using SharedSurfaceKHR = SharedHandle<SurfaceKHR>;
@ -703,7 +755,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<SwapchainKHR>;
using deleter = detail::ObjectDestroyShared<SwapchainKHR>;
};
using SharedSwapchainKHR = SharedHandle<SwapchainKHR>;
@ -714,7 +766,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = PhysicalDevice;
using deleter = ObjectDestroyShared<DisplayKHR>;
using deleter = detail::ObjectDestroyShared<DisplayKHR>;
};
using SharedDisplayKHR = SharedHandle<DisplayKHR>;
@ -725,7 +777,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Instance;
using deleter = ObjectDestroyShared<DebugReportCallbackEXT>;
using deleter = detail::ObjectDestroyShared<DebugReportCallbackEXT>;
};
using SharedDebugReportCallbackEXT = SharedHandle<DebugReportCallbackEXT>;
@ -736,7 +788,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<VideoSessionKHR>;
using deleter = detail::ObjectDestroyShared<VideoSessionKHR>;
};
using SharedVideoSessionKHR = SharedHandle<VideoSessionKHR>;
@ -746,7 +798,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<VideoSessionParametersKHR>;
using deleter = detail::ObjectDestroyShared<VideoSessionParametersKHR>;
};
using SharedVideoSessionParametersKHR = SharedHandle<VideoSessionParametersKHR>;
@ -757,7 +809,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<CuModuleNVX>;
using deleter = detail::ObjectDestroyShared<CuModuleNVX>;
};
using SharedCuModuleNVX = SharedHandle<CuModuleNVX>;
@ -767,7 +819,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<CuFunctionNVX>;
using deleter = detail::ObjectDestroyShared<CuFunctionNVX>;
};
using SharedCuFunctionNVX = SharedHandle<CuFunctionNVX>;
@ -778,7 +830,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Instance;
using deleter = ObjectDestroyShared<DebugUtilsMessengerEXT>;
using deleter = detail::ObjectDestroyShared<DebugUtilsMessengerEXT>;
};
using SharedDebugUtilsMessengerEXT = SharedHandle<DebugUtilsMessengerEXT>;
@ -789,7 +841,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<AccelerationStructureKHR>;
using deleter = detail::ObjectDestroyShared<AccelerationStructureKHR>;
};
using SharedAccelerationStructureKHR = SharedHandle<AccelerationStructureKHR>;
@ -800,7 +852,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<ValidationCacheEXT>;
using deleter = detail::ObjectDestroyShared<ValidationCacheEXT>;
};
using SharedValidationCacheEXT = SharedHandle<ValidationCacheEXT>;
@ -811,7 +863,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<AccelerationStructureNV>;
using deleter = detail::ObjectDestroyShared<AccelerationStructureNV>;
};
using SharedAccelerationStructureNV = SharedHandle<AccelerationStructureNV>;
@ -822,7 +874,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<PerformanceConfigurationINTEL>;
using deleter = detail::ObjectDestroyShared<PerformanceConfigurationINTEL>;
};
using SharedPerformanceConfigurationINTEL = SharedHandle<PerformanceConfigurationINTEL>;
@ -833,7 +885,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<DeferredOperationKHR>;
using deleter = detail::ObjectDestroyShared<DeferredOperationKHR>;
};
using SharedDeferredOperationKHR = SharedHandle<DeferredOperationKHR>;
@ -844,7 +896,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<IndirectCommandsLayoutNV>;
using deleter = detail::ObjectDestroyShared<IndirectCommandsLayoutNV>;
};
using SharedIndirectCommandsLayoutNV = SharedHandle<IndirectCommandsLayoutNV>;
@ -856,7 +908,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<CudaModuleNV>;
using deleter = detail::ObjectDestroyShared<CudaModuleNV>;
};
using SharedCudaModuleNV = SharedHandle<CudaModuleNV>;
@ -866,7 +918,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<CudaFunctionNV>;
using deleter = detail::ObjectDestroyShared<CudaFunctionNV>;
};
using SharedCudaFunctionNV = SharedHandle<CudaFunctionNV>;
@ -879,7 +931,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<BufferCollectionFUCHSIA>;
using deleter = detail::ObjectDestroyShared<BufferCollectionFUCHSIA>;
};
using SharedBufferCollectionFUCHSIA = SharedHandle<BufferCollectionFUCHSIA>;
@ -891,7 +943,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<MicromapEXT>;
using deleter = detail::ObjectDestroyShared<MicromapEXT>;
};
using SharedMicromapEXT = SharedHandle<MicromapEXT>;
@ -902,7 +954,7 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<OpticalFlowSessionNV>;
using deleter = detail::ObjectDestroyShared<OpticalFlowSessionNV>;
};
using SharedOpticalFlowSessionNV = SharedHandle<OpticalFlowSessionNV>;
@ -913,11 +965,54 @@ namespace VULKAN_HPP_NAMESPACE
{
public:
using DestructorType = Device;
using deleter = ObjectDestroyShared<ShaderEXT>;
using deleter = detail::ObjectDestroyShared<ShaderEXT>;
};
using SharedShaderEXT = SharedHandle<ShaderEXT>;
//=== VK_KHR_pipeline_binary ===
template <>
class SharedHandleTraits<PipelineBinaryKHR>
{
public:
using DestructorType = Device;
using deleter = detail::ObjectDestroyShared<PipelineBinaryKHR>;
};
using SharedPipelineBinaryKHR = SharedHandle<PipelineBinaryKHR>;
//=== VK_NV_external_compute_queue ===
template <>
class SharedHandleTraits<ExternalComputeQueueNV>
{
public:
using DestructorType = Device;
using deleter = detail::ObjectDestroyShared<ExternalComputeQueueNV>;
};
using SharedExternalComputeQueueNV = SharedHandle<ExternalComputeQueueNV>;
//=== VK_EXT_device_generated_commands ===
template <>
class SharedHandleTraits<IndirectCommandsLayoutEXT>
{
public:
using DestructorType = Device;
using deleter = detail::ObjectDestroyShared<IndirectCommandsLayoutEXT>;
};
using SharedIndirectCommandsLayoutEXT = SharedHandle<IndirectCommandsLayoutEXT>;
template <>
class SharedHandleTraits<IndirectExecutionSetEXT>
{
public:
using DestructorType = Device;
using deleter = detail::ObjectDestroyShared<IndirectExecutionSetEXT>;
};
using SharedIndirectExecutionSetEXT = SharedHandle<IndirectExecutionSetEXT>;
enum class SwapchainOwns
{
no,

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
#define VULKAN_VI_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
#define VULKAN_WAYLAND_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -2,7 +2,7 @@
#define VULKAN_WIN32_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -2,7 +2,7 @@
#define VULKAN_XCB_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -2,7 +2,7 @@
#define VULKAN_XLIB_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -2,7 +2,7 @@
#define VULKAN_XLIB_XRANDR_H_ 1
/*
** Copyright 2015-2024 The Khronos Group Inc.
** Copyright 2015-2025 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/

View file

@ -1,6 +1,6 @@
#!/usr/bin/python3 -i
#!/usr/bin/env python3 -i
#
# Copyright 2021-2024 The Khronos Group Inc.
# Copyright 2021-2025 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
# Generic alias for working group-specific API conventions interface.

803
registry/base_generator.py Normal file
View file

@ -0,0 +1,803 @@
#!/usr/bin/env python3 -i
#
# Copyright 2023-2025 The Khronos Group Inc.
#
# SPDX-License-Identifier: Apache-2.0
import pickle
import os
import tempfile
from vulkan_object import (VulkanObject,
Extension, Version, Handle, Param, Queues, CommandScope, Command,
EnumField, Enum, Flag, Bitmask, Member, Struct,
FormatComponent, FormatPlane, Format,
SyncSupport, SyncEquivalent, SyncStage, SyncAccess, SyncPipelineStage, SyncPipeline,
SpirvEnables, Spirv)
# These live in the Vulkan-Docs repo, but are pulled in via the
# Vulkan-Headers/registry folder
from generator import OutputGenerator, GeneratorOptions, write
from vkconventions import VulkanConventions
# An API style convention object
vulkanConventions = VulkanConventions()
# Helpers to keep things cleaner
def splitIfGet(elem, name):
return elem.get(name).split(',') if elem.get(name) is not None and elem.get(name) != '' else None
def textIfFind(elem, name):
return elem.find(name).text if elem.find(name) is not None else None
def intIfGet(elem, name):
return None if elem.get(name) is None else int(elem.get(name), 0)
def boolGet(elem, name) -> bool:
return elem.get(name) is not None and elem.get(name) == "true"
def getQueues(elem) -> Queues:
queues = 0
queues_list = splitIfGet(elem, 'queues')
if queues_list is not None:
queues |= Queues.TRANSFER if 'transfer' in queues_list else 0
queues |= Queues.GRAPHICS if 'graphics' in queues_list else 0
queues |= Queues.COMPUTE if 'compute' in queues_list else 0
queues |= Queues.PROTECTED if 'protected' in queues_list else 0
queues |= Queues.SPARSE_BINDING if 'sparse_binding' in queues_list else 0
queues |= Queues.OPTICAL_FLOW if 'opticalflow' in queues_list else 0
queues |= Queues.DECODE if 'decode' in queues_list else 0
queues |= Queues.ENCODE if 'encode' in queues_list else 0
return queues
# Shared object used by Sync elements that do not have ones
maxSyncSupport = SyncSupport(None, None, True)
maxSyncEquivalent = SyncEquivalent(None, None, True)
# Helpers to set GeneratorOptions options globally
def SetOutputFileName(fileName: str) -> None:
global globalFileName
globalFileName = fileName
def SetOutputDirectory(directory: str) -> None:
global globalDirectory
globalDirectory = directory
def SetTargetApiName(apiname: str) -> None:
global globalApiName
globalApiName = apiname
def SetMergedApiNames(names: str) -> None:
global mergedApiNames
mergedApiNames = names
cachingEnabled = False
def EnableCaching() -> None:
global cachingEnabled
cachingEnabled = True
# This class is a container for any source code, data, or other behavior that is necessary to
# customize the generator script for a specific target API variant (e.g. Vulkan SC). As such,
# all of these API-specific interfaces and their use in the generator script are part of the
# contract between this repository and its downstream users. Changing or removing any of these
# interfaces or their use in the generator script will have downstream effects and thus
# should be avoided unless absolutely necessary.
class APISpecific:
# Version object factory method
@staticmethod
def createApiVersion(targetApiName: str, name: str) -> Version:
match targetApiName:
# Vulkan SC specific API version creation
case 'vulkansc':
nameApi = name.replace('VK_', 'VK_API_')
nameApi = nameApi.replace('VKSC_', 'VKSC_API_')
nameString = f'"{name}"'
return Version(name, nameString, nameApi)
# Vulkan specific API version creation
case 'vulkan':
nameApi = name.replace('VK_', 'VK_API_')
nameString = f'"{name}"'
return Version(name, nameString, nameApi)
# This Generator Option is used across all generators.
# After years of use, it has shown that most the options are unified across each generator (file)
# as it is easier to modify things per-file that need the difference
class BaseGeneratorOptions(GeneratorOptions):
def __init__(self,
customFileName = None,
customDirectory = None,
customApiName = None):
GeneratorOptions.__init__(self,
conventions = vulkanConventions,
filename = customFileName if customFileName else globalFileName,
directory = customDirectory if customDirectory else globalDirectory,
apiname = customApiName if customApiName else globalApiName,
mergeApiNames = mergedApiNames,
defaultExtensions = customApiName if customApiName else globalApiName,
emitExtensions = '.*',
emitSpirv = '.*',
emitFormats = '.*')
# These are used by the generator.py script
self.apicall = 'VKAPI_ATTR '
self.apientry = 'VKAPI_CALL '
self.apientryp = 'VKAPI_PTR *'
self.alignFuncParam = 48
#
# This object handles all the parsing from reg.py generator scripts in the Vulkan-Headers
# It will grab all the data and form it into a single object the rest of the generators will use
class BaseGenerator(OutputGenerator):
def __init__(self):
OutputGenerator.__init__(self, None, None, None)
self.vk = VulkanObject()
self.targetApiName = globalApiName
# reg.py has a `self.featureName` but this is nicer because
# it will be either the Version or Extension object
self.currentExtension = None
self.currentVersion = None
# Will map alias to promoted name
# ex. ['VK_FILTER_CUBIC_IMG' : 'VK_FILTER_CUBIC_EXT']
# When generating any code, there is no reason so use the old name
self.enumAliasMap = dict()
self.enumFieldAliasMap = dict()
self.bitmaskAliasMap = dict()
self.flagAliasMap = dict()
self.structAliasMap = dict()
self.handleAliasMap = dict()
def write(self, data):
# Prevents having to check before writing
if data is not None and data != "":
write(data, file=self.outFile)
def beginFile(self, genOpts):
OutputGenerator.beginFile(self, genOpts)
self.filename = genOpts.filename
# No gen*() command to get these, so do it manually
for platform in self.registry.tree.findall('platforms/platform'):
self.vk.platforms[platform.get('name')] = platform.get('protect')
for tags in self.registry.tree.findall('tags'):
for tag in tags.findall('tag'):
self.vk.vendorTags.append(tag.get('name'))
# No way known to get this from the XML
self.vk.queueBits[Queues.TRANSFER] = 'VK_QUEUE_TRANSFER_BIT'
self.vk.queueBits[Queues.GRAPHICS] = 'VK_QUEUE_GRAPHICS_BIT'
self.vk.queueBits[Queues.COMPUTE] = 'VK_QUEUE_COMPUTE_BIT'
self.vk.queueBits[Queues.PROTECTED] = 'VK_QUEUE_PROTECTED_BIT'
self.vk.queueBits[Queues.SPARSE_BINDING] = 'VK_QUEUE_SPARSE_BINDING_BIT'
self.vk.queueBits[Queues.OPTICAL_FLOW] = 'VK_QUEUE_OPTICAL_FLOW_BIT_NV'
self.vk.queueBits[Queues.DECODE] = 'VK_QUEUE_VIDEO_DECODE_BIT_KHR'
self.vk.queueBits[Queues.ENCODE] = 'VK_QUEUE_VIDEO_ENCODE_BIT_KHR'
# This function should be overloaded
def generate(self):
print("WARNING: This should not be called from the child class")
return
# This function is dense, it does all the magic to set the right extensions dependencies!
#
# The issue is if 2 extension expose a command, genCmd() will only
# show one of the extension, at endFile() we can finally go through
# and update which things depend on which extensions
#
# self.featureDictionary is built for use in the reg.py framework
# Details found in Vulkan-Docs/scripts/scriptgenerator.py
def applyExtensionDependency(self):
for extension in self.vk.extensions.values():
# dict.key() can be None, so need to double loop
dict = self.featureDictionary[extension.name]['command']
# "required" == None
# or
# an additional feature dependency, which is a boolean expression of
# one or more extension and/or core version names
for required in dict:
for commandName in dict[required]:
# Skip commands removed in the target API
# This check is needed because parts of the base generator code bypass the
# dependency resolution logic in the registry tooling and thus the generator
# may attempt to generate code for commands which are not supported in the
# target API variant, thus this check needs to happen even if any specific
# target API variant may not specifically need it
if not commandName in self.vk.commands:
continue
command = self.vk.commands[commandName]
# Make sure list is unique
command.extensions.extend([extension] if extension not in command.extensions else [])
extension.commands.extend([command] if command not in extension.commands else [])
# While genGroup() will call twice with aliased value, it does not provide all the information we need
dict = self.featureDictionary[extension.name]['enumconstant']
for required in dict:
# group can be a Enum or Bitmask
for group in dict[required]:
if group in self.vk.enums:
if group not in extension.enumFields:
extension.enumFields[group] = [] # Dict needs init
enum = self.vk.enums[group]
# Need to convert all alias so they match what is in EnumField
enumList = list(map(lambda x: x if x not in self.enumFieldAliasMap else self.enumFieldAliasMap[x], dict[required][group]))
for enumField in [x for x in enum.fields if x.name in enumList]:
# Make sure list is unique
enum.fieldExtensions.extend([extension] if extension not in enum.fieldExtensions else [])
enumField.extensions.extend([extension] if extension not in enumField.extensions else [])
extension.enumFields[group].extend([enumField] if enumField not in extension.enumFields[group] else [])
if group in self.vk.bitmasks:
if group not in extension.flags:
extension.flags[group] = [] # Dict needs init
bitmask = self.vk.bitmasks[group]
# Need to convert all alias so they match what is in Flags
flagList = list(map(lambda x: x if x not in self.flagAliasMap else self.flagAliasMap[x], dict[required][group]))
for flags in [x for x in bitmask.flags if x.name in flagList]:
# Make sure list is unique
bitmask.flagExtensions.extend([extension] if extension not in bitmask.flagExtensions else [])
flags.extensions.extend([extension] if extension not in flags.extensions else [])
extension.flags[group].extend([flags] if flags not in extension.flags[group] else [])
# Need to do 'enum'/'bitmask' after 'enumconstant' has applied everything so we can add implicit extensions
#
# Sometimes two extensions enable an Enum, but the newer extension version has extra flags allowed
# This information seems to be implicit, so need to update it here
# Go through each Flag and append the Enum extension to it
#
# ex. VkAccelerationStructureTypeKHR where GENERIC_KHR is not allowed with just VK_NV_ray_tracing
# This only works because the values are aliased as well, making the KHR a superset enum
for extension in self.vk.extensions.values():
dict = self.featureDictionary[extension.name]['enum']
for required in dict:
for group in dict[required]:
for enumName in dict[required][group]:
isAlias = enumName in self.enumAliasMap
enumName = self.enumAliasMap[enumName] if isAlias else enumName
if enumName in self.vk.enums:
enum = self.vk.enums[enumName]
enum.extensions.extend([extension] if extension not in enum.extensions else [])
extension.enums.extend([enum] if enum not in extension.enums else [])
# Update fields with implicit base extension
if isAlias:
continue
enum.fieldExtensions.extend([extension] if extension not in enum.fieldExtensions else [])
for enumField in [x for x in enum.fields if (not x.extensions or (x.extensions and all(e in enum.extensions for e in x.extensions)))]:
enumField.extensions.extend([extension] if extension not in enumField.extensions else [])
if enumName not in extension.enumFields:
extension.enumFields[enumName] = [] # Dict needs init
extension.enumFields[enumName].extend([enumField] if enumField not in extension.enumFields[enumName] else [])
dict = self.featureDictionary[extension.name]['bitmask']
for required in dict:
for group in dict[required]:
for bitmaskName in dict[required][group]:
bitmaskName = bitmaskName.replace('Flags', 'FlagBits') # Works since Flags is not repeated in name
isAlias = bitmaskName in self.bitmaskAliasMap
bitmaskName = self.bitmaskAliasMap[bitmaskName] if isAlias else bitmaskName
if bitmaskName in self.vk.bitmasks:
bitmask = self.vk.bitmasks[bitmaskName]
bitmask.extensions.extend([extension] if extension not in bitmask.extensions else [])
extension.bitmasks.extend([bitmask] if bitmask not in extension.bitmasks else [])
# Update flags with implicit base extension
if isAlias:
continue
bitmask.flagExtensions.extend([extension] if extension not in bitmask.flagExtensions else [])
for flag in [x for x in bitmask.flags if (not x.extensions or (x.extensions and all(e in bitmask.extensions for e in x.extensions)))]:
flag.extensions.extend([extension] if extension not in flag.extensions else [])
if bitmaskName not in extension.flags:
extension.flags[bitmaskName] = [] # Dict needs init
extension.flags[bitmaskName].extend([flag] if flag not in extension.flags[bitmaskName] else [])
# Some structs (ex VkAttachmentSampleCountInfoAMD) can have multiple alias pointing to same extension
for extension in self.vk.extensions.values():
dict = self.featureDictionary[extension.name]['struct']
for required in dict:
for group in dict[required]:
for structName in dict[required][group]:
isAlias = structName in self.structAliasMap
structName = self.structAliasMap[structName] if isAlias else structName
# An EXT struct can alias a KHR struct,
# that in turns aliaes a core struct
# => Try to propagate aliasing, it can safely result in a no-op
isAlias = structName in self.structAliasMap
structName = self.structAliasMap[structName] if isAlias else structName
if structName in self.vk.structs:
struct = self.vk.structs[structName]
struct.extensions.extend([extension] if extension not in struct.extensions else [])
# While we update struct alias inside other structs, the command itself might have the struct as a first level param.
# We use this time to update params to have the promoted name
# Example - https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/9322
for command in self.vk.commands.values():
for member in command.params:
if member.type in self.structAliasMap:
member.type = self.structAliasMap[member.type]
# Could build up a reverse lookup map, but since these are not too large of list, just do here
# (Need to be done after we have found all the aliases)
for key, value in self.structAliasMap.items():
self.vk.structs[value].aliases.append(key)
for key, value in self.enumAliasMap.items():
self.vk.enums[value].aliases.append(key)
for key, value in self.bitmaskAliasMap.items():
self.vk.bitmasks[value].aliases.append(key)
for key, value in self.handleAliasMap.items():
self.vk.handles[value].aliases.append(key)
def endFile(self):
# This is the point were reg.py has ran, everything is collected
# We do some post processing now
self.applyExtensionDependency()
# Use structs and commands to find which things are returnedOnly
for struct in [x for x in self.vk.structs.values() if not x.returnedOnly]:
for enum in [self.vk.enums[x.type] for x in struct.members if x.type in self.vk.enums]:
enum.returnedOnly = False
for bitmask in [self.vk.bitmasks[x.type] for x in struct.members if x.type in self.vk.bitmasks]:
bitmask.returnedOnly = False
for bitmask in [self.vk.bitmasks[x.type.replace('Flags', 'FlagBits')] for x in struct.members if x.type.replace('Flags', 'FlagBits') in self.vk.bitmasks]:
bitmask.returnedOnly = False
for command in self.vk.commands.values():
for enum in [self.vk.enums[x.type] for x in command.params if x.type in self.vk.enums]:
enum.returnedOnly = False
for bitmask in [self.vk.bitmasks[x.type] for x in command.params if x.type in self.vk.bitmasks]:
bitmask.returnedOnly = False
for bitmask in [self.vk.bitmasks[x.type.replace('Flags', 'FlagBits')] for x in command.params if x.type.replace('Flags', 'FlagBits') in self.vk.bitmasks]:
bitmask.returnedOnly = False
# Turn handle parents into pointers to classes
for handle in [x for x in self.vk.handles.values() if x.parent is not None]:
handle.parent = self.vk.handles[handle.parent]
# search up parent chain to see if instance or device
for handle in [x for x in self.vk.handles.values()]:
next_parent = handle.parent
while (not handle.instance and not handle.device):
handle.instance = next_parent.name == 'VkInstance'
handle.device = next_parent.name == 'VkDevice'
next_parent = next_parent.parent
maxSyncSupport.queues = Queues.ALL
maxSyncSupport.stages = self.vk.bitmasks['VkPipelineStageFlagBits2'].flags
maxSyncEquivalent.accesses = self.vk.bitmasks['VkAccessFlagBits2'].flags
maxSyncEquivalent.stages = self.vk.bitmasks['VkPipelineStageFlagBits2'].flags
# All inherited generators should run from here
self.generate()
if cachingEnabled:
cachePath = os.path.join(tempfile.gettempdir(), f'vkobject_{os.getpid()}')
if not os.path.isfile(cachePath):
cacheFile = open(cachePath, 'wb')
pickle.dump(self.vk, cacheFile)
cacheFile.close()
# This should not have to do anything but call into OutputGenerator
OutputGenerator.endFile(self)
#
# Bypass the entire processing and load in the VkObject data
# Still need to handle the beingFile/endFile for reg.py
def generateFromCache(self, cacheVkObjectData, genOpts):
OutputGenerator.beginFile(self, genOpts)
self.filename = genOpts.filename
self.vk = cacheVkObjectData
self.generate()
OutputGenerator.endFile(self)
#
# Processing point at beginning of each extension definition
def beginFeature(self, interface, emit):
OutputGenerator.beginFeature(self, interface, emit)
platform = interface.get('platform')
self.featureExtraProtec = self.vk.platforms[platform] if platform in self.vk.platforms else None
protect = self.vk.platforms[platform] if platform in self.vk.platforms else None
name = interface.get('name')
if interface.tag == 'extension':
instance = interface.get('type') == 'instance'
device = not instance
depends = interface.get('depends')
vendorTag = interface.get('author')
platform = interface.get('platform')
provisional = boolGet(interface, 'provisional')
promotedto = interface.get('promotedto')
deprecatedby = interface.get('deprecatedby')
obsoletedby = interface.get('obsoletedby')
specialuse = splitIfGet(interface, 'specialuse')
# Not sure if better way to get this info
specVersion = self.featureDictionary[name]['enumconstant'][None][None][0]
nameString = self.featureDictionary[name]['enumconstant'][None][None][1]
self.currentExtension = Extension(name, nameString, specVersion, instance, device, depends, vendorTag,
platform, protect, provisional, promotedto, deprecatedby,
obsoletedby, specialuse)
self.vk.extensions[name] = self.currentExtension
else: # version
number = interface.get('number')
if number != '1.0':
self.currentVersion = APISpecific.createApiVersion(self.targetApiName, name)
self.vk.versions[name] = self.currentVersion
def endFeature(self):
OutputGenerator.endFeature(self)
self.currentExtension = None
self.currentVersion = None
#
# All <command> from XML
def genCmd(self, cmdinfo, name, alias):
OutputGenerator.genCmd(self, cmdinfo, name, alias)
params = []
for param in cmdinfo.elem.findall('param'):
paramName = param.find('name').text
paramType = textIfFind(param, 'type')
paramAlias = param.get('alias')
cdecl = self.makeCParamDecl(param, 0)
paramFullType = ' '.join(cdecl.split()[:-1])
pointer = '*' in cdecl or paramType.startswith('PFN_')
paramConst = 'const' in cdecl
fixedSizeArray = [x[:-1] for x in cdecl.split('[') if x.endswith(']')]
paramNoautovalidity = boolGet(param, 'noautovalidity')
nullTerminated = False
length = param.get('altlen') if param.get('altlen') is not None else param.get('len')
if length:
# we will either find it like "null-terminated" or "enabledExtensionCount,null-terminated"
# This finds both
nullTerminated = 'null-terminated' in length
length = length.replace(',null-terminated', '') if 'null-terminated' in length else length
length = None if length == 'null-terminated' else length
if fixedSizeArray and not length:
length = ','.join(fixedSizeArray)
# See Member::optional code for details of this
optionalValues = splitIfGet(param, 'optional')
optional = optionalValues is not None and optionalValues[0].lower() == "true"
optionalPointer = optionalValues is not None and len(optionalValues) > 1 and optionalValues[1].lower() == "true"
# externsync will be 'true' or expression
# if expression, it should be same as 'true'
externSync = boolGet(param, 'externsync')
externSyncPointer = None if externSync else splitIfGet(param, 'externsync')
if not externSync and externSyncPointer is not None:
externSync = True
params.append(Param(paramName, paramAlias, paramType, paramFullType, paramNoautovalidity,
paramConst, length, nullTerminated, pointer, fixedSizeArray,
optional, optionalPointer,
externSync, externSyncPointer, cdecl))
attrib = cmdinfo.elem.attrib
alias = attrib.get('alias')
tasks = splitIfGet(attrib, 'tasks')
queues = getQueues(attrib)
successcodes = splitIfGet(attrib, 'successcodes')
errorcodes = splitIfGet(attrib, 'errorcodes')
cmdbufferlevel = attrib.get('cmdbufferlevel')
primary = cmdbufferlevel is not None and 'primary' in cmdbufferlevel
secondary = cmdbufferlevel is not None and 'secondary' in cmdbufferlevel
renderpass = attrib.get('renderpass')
renderpass = CommandScope.NONE if renderpass is None else getattr(CommandScope, renderpass.upper())
videocoding = attrib.get('videocoding')
videocoding = CommandScope.NONE if videocoding is None else getattr(CommandScope, videocoding.upper())
protoElem = cmdinfo.elem.find('proto')
returnType = textIfFind(protoElem, 'type')
decls = self.makeCDecls(cmdinfo.elem)
cPrototype = decls[0]
cFunctionPointer = decls[1]
protect = self.currentExtension.protect if self.currentExtension is not None else None
# These coammds have no way from the XML to detect they would be an instance command
specialInstanceCommand = ['vkCreateInstance', 'vkEnumerateInstanceExtensionProperties','vkEnumerateInstanceLayerProperties', 'vkEnumerateInstanceVersion']
instance = len(params) > 0 and (params[0].type == 'VkInstance' or params[0].type == 'VkPhysicalDevice' or name in specialInstanceCommand)
device = not instance
implicitElem = cmdinfo.elem.find('implicitexternsyncparams')
implicitExternSyncParams = [x.text for x in implicitElem.findall('param')] if implicitElem else []
self.vk.commands[name] = Command(name, alias, protect, [], self.currentVersion,
returnType, params, instance, device,
tasks, queues, successcodes, errorcodes,
primary, secondary, renderpass, videocoding,
implicitExternSyncParams, cPrototype, cFunctionPointer)
#
# List the enum for the commands
# TODO - Seems empty groups like `VkDeviceDeviceMemoryReportCreateInfoEXT` do not show up in here
def genGroup(self, groupinfo, groupName, alias):
# There can be case where the Enum/Bitmask is in a protect, but the individual
# fields also have their own protect
groupProtect = self.currentExtension.protect if hasattr(self.currentExtension, 'protect') and self.currentExtension.protect is not None else None
enumElem = groupinfo.elem
bitwidth = 32 if enumElem.get('bitwidth') is None else int(enumElem.get('bitwidth'))
fields = []
if enumElem.get('type') == "enum":
if alias is not None:
self.enumAliasMap[groupName] = alias
return
for elem in enumElem.findall('enum'):
fieldName = elem.get('name')
if elem.get('alias') is not None:
self.enumFieldAliasMap[fieldName] = elem.get('alias')
continue
negative = elem.get('dir') is not None
protect = elem.get('protect')
(valueInt, valueStr) = self.enumToValue(elem, True, bitwidth)
# Some values have multiple extensions (ex VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR)
# genGroup() lists them twice
if next((x for x in fields if x.name == fieldName), None) is None:
fields.append(EnumField(fieldName, protect, negative, valueInt, valueStr, []))
self.vk.enums[groupName] = Enum(groupName, [], groupProtect, bitwidth, True, fields, [], [])
else: # "bitmask"
if alias is not None:
self.bitmaskAliasMap[groupName] = alias
return
for elem in enumElem.findall('enum'):
flagName = elem.get('name')
if elem.get('alias') is not None:
self.flagAliasMap[flagName] = elem.get('alias')
continue
protect = elem.get('protect')
(valueInt, valueStr) = self.enumToValue(elem, True, bitwidth)
flagZero = valueInt == 0
flagMultiBit = False
# if flag uses 'value' instead of 'bitpos', will be zero or a mask
if elem.get('bitpos') is None and elem.get('value'):
flagMultiBit = valueInt != 0
# Some values have multiple extensions (ex VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT)
# genGroup() lists them twice
if next((x for x in fields if x.name == flagName), None) is None:
fields.append(Flag(flagName, protect, valueInt, valueStr, flagMultiBit, flagZero, []))
flagName = groupName.replace('FlagBits', 'Flags')
self.vk.bitmasks[groupName] = Bitmask(groupName, [], flagName, groupProtect, bitwidth, True, fields, [], [])
def genType(self, typeInfo, typeName, alias):
OutputGenerator.genType(self, typeInfo, typeName, alias)
typeElem = typeInfo.elem
protect = self.currentExtension.protect if hasattr(self.currentExtension, 'protect') and self.currentExtension.protect is not None else None
category = typeElem.get('category')
if (category == 'struct' or category == 'union'):
extension = [self.currentExtension] if self.currentExtension is not None else []
if alias is not None:
self.structAliasMap[typeName] = alias
return
union = category == 'union'
returnedOnly = boolGet(typeElem, 'returnedonly')
allowDuplicate = boolGet(typeElem, 'allowduplicate')
extends = splitIfGet(typeElem, 'structextends')
extendedBy = self.registry.validextensionstructs[typeName] if len(self.registry.validextensionstructs[typeName]) > 0 else None
membersElem = typeInfo.elem.findall('.//member')
members = []
sType = None
for member in membersElem:
for comment in member.findall('comment'):
member.remove(comment)
name = textIfFind(member, 'name')
type = textIfFind(member, 'type')
sType = member.get('values') if member.get('values') is not None else sType
externSync = boolGet(member, 'externsync')
noautovalidity = boolGet(member, 'noautovalidity')
limittype = member.get('limittype')
nullTerminated = False
length = member.get('altlen') if member.get('altlen') is not None else member.get('len')
if length:
# we will either find it like "null-terminated" or "enabledExtensionCount,null-terminated"
# This finds both
nullTerminated = 'null-terminated' in length
length = length.replace(',null-terminated', '') if 'null-terminated' in length else length
length = None if length == 'null-terminated' else length
cdecl = self.makeCParamDecl(member, 0)
fullType = ' '.join(cdecl.split()[:-1])
pointer = '*' in cdecl or type.startswith('PFN_')
const = 'const' in cdecl
# Some structs like VkTransformMatrixKHR have a 2D array
fixedSizeArray = [x[:-1] for x in cdecl.split('[') if x.endswith(']')]
if fixedSizeArray and not length:
length = ','.join(fixedSizeArray)
# if a pointer, this can be a something like:
# optional="true,false" for ppGeometries
# optional="false,true" for pPhysicalDeviceCount
# the first is if the variable itself is optional
# the second is the value of the pointer is optional;
optionalValues = splitIfGet(member, 'optional')
optional = optionalValues is not None and optionalValues[0].lower() == "true"
optionalPointer = optionalValues is not None and len(optionalValues) > 1 and optionalValues[1].lower() == "true"
members.append(Member(name, type, fullType, noautovalidity, limittype,
const, length, nullTerminated, pointer, fixedSizeArray,
optional, optionalPointer,
externSync, cdecl))
self.vk.structs[typeName] = Struct(typeName, [], extension, self.currentVersion, protect, members,
union, returnedOnly, sType, allowDuplicate, extends, extendedBy)
elif category == 'handle':
if alias is not None:
self.handleAliasMap[typeName] = alias
return
type = typeElem.get('objtypeenum')
# will resolve these later, the VulkanObjectType does not list things in dependent order
parent = typeElem.get('parent')
instance = typeName == 'VkInstance'
device = typeName == 'VkDevice'
dispatchable = typeElem.find('type').text == 'VK_DEFINE_HANDLE'
self.vk.handles[typeName] = Handle(typeName, [], type, protect, parent, instance, device, dispatchable)
elif category == 'define':
if typeName == 'VK_HEADER_VERSION':
self.vk.headerVersion = typeElem.find('name').tail.strip()
else:
# not all categories are used
# 'group'/'enum'/'bitmask' are routed to genGroup instead
# 'basetype'/'include' are only for headers
# 'funcpointer` ignore until needed
return
def genSpirv(self, spirvinfo, spirvName, alias):
OutputGenerator.genSpirv(self, spirvinfo, spirvName, alias)
spirvElem = spirvinfo.elem
name = spirvElem.get('name')
extension = True if spirvElem.tag == 'spirvextension' else False
capability = not extension
enables = []
for elem in spirvElem:
version = elem.attrib.get('version')
extensionEnable = elem.attrib.get('extension')
struct = elem.attrib.get('struct')
feature = elem.attrib.get('feature')
requires = elem.attrib.get('requires')
propertyEnable = elem.attrib.get('property')
member = elem.attrib.get('member')
value = elem.attrib.get('value')
enables.append(SpirvEnables(version, extensionEnable, struct, feature,
requires, propertyEnable, member, value))
self.vk.spirv.append(Spirv(name, extension, capability, enables))
def genFormat(self, format, formatinfo, alias):
OutputGenerator.genFormat(self, format, formatinfo, alias)
formatElem = format.elem
name = formatElem.get('name')
components = []
for component in formatElem.iterfind('component'):
type = component.get('name')
bits = component.get('bits')
numericFormat = component.get('numericFormat')
planeIndex = intIfGet(component, 'planeIndex')
components.append(FormatComponent(type, bits, numericFormat, planeIndex))
planes = []
for plane in formatElem.iterfind('plane'):
index = int(plane.get('index'))
widthDivisor = int(plane.get('widthDivisor'))
heightDivisor = int(plane.get('heightDivisor'))
compatible = plane.get('compatible')
planes.append(FormatPlane(index, widthDivisor, heightDivisor, compatible))
className = formatElem.get('class')
blockSize = int(formatElem.get('blockSize'))
texelsPerBlock = int(formatElem.get('texelsPerBlock'))
blockExtent = splitIfGet(formatElem, 'blockExtent')
packed = intIfGet(formatElem, 'packed')
chroma = formatElem.get('chroma')
compressed = formatElem.get('compressed')
spirvImageFormat = formatElem.find('spirvimageformat')
if spirvImageFormat is not None:
spirvImageFormat = spirvImageFormat.get('name')
self.vk.formats[name] = Format(name, className, blockSize, texelsPerBlock,
blockExtent, packed, chroma, compressed,
components, planes, spirvImageFormat)
def genSyncStage(self, sync):
OutputGenerator.genSyncStage(self, sync)
syncElem = sync.elem
support = maxSyncSupport
supportElem = syncElem.find('syncsupport')
if supportElem is not None:
queues = getQueues(supportElem)
stageNames = splitIfGet(supportElem, 'stage')
stages = [x for x in self.vk.bitmasks['VkPipelineStageFlagBits2'].flags if x.name in stageNames] if stageNames is not None else None
support = SyncSupport(queues, stages, False)
equivalent = maxSyncEquivalent
equivalentElem = syncElem.find('syncequivalent')
if equivalentElem is not None:
stageNames = splitIfGet(equivalentElem, 'stage')
stages = [x for x in self.vk.bitmasks['VkPipelineStageFlagBits2'].flags if x.name in stageNames] if stageNames is not None else None
accessNames = splitIfGet(equivalentElem, 'access')
accesses = [x for x in self.vk.bitmasks['VkAccessFlagBits2'].flags if x.name in accessNames] if accessNames is not None else None
equivalent = SyncEquivalent(stages, accesses, False)
flagName = syncElem.get('name')
flag = [x for x in self.vk.bitmasks['VkPipelineStageFlagBits2'].flags if x.name == flagName]
# This check is needed because not all API variants have VK_KHR_synchronization2
if flag:
self.vk.syncStage.append(SyncStage(flag[0], support, equivalent))
def genSyncAccess(self, sync):
OutputGenerator.genSyncAccess(self, sync)
syncElem = sync.elem
support = maxSyncSupport
supportElem = syncElem.find('syncsupport')
if supportElem is not None:
queues = getQueues(supportElem)
stageNames = splitIfGet(supportElem, 'stage')
stages = [x for x in self.vk.bitmasks['VkPipelineStageFlagBits2'].flags if x.name in stageNames] if stageNames is not None else None
support = SyncSupport(queues, stages, False)
equivalent = maxSyncEquivalent
equivalentElem = syncElem.find('syncequivalent')
if equivalentElem is not None:
stageNames = splitIfGet(equivalentElem, 'stage')
stages = [x for x in self.vk.bitmasks['VkPipelineStageFlagBits2'].flags if x.name in stageNames] if stageNames is not None else None
accessNames = splitIfGet(equivalentElem, 'access')
accesses = [x for x in self.vk.bitmasks['VkAccessFlagBits2'].flags if x.name in accessNames] if accessNames is not None else None
equivalent = SyncEquivalent(stages, accesses, False)
flagName = syncElem.get('name')
flag = [x for x in self.vk.bitmasks['VkAccessFlagBits2'].flags if x.name == flagName]
# This check is needed because not all API variants have VK_KHR_synchronization2
if flag:
self.vk.syncAccess.append(SyncAccess(flag[0], support, equivalent))
def genSyncPipeline(self, sync):
OutputGenerator.genSyncPipeline(self, sync)
syncElem = sync.elem
name = syncElem.get('name')
depends = splitIfGet(syncElem, 'depends')
stages = []
for stageElem in syncElem.findall('syncpipelinestage'):
order = stageElem.get('order')
before = stageElem.get('before')
after = stageElem.get('after')
value = stageElem.text
stages.append(SyncPipelineStage(order, before, after, value))
self.vk.syncPipeline.append(SyncPipeline(name, depends, stages))

View file

@ -1,6 +1,6 @@
#!/usr/bin/python3 -i
#!/usr/bin/env python3 -i
#
# Copyright 2013-2024 The Khronos Group Inc.
# Copyright 2013-2025 The Khronos Group Inc.
#
# SPDX-License-Identifier: Apache-2.0
@ -242,8 +242,8 @@ class COutputGenerator(OutputGenerator):
raise MissingGeneratorOptionsError()
if self.genOpts.conventions is None:
raise MissingGeneratorOptionsConventionsError()
is_core = self.featureName and self.featureName.startswith(self.conventions.api_prefix + 'VERSION_')
if self.genOpts.conventions.writeFeature(self.featureExtraProtect, self.genOpts.filename):
is_core = self.featureName and self.featureName.startswith(f"{self.conventions.api_prefix}VERSION_")
if self.genOpts.conventions.writeFeature(self.featureName, self.featureExtraProtect, self.genOpts.filename):
self.newline()
if self.genOpts.protectFeature:
write('#ifndef', self.featureName, file=self.outFile)
@ -334,15 +334,18 @@ class COutputGenerator(OutputGenerator):
else:
if self.genOpts is None:
raise MissingGeneratorOptionsError()
body = self.deprecationComment(typeElem)
# OpenXR: this section was not under 'else:' previously, just fell through
if alias:
# If the type is an alias, just emit a typedef declaration
body = 'typedef ' + alias + ' ' + name + ';\n'
body += f"typedef {alias} {name};\n"
else:
# Replace <apientry /> tags with an APIENTRY-style string
# (from self.genOpts). Copy other text through unchanged.
# If the resulting text is an empty string, do not emit it.
body = noneStr(typeElem.text)
body += noneStr(typeElem.text)
for elem in typeElem:
if elem.tag == 'apientry':
body += self.genOpts.apientry + noneStr(elem.tail)
@ -370,13 +373,13 @@ class COutputGenerator(OutputGenerator):
if ',' in protect_str:
protect_list = protect_str.split(',')
protect_defs = ('defined(%s)' % d for d in protect_list)
protect_defs = (f'defined({d})' for d in protect_list)
protect_def_str = ' && '.join(protect_defs)
protect_if_str = '#if %s\n' % protect_def_str
protect_end_str = '#endif // %s\n' % protect_def_str
protect_if_str = f'#if {protect_def_str}\n'
protect_end_str = f'#endif // {protect_def_str}\n'
else:
protect_if_str = '#ifdef %s\n' % protect_str
protect_end_str = '#endif // %s\n' % protect_str
protect_if_str = f'#ifdef {protect_str}\n'
protect_end_str = f'#endif // {protect_str}\n'
return (protect_if_str, protect_end_str)
@ -417,34 +420,35 @@ class COutputGenerator(OutputGenerator):
raise MissingGeneratorOptionsError()
typeElem = typeinfo.elem
body = self.deprecationComment(typeElem)
if alias:
body = 'typedef ' + alias + ' ' + typeName + ';\n'
body += f"typedef {alias} {typeName};\n"
else:
body = ''
(protect_begin, protect_end) = self.genProtectString(typeElem.get('protect'))
if protect_begin:
body += protect_begin
if self.genOpts.genStructExtendsComment:
structextends = typeElem.get('structextends')
body += '// ' + typeName + ' extends ' + structextends + '\n' if structextends else ''
body += f"// {typeName} extends {structextends}\n" if structextends else ''
body += 'typedef ' + typeElem.get('category')
body += f"typedef {typeElem.get('category')}"
# This is an OpenXR-specific alternative where aliasing refers
# to an inheritance hierarchy of types rather than C-level type
# aliases.
if self.genOpts.genAliasMacro and self.typeMayAlias(typeName):
body += ' ' + self.genOpts.aliasMacro
body += f" {self.genOpts.aliasMacro}"
body += ' ' + typeName + ' {\n'
body += f" {typeName} {{\n"
targetLen = self.getMaxCParamTypeLength(typeinfo)
for member in typeElem.findall('.//member'):
body += self.deprecationComment(member, indent = 4)
body += self.makeCParamDecl(member, targetLen + 4)
body += ';\n'
body += '} ' + typeName + ';\n'
body += f"}} {typeName};\n"
if protect_end:
body += protect_end
@ -470,13 +474,13 @@ class COutputGenerator(OutputGenerator):
if alias:
# If the group name is aliased, just emit a typedef declaration
# for the alias.
body = 'typedef ' + alias + ' ' + groupName + ';\n'
body = f"typedef {alias} {groupName};\n"
self.appendSection(section, body)
else:
if self.genOpts is None:
raise MissingGeneratorOptionsError()
(section, body) = self.buildEnumCDecl(self.genOpts.genEnumBeginEndRange, groupinfo, groupName)
self.appendSection(section, '\n' + body)
self.appendSection(section, f"\n{body}")
def genEnum(self, enuminfo, name, alias):
"""Generate the C declaration for a constant (a single <enum> value).
@ -486,7 +490,8 @@ class COutputGenerator(OutputGenerator):
OutputGenerator.genEnum(self, enuminfo, name, alias)
body = self.buildConstantCDecl(enuminfo, name, alias)
body = self.deprecationComment(enuminfo.elem)
body += self.buildConstantCDecl(enuminfo, name, alias)
self.appendSection('enum', body)
def genCmd(self, cmdinfo, name, alias):
@ -502,12 +507,12 @@ class COutputGenerator(OutputGenerator):
prefix = ''
decls = self.makeCDecls(cmdinfo.elem)
self.appendSection('command', prefix + decls[0] + '\n')
self.appendSection('command', f"{prefix + decls[0]}\n")
if self.genOpts.genFuncPointers:
self.appendSection('commandPointer', decls[1])
def misracstyle(self):
return self.genOpts.misracstyle;
return self.genOpts.misracstyle
def misracppstyle(self):
return self.genOpts.misracppstyle;
return self.genOpts.misracppstyle

View file

@ -1,6 +1,6 @@
#!/usr/bin/python3 -i
#!/usr/bin/env python3 -i
#
# Copyright 2013-2024 The Khronos Group Inc.
# Copyright 2013-2025 The Khronos Group Inc.
#
# SPDX-License-Identifier: Apache-2.0
"""Base class for source/header/doc generators, as well as some utility functions."""
@ -65,7 +65,7 @@ def regSortCategoryKey(feature):
else:
return 0
if feature.category.upper() in ['ARB', 'KHR', 'OES']:
if feature.category.upper() in ('ARB', 'KHR', 'OES'):
return 1
return 2
@ -116,7 +116,7 @@ class MissingGeneratorOptionsError(RuntimeError):
def __init__(self, msg=None):
full_msg = 'Missing generator options object self.genOpts'
if msg:
full_msg += ': ' + msg
full_msg += f": {msg}"
super().__init__(full_msg)
@ -126,7 +126,7 @@ class MissingRegistryError(RuntimeError):
def __init__(self, msg=None):
full_msg = 'Missing Registry object self.registry'
if msg:
full_msg += ': ' + msg
full_msg += f": {msg}"
super().__init__(full_msg)
@ -136,7 +136,7 @@ class MissingGeneratorOptionsConventionsError(RuntimeError):
def __init__(self, msg=None):
full_msg = 'Missing Conventions object self.genOpts.conventions'
if msg:
full_msg += ': ' + msg
full_msg += f": {msg}"
super().__init__(full_msg)
@ -338,7 +338,7 @@ class OutputGenerator:
)
if name in bad and True:
print('breakName {}: {}'.format(name, msg))
print(f'breakName {name}: {msg}')
pdb.set_trace()
def __init__(self, errFile=sys.stderr, warnFile=sys.stderr, diagFile=sys.stdout):
@ -399,7 +399,7 @@ class OutputGenerator:
write('DIAG:', *args, file=self.diagFile)
else:
raise UserWarning(
'*** FATAL ERROR in Generator.logMsg: unknown level:' + level)
f"*** FATAL ERROR in Generator.logMsg: unknown level:{level}")
def enumToValue(self, elem, needsNum, bitwidth = 32,
forceSuffix = False, parent_for_alias_dereference=None):
@ -452,20 +452,20 @@ class OutputGenerator:
# value += enuminfo.type
if forceSuffix:
if bitwidth == 64:
value = value + 'ULL'
value = f"{value}ULL"
else:
value = value + 'U'
value = f"{value}U"
self.logMsg('diag', 'Enum', name, '-> value [', numVal, ',', value, ']')
return [numVal, value]
if 'bitpos' in elem.keys():
value = elem.get('bitpos')
bitpos = int(value, 0)
numVal = 1 << bitpos
value = '0x%08x' % numVal
value = f'0x{numVal:08x}'
if bitwidth == 64 or bitpos >= 32:
value = value + 'ULL'
value = f"{value}ULL"
elif forceSuffix:
value = value + 'U'
value = f"{value}U"
self.logMsg('diag', 'Enum', name, '-> bitpos [', numVal, ',', value, ']')
return [numVal, value]
if 'offset' in elem.keys():
@ -562,6 +562,41 @@ class OutputGenerator:
def misracppstyle(self):
return False;
def deprecationComment(self, elem, indent = 0):
"""If an API element is marked deprecated, return a brief comment
describing why.
Otherwise, return an empty string.
- elem - Element of the API.
API name is determined depending on the element tag.
- indent - number of spaces to indent the comment"""
reason = elem.get('deprecated')
# This is almost always the path taken.
if reason == None:
return ''
# There is actually a deprecated attribute.
padding = indent * ' '
# Determine the API name.
if elem.tag == 'member' or elem.tag == 'param':
name = elem.find('.//name').text
else:
name = elem.get('name')
if reason == 'aliased':
return f'{padding}// {name} is a deprecated alias\n'
elif reason == 'ignored':
return f'{padding}// {name} is deprecated and should not be used\n'
elif reason == 'true':
return f'{padding}// {name} is deprecated, but no reason was given in the API XML\n'
else:
# This can be caught by schema validation
self.logMsg('error', f"{name} has an unknown deprecation attribute value '{reason}'")
exit(1)
def buildEnumCDecl(self, expand, groupinfo, groupName):
"""Generate the C declaration for an enum"""
if self.genOpts is None:
@ -620,12 +655,12 @@ class OutputGenerator:
flagTypeName = groupElem.get('name')
# Prefix
body = "// Flag bits for " + flagTypeName + "\n"
body = f"// Flag bits for {flagTypeName}\n"
if bitwidth == 64:
body += "typedef VkFlags64 %s;\n" % flagTypeName;
body += f"typedef VkFlags64 {flagTypeName};\n";
else:
body += "typedef VkFlags %s;\n" % flagTypeName;
body += f"typedef VkFlags {flagTypeName};\n";
# Maximum allowable value for a flag (unsigned 64-bit integer)
maxValidValue = 2**(64) - 1
@ -662,23 +697,25 @@ class OutputGenerator:
if self.isEnumRequired(elem):
protect = elem.get('protect')
if protect is not None:
body += '#ifdef {}\n'.format(protect)
body += f'#ifdef {protect}\n'
body += self.deprecationComment(elem, indent = 0)
if usedefine:
decl += "#define {} {}\n".format(name, strVal)
decl += f"#define {name} {strVal}\n"
elif self.misracppstyle():
decl += "static constexpr {} {} {{{}}};\n".format(flagTypeName, name, strVal)
decl += f"static constexpr {flagTypeName} {name} {{{strVal}}};\n"
else:
# Some C compilers only allow initializing a 'static const' variable with a literal value.
# So initializing an alias from another 'static const' value would fail to compile.
# Work around this by chasing the aliases to get the actual value.
while numVal is None:
alias = self.registry.tree.find("enums/enum[@name='" + strVal + "']")
alias = self.registry.tree.find(f"enums/enum[@name='{strVal}']")
if alias is not None:
(numVal, strVal) = self.enumToValue(alias, True, bitwidth, True)
else:
self.logMsg('error', 'No such alias {} for enum {}'.format(strVal, name))
decl += "static const {} {} = {};\n".format(flagTypeName, name, strVal)
self.logMsg('error', f'No such alias {strVal} for enum {name}')
decl += f"static const {flagTypeName} {name} = {strVal};\n"
if numVal is not None:
body += decl
@ -706,7 +743,7 @@ class OutputGenerator:
expandSuffix = ''
expandSuffixMatch = re.search(r'[A-Z][A-Z]+$', groupName)
if expandSuffixMatch:
expandSuffix = '_' + expandSuffixMatch.group()
expandSuffix = f"_{expandSuffixMatch.group()}"
# Strip off the suffix from the prefix
expandPrefix = expandName.rsplit(expandSuffix, 1)[0]
@ -755,14 +792,12 @@ class OutputGenerator:
protect = elem.get('protect')
if protect is not None:
decl += '#ifdef {}\n'.format(protect)
decl += f'#ifdef {protect}\n'
# Indent requirements comment, if there is one
requirements = self.genRequirements(name, mustBeFound = False)
if requirements != '':
requirements = ' ' + requirements
decl += requirements
decl += ' {} = {},'.format(name, strVal)
decl += self.genRequirements(name, mustBeFound = False, indent = 2)
decl += self.deprecationComment(elem, indent = 2)
decl += f' {name} = {strVal},'
if protect is not None:
decl += '\n#endif'
@ -833,8 +868,8 @@ class OutputGenerator:
if typeStr != "float":
number += 'U'
strVal = "~" if invert else ""
strVal += "static_cast<" + typeStr + ">(" + number + ")"
body = 'static constexpr ' + typeStr.ljust(9) + name.ljust(33) + ' {' + strVal + '};'
strVal += f"static_cast<{typeStr}>({number})"
body = f"static constexpr {typeStr.ljust(9)}{name.ljust(33)} {{{strVal}}};"
elif enuminfo.elem.get('type') and not alias:
# Generate e.g.: #define x (~0ULL)
typeStr = enuminfo.elem.get('type');
@ -849,10 +884,10 @@ class OutputGenerator:
strVal = "~" if invert else ""
strVal += number
if paren:
strVal = "(" + strVal + ")";
body = '#define ' + name.ljust(33) + ' ' + strVal;
strVal = f"({strVal})";
body = f"#define {name.ljust(33)} {strVal}";
else:
body = '#define ' + name.ljust(33) + ' ' + strVal
body = f"#define {name.ljust(33)} {strVal}"
return body
@ -860,7 +895,7 @@ class OutputGenerator:
"""Create a directory, if not already done.
Generally called from derived generators creating hierarchies."""
self.logMsg('diag', 'OutputGenerator::makeDir(' + path + ')')
self.logMsg('diag', 'OutputGenerator::makeDir(', path, ')')
if path not in self.madeDirs:
# This can get race conditions with multiple writers, see
# https://stackoverflow.com/questions/273192/
@ -919,11 +954,11 @@ class OutputGenerator:
# On successfully generating output, move the temporary file to the
# target file.
if self.genOpts.filename is not None:
directory = Path(self.genOpts.directory)
if sys.platform == 'win32':
directory = Path(self.genOpts.directory)
if not Path.exists(directory):
os.makedirs(directory)
shutil.copy(self.outFile.name, self.genOpts.directory + '/' + self.genOpts.filename)
shutil.copy(self.outFile.name, directory / self.genOpts.filename)
os.remove(self.outFile.name)
self.genOpts = None
@ -944,7 +979,7 @@ class OutputGenerator:
self.featureName = None
self.featureExtraProtect = None
def genRequirements(self, name, mustBeFound = True):
def genRequirements(self, name, mustBeFound = True, indent = 0):
"""Generate text showing what core versions and extensions introduce
an API. This exists in the base Generator class because it is used by
the shared enumerant-generating interfaces (buildEnumCDecl, etc.).
@ -1067,7 +1102,7 @@ class OutputGenerator:
"""Make the function-pointer typedef name for a command."""
if self.genOpts is None:
raise MissingGeneratorOptionsError()
return '(' + self.genOpts.apientryp + 'PFN_' + name + tail + ')'
return f"({self.genOpts.apientryp}PFN_{name}{tail})"
def makeCParamDecl(self, param, aligncol):
"""Return a string which is an indented, formatted
@ -1100,14 +1135,14 @@ class OutputGenerator:
# This works around a problem where very long type names -
# longer than the alignment column - would run into the tail
# text.
paramdecl = paramdecl.ljust(aligncol - 1) + ' '
paramdecl = f"{paramdecl.ljust(aligncol - 1)} "
newLen = len(paramdecl)
self.logMsg('diag', 'Adjust length of parameter decl from', oldLen, 'to', newLen, ':', paramdecl)
if (self.misracppstyle() and prefix.find('const ') != -1):
# Change pointer type order from e.g. "const void *" to "void const *".
# If the string starts with 'const', reorder it to be after the first type.
paramdecl += prefix.replace('const ', '') + text + ' const' + tail
paramdecl += f"{prefix.replace('const ', '') + text} const{tail}"
else:
paramdecl += prefix + text + tail
@ -1134,7 +1169,7 @@ class OutputGenerator:
# Allow for missing <name> tag
newLen = 0
paramdecl = ' ' + noneStr(param.text)
paramdecl = f" {noneStr(param.text)}"
for elem in param:
text = noneStr(elem.text)
tail = noneStr(elem.tail)
@ -1365,7 +1400,7 @@ class OutputGenerator:
# Change pointer type order from e.g. "const void *" to "void const *".
# If the string starts with 'const', reorder it to be after the first type.
if (prefix.find('const ') != -1):
param += prefix.replace('const ', '') + t + ' const '
param += f"{prefix.replace('const ', '') + t} const "
else:
param += prefix + t
# Clear prefix for subsequent iterations

View file

@ -1,6 +1,6 @@
#!/usr/bin/python3
#!/usr/bin/env python3
# Copyright 2022-2024 The Khronos Group Inc.
# Copyright 2022-2025 The Khronos Group Inc.
# Copyright 2003-2019 Paul McGuire
# SPDX-License-Identifier: MIT
@ -31,7 +31,8 @@
# - ',' as OR connector
# - parenthesization for grouping
# Based on https://github.com/pyparsing/pyparsing/blob/master/examples/fourFn.py
# Based on `examples/fourFn.py` from the
# https://github.com/pyparsing/pyparsing/ repository.
from pyparsing import (
Literal,
@ -83,7 +84,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 +93,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 ',')"""
@ -109,8 +110,8 @@ def push_first(toks):
exprStack.append(toks[0])
# An identifier (version or extension name)
dependencyIdent = Word(alphanums + '_')
# An identifier (version, feature boolean, or extension name)
dependencyIdent = Word(f"{alphanums}_:")
# Infix expression for depends expressions
dependencyExpr = pp.infixNotation(dependencyIdent,
@ -287,7 +288,7 @@ def markupTraverse(expr, level = 0, root = True):
- root - True only on initial call"""
if level > 0:
prefix = '{nbsp}{nbsp}' * level * 2 + ' '
prefix = f"{'{nbsp}{nbsp}' * level * 2} "
else:
prefix = ''
str = ''
@ -302,9 +303,9 @@ def markupTraverse(expr, level = 0, root = True):
str = str + markupTraverse(elem, level = nextlevel, root = False)
elif elem in ('+', ','):
str = str + f'{prefix}{opMarkupAsciidoc(elem)} +\n'
str = f"{str}{prefix}{opMarkupAsciidoc(elem)} +\n"
else:
str = str + f'{prefix}{leafMarkupAsciidoc(elem)} +\n'
str = f"{str}{prefix}{leafMarkupAsciidoc(elem)} +\n"
return str

View file

@ -1,5 +1,5 @@
{
"$schema": "https://schema.khronos.org/vulkan/profiles-0.8.1-204.json#",
"$schema": "https://schema.khronos.org/vulkan/profiles-0.8.2-276.json#",
"capabilities": {
"vulkan10requirements": {
"features": {
@ -8,6 +8,71 @@
}
}
},
"vulkan11requirements": {
"features": {
"VkPhysicalDeviceVulkan11Features": {
"multiview": true
}
},
"properties": {
"VkPhysicalDeviceVulkan11Properties": {
"maxMultiviewViewCount": 6,
"maxMultiviewInstanceIndex": 134217727
}
}
},
"vulkan12requirements": {
"features": {
"VkPhysicalDeviceVulkan12Features": {
"uniformBufferStandardLayout": true,
"subgroupBroadcastDynamicId": true,
"imagelessFramebuffer": true,
"separateDepthStencilLayouts": true,
"hostQueryReset": true,
"timelineSemaphore": true,
"shaderSubgroupExtendedTypes": true
}
},
"properties": {
"VkPhysicalDeviceVulkan12Properties": {
"maxTimelineSemaphoreValueDifference": 2147483647
}
}
},
"vulkan13requirements": {
"features": {
"VkPhysicalDeviceVulkan12Features": {
"vulkanMemoryModel": true,
"vulkanMemoryModelDeviceScope": true,
"bufferDeviceAddress": true
},
"VkPhysicalDeviceVulkan13Features": {
"robustImageAccess": true,
"shaderTerminateInvocation": true,
"shaderZeroInitializeWorkgroupMemory": true,
"synchronization2": true,
"shaderIntegerDotProduct": true,
"maintenance4": true,
"pipelineCreationCacheControl": true,
"subgroupSizeControl": true,
"computeFullSubgroups": true,
"shaderDemoteToHelperInvocation": true,
"inlineUniformBlock": true,
"dynamicRendering": true
}
},
"properties": {
"VkPhysicalDeviceVulkan13Properties": {
"maxBufferSize": 1073741824,
"maxInlineUniformBlockSize": 256,
"maxPerStageDescriptorInlineUniformBlocks": 4,
"maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks": 4,
"maxDescriptorSetInlineUniformBlocks": 4,
"maxDescriptorSetUpdateAfterBindInlineUniformBlocks": 4,
"maxInlineUniformTotalSize": 256
}
}
},
"vulkan10requirements_roadmap2022": {
"features": {
"VkPhysicalDeviceFeatures": {
@ -76,19 +141,6 @@
}
}
},
"vulkan11requirements": {
"features": {
"VkPhysicalDeviceVulkan11Features": {
"multiview": true
}
},
"properties": {
"VkPhysicalDeviceVulkan11Properties": {
"maxMultiviewViewCount": 6,
"maxMultiviewInstanceIndex": 134217727
}
}
},
"vulkan11requirements_roadmap2022": {
"features": {
"VkPhysicalDeviceVulkan11Features": {
@ -103,24 +155,6 @@
}
}
},
"vulkan12requirements": {
"features": {
"VkPhysicalDeviceVulkan12Features": {
"uniformBufferStandardLayout": true,
"subgroupBroadcastDynamicId": true,
"imagelessFramebuffer": true,
"separateDepthStencilLayouts": true,
"hostQueryReset": true,
"timelineSemaphore": true,
"shaderSubgroupExtendedTypes": true
}
},
"properties": {
"VkPhysicalDeviceVulkan12Properties": {
"maxTimelineSemaphoreValueDifference": 2147483647
}
}
},
"vulkan12requirements_roadmap2022": {
"features": {
"VkPhysicalDeviceVulkan12Features": {
@ -168,40 +202,6 @@
}
}
},
"vulkan13requirements": {
"features": {
"VkPhysicalDeviceVulkan12Features": {
"vulkanMemoryModel": true,
"vulkanMemoryModelDeviceScope": true,
"bufferDeviceAddress": true
},
"VkPhysicalDeviceVulkan13Features": {
"robustImageAccess": true,
"shaderTerminateInvocation": true,
"shaderZeroInitializeWorkgroupMemory": true,
"synchronization2": true,
"shaderIntegerDotProduct": true,
"maintenance4": true,
"pipelineCreationCacheControl": true,
"subgroupSizeControl": true,
"computeFullSubgroups": true,
"shaderDemoteToHelperInvocation": true,
"inlineUniformBlock": true,
"dynamicRendering": true
}
},
"properties": {
"VkPhysicalDeviceVulkan13Properties": {
"maxBufferSize": 1073741824,
"maxInlineUniformBlockSize": 256,
"maxPerStageDescriptorInlineUniformBlocks": 4,
"maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks": 4,
"maxDescriptorSetInlineUniformBlocks": 4,
"maxDescriptorSetUpdateAfterBindInlineUniformBlocks": 4,
"maxInlineUniformTotalSize": 256
}
}
},
"vulkan13requirements_roadmap2022": {
"extensions": {
"VK_KHR_global_priority": 1
@ -211,9 +211,94 @@
"descriptorBindingInlineUniformBlockUpdateAfterBind": true
}
}
},
"vulkan10requirements_roadmap2024": {
"features": {
"VkPhysicalDeviceFeatures": {
"multiDrawIndirect": true,
"shaderInt16": true,
"shaderImageGatherExtended": true
}
},
"properties": {
"VkPhysicalDeviceProperties": {
"limits": {
"timestampComputeAndGraphics": true,
"maxColorAttachments": 8,
"maxBoundDescriptorSets": 7
}
}
}
},
"vulkan11requirements_roadmap2024": {
"features": {
"VkPhysicalDeviceVulkan11Features": {
"shaderDrawParameters": true,
"storageBuffer16BitAccess": true
}
}
},
"vulkan12requirements_roadmap2024": {
"features": {
"VkPhysicalDeviceVulkan12Features": {
"shaderInt8": true,
"shaderFloat16": true,
"storageBuffer8BitAccess": true
}
},
"properties": {
"VkPhysicalDeviceVulkan12Properties": {
"shaderRoundingModeRTEFloat16": true,
"shaderRoundingModeRTEFloat32": true
}
}
},
"vulkan13requirements_roadmap2024": {
"features": {
"VkPhysicalDeviceVulkan13Features": {
}
},
"properties": {
"VkPhysicalDeviceVulkan13Properties": {
}
}
},
"vulkanextensionrequirements_roadmap2024": {
"extensions": {
"VK_KHR_dynamic_rendering_local_read": 1,
"VK_KHR_load_store_op_none": 1,
"VK_KHR_shader_quad_control": 1,
"VK_KHR_shader_maximal_reconvergence": 1,
"VK_KHR_shader_subgroup_uniform_control_flow": 1,
"VK_KHR_shader_subgroup_rotate": 1,
"VK_KHR_shader_float_controls2": 1,
"VK_KHR_shader_expect_assume": 1,
"VK_KHR_line_rasterization": 1,
"VK_KHR_vertex_attribute_divisor": 1,
"VK_KHR_index_type_uint8": 1,
"VK_KHR_map_memory2": 1,
"VK_KHR_maintenance5": 1,
"VK_KHR_push_descriptor": 1
}
}
},
"profiles": {
"VP_KHR_roadmap_2024": {
"version": 1,
"api-version": "1.3.276",
"label": "Khronos Vulkan Roadmap 2024 profile",
"description": "This roadmap profile is intended to be supported by newer devices shipping in 2024 across mainstream smartphone, tablet, laptops, console and desktop devices.",
"profiles": [
"VP_KHR_roadmap_2022"
],
"capabilities": [
"vulkan10requirements_roadmap2024",
"vulkan11requirements_roadmap2024",
"vulkan12requirements_roadmap2024",
"vulkan13requirements_roadmap2024",
"vulkanextensionrequirements_roadmap2024"
]
},
"VP_KHR_roadmap_2022": {
"version": 1,
"api-version": "1.3.204",
@ -232,6 +317,12 @@
}
},
"history": [
{
"revision": 9,
"date": "2024-01-16",
"author": "Tobias Hector",
"comment": "Add Roadmap 2024 profile"
},
{
"revision": 8,
"date": "2023-11-02",

View file

@ -1,6 +1,6 @@
#!/usr/bin/python3 -i
#!/usr/bin/env python3 -i
#
# Copyright 2013-2024 The Khronos Group Inc.
# Copyright 2013-2025 The Khronos Group Inc.
#
# SPDX-License-Identifier: Apache-2.0
@ -134,8 +134,10 @@ def mergeAPIs(tree, fromApiNames, toApiName):
definitionName = child.get('name')
definitionVariants = parent.findall(f"{child.tag}[@name='{definitionName}']")
elif child.tag in ['require']:
definitionName = child.get('feature')
definitionVariants = parent.findall(f"{child.tag}[@feature='{definitionName}']")
# No way to correlate require tags because they do not have a definite identifier in the way they
# are used in the latest forms of the XML so the best we can do is simply enable all of them
if child.get('api') in fromApiNames:
child.set('api', toApiName)
elif child.tag in ['command']:
definitionName = child.find('proto/name').text
definitionVariants = parent.findall(f"{child.tag}/proto/name[.='{definitionName}']/../..")
@ -436,6 +438,12 @@ class Registry:
self.cmddict = {}
"dictionary of CmdInfo objects keyed by command name"
self.aliasdict = {}
"dictionary of type and command names mapped to their alias, such as VkFooKHR -> VkFoo"
self.enumvaluedict = {}
"dictionary of enum values mapped to their type, such as VK_FOO_VALUE -> VkFoo"
self.apidict = {}
"dictionary of FeatureInfo objects for `<feature>` elements keyed by API name"
@ -548,6 +556,22 @@ class Registry:
"""Specify a feature name regexp to break on when generating features."""
self.breakPat = re.compile(regexp)
def addEnumValue(self, enum, type_name):
"""Track aliasing and map back from enum values to their type"""
# Record alias, if any
value = enum.get('name')
alias = enum.get('alias')
if alias:
self.aliasdict[value] = alias
# Map the value back to the type
if type_name in self.aliasdict:
type_name = self.aliasdict[type_name]
if value in self.enumvaluedict:
# Some times the same enum is defined by multiple extensions
assert(type_name == self.enumvaluedict[value])
else:
self.enumvaluedict[value] = type_name
def parseTree(self):
"""Parse the registry Element, once created"""
# This must be the Element for the root <registry>
@ -571,6 +595,9 @@ class Registry:
else:
stripNonmatchingAPIs(self.reg, self.genOpts.apiname, actuallyDelete = True)
self.aliasdict = {}
self.enumvaluedict = {}
# Create dictionary of registry types from toplevel <types> tags
# and add 'name' attribute to each <type> tag (where missing)
# based on its <name> element.
@ -581,13 +608,20 @@ class Registry:
for type_elem in self.reg.findall('types/type'):
# If the <type> does not already have a 'name' attribute, set
# it from contents of its <name> tag.
if type_elem.get('name') is None:
name = type_elem.get('name')
if name is None:
name_elem = type_elem.find('name')
if name_elem is None or not name_elem.text:
raise RuntimeError("Type without a name!")
type_elem.set('name', name_elem.text)
name = name_elem.text
type_elem.set('name', name)
self.addElementInfo(type_elem, TypeInfo(type_elem), 'type', self.typedict)
# Record alias, if any
alias = type_elem.get('alias')
if alias:
self.aliasdict[name] = alias
# Create dictionary of registry enum groups from <enums> tags.
#
# Required <enums> attributes: 'name'. If no name is given, one is
@ -609,10 +643,14 @@ class Registry:
self.enumdict = {}
for enums in self.reg.findall('enums'):
required = (enums.get('type') is not None)
type_name = enums.get('name')
# Enum values are defined only for the type that is not aliased to something else.
assert(type_name not in self.aliasdict)
for enum in enums.findall('enum'):
enumInfo = EnumInfo(enum)
enumInfo.required = required
self.addElementInfo(enum, enumInfo, 'enum', self.enumdict)
self.addEnumValue(enum, type_name)
# Create dictionary of registry commands from <command> tags
# and add 'name' attribute to each <command> tag (where missing)
@ -622,7 +660,7 @@ class Registry:
# Required <command> attributes: 'name' or <proto><name> tag contents
self.cmddict = {}
# List of commands which alias others. Contains
# [ aliasName, element ]
# [ name, aliasName, element ]
# for each alias
cmdAlias = []
for cmd in self.reg.findall('commands/command'):
@ -639,6 +677,7 @@ class Registry:
alias = cmd.get('alias')
if alias:
cmdAlias.append([name, alias, cmd])
self.aliasdict[name] = alias
# Now loop over aliases, injecting a copy of the aliased command's
# Element with the aliased prototype name replaced with the command
@ -713,6 +752,7 @@ class Registry:
if addEnumInfo:
enumInfo = EnumInfo(enum)
self.addElementInfo(enum, enumInfo, 'enum', self.enumdict)
self.addEnumValue(enum, groupName)
sync_pipeline_stage_condition = dict()
sync_access_condition = dict()
@ -761,7 +801,7 @@ class Registry:
if enum.get('alias'):
format_name = enum.get('alias')
if format_name in format_condition:
format_condition[format_name] += "," + featureInfo.name
format_condition[format_name] += f",{featureInfo.name}"
else:
format_condition[format_name] = featureInfo.name
elif groupName == "VkPipelineStageFlagBits2":
@ -770,7 +810,7 @@ class Registry:
stage_flag = enum.get('alias')
featureName = elem.get('depends') if elem.get('depends') is not None else featureInfo.name
if stage_flag in sync_pipeline_stage_condition:
sync_pipeline_stage_condition[stage_flag] += "," + featureName
sync_pipeline_stage_condition[stage_flag] += f",{featureName}"
else:
sync_pipeline_stage_condition[stage_flag] = featureName
elif groupName == "VkAccessFlagBits2":
@ -779,7 +819,7 @@ class Registry:
access_flag = enum.get('alias')
featureName = elem.get('depends') if elem.get('depends') is not None else featureInfo.name
if access_flag in sync_access_condition:
sync_access_condition[access_flag] += "," + featureName
sync_access_condition[access_flag] += f",{featureName}"
else:
sync_access_condition[access_flag] = featureName
@ -791,6 +831,7 @@ class Registry:
if addEnumInfo:
enumInfo = EnumInfo(enum)
self.addElementInfo(enum, enumInfo, 'enum', self.enumdict)
self.addEnumValue(enum, groupName)
# Parse out all spirv tags in dictionaries
# Use addElementInfo to catch duplicates
@ -950,7 +991,7 @@ class Registry:
# Look up the Info with matching groupName
if groupName in self.groupdict:
gi = self.groupdict[groupName]
gienum = gi.elem.find("enum[@name='" + enumname + "']")
gienum = gi.elem.find(f"enum[@name='{enumname}']")
if gienum is not None:
# Remove copy of this enum from the group
gi.elem.remove(gienum)
@ -1154,6 +1195,8 @@ class Registry:
# Resolve the type info to the actual type, so we get an accurate read for 'structextends'
while alias:
typeinfo = self.lookupElementInfo(alias, self.typedict)
if not typeinfo:
raise RuntimeError(f"Missing alias {alias}")
alias = typeinfo.elem.get('alias')
typecat = typeinfo.elem.get('category')
@ -1164,7 +1207,7 @@ class Registry:
self.gen.featureDictionary[featurename][typecat][required_key][typeextends] = []
self.gen.featureDictionary[featurename][typecat][required_key][typeextends].append(typename)
else:
self.gen.logMsg('warn', 'fillFeatureDictionary: NOT filling for {}'.format(typename))
self.gen.logMsg('warn', f'fillFeatureDictionary: NOT filling for {typename}')
for enumElem in require.findall('enum'):
@ -1181,7 +1224,7 @@ class Registry:
self.gen.featureDictionary[featurename]['enumconstant'][required_key][enumextends] = []
self.gen.featureDictionary[featurename]['enumconstant'][required_key][enumextends].append(enumname)
else:
self.gen.logMsg('warn', 'fillFeatureDictionary: NOT filling for {}'.format(typename))
self.gen.logMsg('warn', f'fillFeatureDictionary: NOT filling for {typename}')
for cmdElem in require.findall('command'):
# Remove aliases in the same extension/feature; these are always added as a correction. Do not need the original to be visible.
@ -1191,7 +1234,7 @@ class Registry:
self.gen.featureDictionary[featurename]['command'][required_key] = []
self.gen.featureDictionary[featurename]['command'][required_key].append(cmdElem.get('name'))
else:
self.gen.logMsg('warn', 'fillFeatureDictionary: NOT filling for {}'.format(typename))
self.gen.logMsg('warn', f'fillFeatureDictionary: NOT filling for {typename}')
def requireFeatures(self, interface, featurename, api, profile):
"""Process `<require>` tags for a `<version>` or `<extension>`.

View file

@ -1,6 +1,6 @@
#!/usr/bin/python3 -i
#!/usr/bin/env python3 -i
#
# Copyright 2013-2024 The Khronos Group Inc.
# Copyright 2013-2025 The Khronos Group Inc.
#
# SPDX-License-Identifier: Apache-2.0
@ -52,7 +52,7 @@ class ProseListFormats(Enum):
return cls.OR
if s == 'and':
return cls.AND
raise RuntimeError("Unrecognized string connective: " + s)
raise RuntimeError(f"Unrecognized string connective: {s}")
@property
def connective(self):
@ -96,11 +96,11 @@ class ConventionsBase(abc.ABC):
def formatVersion(self, name, apivariant, major, minor):
"""Mark up an API version name as a link in the spec."""
return '`<<{}>>`'.format(name)
return f'`<<{name}>>`'
def formatExtension(self, name):
"""Mark up an extension name as a link in the spec."""
return '`<<{}>>`'.format(name)
return f'`<<{name}>>`'
def formatSPIRVlink(self, name):
"""Mark up a SPIR-V extension name as an external link in the spec.
@ -152,6 +152,11 @@ class ConventionsBase(abc.ABC):
"""
return 'code:'
@property
def allows_x_number_suffix(self):
"""Whether vendor tags can be suffixed with X and a number to mark experimental extensions."""
return False
@property
@abc.abstractmethod
def structtype_member_name(self):
@ -213,13 +218,13 @@ class ConventionsBase(abc.ABC):
Do not edit these defaults, override self.makeProseList().
"""
assert(serial_comma) # did not implement what we did not need
assert serial_comma # did not implement what we did not need
if isinstance(fmt, str):
fmt = ProseListFormats.from_string(fmt)
my_elts = list(elements)
if len(my_elts) > 1:
my_elts[-1] = '{} {}'.format(fmt.connective, my_elts[-1])
my_elts[-1] = f'{fmt.connective} {my_elts[-1]}'
if not comma_for_two_elts and len(my_elts) <= 2:
prose = ' '.join(my_elts)
@ -300,6 +305,20 @@ class ConventionsBase(abc.ABC):
return self.api_prefix
def extension_short_description(self, elem):
"""Return a short description of an extension for use in refpages.
elem is an ElementTree for the <extension> tag in the XML.
The default behavior is to use the 'type' field of this tag, but not
all APIs support this field."""
ext_type = elem.get('type')
if ext_type is not None:
return f'{ext_type} extension'
else:
return ''
@property
def write_contacts(self):
"""Return whether contact list should be written to extension appendices"""
@ -332,7 +351,7 @@ class ConventionsBase(abc.ABC):
Implemented in terms of api_prefix.
May override."""
return self.api_prefix + 'VERSION_'
return f"{self.api_prefix}VERSION_"
@property
def KHR_prefix(self):
@ -341,7 +360,7 @@ class ConventionsBase(abc.ABC):
Implemented in terms of api_prefix.
May override."""
return self.api_prefix + 'KHR_'
return f"{self.api_prefix}KHR_"
@property
def EXT_prefix(self):
@ -350,9 +369,9 @@ class ConventionsBase(abc.ABC):
Implemented in terms of api_prefix.
May override."""
return self.api_prefix + 'EXT_'
return f"{self.api_prefix}EXT_"
def writeFeature(self, featureExtraProtect, filename):
def writeFeature(self, featureName, featureExtraProtect, filename):
"""Return True if OutputGenerator.endFeature should write this feature.
Defaults to always True.
@ -464,8 +483,7 @@ class ConventionsBase(abc.ABC):
file.
- name - extension name"""
return 'include::{{appendices}}/{}[]'.format(
self.extension_file_path(name))
return f'include::{{appendices}}/{self.extension_file_path(name)}[]'
@property
def provisional_extension_warning(self):
@ -534,3 +552,11 @@ class ConventionsBase(abc.ABC):
blocks."""
return 'c++'
@property
def docgen_source_options(self):
"""Return block options to be used in docgenerator [source] blocks,
which are appended to the 'source' block type.
Can be empty."""
return '%unbreakable'

View file

@ -1,6 +1,7 @@
"""Utility functions not closely tied to other spec_tools types."""
# Copyright (c) 2018-2019 Collabora, Ltd.
# Copyright 2013-2024 The Khronos Group Inc.
# Copyright 2013-2025 The Khronos Group Inc.
#
# SPDX-License-Identifier: Apache-2.0

View file

@ -1,6 +1,6 @@
#!/usr/bin/python3
#!/usr/bin/env python3
#
# Copyright 2023 The Khronos Group Inc.
# Copyright 2023-2025 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
import argparse

File diff suppressed because one or more lines are too long

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<registry>
<comment>
Copyright 2021-2024 The Khronos Group Inc.
Copyright 2021-2025 The Khronos Group Inc.
SPDX-License-Identifier: Apache-2.0 OR MIT
</comment>
@ -23,11 +23,13 @@ The current public version of video.xml is maintained in the default branch
<type name="uint16_t" requires="stdint"/>
<type name="uint8_t" requires="stdint"/>
<type name="int32_t" requires="stdint"/>
<type name="int16_t" requires="stdint"/>
<type name="int8_t" requires="stdint"/>
<type category="include" name="vk_video/vulkan_video_codecs_common.h">#include "vulkan_video_codecs_common.h"</type>
<type category="include" name="vk_video/vulkan_video_codec_h264std.h">#include "vulkan_video_codec_h264std.h"</type>
<type category="include" name="vk_video/vulkan_video_codec_h265std.h">#include "vulkan_video_codec_h265std.h"</type>
<type category="include" name="vk_video/vulkan_video_codec_av1std.h">#include "vulkan_video_codec_av1std.h"</type>
<!-- vulkan_video_codecs_common macros -->
<type category="define">#define <name>VK_MAKE_VIDEO_STD_VERSION</name>(major, minor, patch) \
@ -49,6 +51,14 @@ The current public version of video.xml is maintained in the default branch
<type category="define" requires="VK_MAKE_VIDEO_STD_VERSION">
#define <name>VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0</name> <type>VK_MAKE_VIDEO_STD_VERSION</type>(1, 0, 0)</type>
<!-- vulkan_video_codec_av1std_decode.h macros -->
<type category="define" requires="VK_MAKE_VIDEO_STD_VERSION">
#define <name>VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0</name> <type>VK_MAKE_VIDEO_STD_VERSION</type>(1, 0, 0)</type>
<!-- vulkan_video_codec_av1std_encode.h macros -->
<type category="define" requires="VK_MAKE_VIDEO_STD_VERSION">
#define <name>VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0</name> <type>VK_MAKE_VIDEO_STD_VERSION</type>(1, 0, 0)</type>
<!-- vulkan_video_codec_h264std.h enumerated types -->
<type name="StdVideoH264ChromaFormatIdc" category="enum"/>
<type name="StdVideoH264ProfileIdc" category="enum"/>
@ -71,7 +81,7 @@ The current public version of video.xml is maintained in the default branch
<member><type>uint32_t</type> <name>overscan_appropriate_flag</name> : 1</member>
<member><type>uint32_t</type> <name>video_signal_type_present_flag</name> : 1</member>
<member><type>uint32_t</type> <name>video_full_range_flag</name> : 1</member>
<member><type>uint32_t</type> <name>color_description_present_flag</name> : 1</member>
<member><type>uint32_t</type> <name>color_description_present_flag</name> : 1</member><comment>colour_description_present_flag</comment>
<member><type>uint32_t</type> <name>chroma_loc_info_present_flag</name> : 1</member>
<member><type>uint32_t</type> <name>timing_info_present_flag</name> : 1</member>
<member><type>uint32_t</type> <name>fixed_frame_rate_flag</name> : 1</member>
@ -832,6 +842,381 @@ The current public version of video.xml is maintained in the default branch
<member><type>int32_t</type> <name>PicOrderCntVal</name><comment>Picture order count derived as specified in 8.3.1</comment></member>
<member><type>uint8_t</type> <name>TemporalId</name><comment>Temporal ID, as defined in 7.4.2.2</comment></member>
</type>
<!-- vulkan_video_codec_av1std.h enumerated types -->
<type name="StdVideoAV1Profile" category="enum"/>
<type name="StdVideoAV1Level" category="enum"/>
<type name="StdVideoAV1FrameType" category="enum"/>
<type name="StdVideoAV1ReferenceName" category="enum"/>
<type name="StdVideoAV1InterpolationFilter" category="enum"/>
<type name="StdVideoAV1TxMode" category="enum"/>
<type name="StdVideoAV1FrameRestorationType" category="enum"/>
<type name="StdVideoAV1ColorPrimaries" category="enum"/>
<type name="StdVideoAV1TransferCharacteristics" category="enum"/>
<type name="StdVideoAV1MatrixCoefficients" category="enum"/>
<type name="StdVideoAV1ChromaSamplePosition" category="enum"/>
<type category="struct" name="StdVideoAV1ColorConfigFlags">
<comment>Syntax defined in section 5.5.2, semantics defined in section 6.4.2</comment>
<member><type>uint32_t</type> <name>mono_chrome</name> : 1</member>
<member><type>uint32_t</type> <name>color_range</name> : 1</member>
<member><type>uint32_t</type> <name>separate_uv_delta_q</name> : 1</member>
<member><type>uint32_t</type> <name>color_description_present_flag</name> : 1</member>
<member><type>uint32_t</type> <name>reserved</name> : 28</member>
</type>
<type category="struct" name="StdVideoAV1ColorConfig">
<comment>Syntax defined in section 5.5.2, semantics defined in section 6.4.2</comment>
<member><type>StdVideoAV1ColorConfigFlags</type> <name>flags</name></member>
<member><type>uint8_t</type> <name>BitDepth</name></member>
<member><type>uint8_t</type> <name>subsampling_x</name></member>
<member><type>uint8_t</type> <name>subsampling_y</name></member>
<member><type>uint8_t</type> <name>reserved1</name><comment>Reserved for future use and must be initialized with 0.</comment></member>
<member><type>StdVideoAV1ColorPrimaries</type> <name>color_primaries</name></member>
<member><type>StdVideoAV1TransferCharacteristics</type> <name>transfer_characteristics</name></member>
<member><type>StdVideoAV1MatrixCoefficients</type> <name>matrix_coefficients</name></member>
<member><type>StdVideoAV1ChromaSamplePosition</type> <name>chroma_sample_position</name></member>
</type>
<type category="struct" name="StdVideoAV1TimingInfoFlags">
<comment>Syntax defined in section 5.5.3, semantics defined in section 6.4.3</comment>
<member><type>uint32_t</type> <name>equal_picture_interval</name> : 1</member>
<member><type>uint32_t</type> <name>reserved</name> : 31</member>
</type>
<type category="struct" name="StdVideoAV1TimingInfo">
<comment>Syntax defined in section 5.5.3, semantics defined in section 6.4.3</comment>
<member><type>StdVideoAV1TimingInfoFlags</type> <name>flags</name></member>
<member><type>uint32_t</type> <name>num_units_in_display_tick</name></member>
<member><type>uint32_t</type> <name>time_scale</name></member>
<member><type>uint32_t</type> <name>num_ticks_per_picture_minus_1</name></member>
</type>
<type category="struct" name="StdVideoAV1SequenceHeaderFlags">
<comment>Syntax defined in section 5.5, semantics defined in section 6.4</comment>
<member><type>uint32_t</type> <name>still_picture</name> : 1</member>
<member><type>uint32_t</type> <name>reduced_still_picture_header</name> : 1</member>
<member><type>uint32_t</type> <name>use_128x128_superblock</name> : 1</member>
<member><type>uint32_t</type> <name>enable_filter_intra</name> : 1</member>
<member><type>uint32_t</type> <name>enable_intra_edge_filter</name> : 1</member>
<member><type>uint32_t</type> <name>enable_interintra_compound</name> : 1</member>
<member><type>uint32_t</type> <name>enable_masked_compound</name> : 1</member>
<member><type>uint32_t</type> <name>enable_warped_motion</name> : 1</member>
<member><type>uint32_t</type> <name>enable_dual_filter</name> : 1</member>
<member><type>uint32_t</type> <name>enable_order_hint</name> : 1</member>
<member><type>uint32_t</type> <name>enable_jnt_comp</name> : 1</member>
<member><type>uint32_t</type> <name>enable_ref_frame_mvs</name> : 1</member>
<member><type>uint32_t</type> <name>frame_id_numbers_present_flag</name> : 1</member>
<member><type>uint32_t</type> <name>enable_superres</name> : 1</member>
<member><type>uint32_t</type> <name>enable_cdef</name> : 1</member>
<member><type>uint32_t</type> <name>enable_restoration</name> : 1</member>
<member><type>uint32_t</type> <name>film_grain_params_present</name> : 1</member>
<member><type>uint32_t</type> <name>timing_info_present_flag</name> : 1</member>
<member><type>uint32_t</type> <name>initial_display_delay_present_flag</name> : 1</member>
<member><type>uint32_t</type> <name>reserved</name> : 13</member>
</type>
<type category="struct" name="StdVideoAV1SequenceHeader">
<comment>Syntax defined in section 5.5, semantics defined in section 6.4</comment>
<member><type>StdVideoAV1SequenceHeaderFlags</type> <name>flags</name></member>
<member><type>StdVideoAV1Profile</type> <name>seq_profile</name></member>
<member><type>uint8_t</type> <name>frame_width_bits_minus_1</name></member>
<member><type>uint8_t</type> <name>frame_height_bits_minus_1</name></member>
<member><type>uint16_t</type> <name>max_frame_width_minus_1</name></member>
<member><type>uint16_t</type> <name>max_frame_height_minus_1</name></member>
<member><type>uint8_t</type> <name>delta_frame_id_length_minus_2</name></member>
<member><type>uint8_t</type> <name>additional_frame_id_length_minus_1</name></member>
<member><type>uint8_t</type> <name>order_hint_bits_minus_1</name></member>
<member><type>uint8_t</type> <name>seq_force_integer_mv</name><comment>The final value of of seq_force_integer_mv per the value of seq_choose_integer_mv.</comment></member>
<member><type>uint8_t</type> <name>seq_force_screen_content_tools</name><comment>The final value of of seq_force_screen_content_tools per the value of seq_choose_screen_content_tools.</comment></member>
<member><type>uint8_t</type> <name>reserved1</name>[5]<comment>Reserved for future use and must be initialized with 0.</comment></member>
<member>const <type>StdVideoAV1ColorConfig</type>* <name>pColorConfig</name></member>
<member>const <type>StdVideoAV1TimingInfo</type>* <name>pTimingInfo</name></member>
</type>
<type category="struct" name="StdVideoAV1LoopFilterFlags">
<comment>Syntax defined in section 5.9.11, semantics defined in section 6.8.10</comment>
<member><type>uint32_t</type> <name>loop_filter_delta_enabled</name> : 1</member>
<member><type>uint32_t</type> <name>loop_filter_delta_update</name> : 1</member>
<member><type>uint32_t</type> <name>reserved</name> : 30</member>
</type>
<type category="struct" name="StdVideoAV1LoopFilter">
<comment>Syntax defined in section 5.9.11, semantics defined in section 6.8.10</comment>
<member><type>StdVideoAV1LoopFilterFlags</type> <name>flags</name></member>
<member><type>uint8_t</type> <name>loop_filter_level</name>[<enum>STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS</enum>]</member>
<member><type>uint8_t</type> <name>loop_filter_sharpness</name></member>
<member><type>uint8_t</type> <name>update_ref_delta</name></member>
<member><type>int8_t</type> <name>loop_filter_ref_deltas</name>[<enum>STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME</enum>]</member>
<member><type>uint8_t</type> <name>update_mode_delta</name></member>
<member><type>int8_t</type> <name>loop_filter_mode_deltas</name>[<enum>STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS</enum>]</member>
</type>
<type category="struct" name="StdVideoAV1QuantizationFlags">
<comment>Syntax defined in section 5.9.12, semantics defined in section 6.8.11</comment>
<member><type>uint32_t</type> <name>using_qmatrix</name> : 1</member>
<member><type>uint32_t</type> <name>diff_uv_delta</name> : 1</member>
<member><type>uint32_t</type> <name>reserved</name> : 30</member>
</type>
<type category="struct" name="StdVideoAV1Quantization">
<comment>Syntax defined in section 5.9.12, semantics defined in section 6.8.11</comment>
<member><type>StdVideoAV1QuantizationFlags</type> <name>flags</name></member>
<member><type>uint8_t</type> <name>base_q_idx</name></member>
<member><type>int8_t</type> <name>DeltaQYDc</name></member>
<member><type>int8_t</type> <name>DeltaQUDc</name></member>
<member><type>int8_t</type> <name>DeltaQUAc</name></member>
<member><type>int8_t</type> <name>DeltaQVDc</name></member>
<member><type>int8_t</type> <name>DeltaQVAc</name></member>
<member><type>uint8_t</type> <name>qm_y</name></member>
<member><type>uint8_t</type> <name>qm_u</name></member>
<member><type>uint8_t</type> <name>qm_v</name></member>
</type>
<type category="struct" name="StdVideoAV1Segmentation">
<comment>Syntax defined in section 5.9.14, semantics defined in section 6.8.13</comment>
<member><type>uint8_t</type> <name>FeatureEnabled</name>[<enum>STD_VIDEO_AV1_MAX_SEGMENTS</enum>]<comment>Each element contains 8 (SEG_LVL_MAX) bits, one bit for each feature within the segment</comment></member>
<member><type>int16_t</type> <name>FeatureData</name>[<enum>STD_VIDEO_AV1_MAX_SEGMENTS</enum>][<enum>STD_VIDEO_AV1_SEG_LVL_MAX</enum>]</member>
</type>
<type category="struct" name="StdVideoAV1TileInfoFlags">
<comment>Syntax defined in section 5.9.15, semantics defined in section 6.8.14</comment>
<member><type>uint32_t</type> <name>uniform_tile_spacing_flag</name> : 1</member>
<member><type>uint32_t</type> <name>reserved</name> : 31</member>
</type>
<type category="struct" name="StdVideoAV1TileInfo">
<comment>Syntax defined in section 5.9.15, semantics defined in section 6.8.14</comment>
<member><type>StdVideoAV1TileInfoFlags</type> <name>flags</name></member>
<member><type>uint8_t</type> <name>TileCols</name></member>
<member><type>uint8_t</type> <name>TileRows</name></member>
<member><type>uint16_t</type> <name>context_update_tile_id</name></member>
<member><type>uint8_t</type> <name>tile_size_bytes_minus_1</name></member>
<member><type>uint8_t</type> <name>reserved1</name>[7]<comment>Reserved for future use and must be initialized with 0.</comment></member>
<member>const <type>uint16_t</type>* <name>pMiColStarts</name><comment>TileCols number of elements</comment></member>
<member>const <type>uint16_t</type>* <name>pMiRowStarts</name><comment>TileRows number of elements</comment></member>
<member>const <type>uint16_t</type>* <name>pWidthInSbsMinus1</name><comment>TileCols number of elements</comment></member>
<member>const <type>uint16_t</type>* <name>pHeightInSbsMinus1</name><comment>TileRows number of elements</comment></member>
</type>
<type category="struct" name="StdVideoAV1CDEF">
<comment>Syntax defined in section 5.9.19, semantics defined in section 6.10.14</comment>
<member><type>uint8_t</type> <name>cdef_damping_minus_3</name></member>
<member><type>uint8_t</type> <name>cdef_bits</name></member>
<member><type>uint8_t</type> <name>cdef_y_pri_strength</name>[<enum>STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS</enum>]</member>
<member><type>uint8_t</type> <name>cdef_y_sec_strength</name>[<enum>STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS</enum>]</member>
<member><type>uint8_t</type> <name>cdef_uv_pri_strength</name>[<enum>STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS</enum>]</member>
<member><type>uint8_t</type> <name>cdef_uv_sec_strength</name>[<enum>STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS</enum>]</member>
</type>
<type category="struct" name="StdVideoAV1LoopRestoration">
<comment>Syntax defined in section 5.9.20, semantics defined in section 6.10.15</comment>
<member><type>StdVideoAV1FrameRestorationType</type> <name>FrameRestorationType</name>[<enum>STD_VIDEO_AV1_MAX_NUM_PLANES</enum>]</member>
<member><type>uint16_t</type> <name>LoopRestorationSize</name>[<enum>STD_VIDEO_AV1_MAX_NUM_PLANES</enum>]</member>
</type>
<type category="struct" name="StdVideoAV1GlobalMotion">
<comment>Syntax defined in section 5.9.24, semantics defined in section 7.10</comment>
<member><type>uint8_t</type> <name>GmType</name>[<enum>STD_VIDEO_AV1_NUM_REF_FRAMES</enum>]</member>
<member><type>int32_t</type> <name>gm_params</name>[<enum>STD_VIDEO_AV1_NUM_REF_FRAMES</enum>][<enum>STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS</enum>]</member>
</type>
<type category="struct" name="StdVideoAV1FilmGrainFlags">
<comment>Syntax defined in section 5.9.30, semantics defined in section 6.8.20</comment>
<member><type>uint32_t</type> <name>chroma_scaling_from_luma</name> : 1</member>
<member><type>uint32_t</type> <name>overlap_flag</name> : 1</member>
<member><type>uint32_t</type> <name>clip_to_restricted_range</name> : 1</member>
<member><type>uint32_t</type> <name>update_grain</name> : 1</member>
<member><type>uint32_t</type> <name>reserved</name> : 28</member>
</type>
<type category="struct" name="StdVideoAV1FilmGrain">
<comment>Syntax defined in section 5.9.30, semantics defined in section 6.8.20</comment>
<member><type>StdVideoAV1FilmGrainFlags</type> <name>flags</name></member>
<member><type>uint8_t</type> <name>grain_scaling_minus_8</name></member>
<member><type>uint8_t</type> <name>ar_coeff_lag</name></member>
<member><type>uint8_t</type> <name>ar_coeff_shift_minus_6</name></member>
<member><type>uint8_t</type> <name>grain_scale_shift</name></member>
<member><type>uint16_t</type> <name>grain_seed</name></member>
<member><type>uint8_t</type> <name>film_grain_params_ref_idx</name></member>
<member><type>uint8_t</type> <name>num_y_points</name></member>
<member><type>uint8_t</type> <name>point_y_value</name>[<enum>STD_VIDEO_AV1_MAX_NUM_Y_POINTS</enum>]</member>
<member><type>uint8_t</type> <name>point_y_scaling</name>[<enum>STD_VIDEO_AV1_MAX_NUM_Y_POINTS</enum>]</member>
<member><type>uint8_t</type> <name>num_cb_points</name></member>
<member><type>uint8_t</type> <name>point_cb_value</name>[<enum>STD_VIDEO_AV1_MAX_NUM_CB_POINTS</enum>]</member>
<member><type>uint8_t</type> <name>point_cb_scaling</name>[<enum>STD_VIDEO_AV1_MAX_NUM_CB_POINTS</enum>]</member>
<member><type>uint8_t</type> <name>num_cr_points</name></member>
<member><type>uint8_t</type> <name>point_cr_value</name>[<enum>STD_VIDEO_AV1_MAX_NUM_CR_POINTS</enum>]</member>
<member><type>uint8_t</type> <name>point_cr_scaling</name>[<enum>STD_VIDEO_AV1_MAX_NUM_CR_POINTS</enum>]</member>
<member><type>int8_t</type> <name>ar_coeffs_y_plus_128</name>[<enum>STD_VIDEO_AV1_MAX_NUM_POS_LUMA</enum>]</member>
<member><type>int8_t</type> <name>ar_coeffs_cb_plus_128</name>[<enum>STD_VIDEO_AV1_MAX_NUM_POS_CHROMA</enum>]</member>
<member><type>int8_t</type> <name>ar_coeffs_cr_plus_128</name>[<enum>STD_VIDEO_AV1_MAX_NUM_POS_CHROMA</enum>]</member>
<member><type>uint8_t</type> <name>cb_mult</name></member>
<member><type>uint8_t</type> <name>cb_luma_mult</name></member>
<member><type>uint16_t</type> <name>cb_offset</name></member>
<member><type>uint8_t</type> <name>cr_mult</name></member>
<member><type>uint8_t</type> <name>cr_luma_mult</name></member>
<member><type>uint16_t</type> <name>cr_offset</name></member>
</type>
<type category="struct" name="StdVideoDecodeAV1PictureInfoFlags">
<comment>Syntax defined in section 5.9, semantics defined in section 6.8</comment>
<member><type>uint32_t</type> <name>error_resilient_mode</name> : 1</member>
<member><type>uint32_t</type> <name>disable_cdf_update</name> : 1</member>
<member><type>uint32_t</type> <name>use_superres</name> : 1</member>
<member><type>uint32_t</type> <name>render_and_frame_size_different</name> : 1</member>
<member><type>uint32_t</type> <name>allow_screen_content_tools</name> : 1</member>
<member><type>uint32_t</type> <name>is_filter_switchable</name> : 1</member>
<member><type>uint32_t</type> <name>force_integer_mv</name> : 1</member>
<member><type>uint32_t</type> <name>frame_size_override_flag</name> : 1</member>
<member><type>uint32_t</type> <name>buffer_removal_time_present_flag</name> : 1</member>
<member><type>uint32_t</type> <name>allow_intrabc</name> : 1</member>
<member><type>uint32_t</type> <name>frame_refs_short_signaling</name> : 1</member>
<member><type>uint32_t</type> <name>allow_high_precision_mv</name> : 1</member>
<member><type>uint32_t</type> <name>is_motion_mode_switchable</name> : 1</member>
<member><type>uint32_t</type> <name>use_ref_frame_mvs</name> : 1</member>
<member><type>uint32_t</type> <name>disable_frame_end_update_cdf</name> : 1</member>
<member><type>uint32_t</type> <name>allow_warped_motion</name> : 1</member>
<member><type>uint32_t</type> <name>reduced_tx_set</name> : 1</member>
<member><type>uint32_t</type> <name>reference_select</name> : 1</member>
<member><type>uint32_t</type> <name>skip_mode_present</name> : 1</member>
<member><type>uint32_t</type> <name>delta_q_present</name> : 1</member>
<member><type>uint32_t</type> <name>delta_lf_present</name> : 1</member>
<member><type>uint32_t</type> <name>delta_lf_multi</name> : 1</member>
<member><type>uint32_t</type> <name>segmentation_enabled</name> : 1</member>
<member><type>uint32_t</type> <name>segmentation_update_map</name> : 1</member>
<member><type>uint32_t</type> <name>segmentation_temporal_update</name> : 1</member>
<member><type>uint32_t</type> <name>segmentation_update_data</name> : 1</member>
<member><type>uint32_t</type> <name>UsesLr</name> : 1</member>
<member><type>uint32_t</type> <name>usesChromaLr</name> : 1</member>
<member><type>uint32_t</type> <name>apply_grain</name> : 1</member>
<member><type>uint32_t</type> <name>reserved</name> : 3</member>
</type>
<type category="struct" name="StdVideoDecodeAV1PictureInfo">
<comment>Syntax defined in sections 5.9 and 5.11.1, semantics defined in sections 6.8 and 6.10.1</comment>
<member><type>StdVideoDecodeAV1PictureInfoFlags</type> <name>flags</name></member>
<member><type>StdVideoAV1FrameType</type> <name>frame_type</name></member>
<member><type>uint32_t</type> <name>current_frame_id</name></member>
<member><type>uint8_t</type> <name>OrderHint</name></member>
<member><type>uint8_t</type> <name>primary_ref_frame</name></member>
<member><type>uint8_t</type> <name>refresh_frame_flags</name></member>
<member><type>uint8_t</type> <name>reserved1</name><comment>Reserved for future use and must be initialized with 0.</comment></member>
<member><type>StdVideoAV1InterpolationFilter</type> <name>interpolation_filter</name></member>
<member><type>StdVideoAV1TxMode</type> <name>TxMode</name></member>
<member><type>uint8_t</type> <name>delta_q_res</name></member>
<member><type>uint8_t</type> <name>delta_lf_res</name></member>
<member><type>uint8_t</type> <name>SkipModeFrame</name>[<enum>STD_VIDEO_AV1_SKIP_MODE_FRAMES</enum>]</member>
<member><type>uint8_t</type> <name>coded_denom</name></member>
<member><type>uint8_t</type> <name>reserved2</name>[3]<comment>Reserved for future use and must be initialized with 0.</comment></member>
<member><type>uint8_t</type> <name>OrderHints</name>[<enum>STD_VIDEO_AV1_NUM_REF_FRAMES</enum>]</member>
<member><type>uint32_t</type> <name>expectedFrameId</name>[<enum>STD_VIDEO_AV1_NUM_REF_FRAMES</enum>]</member>
<member>const <type>StdVideoAV1TileInfo</type>* <name>pTileInfo</name></member>
<member>const <type>StdVideoAV1Quantization</type>* <name>pQuantization</name></member>
<member>const <type>StdVideoAV1Segmentation</type>* <name>pSegmentation</name></member>
<member>const <type>StdVideoAV1LoopFilter</type>* <name>pLoopFilter</name></member>
<member>const <type>StdVideoAV1CDEF</type>* <name>pCDEF</name></member>
<member>const <type>StdVideoAV1LoopRestoration</type>* <name>pLoopRestoration</name></member>
<member>const <type>StdVideoAV1GlobalMotion</type>* <name>pGlobalMotion</name></member>
<member>const <type>StdVideoAV1FilmGrain</type>* <name>pFilmGrain</name></member>
</type>
<type category="struct" name="StdVideoDecodeAV1ReferenceInfoFlags">
<member><type>uint32_t</type> <name>disable_frame_end_update_cdf</name> : 1</member>
<member><type>uint32_t</type> <name>segmentation_enabled</name> : 1</member>
<member><type>uint32_t</type> <name>reserved</name> : 30</member>
</type>
<type category="struct" name="StdVideoDecodeAV1ReferenceInfo">
<member><type>StdVideoDecodeAV1ReferenceInfoFlags</type> <name>flags</name></member>
<member><type>uint8_t</type> <name>frame_type</name></member>
<member><type>uint8_t</type> <name>RefFrameSignBias</name></member>
<member><type>uint8_t</type> <name>OrderHint</name></member>
<member><type>uint8_t</type> <name>SavedOrderHints</name>[<enum>STD_VIDEO_AV1_NUM_REF_FRAMES</enum>]</member>
</type>
<type category="struct" name="StdVideoEncodeAV1ExtensionHeader">
<comment>Syntax defined in section 5.3.3, semantics defined in section 6.2.3</comment>
<member><type>uint8_t</type> <name>temporal_id</name></member>
<member><type>uint8_t</type> <name>spatial_id</name></member>
</type>
<type category="struct" name="StdVideoEncodeAV1DecoderModelInfo">
<member><type>uint8_t</type> <name>buffer_delay_length_minus_1</name></member>
<member><type>uint8_t</type> <name>buffer_removal_time_length_minus_1</name></member>
<member><type>uint8_t</type> <name>frame_presentation_time_length_minus_1</name></member>
<member><type>uint8_t</type> <name>reserved1</name><comment>Reserved for future use and must be initialized with 0.</comment></member>
<member><type>uint32_t</type> <name>num_units_in_decoding_tick</name></member>
</type>
<type category="struct" name="StdVideoEncodeAV1OperatingPointInfoFlags">
<member><type>uint32_t</type> <name>decoder_model_present_for_this_op</name> : 1</member>
<member><type>uint32_t</type> <name>low_delay_mode_flag</name> : 1</member>
<member><type>uint32_t</type> <name>initial_display_delay_present_for_this_op</name> : 1</member>
<member><type>uint32_t</type> <name>reserved</name> : 29</member>
</type>
<type category="struct" name="StdVideoEncodeAV1OperatingPointInfo">
<member><type>StdVideoEncodeAV1OperatingPointInfoFlags</type> <name>flags</name></member>
<member><type>uint16_t</type> <name>operating_point_idc</name></member>
<member><type>uint8_t</type> <name>seq_level_idx</name></member>
<member><type>uint8_t</type> <name>seq_tier</name></member>
<member><type>uint32_t</type> <name>decoder_buffer_delay</name></member>
<member><type>uint32_t</type> <name>encoder_buffer_delay</name></member>
<member><type>uint8_t</type> <name>initial_display_delay_minus_1</name></member>
</type>
<type category="struct" name="StdVideoEncodeAV1PictureInfoFlags">
<comment>Syntax defined in section 5.9, semantics defined in section 6.8</comment>
<member><type>uint32_t</type> <name>error_resilient_mode</name> : 1</member>
<member><type>uint32_t</type> <name>disable_cdf_update</name> : 1</member>
<member><type>uint32_t</type> <name>use_superres</name> : 1</member>
<member><type>uint32_t</type> <name>render_and_frame_size_different</name> : 1</member>
<member><type>uint32_t</type> <name>allow_screen_content_tools</name> : 1</member>
<member><type>uint32_t</type> <name>is_filter_switchable</name> : 1</member>
<member><type>uint32_t</type> <name>force_integer_mv</name> : 1</member>
<member><type>uint32_t</type> <name>frame_size_override_flag</name> : 1</member>
<member><type>uint32_t</type> <name>buffer_removal_time_present_flag</name> : 1</member>
<member><type>uint32_t</type> <name>allow_intrabc</name> : 1</member>
<member><type>uint32_t</type> <name>frame_refs_short_signaling</name> : 1</member>
<member><type>uint32_t</type> <name>allow_high_precision_mv</name> : 1</member>
<member><type>uint32_t</type> <name>is_motion_mode_switchable</name> : 1</member>
<member><type>uint32_t</type> <name>use_ref_frame_mvs</name> : 1</member>
<member><type>uint32_t</type> <name>disable_frame_end_update_cdf</name> : 1</member>
<member><type>uint32_t</type> <name>allow_warped_motion</name> : 1</member>
<member><type>uint32_t</type> <name>reduced_tx_set</name> : 1</member>
<member><type>uint32_t</type> <name>skip_mode_present</name> : 1</member>
<member><type>uint32_t</type> <name>delta_q_present</name> : 1</member>
<member><type>uint32_t</type> <name>delta_lf_present</name> : 1</member>
<member><type>uint32_t</type> <name>delta_lf_multi</name> : 1</member>
<member><type>uint32_t</type> <name>segmentation_enabled</name> : 1</member>
<member><type>uint32_t</type> <name>segmentation_update_map</name> : 1</member>
<member><type>uint32_t</type> <name>segmentation_temporal_update</name> : 1</member>
<member><type>uint32_t</type> <name>segmentation_update_data</name> : 1</member>
<member><type>uint32_t</type> <name>UsesLr</name> : 1</member>
<member><type>uint32_t</type> <name>usesChromaLr</name> : 1</member>
<member><type>uint32_t</type> <name>show_frame</name> : 1</member>
<member><type>uint32_t</type> <name>showable_frame</name> : 1</member>
<member><type>uint32_t</type> <name>reserved</name> : 3</member>
</type>
<type category="struct" name="StdVideoEncodeAV1PictureInfo">
<comment>Syntax defined in sections 5.9 and 5.11.1, semantics defined in sections 6.8 and 6.10.1</comment>
<member><type>StdVideoEncodeAV1PictureInfoFlags</type> <name>flags</name></member>
<member><type>StdVideoAV1FrameType</type> <name>frame_type</name></member>
<member><type>uint32_t</type> <name>frame_presentation_time</name></member>
<member><type>uint32_t</type> <name>current_frame_id</name></member>
<member><type>uint8_t</type> <name>order_hint</name></member>
<member><type>uint8_t</type> <name>primary_ref_frame</name></member>
<member><type>uint8_t</type> <name>refresh_frame_flags</name></member>
<member><type>uint8_t</type> <name>coded_denom</name></member>
<member><type>uint16_t</type> <name>render_width_minus_1</name></member>
<member><type>uint16_t</type> <name>render_height_minus_1</name></member>
<member><type>StdVideoAV1InterpolationFilter</type> <name>interpolation_filter</name></member>
<member><type>StdVideoAV1TxMode</type> <name>TxMode</name></member>
<member><type>uint8_t</type> <name>delta_q_res</name></member>
<member><type>uint8_t</type> <name>delta_lf_res</name></member>
<member><type>uint8_t</type> <name>ref_order_hint</name>[<enum>STD_VIDEO_AV1_NUM_REF_FRAMES</enum>]</member>
<member><type>int8_t</type> <name>ref_frame_idx</name>[<enum>STD_VIDEO_AV1_REFS_PER_FRAME</enum>]</member>
<member><type>uint8_t</type> <name>reserved1</name>[3]<comment>Reserved for future use and must be initialized with 0.</comment></member>
<member><type>uint32_t</type> <name>delta_frame_id_minus_1</name>[<enum>STD_VIDEO_AV1_REFS_PER_FRAME</enum>]</member>
<member>const <type>StdVideoAV1TileInfo</type>* <name>pTileInfo</name></member>
<member>const <type>StdVideoAV1Quantization</type>* <name>pQuantization</name></member>
<member>const <type>StdVideoAV1Segmentation</type>* <name>pSegmentation</name></member>
<member>const <type>StdVideoAV1LoopFilter</type>* <name>pLoopFilter</name></member>
<member>const <type>StdVideoAV1CDEF</type>* <name>pCDEF</name></member>
<member>const <type>StdVideoAV1LoopRestoration</type>* <name>pLoopRestoration</name></member>
<member>const <type>StdVideoAV1GlobalMotion</type>* <name>pGlobalMotion</name></member>
<member>const <type>StdVideoEncodeAV1ExtensionHeader</type>* <name>pExtensionHeader</name></member>
<member>const <type>uint32_t</type>* <name>pBufferRemovalTimes</name></member>
</type>
<type category="struct" name="StdVideoEncodeAV1ReferenceInfoFlags">
<!-- TODO: Are these needed? For now it is simply copied from AV1 decode -->
<member><type>uint32_t</type> <name>disable_frame_end_update_cdf</name> : 1</member>
<member><type>uint32_t</type> <name>segmentation_enabled</name> : 1</member>
<member><type>uint32_t</type> <name>reserved</name> : 30</member>
</type>
<type category="struct" name="StdVideoEncodeAV1ReferenceInfo">
<member><type>StdVideoEncodeAV1ReferenceInfoFlags</type> <name>flags</name></member>
<member><type>uint32_t</type> <name>RefFrameId</name></member>
<member><type>StdVideoAV1FrameType</type> <name>frame_type</name></member>
<member><type>uint8_t</type> <name>OrderHint</name></member>
<member><type>uint8_t</type> <name>reserved1</name>[3]<comment>Reserved for future use and must be initialized with 0.</comment></member>
<member>const <type>StdVideoEncodeAV1ExtensionHeader</type>* <name>pExtensionHeader</name></member>
</type>
</types>
<!-- vulkan_video_codec_h264std.h enums -->
@ -1039,6 +1424,143 @@ The current public version of video.xml is maintained in the default branch
<enum name="STD_VIDEO_H265_ASPECT_RATIO_IDC_INVALID" value="0x7FFFFFFF"/>
</enums>
<!-- vulkan_video_codec_av1std.h enums -->
<enums name="StdVideoAV1Profile" type="enum">
<enum name="STD_VIDEO_AV1_PROFILE_MAIN" value="0"/>
<enum name="STD_VIDEO_AV1_PROFILE_HIGH" value="1"/>
<enum name="STD_VIDEO_AV1_PROFILE_PROFESSIONAL" value="2"/>
<enum name="STD_VIDEO_AV1_PROFILE_INVALID" value="0x7FFFFFFF"/>
</enums>
<enums name="StdVideoAV1Level" type="enum">
<enum name="STD_VIDEO_AV1_LEVEL_2_0" value="0"/>
<enum name="STD_VIDEO_AV1_LEVEL_2_1" value="1"/>
<enum name="STD_VIDEO_AV1_LEVEL_2_2" value="2"/>
<enum name="STD_VIDEO_AV1_LEVEL_2_3" value="3"/>
<enum name="STD_VIDEO_AV1_LEVEL_3_0" value="4"/>
<enum name="STD_VIDEO_AV1_LEVEL_3_1" value="5"/>
<enum name="STD_VIDEO_AV1_LEVEL_3_2" value="6"/>
<enum name="STD_VIDEO_AV1_LEVEL_3_3" value="7"/>
<enum name="STD_VIDEO_AV1_LEVEL_4_0" value="8"/>
<enum name="STD_VIDEO_AV1_LEVEL_4_1" value="9"/>
<enum name="STD_VIDEO_AV1_LEVEL_4_2" value="10"/>
<enum name="STD_VIDEO_AV1_LEVEL_4_3" value="11"/>
<enum name="STD_VIDEO_AV1_LEVEL_5_0" value="12"/>
<enum name="STD_VIDEO_AV1_LEVEL_5_1" value="13"/>
<enum name="STD_VIDEO_AV1_LEVEL_5_2" value="14"/>
<enum name="STD_VIDEO_AV1_LEVEL_5_3" value="15"/>
<enum name="STD_VIDEO_AV1_LEVEL_6_0" value="16"/>
<enum name="STD_VIDEO_AV1_LEVEL_6_1" value="17"/>
<enum name="STD_VIDEO_AV1_LEVEL_6_2" value="18"/>
<enum name="STD_VIDEO_AV1_LEVEL_6_3" value="19"/>
<enum name="STD_VIDEO_AV1_LEVEL_7_0" value="20"/>
<enum name="STD_VIDEO_AV1_LEVEL_7_1" value="21"/>
<enum name="STD_VIDEO_AV1_LEVEL_7_2" value="22"/>
<enum name="STD_VIDEO_AV1_LEVEL_7_3" value="23"/>
<enum name="STD_VIDEO_AV1_LEVEL_INVALID" value="0x7FFFFFFF"/>
</enums>
<enums name="StdVideoAV1FrameType" type="enum">
<enum name="STD_VIDEO_AV1_FRAME_TYPE_KEY" value="0"/>
<enum name="STD_VIDEO_AV1_FRAME_TYPE_INTER" value="1"/>
<enum name="STD_VIDEO_AV1_FRAME_TYPE_INTRA_ONLY" value="2"/>
<enum name="STD_VIDEO_AV1_FRAME_TYPE_SWITCH" value="3"/>
<enum name="STD_VIDEO_AV1_FRAME_TYPE_INVALID" value="0x7FFFFFFF"/>
</enums>
<enums name="StdVideoAV1ReferenceName" type="enum">
<enum name="STD_VIDEO_AV1_REFERENCE_NAME_INTRA_FRAME" value="0"/>
<enum name="STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME" value="1"/>
<enum name="STD_VIDEO_AV1_REFERENCE_NAME_LAST2_FRAME" value="2"/>
<enum name="STD_VIDEO_AV1_REFERENCE_NAME_LAST3_FRAME" value="3"/>
<enum name="STD_VIDEO_AV1_REFERENCE_NAME_GOLDEN_FRAME" value="4"/>
<enum name="STD_VIDEO_AV1_REFERENCE_NAME_BWDREF_FRAME" value="5"/>
<enum name="STD_VIDEO_AV1_REFERENCE_NAME_ALTREF2_FRAME" value="6"/>
<enum name="STD_VIDEO_AV1_REFERENCE_NAME_ALTREF_FRAME" value="7"/>
<enum name="STD_VIDEO_AV1_REFERENCE_NAME_INVALID" value="0x7FFFFFFF"/>
</enums>
<enums name="StdVideoAV1InterpolationFilter" type="enum">
<enum name="STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP" value="0"/>
<enum name="STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH" value="1"/>
<enum name="STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP" value="2"/>
<enum name="STD_VIDEO_AV1_INTERPOLATION_FILTER_BILINEAR" value="3"/>
<enum name="STD_VIDEO_AV1_INTERPOLATION_FILTER_SWITCHABLE" value="4"/>
<enum name="STD_VIDEO_AV1_INTERPOLATION_FILTER_INVALID" value="0x7FFFFFFF"/>
</enums>
<enums name="StdVideoAV1TxMode" type="enum">
<enum name="STD_VIDEO_AV1_TX_MODE_ONLY_4X4" value="0"/>
<enum name="STD_VIDEO_AV1_TX_MODE_LARGEST" value="1"/>
<enum name="STD_VIDEO_AV1_TX_MODE_SELECT" value="2"/>
<enum name="STD_VIDEO_AV1_TX_MODE_INVALID" value="0x7FFFFFFF"/>
</enums>
<enums name="StdVideoAV1FrameRestorationType" type="enum">
<enum name="STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_NONE" value="0"/>
<enum name="STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_WIENER" value="1"/>
<enum name="STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SGRPROJ" value="2"/>
<enum name="STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SWITCHABLE" value="3"/>
<enum name="STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_INVALID" value="0x7FFFFFFF"/>
</enums>
<enums name="StdVideoAV1ColorPrimaries" type="enum">
<enum name="STD_VIDEO_AV1_COLOR_PRIMARIES_BT_709" value="1"/>
<enum name="STD_VIDEO_AV1_COLOR_PRIMARIES_UNSPECIFIED" value="2"/>
<enum name="STD_VIDEO_AV1_COLOR_PRIMARIES_BT_UNSPECIFIED" alias="STD_VIDEO_AV1_COLOR_PRIMARIES_UNSPECIFIED" deprecated="aliased"/>
<enum name="STD_VIDEO_AV1_COLOR_PRIMARIES_BT_470_M" value="4"/>
<enum name="STD_VIDEO_AV1_COLOR_PRIMARIES_BT_470_B_G" value="5"/>
<enum name="STD_VIDEO_AV1_COLOR_PRIMARIES_BT_601" value="6"/>
<enum name="STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_240" value="7"/>
<enum name="STD_VIDEO_AV1_COLOR_PRIMARIES_GENERIC_FILM" value="8"/>
<enum name="STD_VIDEO_AV1_COLOR_PRIMARIES_BT_2020" value="9"/>
<enum name="STD_VIDEO_AV1_COLOR_PRIMARIES_XYZ" value="10"/>
<enum name="STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_431" value="11"/>
<enum name="STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_432" value="12"/>
<enum name="STD_VIDEO_AV1_COLOR_PRIMARIES_EBU_3213" value="22"/>
<enum name="STD_VIDEO_AV1_COLOR_PRIMARIES_INVALID" value="0x7FFFFFFF"/>
</enums>
<enums name="StdVideoAV1TransferCharacteristics" type="enum">
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_RESERVED_0" value="0"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_709" value="1"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_UNSPECIFIED" value="2"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_RESERVED_3" value="3"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_470_M" value="4"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_470_B_G" value="5"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_601" value="6"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_240" value="7"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LINEAR" value="8"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LOG_100" value="9"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LOG_100_SQRT10" value="10"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_IEC_61966" value="11"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_1361" value="12"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SRGB" value="13"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_2020_10_BIT" value="14"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_2020_12_BIT" value="15"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_2084" value="16"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_428" value="17"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_HLG" value="18"/>
<enum name="STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_INVALID" value="0x7FFFFFFF"/>
</enums>
<enums name="StdVideoAV1MatrixCoefficients" type="enum">
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_IDENTITY" value="0"/>
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_709" value="1"/>
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_UNSPECIFIED" value="2"/>
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_RESERVED_3" value="3"/>
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_FCC" value="4"/>
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_470_B_G" value="5"/>
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_601" value="6"/>
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_240" value="7"/>
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_YCGCO" value="8"/>
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_2020_NCL" value="9"/>
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_2020_CL" value="10"/>
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_2085" value="11"/>
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_CHROMAT_NCL" value="12"/>
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_CHROMAT_CL" value="13"/>
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_ICTCP" value="14"/>
<enum name="STD_VIDEO_AV1_MATRIX_COEFFICIENTS_INVALID" value="0x7FFFFFFF"/>
</enums>
<enums name="StdVideoAV1ChromaSamplePosition" type="enum">
<enum name="STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_UNKNOWN" value="0"/>
<enum name="STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_VERTICAL" value="1"/>
<enum name="STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_COLOCATED" value="2"/>
<enum name="STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_RESERVED" value="3"/>
<enum name="STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_INVALID" value="0x7FFFFFFF"/>
</enums>
<extensions>
<extension name="vulkan_video_codecs_common" comment="protect with VULKAN_VIDEO_CODEC_COMMON_H_" supported="vulkan">
<require>
@ -1214,5 +1736,95 @@ The current public version of video.xml is maintained in the default branch
<type name="StdVideoEncodeH265ReferenceInfo"/>
</require>
</extension>
<extension name="vulkan_video_codec_av1std" comment="protect with VULKAN_VIDEO_CODEC_AV1STD_H_" supported="vulkan">
<require>
<type name="vk_video/vulkan_video_codecs_common.h"/>
<enum name="STD_VIDEO_AV1_NUM_REF_FRAMES" value="8"/>
<enum name="STD_VIDEO_AV1_REFS_PER_FRAME" value="7"/>
<enum name="STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME" value="8"/>
<enum name="STD_VIDEO_AV1_MAX_TILE_COLS" value="64"/>
<enum name="STD_VIDEO_AV1_MAX_TILE_ROWS" value="64"/>
<enum name="STD_VIDEO_AV1_MAX_SEGMENTS" value="8"/>
<enum name="STD_VIDEO_AV1_SEG_LVL_MAX" value="8"/>
<enum name="STD_VIDEO_AV1_PRIMARY_REF_NONE" value="7"/>
<enum name="STD_VIDEO_AV1_SELECT_INTEGER_MV" value="2"/>
<enum name="STD_VIDEO_AV1_SELECT_SCREEN_CONTENT_TOOLS" value="2"/>
<enum name="STD_VIDEO_AV1_SKIP_MODE_FRAMES" value="2"/>
<enum name="STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS" value="4"/>
<enum name="STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS" value="2"/>
<enum name="STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS" value="8"/>
<enum name="STD_VIDEO_AV1_MAX_NUM_PLANES" value="3"/>
<enum name="STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS" value="6"/>
<enum name="STD_VIDEO_AV1_MAX_NUM_Y_POINTS" value="14"/>
<enum name="STD_VIDEO_AV1_MAX_NUM_CB_POINTS" value="10"/>
<enum name="STD_VIDEO_AV1_MAX_NUM_CR_POINTS" value="10"/>
<enum name="STD_VIDEO_AV1_MAX_NUM_POS_LUMA" value="24"/>
<enum name="STD_VIDEO_AV1_MAX_NUM_POS_CHROMA" value="25"/>
<type name="StdVideoAV1Profile"/>
<type name="StdVideoAV1Level"/>
<type name="StdVideoAV1FrameType"/>
<type name="StdVideoAV1ReferenceName"/>
<type name="StdVideoAV1InterpolationFilter"/>
<type name="StdVideoAV1TxMode"/>
<type name="StdVideoAV1FrameRestorationType"/>
<type name="StdVideoAV1ColorPrimaries"/>
<type name="StdVideoAV1TransferCharacteristics"/>
<type name="StdVideoAV1MatrixCoefficients"/>
<type name="StdVideoAV1ChromaSamplePosition"/>
<type name="StdVideoAV1ColorConfigFlags"/>
<type name="StdVideoAV1ColorConfig"/>
<type name="StdVideoAV1TimingInfoFlags"/>
<type name="StdVideoAV1TimingInfo"/>
<type name="StdVideoAV1LoopFilterFlags"/>
<type name="StdVideoAV1LoopFilter"/>
<type name="StdVideoAV1QuantizationFlags"/>
<type name="StdVideoAV1Quantization"/>
<type name="StdVideoAV1Segmentation"/>
<type name="StdVideoAV1TileInfoFlags"/>
<type name="StdVideoAV1TileInfo"/>
<type name="StdVideoAV1CDEF"/>
<type name="StdVideoAV1LoopRestoration"/>
<type name="StdVideoAV1GlobalMotion"/>
<type name="StdVideoAV1FilmGrainFlags"/>
<type name="StdVideoAV1FilmGrain"/>
<type name="StdVideoAV1SequenceHeaderFlags"/>
<type name="StdVideoAV1SequenceHeader"/>
</require>
</extension>
<extension name="vulkan_video_codec_av1std_decode" comment="protect with VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_" supported="vulkan">
<require>
<type name="vk_video/vulkan_video_codec_av1std.h"/>
<type name="VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0"/>
<enum name="VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION" value="VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0"/>
<enum name="VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_EXTENSION_NAME" value="&quot;VK_STD_vulkan_video_codec_av1_decode&quot;"/>
<type name="StdVideoDecodeAV1PictureInfoFlags"/>
<type name="StdVideoDecodeAV1PictureInfo"/>
<type name="StdVideoDecodeAV1ReferenceInfoFlags"/>
<type name="StdVideoDecodeAV1ReferenceInfo"/>
</require>
</extension>
<extension name="vulkan_video_codec_av1std_encode" comment="protect with VULKAN_VIDEO_CODEC_AV1STD_ENCODE_H_" supported="vulkan">
<require>
<type name="vk_video/vulkan_video_codec_av1std.h"/>
<type name="VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0"/>
<enum name="VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_SPEC_VERSION" value="VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0"/>
<enum name="VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_EXTENSION_NAME" value="&quot;VK_STD_vulkan_video_codec_av1_encode&quot;"/>
<type name="StdVideoEncodeAV1DecoderModelInfo"/>
<type name="StdVideoEncodeAV1ExtensionHeader"/>
<type name="StdVideoEncodeAV1OperatingPointInfoFlags"/>
<type name="StdVideoEncodeAV1OperatingPointInfo"/>
<type name="StdVideoEncodeAV1PictureInfoFlags"/>
<type name="StdVideoEncodeAV1PictureInfo"/>
<type name="StdVideoEncodeAV1ReferenceInfoFlags"/>
<type name="StdVideoEncodeAV1ReferenceInfo"/>
</require>
</extension>
</extensions>
</registry>

6672
registry/vk.xml Normal file → Executable file

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
#!/usr/bin/python3 -i
#!/usr/bin/env python3 -i
#
# Copyright 2013-2024 The Khronos Group Inc.
# Copyright 2013-2025 The Khronos Group Inc.
#
# SPDX-License-Identifier: Apache-2.0
@ -28,6 +28,7 @@ SPECIAL_WORDS = set((
'ASTC', # VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT
'D3D12', # VkD3D12FenceSubmitInfoKHR
'Float16', # VkPhysicalDeviceShaderFloat16Int8FeaturesKHR
'Bfloat16', # VkPhysicalDeviceShaderBfloat16FeaturesKHR
'ImagePipe', # VkImagePipeSurfaceCreateInfoFUCHSIA
'Int64', # VkPhysicalDeviceShaderAtomicInt64FeaturesKHR
'Int8', # VkPhysicalDeviceShaderFloat16Int8FeaturesKHR
@ -38,7 +39,7 @@ SPECIAL_WORDS = set((
))
# A regex to match any of the SPECIAL_WORDS
EXCEPTION_PATTERN = r'(?P<exception>{})'.format(
'|'.join('(%s)' % re.escape(w) for w in SPECIAL_WORDS))
'|'.join(f'({re.escape(w)})' for w in SPECIAL_WORDS))
MAIN_RE = re.compile(
# the negative lookahead is to prevent the all-caps pattern from being too greedy.
r'({}|([0-9]+)|([A-Z][a-z]+)|([A-Z][A-Z]*(?![a-z])))'.format(EXCEPTION_PATTERN))
@ -58,9 +59,9 @@ class VulkanConventions(ConventionsBase):
if version == '1.0':
return 'Vulkan SC 1.0'
else:
return f'<<versions-sc-{version}, Version SC {version}>>'
return f'<<versions-sc-{version}, Vulkan SC Version {version}>>'
else:
return f'<<versions-{version}, Version {version}>>'
return f'<<versions-{version}, Vulkan Version {version}>>'
def formatExtension(self, name):
"""Mark up an extension name as a link in the spec."""
@ -119,6 +120,7 @@ class VulkanConventions(ConventionsBase):
# 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_' ],
@ -184,7 +186,7 @@ class VulkanConventions(ConventionsBase):
For Vulkan, these are names with a case-insensitive 'vk' prefix, or
a 'PFN_vk' function pointer type prefix.
"""
return name[0:2].lower() == 'vk' or name[0:6] == 'PFN_vk'
return name[0:2].lower() == 'vk' or name.startswith('PFN_vk')
def specURL(self, spectype='api'):
"""Return public registry URL which ref pages should link to for the
@ -193,7 +195,7 @@ class VulkanConventions(ConventionsBase):
instead. N.b. this may need to change on a per-refpage basis if
there are multiple documents involved.
"""
return 'https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html'
return 'https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html'
@property
def xml_api_name(self):

438
registry/vulkan_object.py Normal file
View file

@ -0,0 +1,438 @@
#!/usr/bin/env python3 -i
#
# Copyright 2023-2025 The Khronos Group Inc.
#
# SPDX-License-Identifier: Apache-2.0
from dataclasses import dataclass, field
from enum import IntFlag, Enum, auto
@dataclass
class Extension:
"""<extension>"""
name: str # ex) VK_KHR_SURFACE
nameString: str # marco with string, ex) VK_KHR_SURFACE_EXTENSION_NAME
specVersion: str # marco with string, ex) VK_KHR_SURFACE_SPEC_VERSION
# Only one will be True, the other is False
instance: bool
device: bool
depends: (str | None)
vendorTag: (str | None) # ex) EXT, KHR, etc
platform: (str | None) # ex) android
protect: (str | None) # ex) VK_USE_PLATFORM_ANDROID_KHR
provisional: bool
promotedTo: (str | None) # ex) VK_VERSION_1_1
deprecatedBy: (str | None)
obsoletedBy: (str | None)
specialUse: list[str]
# These are here to allow for easy reverse lookups
# Quotes allow us to forward declare the dataclass
commands: list['Command'] = field(default_factory=list, init=False)
enums: list['Enum'] = field(default_factory=list, init=False)
bitmasks: list['Bitmask'] = field(default_factory=list, init=False)
# Use the Enum name to see what fields are extended
enumFields: dict[str, list['EnumField']] = field(default_factory=dict, init=False)
# Use the Bitmaks name to see what flags are extended
flags: dict[str, list['Flag']] = field(default_factory=dict, init=False)
@dataclass
class Version:
"""
<feature> which represents a version
This will NEVER be Version 1.0, since having 'no version' is same as being 1.0
"""
name: str # ex) VK_VERSION_1_1
nameString: str # ex) "VK_VERSION_1_1" (no marco, so has quotes)
nameApi: str # ex) VK_API_VERSION_1_1
@dataclass
class Handle:
"""<type> which represents a dispatch handle"""
name: str # ex) VkBuffer
aliases: list[str] # ex) ['VkSamplerYcbcrConversionKHR']
type: str # ex) VK_OBJECT_TYPE_BUFFER
protect: (str | None) # ex) VK_USE_PLATFORM_ANDROID_KHR
parent: 'Handle' # Chain of parent handles, can be None
# Only one will be True, the other is False
instance: bool
device: bool
dispatchable: bool
def __lt__(self, other):
return self.name < other.name
@dataclass
class Param:
"""<command/param>"""
name: str # ex) pCreateInfo, pAllocator, pBuffer
alias: str
# the "base type" - will not preserve the 'const' or pointer info
# ex) void, uint32_t, VkFormat, VkBuffer, etc
type: str
# the "full type" - will be cDeclaration without the type name
# ex) const void*, uint32_t, const VkFormat, VkBuffer*, etc
# For arrays, this will only display the type, fixedSizeArray can be used to get the length
fullType: str
noAutoValidity: bool
const: bool # type contains 'const'
length: (str | None) # the known length of pointer, will never be 'null-terminated'
nullTerminated: bool # If a UTF-8 string, it will be null-terminated
pointer: bool # type contains a pointer (include 'PFN' function pointers)
# Used to list how large an array of the type is
# ex) lineWidthRange is ['2']
# ex) memoryTypes is ['VK_MAX_MEMORY_TYPES']
# ex) VkTransformMatrixKHR:matrix is ['3', '4']
fixedSizeArray: list[str]
optional: bool
optionalPointer: bool # if type contains a pointer, is the pointer value optional
externSync: bool
externSyncPointer: list[str] # if type contains a pointer, might only specific members modified
# C string of member, example:
# - const void* pNext
# - VkFormat format
# - VkStructureType sType
cDeclaration: str
def __lt__(self, other):
return self.name < other.name
class Queues(IntFlag):
TRANSFER = auto() # VK_QUEUE_TRANSFER_BIT
GRAPHICS = auto() # VK_QUEUE_GRAPHICS_BIT
COMPUTE = auto() # VK_QUEUE_COMPUTE_BIT
PROTECTED = auto() # VK_QUEUE_PROTECTED_BIT
SPARSE_BINDING = auto() # VK_QUEUE_SPARSE_BINDING_BIT
OPTICAL_FLOW = auto() # VK_QUEUE_OPTICAL_FLOW_BIT_NV
DECODE = auto() # VK_QUEUE_VIDEO_DECODE_BIT_KHR
ENCODE = auto() # VK_QUEUE_VIDEO_ENCODE_BIT_KHR
ALL = TRANSFER | GRAPHICS | COMPUTE | PROTECTED | SPARSE_BINDING | OPTICAL_FLOW | DECODE | ENCODE
class CommandScope(Enum):
NONE = auto()
INSIDE = auto()
OUTSIDE = auto()
BOTH = auto()
@dataclass
class Command:
"""<command>"""
name: str # ex) vkCmdDraw
alias: (str | None) # Because commands are interfaces into layers/drivers, we need all command alias
protect: (str | None) # ex) 'VK_ENABLE_BETA_EXTENSIONS'
extensions: list[Extension] # All extensions that enable the struct
version: (Version | None) # None if Version 1.0
returnType: str # ex) void, VkResult, etc
params: list[Param] # Each parameter of the command
# Only one will be True, the other is False
instance: bool
device: bool
tasks: list[str] # ex) [ action, state, synchronization ]
queues: Queues # zero == No Queues found
successCodes: list[str] # ex) [ VK_SUCCESS, VK_INCOMPLETE ]
errorCodes: list[str] # ex) [ VK_ERROR_OUT_OF_HOST_MEMORY ]
# Shows support if command can be in a primary and/or secondary command buffer
primary: bool
secondary: bool
renderPass: CommandScope
videoCoding: CommandScope
implicitExternSyncParams: list[str]
# C prototype string - ex:
# VKAPI_ATTR VkResult VKAPI_CALL vkCreateInstance(
# const VkInstanceCreateInfo* pCreateInfo,
# const VkAllocationCallbacks* pAllocator,
# VkInstance* pInstance);
cPrototype: str
# function pointer typedef - ex:
# typedef VkResult (VKAPI_PTR *PFN_vkCreateInstance)
# (const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance);
cFunctionPointer: str
def __lt__(self, other):
return self.name < other.name
@dataclass
class Member:
"""<member>"""
name: str # ex) sType, pNext, flags, size, usage
# the "base type" - will not preserve the 'const' or pointer info
# ex) void, uint32_t, VkFormat, VkBuffer, etc
type: str
# the "full type" - will be cDeclaration without the type name
# ex) const void*, uint32_t, const VkFormat, VkBuffer*, etc
# For arrays, this will only display the type, fixedSizeArray can be used to get the length
fullType: str
noAutoValidity: bool
limitType: (str | None) # ex) 'max', 'bitmask', 'bits', 'min,mul'
const: bool # type contains 'const'
length: (str | None) # the known length of pointer, will never be 'null-terminated'
nullTerminated: bool # If a UTF-8 string, it will be null-terminated
pointer: bool # type contains a pointer (include 'PFN' function pointers)
# Used to list how large an array of the type is
# ex) lineWidthRange is ['2']
# ex) memoryTypes is ['VK_MAX_MEMORY_TYPES']
# ex) VkTransformMatrixKHR:matrix is ['3', '4']
fixedSizeArray: list[str]
optional: bool
optionalPointer: bool # if type contains a pointer, is the pointer value optional
externSync: bool
# C string of member, example:
# - const void* pNext
# - VkFormat format
# - VkStructureType sType
cDeclaration: str
def __lt__(self, other):
return self.name < other.name
@dataclass
class Struct:
"""<type category="struct"> or <type category="union">"""
name: str # ex) VkImageSubresource2
aliases: list[str] # ex) ['VkImageSubresource2KHR', 'VkImageSubresource2EXT']
extensions: list[Extension] # All extensions that enable the struct
version: (Version | None) # None if Version 1.0
protect: (str | None) # ex) VK_ENABLE_BETA_EXTENSIONS
members: list[Member]
union: bool # Unions are just a subset of a Structs
returnedOnly: bool
sType: (str | None) # ex) VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO
allowDuplicate: bool # can have a pNext point to itself
# These use to be list['Struct'] but some circular loops occur and cause
# pydevd warnings and made debugging slow (30 seconds to index a Struct)
extends: list[str] # Struct names that this struct extends
extendedBy: list[str] # Struct names that can be extended by this struct
def __lt__(self, other):
return self.name < other.name
@dataclass
class EnumField:
"""<enum> of type enum"""
name: str # ex) VK_DYNAMIC_STATE_SCISSOR
protect: (str | None) # ex) VK_ENABLE_BETA_EXTENSIONS
negative: bool # True if negative values are allowed (ex. VkResult)
value: int
valueStr: str # value as shown in spec (ex. "0", "2", "1000267000", "0x00000004")
# some fields are enabled from 2 extensions (ex) VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR)
extensions: list[Extension] # None if part of 1.0 core
def __lt__(self, other):
return self.name < other.name
@dataclass
class Enum:
"""<enums> of type enum"""
name: str # ex) VkLineRasterizationMode
aliases: list[str] # ex) ['VkLineRasterizationModeKHR', 'VkLineRasterizationModeEXT']
protect: (str | None) # ex) VK_ENABLE_BETA_EXTENSIONS
bitWidth: int # 32 or 64 (currently all are 32, but field is to match with Bitmask)
returnedOnly: bool
fields: list[EnumField]
extensions: list[Extension] # None if part of 1.0 core
# Unique list of all extension that are involved in 'fields' (superset of 'extensions')
fieldExtensions: list[Extension]
def __lt__(self, other):
return self.name < other.name
@dataclass
class Flag:
"""<enum> of type bitmask"""
name: str # ex) VK_ACCESS_2_SHADER_READ_BIT
protect: (str | None) # ex) VK_ENABLE_BETA_EXTENSIONS
value: int
valueStr: str # value as shown in spec (ex. 0x00000000", "0x00000004", "0x0000000F", "0x800000000ULL")
multiBit: bool # if true, more than one bit is set (ex) VK_SHADER_STAGE_ALL_GRAPHICS)
zero: bool # if true, the value is zero (ex) VK_PIPELINE_STAGE_NONE)
# some fields are enabled from 2 extensions (ex) VK_TOOL_PURPOSE_DEBUG_REPORTING_BIT_EXT)
extensions: list[Extension] # None if part of 1.0 core
def __lt__(self, other):
return self.name < other.name
@dataclass
class Bitmask:
"""<enums> of type bitmask"""
name: str # ex) VkAccessFlagBits2
aliases: list[str] # ex) ['VkAccessFlagBits2KHR']
flagName: str # ex) VkAccessFlags2
protect: (str | None) # ex) VK_ENABLE_BETA_EXTENSIONS
bitWidth: int # 32 or 64
returnedOnly: bool
flags: list[Flag]
extensions: list[Extension] # None if part of 1.0 core
# Unique list of all extension that are involved in 'flag' (superset of 'extensions')
flagExtensions: list[Extension]
def __lt__(self, other):
return self.name < other.name
@dataclass
class FormatComponent:
"""<format/component>"""
type: str # ex) R, G, B, A, D, S, etc
bits: str # will be an INT or 'compressed'
numericFormat: str # ex) UNORM, SINT, etc
planeIndex: (int | None) # None if no planeIndex in format
@dataclass
class FormatPlane:
"""<format/plane>"""
index: int
widthDivisor: int
heightDivisor: int
compatible: str
@dataclass
class Format:
"""<format>"""
name: str
className: str
blockSize: int
texelsPerBlock: int
blockExtent: list[str]
packed: (int | None) # None == not-packed
chroma: (str | None)
compressed: (str | None)
components: list[FormatComponent] # <format/component>
planes: list[FormatPlane] # <format/plane>
spirvImageFormat: (str | None)
@dataclass
class SyncSupport:
"""<syncsupport>"""
queues: Queues
stages: list[Flag] # VkPipelineStageFlagBits2
max: bool # If this supports max values
@dataclass
class SyncEquivalent:
"""<syncequivalent>"""
stages: list[Flag] # VkPipelineStageFlagBits2
accesses: list[Flag] # VkAccessFlagBits2
max: bool # If this equivalent to everything
@dataclass
class SyncStage:
"""<syncstage>"""
flag: Flag # VkPipelineStageFlagBits2
support: SyncSupport
equivalent: SyncEquivalent
@dataclass
class SyncAccess:
"""<syncaccess>"""
flag: Flag # VkAccessFlagBits2
support: SyncSupport
equivalent: SyncEquivalent
@dataclass
class SyncPipelineStage:
"""<syncpipelinestage>"""
order: (str | None)
before: (str | None)
after: (str | None)
value: str
@dataclass
class SyncPipeline:
"""<syncpipeline>"""
name: str
depends: list[str]
stages: list[SyncPipelineStage]
@dataclass
class SpirvEnables:
"""What is needed to enable the SPIR-V element"""
version: (str | None)
extension: (str | None)
struct: (str | None)
feature: (str | None)
requires: (str | None)
property: (str | None)
member: (str | None)
value: (str | None)
@dataclass
class Spirv:
"""<spirvextension> and <spirvcapability>"""
name: str
# Only one will be True, the other is False
extension: bool
capability: bool
enable: list[SpirvEnables]
# This is the global Vulkan Object that holds all the information from parsing the XML
# This class is designed so all generator scripts can use this to obtain data
@dataclass
class VulkanObject():
headerVersion: int = 0 # value of VK_HEADER_VERSION
extensions: dict[str, Extension] = field(default_factory=dict, init=False)
versions: dict[str, Version] = field(default_factory=dict, init=False)
handles: dict[str, Handle] = field(default_factory=dict, init=False)
commands: dict[str, Command] = field(default_factory=dict, init=False)
structs: dict[str, Struct] = field(default_factory=dict, init=False)
enums: dict[str, Enum] = field(default_factory=dict, init=False)
bitmasks: dict[str, Bitmask] = field(default_factory=dict, init=False)
formats: dict[str, Format] = field(default_factory=dict, init=False)
syncStage: list[SyncStage] = field(default_factory=list, init=False)
syncAccess: list[SyncAccess] = field(default_factory=list, init=False)
syncPipeline: list[SyncPipeline] = field(default_factory=list, init=False)
spirv: list[Spirv] = field(default_factory=list, init=False)
# ex) [ xlib : VK_USE_PLATFORM_XLIB_KHR ]
platforms: dict[str, str] = field(default_factory=dict, init=False)
# list of all vendor Suffix names (KHR, EXT, etc. )
vendorTags: list[str] = field(default_factory=list, init=False)
# ex) [ Queues.COMPUTE : VK_QUEUE_COMPUTE_BIT ]
queueBits: dict[IntFlag, str] = field(default_factory=dict, init=False)

View file

@ -12,7 +12,7 @@ add_test(NAME integration.add_subdirectory
--build-and-test ${CMAKE_CURRENT_LIST_DIR}/integration
${CMAKE_CURRENT_BINARY_DIR}/add_subdirectory
--build-generator ${CMAKE_GENERATOR}
--build-options -DFIND_PACKAGE_TESTING=OFF
--build-options -DFIND_PACKAGE_TESTING=OFF -DVULKAN_HEADERS_ENABLE_MODULE=${VULKAN_HEADERS_ENABLE_MODULE}
)
set(test_install_dir "${CMAKE_CURRENT_BINARY_DIR}/install")

View file

@ -5,9 +5,9 @@
#
# SPDX-License-Identifier: Apache-2.0
# ~~~
cmake_minimum_required(VERSION 3.14.2)
cmake_minimum_required(VERSION 3.22.1)
project(API LANGUAGES C)
project(API LANGUAGES C CXX)
if (FIND_PACKAGE_TESTING)
find_package(VulkanHeaders REQUIRED CONFIG)
@ -18,6 +18,9 @@ endif()
if (NOT TARGET Vulkan::Headers)
message(FATAL_ERROR "Vulkan::Headers target not defined")
endif()
if (NOT TARGET Vulkan::HppModule AND VULKAN_HEADERS_ENABLE_MODULE)
message(FATAL_ERROR "Vulkan::HppModule target not defined")
endif()
if (FIND_PACKAGE_TESTING)
if (NOT DEFINED VulkanHeaders_VERSION)
@ -37,6 +40,9 @@ if (NOT FIND_PACKAGE_TESTING)
if (NOT TARGET Vulkan-Headers)
message(FATAL_ERROR "Backcompat for Vulkan-Headers target broken!")
endif()
if (NOT TARGET Vulkan-HppModule AND VULKAN_HEADERS_ENABLE_MODULE)
message(FATAL_ERROR "Backcompat for Vulkan-HppModule target broken!")
endif()
endif()
set(CMAKE_C_STANDARD 99)
@ -71,3 +77,15 @@ 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)
# vulkan.hpp
add_library(vk_hpp MODULE ../vk_hpp.cpp)
target_compile_features(vk_hpp PUBLIC cxx_std_11)
target_link_libraries(vk_hpp PRIVATE Vulkan::Headers)
# vulkan.cppm
if (VULKAN_HEADERS_ENABLE_MODULE)
add_library(vk_hpp_module MODULE ../vk_hpp_module.cpp)
set_target_properties(vk_hpp_module PROPERTIES CXX_SCAN_FOR_MODULES ON)
target_link_libraries(vk_hpp_module PRIVATE Vulkan::HppModule)
endif()

13
tests/vk_hpp.cpp Normal file
View file

@ -0,0 +1,13 @@
/*
* Copyright 2025 The Khronos Group Inc.
* Copyright 2025 Valve Corporation
* Copyright 2025 LunarG, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <vulkan/vulkan.hpp>
int header_version()
{
return VK_HEADER_VERSION;
}

13
tests/vk_hpp_module.cpp Normal file
View file

@ -0,0 +1,13 @@
/*
* Copyright 2025 The Khronos Group Inc.
* Copyright 2025 Valve Corporation
* Copyright 2025 LunarG, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
import vulkan_hpp;
int test_version()
{
return static_cast<int>(vk::makeApiVersion(1, 0, 0, 0));
}