early-access version 1255
This commit is contained in:
34
externals/Vulkan-Headers/.cmake-format.py
vendored
Executable file
34
externals/Vulkan-Headers/.cmake-format.py
vendored
Executable file
@@ -0,0 +1,34 @@
|
||||
# Configuration for cmake-format (v0.4.1, circa Jul 2018)
|
||||
# https://github.com/cheshirekow/cmake_format
|
||||
|
||||
# How wide to allow formatted cmake files
|
||||
line_width = 132
|
||||
|
||||
# How many spaces to tab for indent
|
||||
tab_size = 4
|
||||
|
||||
# If arglists are longer than this, break them always
|
||||
max_subargs_per_line = 3
|
||||
|
||||
# If true, separate flow control names from their parentheses with a space
|
||||
separate_ctrl_name_with_space = False
|
||||
|
||||
# If true, separate function names from parentheses with a space
|
||||
separate_fn_name_with_space = False
|
||||
|
||||
# If a statement is wrapped to more than one line, than dangle the closing
|
||||
# parenthesis on it's own line
|
||||
dangle_parens = False
|
||||
|
||||
# What character to use for bulleted lists
|
||||
bullet_char = u'*'
|
||||
|
||||
# What character to use as punctuation after numerals in an enumerated list
|
||||
enum_char = u'.'
|
||||
|
||||
# What style line endings to use in the output.
|
||||
line_ending = u'unix'
|
||||
|
||||
# Format command names consistently as 'lower' or 'upper' case
|
||||
command_case = u'lower'
|
||||
|
16
externals/Vulkan-Headers/.gitattributes
vendored
Executable file
16
externals/Vulkan-Headers/.gitattributes
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
# See https://git-scm.com/docs/gitattributes
|
||||
# See https://help.github.com/articles/dealing-with-line-endings/
|
||||
|
||||
# Default behavior, if core.autocrlf is unset.
|
||||
* text=auto
|
||||
|
||||
# Files to be converted to native line endings on checkout.
|
||||
*.cpp text
|
||||
*.h text
|
||||
|
||||
# Text files to always have CRLF (dos) line endings on checkout.
|
||||
*.bat text eol=crlf
|
||||
|
||||
# Text files to always have LF (unix) line endings on checkout.
|
||||
*.sh text eol=lf
|
||||
|
6
externals/Vulkan-Headers/.gitignore
vendored
Executable file
6
externals/Vulkan-Headers/.gitignore
vendored
Executable file
@@ -0,0 +1,6 @@
|
||||
# Python cache
|
||||
__pycache__
|
||||
*.pyc
|
||||
build
|
||||
.vscode/
|
||||
**/.*.swp
|
54
externals/Vulkan-Headers/BUILD.gn
vendored
Executable file
54
externals/Vulkan-Headers/BUILD.gn
vendored
Executable file
@@ -0,0 +1,54 @@
|
||||
# Copyright (C) 2018-2019 The ANGLE Project Authors.
|
||||
# Copyright (C) 2019 LunarG, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build_overrides/vulkan_headers.gni")
|
||||
|
||||
config("vulkan_headers_config") {
|
||||
include_dirs = [ "include" ]
|
||||
|
||||
if (is_win) {
|
||||
defines = [ "VK_USE_PLATFORM_WIN32_KHR" ]
|
||||
}
|
||||
if (defined(vulkan_use_x11) && vulkan_use_x11) {
|
||||
defines = [ "VK_USE_PLATFORM_XCB_KHR" ]
|
||||
}
|
||||
if (is_android) {
|
||||
defines = [ "VK_USE_PLATFORM_ANDROID_KHR" ]
|
||||
}
|
||||
if (is_fuchsia) {
|
||||
defines = [ "VK_USE_PLATFORM_FUCHSIA" ]
|
||||
}
|
||||
if (is_mac) {
|
||||
defines = [ "VK_USE_PLATFORM_METAL_EXT" ]
|
||||
}
|
||||
if (defined(is_ggp) && is_ggp) {
|
||||
defines = [ "VK_USE_PLATFORM_GGP" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Vulkan headers only, no compiled sources.
|
||||
source_set("vulkan_headers") {
|
||||
sources = [
|
||||
"include/vulkan/vk_icd.h",
|
||||
"include/vulkan/vk_layer.h",
|
||||
"include/vulkan/vk_platform.h",
|
||||
"include/vulkan/vk_sdk_platform.h",
|
||||
"include/vulkan/vulkan.h",
|
||||
"include/vulkan/vulkan.hpp",
|
||||
"include/vulkan/vulkan_core.h",
|
||||
]
|
||||
public_configs = [ ":vulkan_headers_config" ]
|
||||
}
|
||||
|
274
externals/Vulkan-Headers/BUILD.md
vendored
Executable file
274
externals/Vulkan-Headers/BUILD.md
vendored
Executable file
@@ -0,0 +1,274 @@
|
||||
# Build Instructions
|
||||
|
||||
Instructions for building this repository on Windows, Linux, and MacOS.
|
||||
|
||||
## Index
|
||||
|
||||
1. [Contributing](#contributing-to-the-repository)
|
||||
1. [Repository Content](#repository-content)
|
||||
1. [Repository Set-up](#repository-set-up)
|
||||
1. [Windows Build](#building-on-windows)
|
||||
1. [Linux Build](#building-on-linux)
|
||||
1. [MacOS Build](#building-on-macos)
|
||||
|
||||
## Contributing to the Repository
|
||||
|
||||
The contents of this repository are sourced primarily from the Khronos Vulkan
|
||||
API specification [repository](https://github.com/KhronosGroup/Vulkan-Docs).
|
||||
Please visit that repository for information on contributing.
|
||||
|
||||
## Repository Content
|
||||
|
||||
This repository contains the Vulkan header files and the Vulkan API definition
|
||||
(registry) with its related files. This repository does not create libraries
|
||||
or executables.
|
||||
|
||||
However, this repository contains CMake build configuration files to "install"
|
||||
the files from this repository to a specific install directory. For example,
|
||||
you can install the files to a system directory such as `/usr/local` on Linux.
|
||||
|
||||
If you are building other Vulkan-related repositories such as
|
||||
[Vulkan-Loader](https://github.com/KhronosGroup/Vulkan-Loader),
|
||||
you need to build the install target of this repository and provide the
|
||||
resulting install directory to those repositories.
|
||||
|
||||
### Installed Files
|
||||
|
||||
The `install` target installs the following files under the directory
|
||||
indicated by *install_dir*:
|
||||
|
||||
- *install_dir*`/include/vulkan` : The header files found in the
|
||||
`include/vulkan` directory of this repository
|
||||
- *install_dir*`/share/vulkan/registry` : The registry files found in the
|
||||
`registry` directory of this repository
|
||||
|
||||
The `uninstall` target can be used to remove the above files from the install
|
||||
directory.
|
||||
|
||||
## Repository Set-Up
|
||||
|
||||
### Download the Repository
|
||||
|
||||
To create your local git repository:
|
||||
|
||||
git clone https://github.com/KhronosGroup/Vulkan-Headers.git
|
||||
|
||||
### Repository Dependencies
|
||||
|
||||
This repository does not depend on any other repositories.
|
||||
|
||||
### Build and Install Directories
|
||||
|
||||
A common convention is to place the build directory in the top directory of
|
||||
the repository with a name of `build` and place the install directory as a
|
||||
child of the build directory with the name `install`. The remainder of these
|
||||
instructions follow this convention, although you can use any name for these
|
||||
directories and place them in any location.
|
||||
|
||||
## Building On Windows
|
||||
|
||||
### Windows Development Environment Requirements
|
||||
|
||||
- Windows
|
||||
- Any Personal Computer version supported by Microsoft
|
||||
- Microsoft [Visual Studio](https://www.visualstudio.com/)
|
||||
- Versions
|
||||
- [2015](https://www.visualstudio.com/vs/older-downloads/)
|
||||
- [2017](https://www.visualstudio.com/vs/older-downloads/)
|
||||
- [2019](https://www.visualstudio.com/vs/downloads/)
|
||||
- The Community Edition of each of the above versions is sufficient, as
|
||||
well as any more capable edition.
|
||||
- [CMake 3.10.2](https://cmake.org/files/v3.10/cmake-3.10.2-win64-x64.zip) is recommended.
|
||||
- Use the installer option to add CMake to the system PATH
|
||||
- Git Client Support
|
||||
- [Git for Windows](http://git-scm.com/download/win) is a popular solution
|
||||
for Windows
|
||||
- Some IDEs (e.g., [Visual Studio](https://www.visualstudio.com/),
|
||||
[GitHub Desktop](https://desktop.github.com/)) have integrated
|
||||
Git client support
|
||||
|
||||
### Windows Build - Microsoft Visual Studio
|
||||
|
||||
The general approach is to run CMake to generate the Visual Studio project
|
||||
files. Then either run CMake with the `--build` option to build from the
|
||||
command line or use the Visual Studio IDE to open the generated solution and
|
||||
work with the solution interactively.
|
||||
|
||||
#### Windows Quick Start
|
||||
|
||||
From a "Developer Command Prompt for VS 201x" console:
|
||||
|
||||
cd Vulkan-Headers
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake --build . --target install
|
||||
|
||||
See below for the details.
|
||||
|
||||
#### Use `CMake` to Create the Visual Studio Project Files
|
||||
|
||||
From within a "Developer Command Prompt for VS 201x" console, change your
|
||||
current directory to the top of the cloned repository directory, create a
|
||||
build directory and generate the Visual Studio project files:
|
||||
|
||||
cd Vulkan-Headers
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
|
||||
> Note: The `..` parameter tells `cmake` the location of the top of the
|
||||
> repository. If you place your build directory someplace else, you'll need to
|
||||
> specify the location of the repository top differently.
|
||||
|
||||
The CMake configuration files set the default install directory location to
|
||||
`$CMAKE_BINARY_DIR\install`, which is a child of your build directory. In this
|
||||
example, the install directory becomes the `Vulkan-Headers\build\install`
|
||||
directory.
|
||||
|
||||
The project installs the header files to
|
||||
|
||||
Vulkan-Headers\build\install\include\vulkan
|
||||
|
||||
and installs the registry files to
|
||||
|
||||
Vulkan-Headers\build\install\share\vulkan\registry
|
||||
|
||||
You can change the install directory with the `CMAKE_INSTALL_PREFIX` CMake
|
||||
variable.
|
||||
|
||||
For example:
|
||||
|
||||
cd Vulkan-Headers
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/c/Users/dev/install .. # MINGW64 shell
|
||||
|
||||
As it starts generating the project files, `cmake` responds with something
|
||||
like:
|
||||
|
||||
-- Building for: Visual Studio 14 2015
|
||||
|
||||
which is a 32-bit generator.
|
||||
|
||||
Since this repository does not compile anything, there is no need to specify a
|
||||
specific generator such as "Visual Studio 14 2015 Win64", so the default
|
||||
generator should suffice.
|
||||
|
||||
The above steps create a Windows solution file named `Vulkan-Headers.sln` in
|
||||
the build directory.
|
||||
|
||||
At this point, you can build the solution from the command line or open the
|
||||
generated solution with Visual Studio.
|
||||
|
||||
#### Build the Solution From the Command Line
|
||||
|
||||
While still in the build directory:
|
||||
|
||||
cmake --build . --target install
|
||||
|
||||
to build the install target.
|
||||
|
||||
Build the `uninstall` target to remove the files from the install directory.
|
||||
|
||||
cmake --build . --target uninstall
|
||||
|
||||
#### Build the Solution With Visual Studio
|
||||
|
||||
Launch Visual Studio and open the "Vulkan-Headers.sln" solution file in the
|
||||
build directory. Build the `INSTALL` target from the Visual Studio solution
|
||||
explorer.
|
||||
|
||||
Build the `uninstall` target to remove the files from the install directory.
|
||||
|
||||
> Note: Since there are only the `INSTALL` and `uninstall` projects in the
|
||||
> solution, building the solution from the command line may be more efficient
|
||||
> than starting Visual Studio for these simple operations.
|
||||
|
||||
## Building On Linux
|
||||
|
||||
### Linux Development Environment Requirements
|
||||
|
||||
There are no specific Linux distribution or compiler version requirements for
|
||||
building this repository. The required tools are
|
||||
|
||||
- [CMake 3.10.2](https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.tar.gz) is recommended.
|
||||
- git
|
||||
|
||||
### Linux Build
|
||||
|
||||
The general approach is to run CMake to generate make files. Then either run
|
||||
CMake with the `--build` option or `make` to build from the command line.
|
||||
|
||||
#### Linux Quick Start
|
||||
|
||||
cd Vulkan-Headers
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=install ..
|
||||
make install
|
||||
|
||||
See below for the details.
|
||||
|
||||
#### Use CMake to Create the Make Files
|
||||
|
||||
Change your current directory to the top of the cloned repository directory,
|
||||
create a build directory and generate the make files:
|
||||
|
||||
cd Vulkan-Headers
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=install ..
|
||||
|
||||
> Note: The `..` parameter tells `cmake` the location of the top of the
|
||||
> repository. If you place your `build` directory someplace else, you'll need
|
||||
> to specify the location of the repository top differently.
|
||||
|
||||
Set the `CMAKE_INSTALL_PREFIX` variable to the directory to serve as the
|
||||
destination directory for the `install` target.
|
||||
|
||||
The above `cmake` command sets the install directory to
|
||||
`$CMAKE_BINARY_DIR/install`, which is a child of your `build` directory. In
|
||||
this example, the install directory becomes the `Vulkan-Headers/build/install`
|
||||
directory.
|
||||
|
||||
The make file install target installs the header files to
|
||||
|
||||
Vulkan-Headers/build/install/include/vulkan
|
||||
|
||||
and installs the registry files to
|
||||
|
||||
Vulkan-Headers/build/install/share/vulkan/registry
|
||||
|
||||
> Note: For Linux, the default value for `CMAKE_INSTALL_PREFIX` is
|
||||
> `/usr/local`, which would be used if you do not specify
|
||||
> `CMAKE_INSTALL_PREFIX`. In this case, you may need to use `sudo` to install
|
||||
> to system directories later when you run `make install`.
|
||||
|
||||
Note that after generating the make files, running `make`:
|
||||
|
||||
make
|
||||
|
||||
does nothing, since there are no libraries or executables to build.
|
||||
|
||||
To install the header files:
|
||||
|
||||
make install
|
||||
|
||||
or
|
||||
|
||||
cmake --build . --target install
|
||||
|
||||
To uninstall the files from the install directories, you can execute:
|
||||
|
||||
make uninstall
|
||||
|
||||
or
|
||||
|
||||
cmake --build . --target uninstall
|
||||
|
||||
## Building on MacOS
|
||||
|
||||
The instructions for building this repository on MacOS are similar to those for Linux.
|
||||
|
||||
[CMake 3.10.2](https://cmake.org/files/v3.10/cmake-3.10.2-Darwin-x86_64.tar.gz) is recommended.
|
58
externals/Vulkan-Headers/CMakeLists.txt
vendored
Executable file
58
externals/Vulkan-Headers/CMakeLists.txt
vendored
Executable file
@@ -0,0 +1,58 @@
|
||||
# ~~~
|
||||
# Copyright (c) 2018 Valve Corporation
|
||||
# Copyright (c) 2018 LunarG, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# ~~~
|
||||
|
||||
# CMake project initialization ---------------------------------------------------------------------------------------------------
|
||||
# This section contains pre-project() initialization, and ends with the project() command.
|
||||
|
||||
cmake_minimum_required(VERSION 3.10.2)
|
||||
|
||||
# NONE = this project has no language toolchain requirement.
|
||||
project(Vulkan-Headers NONE)
|
||||
|
||||
# User-interface declarations ----------------------------------------------------------------------------------------------------
|
||||
# This section contains variables that affect development GUIs (e.g. CMake GUI and IDEs), such as option(), folders, and variables
|
||||
# with the CACHE property.
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
if(WIN32 AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
# Windows: if install locations not set by user, set install prefix to "<build_dir>\install".
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "default install path" FORCE)
|
||||
endif()
|
||||
|
||||
# --------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# define exported targets for nested project builds to consume
|
||||
add_library(Vulkan-Headers INTERFACE)
|
||||
target_include_directories(Vulkan-Headers INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
add_library(Vulkan::Headers ALIAS Vulkan-Headers)
|
||||
|
||||
add_library(Vulkan-Registry INTERFACE)
|
||||
target_include_directories(Vulkan-Registry INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/registry")
|
||||
add_library(Vulkan::Registry ALIAS Vulkan-Registry)
|
||||
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/vulkan" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/registry" DESTINATION ${CMAKE_INSTALL_DATADIR}/vulkan)
|
||||
|
||||
# uninstall target
|
||||
if(NOT TARGET uninstall)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
||||
IMMEDIATE
|
||||
@ONLY)
|
||||
add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|
||||
endif()
|
1
externals/Vulkan-Headers/CODE_OF_CONDUCT.md
vendored
Executable file
1
externals/Vulkan-Headers/CODE_OF_CONDUCT.md
vendored
Executable file
@@ -0,0 +1 @@
|
||||
A reminder that this issue tracker is managed by the Khronos Group. Interactions here should follow the Khronos Code of Conduct (https://www.khronos.org/developers/code-of-conduct), which prohibits aggressive or derogatory language. Please keep the discussion friendly and civil.
|
202
externals/Vulkan-Headers/LICENSE.txt
vendored
Executable file
202
externals/Vulkan-Headers/LICENSE.txt
vendored
Executable file
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
35
externals/Vulkan-Headers/README.md
vendored
Executable file
35
externals/Vulkan-Headers/README.md
vendored
Executable file
@@ -0,0 +1,35 @@
|
||||
# Vulkan-Headers
|
||||
|
||||
Vulkan header files and API registry
|
||||
|
||||
## Repository Content
|
||||
|
||||
The contents of this repository are largely obtained from other repositories and are
|
||||
collected, coordinated, and curated here.
|
||||
|
||||
Do not propose pull requests to this repository which modify any files under
|
||||
include/vulkan/ or registry/. All such files are generated from the
|
||||
Vulkan-Docs repository and, in the case of include/vulkan/vulkan.hpp, the
|
||||
Vulkan-Hpp repository. Any changes must be made in those repositories.
|
||||
|
||||
The projects for these repositories are:
|
||||
|
||||
- [KhronosGroup/Vulkan-Docs](https://github.com/KhronosGroup/Vulkan-Docs)
|
||||
- Core Vulkan headers and Registry
|
||||
- [KhronosGroup/Vulkan-Hpp](https://github.com/KhronosGroup/Vulkan-Hpp)
|
||||
- C++ Bindings for Vulkan
|
||||
|
||||
Please visit the appropriate project in the above list for obtaining additional information,
|
||||
asking questions, or opening issues.
|
||||
|
||||
## Version Tagging Scheme
|
||||
|
||||
Updates to the `Vulkan-Headers` repository which correspond to a new Vulkan
|
||||
specification release are tagged using the following format:
|
||||
`v<`_`version`_`>` (e.g., `v1.1.96`).
|
||||
|
||||
**Note**: Marked version releases have undergone thorough testing but do not
|
||||
imply the same quality level as SDK tags. SDK tags follow the
|
||||
`sdk-<`_`version`_`>.<`_`patch`_`>` format (e.g., `sdk-1.1.92.0`).
|
||||
|
||||
This scheme was adopted following the 1.1.96 Vulkan specification release.
|
126
externals/Vulkan-Headers/cmake/Copyright_cmake.txt
vendored
Executable file
126
externals/Vulkan-Headers/cmake/Copyright_cmake.txt
vendored
Executable file
@@ -0,0 +1,126 @@
|
||||
CMake - Cross Platform Makefile Generator
|
||||
Copyright 2000-2018 Kitware, Inc. and Contributors
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of Kitware, Inc. nor the names of Contributors
|
||||
may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
The following individuals and institutions are among the Contributors:
|
||||
|
||||
* Aaron C. Meadows <cmake@shadowguarddev.com>
|
||||
* Adriaan de Groot <groot@kde.org>
|
||||
* Aleksey Avdeev <solo@altlinux.ru>
|
||||
* Alexander Neundorf <neundorf@kde.org>
|
||||
* Alexander Smorkalov <alexander.smorkalov@itseez.com>
|
||||
* Alexey Sokolov <sokolov@google.com>
|
||||
* Alex Turbov <i.zaufi@gmail.com>
|
||||
* Andreas Pakulat <apaku@gmx.de>
|
||||
* Andreas Schneider <asn@cryptomilk.org>
|
||||
* André Rigland Brodtkorb <Andre.Brodtkorb@ifi.uio.no>
|
||||
* Axel Huebl, Helmholtz-Zentrum Dresden - Rossendorf
|
||||
* Benjamin Eikel
|
||||
* Bjoern Ricks <bjoern.ricks@gmail.com>
|
||||
* Brad Hards <bradh@kde.org>
|
||||
* Christopher Harvey
|
||||
* Christoph Grüninger <foss@grueninger.de>
|
||||
* Clement Creusot <creusot@cs.york.ac.uk>
|
||||
* Daniel Blezek <blezek@gmail.com>
|
||||
* Daniel Pfeifer <daniel@pfeifer-mail.de>
|
||||
* Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
|
||||
* Eran Ifrah <eran.ifrah@gmail.com>
|
||||
* Esben Mose Hansen, Ange Optimization ApS
|
||||
* Geoffrey Viola <geoffrey.viola@asirobots.com>
|
||||
* Google Inc
|
||||
* Gregor Jasny
|
||||
* Helio Chissini de Castro <helio@kde.org>
|
||||
* Ilya Lavrenov <ilya.lavrenov@itseez.com>
|
||||
* Insight Software Consortium <insightsoftwareconsortium.org>
|
||||
* Jan Woetzel
|
||||
* Kelly Thompson <kgt@lanl.gov>
|
||||
* Konstantin Podsvirov <konstantin@podsvirov.pro>
|
||||
* Mario Bensi <mbensi@ipsquad.net>
|
||||
* Mathieu Malaterre <mathieu.malaterre@gmail.com>
|
||||
* Matthaeus G. Chajdas
|
||||
* Matthias Kretz <kretz@kde.org>
|
||||
* Matthias Maennich <matthias@maennich.net>
|
||||
* Michael Stürmer
|
||||
* Miguel A. Figueroa-Villanueva
|
||||
* Mike Jackson
|
||||
* Mike McQuaid <mike@mikemcquaid.com>
|
||||
* Nicolas Bock <nicolasbock@gmail.com>
|
||||
* Nicolas Despres <nicolas.despres@gmail.com>
|
||||
* Nikita Krupen'ko <krnekit@gmail.com>
|
||||
* NVIDIA Corporation <www.nvidia.com>
|
||||
* OpenGamma Ltd. <opengamma.com>
|
||||
* Patrick Stotko <stotko@cs.uni-bonn.de>
|
||||
* Per Øyvind Karlsen <peroyvind@mandriva.org>
|
||||
* Peter Collingbourne <peter@pcc.me.uk>
|
||||
* Petr Gotthard <gotthard@honeywell.com>
|
||||
* Philip Lowman <philip@yhbt.com>
|
||||
* Philippe Proulx <pproulx@efficios.com>
|
||||
* Raffi Enficiaud, Max Planck Society
|
||||
* Raumfeld <raumfeld.com>
|
||||
* Roger Leigh <rleigh@codelibre.net>
|
||||
* Rolf Eike Beer <eike@sf-mail.de>
|
||||
* Roman Donchenko <roman.donchenko@itseez.com>
|
||||
* Roman Kharitonov <roman.kharitonov@itseez.com>
|
||||
* Ruslan Baratov
|
||||
* Sebastian Holtermann <sebholt@xwmw.org>
|
||||
* Stephen Kelly <steveire@gmail.com>
|
||||
* Sylvain Joubert <joubert.sy@gmail.com>
|
||||
* Thomas Sondergaard <ts@medical-insight.com>
|
||||
* Tobias Hunger <tobias.hunger@qt.io>
|
||||
* Todd Gamblin <tgamblin@llnl.gov>
|
||||
* Tristan Carel
|
||||
* University of Dundee
|
||||
* Vadim Zhukov
|
||||
* Will Dicharry <wdicharry@stellarscience.com>
|
||||
|
||||
See version control history for details of individual contributions.
|
||||
|
||||
The above copyright and license notice applies to distributions of
|
||||
CMake in source and binary form. Third-party software packages supplied
|
||||
with CMake under compatible licenses provide their own copyright notices
|
||||
documented in corresponding subdirectories or source files.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
CMake was initially developed by Kitware with the following sponsorship:
|
||||
|
||||
* National Library of Medicine at the National Institutes of Health
|
||||
as part of the Insight Segmentation and Registration Toolkit (ITK).
|
||||
|
||||
* US National Labs (Los Alamos, Livermore, Sandia) ASC Parallel
|
||||
Visualization Initiative.
|
||||
|
||||
* National Alliance for Medical Image Computing (NAMIC) is funded by the
|
||||
National Institutes of Health through the NIH Roadmap for Medical Research,
|
||||
Grant U54 EB005149.
|
||||
|
||||
* Kitware, Inc.
|
21
externals/Vulkan-Headers/cmake/cmake_uninstall.cmake.in
vendored
Executable file
21
externals/Vulkan-Headers/cmake/cmake_uninstall.cmake.in
vendored
Executable file
@@ -0,0 +1,21 @@
|
||||
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
|
||||
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
foreach(file ${files})
|
||||
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
|
||||
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
exec_program(
|
||||
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RETURN_VALUE rm_retval
|
||||
)
|
||||
if(NOT "${rm_retval}" STREQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
|
||||
endif(NOT "${rm_retval}" STREQUAL 0)
|
||||
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
|
||||
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
|
||||
endforeach(file)
|
183
externals/Vulkan-Headers/include/vulkan/vk_icd.h
vendored
Executable file
183
externals/Vulkan-Headers/include/vulkan/vk_icd.h
vendored
Executable file
@@ -0,0 +1,183 @@
|
||||
//
|
||||
// File: vk_icd.h
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2015-2016 The Khronos Group Inc.
|
||||
* Copyright (c) 2015-2016 Valve Corporation
|
||||
* Copyright (c) 2015-2016 LunarG, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef VKICD_H
|
||||
#define VKICD_H
|
||||
|
||||
#include "vulkan.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
// Loader-ICD version negotiation API. Versions add the following features:
|
||||
// Version 0 - Initial. Doesn't support vk_icdGetInstanceProcAddr
|
||||
// or vk_icdNegotiateLoaderICDInterfaceVersion.
|
||||
// Version 1 - Add support for vk_icdGetInstanceProcAddr.
|
||||
// Version 2 - Add Loader/ICD Interface version negotiation
|
||||
// via vk_icdNegotiateLoaderICDInterfaceVersion.
|
||||
// Version 3 - Add ICD creation/destruction of KHR_surface objects.
|
||||
// Version 4 - Add unknown physical device extension qyering via
|
||||
// vk_icdGetPhysicalDeviceProcAddr.
|
||||
// Version 5 - Tells ICDs that the loader is now paying attention to the
|
||||
// application version of Vulkan passed into the ApplicationInfo
|
||||
// structure during vkCreateInstance. This will tell the ICD
|
||||
// that if the loader is older, it should automatically fail a
|
||||
// call for any API version > 1.0. Otherwise, the loader will
|
||||
// manually determine if it can support the expected version.
|
||||
#define CURRENT_LOADER_ICD_INTERFACE_VERSION 5
|
||||
#define MIN_SUPPORTED_LOADER_ICD_INTERFACE_VERSION 0
|
||||
#define MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION 4
|
||||
typedef VkResult(VKAPI_PTR *PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t *pVersion);
|
||||
|
||||
// This is defined in vk_layer.h which will be found by the loader, but if an ICD is building against this
|
||||
// file directly, it won't be found.
|
||||
#ifndef PFN_GetPhysicalDeviceProcAddr
|
||||
typedef PFN_vkVoidFunction(VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char *pName);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The ICD must reserve space for a pointer for the loader's dispatch
|
||||
* table, at the start of <each object>.
|
||||
* The ICD must initialize this variable using the SET_LOADER_MAGIC_VALUE macro.
|
||||
*/
|
||||
|
||||
#define ICD_LOADER_MAGIC 0x01CDC0DE
|
||||
|
||||
typedef union {
|
||||
uintptr_t loaderMagic;
|
||||
void *loaderData;
|
||||
} VK_LOADER_DATA;
|
||||
|
||||
static inline void set_loader_magic_value(void *pNewObject) {
|
||||
VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject;
|
||||
loader_info->loaderMagic = ICD_LOADER_MAGIC;
|
||||
}
|
||||
|
||||
static inline bool valid_loader_magic_value(void *pNewObject) {
|
||||
const VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject;
|
||||
return (loader_info->loaderMagic & 0xffffffff) == ICD_LOADER_MAGIC;
|
||||
}
|
||||
|
||||
/*
|
||||
* Windows and Linux ICDs will treat VkSurfaceKHR as a pointer to a struct that
|
||||
* contains the platform-specific connection and surface information.
|
||||
*/
|
||||
typedef enum {
|
||||
VK_ICD_WSI_PLATFORM_MIR,
|
||||
VK_ICD_WSI_PLATFORM_WAYLAND,
|
||||
VK_ICD_WSI_PLATFORM_WIN32,
|
||||
VK_ICD_WSI_PLATFORM_XCB,
|
||||
VK_ICD_WSI_PLATFORM_XLIB,
|
||||
VK_ICD_WSI_PLATFORM_ANDROID,
|
||||
VK_ICD_WSI_PLATFORM_MACOS,
|
||||
VK_ICD_WSI_PLATFORM_IOS,
|
||||
VK_ICD_WSI_PLATFORM_DISPLAY,
|
||||
VK_ICD_WSI_PLATFORM_HEADLESS,
|
||||
VK_ICD_WSI_PLATFORM_METAL,
|
||||
} VkIcdWsiPlatform;
|
||||
|
||||
typedef struct {
|
||||
VkIcdWsiPlatform platform;
|
||||
} VkIcdSurfaceBase;
|
||||
|
||||
#ifdef VK_USE_PLATFORM_MIR_KHR
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
MirConnection *connection;
|
||||
MirSurface *mirSurface;
|
||||
} VkIcdSurfaceMir;
|
||||
#endif // VK_USE_PLATFORM_MIR_KHR
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
struct wl_display *display;
|
||||
struct wl_surface *surface;
|
||||
} VkIcdSurfaceWayland;
|
||||
#endif // VK_USE_PLATFORM_WAYLAND_KHR
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
HINSTANCE hinstance;
|
||||
HWND hwnd;
|
||||
} VkIcdSurfaceWin32;
|
||||
#endif // VK_USE_PLATFORM_WIN32_KHR
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XCB_KHR
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
xcb_connection_t *connection;
|
||||
xcb_window_t window;
|
||||
} VkIcdSurfaceXcb;
|
||||
#endif // VK_USE_PLATFORM_XCB_KHR
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_KHR
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
Display *dpy;
|
||||
Window window;
|
||||
} VkIcdSurfaceXlib;
|
||||
#endif // VK_USE_PLATFORM_XLIB_KHR
|
||||
|
||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
struct ANativeWindow *window;
|
||||
} VkIcdSurfaceAndroid;
|
||||
#endif // VK_USE_PLATFORM_ANDROID_KHR
|
||||
|
||||
#ifdef VK_USE_PLATFORM_MACOS_MVK
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
const void *pView;
|
||||
} VkIcdSurfaceMacOS;
|
||||
#endif // VK_USE_PLATFORM_MACOS_MVK
|
||||
|
||||
#ifdef VK_USE_PLATFORM_IOS_MVK
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
const void *pView;
|
||||
} VkIcdSurfaceIOS;
|
||||
#endif // VK_USE_PLATFORM_IOS_MVK
|
||||
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
VkDisplayModeKHR displayMode;
|
||||
uint32_t planeIndex;
|
||||
uint32_t planeStackIndex;
|
||||
VkSurfaceTransformFlagBitsKHR transform;
|
||||
float globalAlpha;
|
||||
VkDisplayPlaneAlphaFlagBitsKHR alphaMode;
|
||||
VkExtent2D imageExtent;
|
||||
} VkIcdSurfaceDisplay;
|
||||
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
} VkIcdSurfaceHeadless;
|
||||
|
||||
#ifdef VK_USE_PLATFORM_METAL_EXT
|
||||
typedef struct {
|
||||
VkIcdSurfaceBase base;
|
||||
const CAMetalLayer *pLayer;
|
||||
} VkIcdSurfaceMetal;
|
||||
#endif // VK_USE_PLATFORM_METAL_EXT
|
||||
|
||||
#endif // VKICD_H
|
202
externals/Vulkan-Headers/include/vulkan/vk_layer.h
vendored
Executable file
202
externals/Vulkan-Headers/include/vulkan/vk_layer.h
vendored
Executable file
@@ -0,0 +1,202 @@
|
||||
//
|
||||
// File: vk_layer.h
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2015-2017 The Khronos Group Inc.
|
||||
* Copyright (c) 2015-2017 Valve Corporation
|
||||
* Copyright (c) 2015-2017 LunarG, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Need to define dispatch table
|
||||
* Core struct can then have ptr to dispatch table at the top
|
||||
* Along with object ptrs for current and next OBJ
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "vulkan.h"
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
|
||||
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
|
||||
#define VK_LAYER_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define VK_LAYER_EXPORT
|
||||
#endif
|
||||
|
||||
#define MAX_NUM_UNKNOWN_EXTS 250
|
||||
|
||||
// Loader-Layer version negotiation API. Versions add the following features:
|
||||
// Versions 0/1 - Initial. Doesn't support vk_layerGetPhysicalDeviceProcAddr
|
||||
// or vk_icdNegotiateLoaderLayerInterfaceVersion.
|
||||
// Version 2 - Add support for vk_layerGetPhysicalDeviceProcAddr and
|
||||
// vk_icdNegotiateLoaderLayerInterfaceVersion.
|
||||
#define CURRENT_LOADER_LAYER_INTERFACE_VERSION 2
|
||||
#define MIN_SUPPORTED_LOADER_LAYER_INTERFACE_VERSION 1
|
||||
|
||||
#define VK_CURRENT_CHAIN_VERSION 1
|
||||
|
||||
// Typedef for use in the interfaces below
|
||||
typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName);
|
||||
|
||||
// Version negotiation values
|
||||
typedef enum VkNegotiateLayerStructType {
|
||||
LAYER_NEGOTIATE_UNINTIALIZED = 0,
|
||||
LAYER_NEGOTIATE_INTERFACE_STRUCT = 1,
|
||||
} VkNegotiateLayerStructType;
|
||||
|
||||
// Version negotiation structures
|
||||
typedef struct VkNegotiateLayerInterface {
|
||||
VkNegotiateLayerStructType sType;
|
||||
void *pNext;
|
||||
uint32_t loaderLayerInterfaceVersion;
|
||||
PFN_vkGetInstanceProcAddr pfnGetInstanceProcAddr;
|
||||
PFN_vkGetDeviceProcAddr pfnGetDeviceProcAddr;
|
||||
PFN_GetPhysicalDeviceProcAddr pfnGetPhysicalDeviceProcAddr;
|
||||
} VkNegotiateLayerInterface;
|
||||
|
||||
// Version negotiation functions
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkNegotiateLoaderLayerInterfaceVersion)(VkNegotiateLayerInterface *pVersionStruct);
|
||||
|
||||
// Function prototype for unknown physical device extension command
|
||||
typedef VkResult(VKAPI_PTR *PFN_PhysDevExt)(VkPhysicalDevice phys_device);
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// CreateInstance and CreateDevice support structures
|
||||
|
||||
/* Sub type of structure for instance and device loader ext of CreateInfo.
|
||||
* When sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO
|
||||
* or sType == VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO
|
||||
* then VkLayerFunction indicates struct type pointed to by pNext
|
||||
*/
|
||||
typedef enum VkLayerFunction_ {
|
||||
VK_LAYER_LINK_INFO = 0,
|
||||
VK_LOADER_DATA_CALLBACK = 1,
|
||||
VK_LOADER_LAYER_CREATE_DEVICE_CALLBACK = 2
|
||||
} VkLayerFunction;
|
||||
|
||||
typedef struct VkLayerInstanceLink_ {
|
||||
struct VkLayerInstanceLink_ *pNext;
|
||||
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
|
||||
PFN_GetPhysicalDeviceProcAddr pfnNextGetPhysicalDeviceProcAddr;
|
||||
} VkLayerInstanceLink;
|
||||
|
||||
/*
|
||||
* When creating the device chain the loader needs to pass
|
||||
* down information about it's device structure needed at
|
||||
* the end of the chain. Passing the data via the
|
||||
* VkLayerDeviceInfo avoids issues with finding the
|
||||
* exact instance being used.
|
||||
*/
|
||||
typedef struct VkLayerDeviceInfo_ {
|
||||
void *device_info;
|
||||
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
|
||||
} VkLayerDeviceInfo;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkSetInstanceLoaderData)(VkInstance instance,
|
||||
void *object);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkSetDeviceLoaderData)(VkDevice device,
|
||||
void *object);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkLayerCreateDevice)(VkInstance instance, VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo,
|
||||
const VkAllocationCallbacks *pAllocator, VkDevice *pDevice, PFN_vkGetInstanceProcAddr layerGIPA, PFN_vkGetDeviceProcAddr *nextGDPA);
|
||||
typedef void (VKAPI_PTR *PFN_vkLayerDestroyDevice)(VkDevice physicalDevice, const VkAllocationCallbacks *pAllocator, PFN_vkDestroyDevice destroyFunction);
|
||||
typedef struct {
|
||||
VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO
|
||||
const void *pNext;
|
||||
VkLayerFunction function;
|
||||
union {
|
||||
VkLayerInstanceLink *pLayerInfo;
|
||||
PFN_vkSetInstanceLoaderData pfnSetInstanceLoaderData;
|
||||
struct {
|
||||
PFN_vkLayerCreateDevice pfnLayerCreateDevice;
|
||||
PFN_vkLayerDestroyDevice pfnLayerDestroyDevice;
|
||||
} layerDevice;
|
||||
} u;
|
||||
} VkLayerInstanceCreateInfo;
|
||||
|
||||
typedef struct VkLayerDeviceLink_ {
|
||||
struct VkLayerDeviceLink_ *pNext;
|
||||
PFN_vkGetInstanceProcAddr pfnNextGetInstanceProcAddr;
|
||||
PFN_vkGetDeviceProcAddr pfnNextGetDeviceProcAddr;
|
||||
} VkLayerDeviceLink;
|
||||
|
||||
typedef struct {
|
||||
VkStructureType sType; // VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO
|
||||
const void *pNext;
|
||||
VkLayerFunction function;
|
||||
union {
|
||||
VkLayerDeviceLink *pLayerInfo;
|
||||
PFN_vkSetDeviceLoaderData pfnSetDeviceLoaderData;
|
||||
} u;
|
||||
} VkLayerDeviceCreateInfo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct);
|
||||
|
||||
typedef enum VkChainType {
|
||||
VK_CHAIN_TYPE_UNKNOWN = 0,
|
||||
VK_CHAIN_TYPE_ENUMERATE_INSTANCE_EXTENSION_PROPERTIES = 1,
|
||||
VK_CHAIN_TYPE_ENUMERATE_INSTANCE_LAYER_PROPERTIES = 2,
|
||||
VK_CHAIN_TYPE_ENUMERATE_INSTANCE_VERSION = 3,
|
||||
} VkChainType;
|
||||
|
||||
typedef struct VkChainHeader {
|
||||
VkChainType type;
|
||||
uint32_t version;
|
||||
uint32_t size;
|
||||
} VkChainHeader;
|
||||
|
||||
typedef struct VkEnumerateInstanceExtensionPropertiesChain {
|
||||
VkChainHeader header;
|
||||
VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceExtensionPropertiesChain *, const char *, uint32_t *,
|
||||
VkExtensionProperties *);
|
||||
const struct VkEnumerateInstanceExtensionPropertiesChain *pNextLink;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
inline VkResult CallDown(const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) const {
|
||||
return pfnNextLayer(pNextLink, pLayerName, pPropertyCount, pProperties);
|
||||
}
|
||||
#endif
|
||||
} VkEnumerateInstanceExtensionPropertiesChain;
|
||||
|
||||
typedef struct VkEnumerateInstanceLayerPropertiesChain {
|
||||
VkChainHeader header;
|
||||
VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceLayerPropertiesChain *, uint32_t *, VkLayerProperties *);
|
||||
const struct VkEnumerateInstanceLayerPropertiesChain *pNextLink;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
inline VkResult CallDown(uint32_t *pPropertyCount, VkLayerProperties *pProperties) const {
|
||||
return pfnNextLayer(pNextLink, pPropertyCount, pProperties);
|
||||
}
|
||||
#endif
|
||||
} VkEnumerateInstanceLayerPropertiesChain;
|
||||
|
||||
typedef struct VkEnumerateInstanceVersionChain {
|
||||
VkChainHeader header;
|
||||
VkResult(VKAPI_PTR *pfnNextLayer)(const struct VkEnumerateInstanceVersionChain *, uint32_t *);
|
||||
const struct VkEnumerateInstanceVersionChain *pNextLink;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
inline VkResult CallDown(uint32_t *pApiVersion) const {
|
||||
return pfnNextLayer(pNextLink, pApiVersion);
|
||||
}
|
||||
#endif
|
||||
} VkEnumerateInstanceVersionChain;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
82
externals/Vulkan-Headers/include/vulkan/vk_platform.h
vendored
Executable file
82
externals/Vulkan-Headers/include/vulkan/vk_platform.h
vendored
Executable file
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// File: vk_platform.h
|
||||
//
|
||||
/*
|
||||
** Copyright (c) 2014-2020 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
|
||||
#ifndef VK_PLATFORM_H_
|
||||
#define VK_PLATFORM_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif // __cplusplus
|
||||
|
||||
/*
|
||||
***************************************************************************************************
|
||||
* Platform-specific directives and type declarations
|
||||
***************************************************************************************************
|
||||
*/
|
||||
|
||||
/* Platform-specific calling convention macros.
|
||||
*
|
||||
* Platforms should define these so that Vulkan clients call Vulkan commands
|
||||
* with the same calling conventions that the Vulkan implementation expects.
|
||||
*
|
||||
* VKAPI_ATTR - Placed before the return type in function declarations.
|
||||
* Useful for C++11 and GCC/Clang-style function attribute syntax.
|
||||
* VKAPI_CALL - Placed after the return type in function declarations.
|
||||
* Useful for MSVC-style calling convention syntax.
|
||||
* VKAPI_PTR - Placed between the '(' and '*' in function pointer types.
|
||||
*
|
||||
* Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void);
|
||||
* Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void);
|
||||
*/
|
||||
#if defined(_WIN32)
|
||||
// On Windows, Vulkan commands use the stdcall convention
|
||||
#define VKAPI_ATTR
|
||||
#define VKAPI_CALL __stdcall
|
||||
#define VKAPI_PTR VKAPI_CALL
|
||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
|
||||
#error "Vulkan isn't supported for the 'armeabi' NDK ABI"
|
||||
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
|
||||
// On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
|
||||
// calling convention, i.e. float parameters are passed in registers. This
|
||||
// is true even if the rest of the application passes floats on the stack,
|
||||
// as it does by default when compiling for the armeabi-v7a NDK ABI.
|
||||
#define VKAPI_ATTR __attribute__((pcs("aapcs-vfp")))
|
||||
#define VKAPI_CALL
|
||||
#define VKAPI_PTR VKAPI_ATTR
|
||||
#else
|
||||
// On other platforms, use the default calling convention
|
||||
#define VKAPI_ATTR
|
||||
#define VKAPI_CALL
|
||||
#define VKAPI_PTR
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#if !defined(VK_NO_STDINT_H)
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#endif // !defined(VK_NO_STDINT_H)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif
|
69
externals/Vulkan-Headers/include/vulkan/vk_sdk_platform.h
vendored
Executable file
69
externals/Vulkan-Headers/include/vulkan/vk_sdk_platform.h
vendored
Executable file
@@ -0,0 +1,69 @@
|
||||
//
|
||||
// File: vk_sdk_platform.h
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2015-2016 The Khronos Group Inc.
|
||||
* Copyright (c) 2015-2016 Valve Corporation
|
||||
* Copyright (c) 2015-2016 LunarG, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef VK_SDK_PLATFORM_H
|
||||
#define VK_SDK_PLATFORM_H
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define NOMINMAX
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#define inline __inline
|
||||
#endif // __cplusplus
|
||||
|
||||
#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/)
|
||||
// C99:
|
||||
// Microsoft didn't implement C99 in Visual Studio; but started adding it with
|
||||
// VS2013. However, VS2013 still didn't have snprintf(). The following is a
|
||||
// work-around (Note: The _CRT_SECURE_NO_WARNINGS macro must be set in the
|
||||
// "CMakeLists.txt" file).
|
||||
// NOTE: This is fixed in Visual Studio 2015.
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#define strdup _strdup
|
||||
|
||||
#endif // _WIN32
|
||||
|
||||
// Check for noexcept support using clang, with fallback to Windows or GCC version numbers
|
||||
#ifndef NOEXCEPT
|
||||
#if defined(__clang__)
|
||||
#if __has_feature(cxx_noexcept)
|
||||
#define HAS_NOEXCEPT
|
||||
#endif
|
||||
#else
|
||||
#if defined(__GXX_EXPERIMENTAL_CXX0X__) && __GNUC__ * 10 + __GNUC_MINOR__ >= 46
|
||||
#define HAS_NOEXCEPT
|
||||
#else
|
||||
#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023026 && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS
|
||||
#define HAS_NOEXCEPT
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAS_NOEXCEPT
|
||||
#define NOEXCEPT noexcept
|
||||
#else
|
||||
#define NOEXCEPT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // VK_SDK_PLATFORM_H
|
81
externals/Vulkan-Headers/include/vulkan/vulkan.h
vendored
Executable file
81
externals/Vulkan-Headers/include/vulkan/vulkan.h
vendored
Executable file
@@ -0,0 +1,81 @@
|
||||
#ifndef VULKAN_H_
|
||||
#define VULKAN_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "vk_platform.h"
|
||||
#include "vulkan_core.h"
|
||||
|
||||
#ifdef VK_USE_PLATFORM_ANDROID_KHR
|
||||
#include "vulkan_android.h"
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_FUCHSIA
|
||||
#include <zircon/types.h>
|
||||
#include "vulkan_fuchsia.h"
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_IOS_MVK
|
||||
#include "vulkan_ios.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_MACOS_MVK
|
||||
#include "vulkan_macos.h"
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_METAL_EXT
|
||||
#include "vulkan_metal.h"
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_VI_NN
|
||||
#include "vulkan_vi.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
|
||||
#include <wayland-client.h>
|
||||
#include "vulkan_wayland.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_WIN32_KHR
|
||||
#include <windows.h>
|
||||
#include "vulkan_win32.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XCB_KHR
|
||||
#include <xcb/xcb.h>
|
||||
#include "vulkan_xcb.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_KHR
|
||||
#include <X11/Xlib.h>
|
||||
#include "vulkan_xlib.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#include "vulkan_xlib_xrandr.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_GGP
|
||||
#include <ggp_c/vulkan_types.h>
|
||||
#include "vulkan_ggp.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
#include "vulkan_beta.h"
|
||||
#endif
|
||||
|
||||
#endif // VULKAN_H_
|
87226
externals/Vulkan-Headers/include/vulkan/vulkan.hpp
vendored
Executable file
87226
externals/Vulkan-Headers/include/vulkan/vulkan.hpp
vendored
Executable file
File diff suppressed because it is too large
Load Diff
112
externals/Vulkan-Headers/include/vulkan/vulkan_android.h
vendored
Executable file
112
externals/Vulkan-Headers/include/vulkan/vulkan_android.h
vendored
Executable file
@@ -0,0 +1,112 @@
|
||||
#ifndef VULKAN_ANDROID_H_
|
||||
#define VULKAN_ANDROID_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 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
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_android_surface 1
|
||||
struct ANativeWindow;
|
||||
#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
|
||||
typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
|
||||
typedef struct VkAndroidSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkAndroidSurfaceCreateFlagsKHR flags;
|
||||
struct ANativeWindow* window;
|
||||
} VkAndroidSurfaceCreateInfoKHR;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_ANDROID_external_memory_android_hardware_buffer 1
|
||||
struct AHardwareBuffer;
|
||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3
|
||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
|
||||
typedef struct VkAndroidHardwareBufferUsageANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint64_t androidHardwareBufferUsage;
|
||||
} VkAndroidHardwareBufferUsageANDROID;
|
||||
|
||||
typedef struct VkAndroidHardwareBufferPropertiesANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkDeviceSize allocationSize;
|
||||
uint32_t memoryTypeBits;
|
||||
} VkAndroidHardwareBufferPropertiesANDROID;
|
||||
|
||||
typedef struct VkAndroidHardwareBufferFormatPropertiesANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkFormat format;
|
||||
uint64_t externalFormat;
|
||||
VkFormatFeatureFlags formatFeatures;
|
||||
VkComponentMapping samplerYcbcrConversionComponents;
|
||||
VkSamplerYcbcrModelConversion suggestedYcbcrModel;
|
||||
VkSamplerYcbcrRange suggestedYcbcrRange;
|
||||
VkChromaLocation suggestedXChromaOffset;
|
||||
VkChromaLocation suggestedYChromaOffset;
|
||||
} VkAndroidHardwareBufferFormatPropertiesANDROID;
|
||||
|
||||
typedef struct VkImportAndroidHardwareBufferInfoANDROID {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
struct AHardwareBuffer* buffer;
|
||||
} VkImportAndroidHardwareBufferInfoANDROID;
|
||||
|
||||
typedef struct VkMemoryGetAndroidHardwareBufferInfoANDROID {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceMemory memory;
|
||||
} VkMemoryGetAndroidHardwareBufferInfoANDROID;
|
||||
|
||||
typedef struct VkExternalFormatANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint64_t externalFormat;
|
||||
} VkExternalFormatANDROID;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetAndroidHardwareBufferPropertiesANDROID(
|
||||
VkDevice device,
|
||||
const struct AHardwareBuffer* buffer,
|
||||
VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryAndroidHardwareBufferANDROID(
|
||||
VkDevice device,
|
||||
const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
|
||||
struct AHardwareBuffer** pBuffer);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
428
externals/Vulkan-Headers/include/vulkan/vulkan_beta.h
vendored
Executable file
428
externals/Vulkan-Headers/include/vulkan/vulkan_beta.h
vendored
Executable file
@@ -0,0 +1,428 @@
|
||||
#ifndef VULKAN_BETA_H_
|
||||
#define VULKAN_BETA_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 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
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_deferred_host_operations 1
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeferredOperationKHR)
|
||||
#define VK_KHR_DEFERRED_HOST_OPERATIONS_SPEC_VERSION 3
|
||||
#define VK_KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME "VK_KHR_deferred_host_operations"
|
||||
typedef struct VkDeferredOperationInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeferredOperationKHR operationHandle;
|
||||
} VkDeferredOperationInfoKHR;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateDeferredOperationKHR)(VkDevice device, const VkAllocationCallbacks* pAllocator, VkDeferredOperationKHR* pDeferredOperation);
|
||||
typedef void (VKAPI_PTR *PFN_vkDestroyDeferredOperationKHR)(VkDevice device, VkDeferredOperationKHR operation, const VkAllocationCallbacks* pAllocator);
|
||||
typedef uint32_t (VKAPI_PTR *PFN_vkGetDeferredOperationMaxConcurrencyKHR)(VkDevice device, VkDeferredOperationKHR operation);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetDeferredOperationResultKHR)(VkDevice device, VkDeferredOperationKHR operation);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkDeferredOperationJoinKHR)(VkDevice device, VkDeferredOperationKHR operation);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDeferredOperationKHR(
|
||||
VkDevice device,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkDeferredOperationKHR* pDeferredOperation);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkDestroyDeferredOperationKHR(
|
||||
VkDevice device,
|
||||
VkDeferredOperationKHR operation,
|
||||
const VkAllocationCallbacks* pAllocator);
|
||||
|
||||
VKAPI_ATTR uint32_t VKAPI_CALL vkGetDeferredOperationMaxConcurrencyKHR(
|
||||
VkDevice device,
|
||||
VkDeferredOperationKHR operation);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetDeferredOperationResultKHR(
|
||||
VkDevice device,
|
||||
VkDeferredOperationKHR operation);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkDeferredOperationJoinKHR(
|
||||
VkDevice device,
|
||||
VkDeferredOperationKHR operation);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_KHR_pipeline_library 1
|
||||
#define VK_KHR_PIPELINE_LIBRARY_SPEC_VERSION 1
|
||||
#define VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME "VK_KHR_pipeline_library"
|
||||
typedef struct VkPipelineLibraryCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t libraryCount;
|
||||
const VkPipeline* pLibraries;
|
||||
} VkPipelineLibraryCreateInfoKHR;
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_ray_tracing 1
|
||||
#define VK_KHR_RAY_TRACING_SPEC_VERSION 8
|
||||
#define VK_KHR_RAY_TRACING_EXTENSION_NAME "VK_KHR_ray_tracing"
|
||||
|
||||
typedef enum VkAccelerationStructureBuildTypeKHR {
|
||||
VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR = 0,
|
||||
VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR = 1,
|
||||
VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR = 2,
|
||||
VK_ACCELERATION_STRUCTURE_BUILD_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkAccelerationStructureBuildTypeKHR;
|
||||
typedef union VkDeviceOrHostAddressKHR {
|
||||
VkDeviceAddress deviceAddress;
|
||||
void* hostAddress;
|
||||
} VkDeviceOrHostAddressKHR;
|
||||
|
||||
typedef union VkDeviceOrHostAddressConstKHR {
|
||||
VkDeviceAddress deviceAddress;
|
||||
const void* hostAddress;
|
||||
} VkDeviceOrHostAddressConstKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureBuildOffsetInfoKHR {
|
||||
uint32_t primitiveCount;
|
||||
uint32_t primitiveOffset;
|
||||
uint32_t firstVertex;
|
||||
uint32_t transformOffset;
|
||||
} VkAccelerationStructureBuildOffsetInfoKHR;
|
||||
|
||||
typedef struct VkRayTracingShaderGroupCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkRayTracingShaderGroupTypeKHR type;
|
||||
uint32_t generalShader;
|
||||
uint32_t closestHitShader;
|
||||
uint32_t anyHitShader;
|
||||
uint32_t intersectionShader;
|
||||
const void* pShaderGroupCaptureReplayHandle;
|
||||
} VkRayTracingShaderGroupCreateInfoKHR;
|
||||
|
||||
typedef struct VkRayTracingPipelineInterfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t maxPayloadSize;
|
||||
uint32_t maxAttributeSize;
|
||||
uint32_t maxCallableSize;
|
||||
} VkRayTracingPipelineInterfaceCreateInfoKHR;
|
||||
|
||||
typedef struct VkRayTracingPipelineCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkPipelineCreateFlags flags;
|
||||
uint32_t stageCount;
|
||||
const VkPipelineShaderStageCreateInfo* pStages;
|
||||
uint32_t groupCount;
|
||||
const VkRayTracingShaderGroupCreateInfoKHR* pGroups;
|
||||
uint32_t maxRecursionDepth;
|
||||
VkPipelineLibraryCreateInfoKHR libraries;
|
||||
const VkRayTracingPipelineInterfaceCreateInfoKHR* pLibraryInterface;
|
||||
VkPipelineLayout layout;
|
||||
VkPipeline basePipelineHandle;
|
||||
int32_t basePipelineIndex;
|
||||
} VkRayTracingPipelineCreateInfoKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureGeometryTrianglesDataKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkFormat vertexFormat;
|
||||
VkDeviceOrHostAddressConstKHR vertexData;
|
||||
VkDeviceSize vertexStride;
|
||||
VkIndexType indexType;
|
||||
VkDeviceOrHostAddressConstKHR indexData;
|
||||
VkDeviceOrHostAddressConstKHR transformData;
|
||||
} VkAccelerationStructureGeometryTrianglesDataKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureGeometryAabbsDataKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceOrHostAddressConstKHR data;
|
||||
VkDeviceSize stride;
|
||||
} VkAccelerationStructureGeometryAabbsDataKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureGeometryInstancesDataKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkBool32 arrayOfPointers;
|
||||
VkDeviceOrHostAddressConstKHR data;
|
||||
} VkAccelerationStructureGeometryInstancesDataKHR;
|
||||
|
||||
typedef union VkAccelerationStructureGeometryDataKHR {
|
||||
VkAccelerationStructureGeometryTrianglesDataKHR triangles;
|
||||
VkAccelerationStructureGeometryAabbsDataKHR aabbs;
|
||||
VkAccelerationStructureGeometryInstancesDataKHR instances;
|
||||
} VkAccelerationStructureGeometryDataKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureGeometryKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkGeometryTypeKHR geometryType;
|
||||
VkAccelerationStructureGeometryDataKHR geometry;
|
||||
VkGeometryFlagsKHR flags;
|
||||
} VkAccelerationStructureGeometryKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureBuildGeometryInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkAccelerationStructureTypeKHR type;
|
||||
VkBuildAccelerationStructureFlagsKHR flags;
|
||||
VkBool32 update;
|
||||
VkAccelerationStructureKHR srcAccelerationStructure;
|
||||
VkAccelerationStructureKHR dstAccelerationStructure;
|
||||
VkBool32 geometryArrayOfPointers;
|
||||
uint32_t geometryCount;
|
||||
const VkAccelerationStructureGeometryKHR* const* ppGeometries;
|
||||
VkDeviceOrHostAddressKHR scratchData;
|
||||
} VkAccelerationStructureBuildGeometryInfoKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureCreateGeometryTypeInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkGeometryTypeKHR geometryType;
|
||||
uint32_t maxPrimitiveCount;
|
||||
VkIndexType indexType;
|
||||
uint32_t maxVertexCount;
|
||||
VkFormat vertexFormat;
|
||||
VkBool32 allowsTransforms;
|
||||
} VkAccelerationStructureCreateGeometryTypeInfoKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceSize compactedSize;
|
||||
VkAccelerationStructureTypeKHR type;
|
||||
VkBuildAccelerationStructureFlagsKHR flags;
|
||||
uint32_t maxGeometryCount;
|
||||
const VkAccelerationStructureCreateGeometryTypeInfoKHR* pGeometryInfos;
|
||||
VkDeviceAddress deviceAddress;
|
||||
} VkAccelerationStructureCreateInfoKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureMemoryRequirementsInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkAccelerationStructureMemoryRequirementsTypeKHR type;
|
||||
VkAccelerationStructureBuildTypeKHR buildType;
|
||||
VkAccelerationStructureKHR accelerationStructure;
|
||||
} VkAccelerationStructureMemoryRequirementsInfoKHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceRayTracingFeaturesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkBool32 rayTracing;
|
||||
VkBool32 rayTracingShaderGroupHandleCaptureReplay;
|
||||
VkBool32 rayTracingShaderGroupHandleCaptureReplayMixed;
|
||||
VkBool32 rayTracingAccelerationStructureCaptureReplay;
|
||||
VkBool32 rayTracingIndirectTraceRays;
|
||||
VkBool32 rayTracingIndirectAccelerationStructureBuild;
|
||||
VkBool32 rayTracingHostAccelerationStructureCommands;
|
||||
VkBool32 rayQuery;
|
||||
VkBool32 rayTracingPrimitiveCulling;
|
||||
} VkPhysicalDeviceRayTracingFeaturesKHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceRayTracingPropertiesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint32_t shaderGroupHandleSize;
|
||||
uint32_t maxRecursionDepth;
|
||||
uint32_t maxShaderGroupStride;
|
||||
uint32_t shaderGroupBaseAlignment;
|
||||
uint64_t maxGeometryCount;
|
||||
uint64_t maxInstanceCount;
|
||||
uint64_t maxPrimitiveCount;
|
||||
uint32_t maxDescriptorSetAccelerationStructures;
|
||||
uint32_t shaderGroupHandleCaptureReplaySize;
|
||||
} VkPhysicalDeviceRayTracingPropertiesKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureDeviceAddressInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkAccelerationStructureKHR accelerationStructure;
|
||||
} VkAccelerationStructureDeviceAddressInfoKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureVersionKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const uint8_t* versionData;
|
||||
} VkAccelerationStructureVersionKHR;
|
||||
|
||||
typedef struct VkStridedBufferRegionKHR {
|
||||
VkBuffer buffer;
|
||||
VkDeviceSize offset;
|
||||
VkDeviceSize stride;
|
||||
VkDeviceSize size;
|
||||
} VkStridedBufferRegionKHR;
|
||||
|
||||
typedef struct VkTraceRaysIndirectCommandKHR {
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t depth;
|
||||
} VkTraceRaysIndirectCommandKHR;
|
||||
|
||||
typedef struct VkCopyAccelerationStructureToMemoryInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkAccelerationStructureKHR src;
|
||||
VkDeviceOrHostAddressKHR dst;
|
||||
VkCopyAccelerationStructureModeKHR mode;
|
||||
} VkCopyAccelerationStructureToMemoryInfoKHR;
|
||||
|
||||
typedef struct VkCopyMemoryToAccelerationStructureInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceOrHostAddressConstKHR src;
|
||||
VkAccelerationStructureKHR dst;
|
||||
VkCopyAccelerationStructureModeKHR mode;
|
||||
} VkCopyMemoryToAccelerationStructureInfoKHR;
|
||||
|
||||
typedef struct VkCopyAccelerationStructureInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkAccelerationStructureKHR src;
|
||||
VkAccelerationStructureKHR dst;
|
||||
VkCopyAccelerationStructureModeKHR mode;
|
||||
} VkCopyAccelerationStructureInfoKHR;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateAccelerationStructureKHR)(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureKHR* pAccelerationStructure);
|
||||
typedef void (VKAPI_PTR *PFN_vkGetAccelerationStructureMemoryRequirementsKHR)(VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoKHR* pInfo, VkMemoryRequirements2* pMemoryRequirements);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdBuildAccelerationStructureKHR)(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildOffsetInfoKHR* const* ppOffsetInfos);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdBuildAccelerationStructureIndirectKHR)(VkCommandBuffer commandBuffer, const VkAccelerationStructureBuildGeometryInfoKHR* pInfo, VkBuffer indirectBuffer, VkDeviceSize indirectOffset, uint32_t indirectStride);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkBuildAccelerationStructureKHR)(VkDevice device, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildOffsetInfoKHR* const* ppOffsetInfos);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCopyAccelerationStructureKHR)(VkDevice device, const VkCopyAccelerationStructureInfoKHR* pInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCopyAccelerationStructureToMemoryKHR)(VkDevice device, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCopyMemoryToAccelerationStructureKHR)(VkDevice device, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkWriteAccelerationStructuresPropertiesKHR)(VkDevice device, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, size_t dataSize, void* pData, size_t stride);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdCopyAccelerationStructureKHR)(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR* pInfo);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdCopyAccelerationStructureToMemoryKHR)(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdCopyMemoryToAccelerationStructureKHR)(VkCommandBuffer commandBuffer, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdTraceRaysKHR)(VkCommandBuffer commandBuffer, const VkStridedBufferRegionKHR* pRaygenShaderBindingTable, const VkStridedBufferRegionKHR* pMissShaderBindingTable, const VkStridedBufferRegionKHR* pHitShaderBindingTable, const VkStridedBufferRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateRayTracingPipelinesKHR)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines);
|
||||
typedef VkDeviceAddress (VKAPI_PTR *PFN_vkGetAccelerationStructureDeviceAddressKHR)(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR)(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdTraceRaysIndirectKHR)(VkCommandBuffer commandBuffer, const VkStridedBufferRegionKHR* pRaygenShaderBindingTable, const VkStridedBufferRegionKHR* pMissShaderBindingTable, const VkStridedBufferRegionKHR* pHitShaderBindingTable, const VkStridedBufferRegionKHR* pCallableShaderBindingTable, VkBuffer buffer, VkDeviceSize offset);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceAccelerationStructureCompatibilityKHR)(VkDevice device, const VkAccelerationStructureVersionKHR* version);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateAccelerationStructureKHR(
|
||||
VkDevice device,
|
||||
const VkAccelerationStructureCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkAccelerationStructureKHR* pAccelerationStructure);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetAccelerationStructureMemoryRequirementsKHR(
|
||||
VkDevice device,
|
||||
const VkAccelerationStructureMemoryRequirementsInfoKHR* pInfo,
|
||||
VkMemoryRequirements2* pMemoryRequirements);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdBuildAccelerationStructureKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
uint32_t infoCount,
|
||||
const VkAccelerationStructureBuildGeometryInfoKHR* pInfos,
|
||||
const VkAccelerationStructureBuildOffsetInfoKHR* const* ppOffsetInfos);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdBuildAccelerationStructureIndirectKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkAccelerationStructureBuildGeometryInfoKHR* pInfo,
|
||||
VkBuffer indirectBuffer,
|
||||
VkDeviceSize indirectOffset,
|
||||
uint32_t indirectStride);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkBuildAccelerationStructureKHR(
|
||||
VkDevice device,
|
||||
uint32_t infoCount,
|
||||
const VkAccelerationStructureBuildGeometryInfoKHR* pInfos,
|
||||
const VkAccelerationStructureBuildOffsetInfoKHR* const* ppOffsetInfos);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCopyAccelerationStructureKHR(
|
||||
VkDevice device,
|
||||
const VkCopyAccelerationStructureInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCopyAccelerationStructureToMemoryKHR(
|
||||
VkDevice device,
|
||||
const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCopyMemoryToAccelerationStructureKHR(
|
||||
VkDevice device,
|
||||
const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkWriteAccelerationStructuresPropertiesKHR(
|
||||
VkDevice device,
|
||||
uint32_t accelerationStructureCount,
|
||||
const VkAccelerationStructureKHR* pAccelerationStructures,
|
||||
VkQueryType queryType,
|
||||
size_t dataSize,
|
||||
void* pData,
|
||||
size_t stride);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdCopyAccelerationStructureKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkCopyAccelerationStructureInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdCopyAccelerationStructureToMemoryKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdCopyMemoryToAccelerationStructureKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdTraceRaysKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkStridedBufferRegionKHR* pRaygenShaderBindingTable,
|
||||
const VkStridedBufferRegionKHR* pMissShaderBindingTable,
|
||||
const VkStridedBufferRegionKHR* pHitShaderBindingTable,
|
||||
const VkStridedBufferRegionKHR* pCallableShaderBindingTable,
|
||||
uint32_t width,
|
||||
uint32_t height,
|
||||
uint32_t depth);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateRayTracingPipelinesKHR(
|
||||
VkDevice device,
|
||||
VkPipelineCache pipelineCache,
|
||||
uint32_t createInfoCount,
|
||||
const VkRayTracingPipelineCreateInfoKHR* pCreateInfos,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkPipeline* pPipelines);
|
||||
|
||||
VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetAccelerationStructureDeviceAddressKHR(
|
||||
VkDevice device,
|
||||
const VkAccelerationStructureDeviceAddressInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(
|
||||
VkDevice device,
|
||||
VkPipeline pipeline,
|
||||
uint32_t firstGroup,
|
||||
uint32_t groupCount,
|
||||
size_t dataSize,
|
||||
void* pData);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdTraceRaysIndirectKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkStridedBufferRegionKHR* pRaygenShaderBindingTable,
|
||||
const VkStridedBufferRegionKHR* pMissShaderBindingTable,
|
||||
const VkStridedBufferRegionKHR* pHitShaderBindingTable,
|
||||
const VkStridedBufferRegionKHR* pCallableShaderBindingTable,
|
||||
VkBuffer buffer,
|
||||
VkDeviceSize offset);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceAccelerationStructureCompatibilityKHR(
|
||||
VkDevice device,
|
||||
const VkAccelerationStructureVersionKHR* version);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
10909
externals/Vulkan-Headers/include/vulkan/vulkan_core.h
vendored
Executable file
10909
externals/Vulkan-Headers/include/vulkan/vulkan_core.h
vendored
Executable file
File diff suppressed because it is too large
Load Diff
47
externals/Vulkan-Headers/include/vulkan/vulkan_fuchsia.h
vendored
Executable file
47
externals/Vulkan-Headers/include/vulkan/vulkan_fuchsia.h
vendored
Executable file
@@ -0,0 +1,47 @@
|
||||
#ifndef VULKAN_FUCHSIA_H_
|
||||
#define VULKAN_FUCHSIA_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 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
|
||||
|
||||
|
||||
|
||||
#define VK_FUCHSIA_imagepipe_surface 1
|
||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1
|
||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface"
|
||||
typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA;
|
||||
typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkImagePipeSurfaceCreateFlagsFUCHSIA flags;
|
||||
zx_handle_t imagePipeHandle;
|
||||
} VkImagePipeSurfaceCreateInfoFUCHSIA;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA(
|
||||
VkInstance instance,
|
||||
const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
58
externals/Vulkan-Headers/include/vulkan/vulkan_ggp.h
vendored
Executable file
58
externals/Vulkan-Headers/include/vulkan/vulkan_ggp.h
vendored
Executable file
@@ -0,0 +1,58 @@
|
||||
#ifndef VULKAN_GGP_H_
|
||||
#define VULKAN_GGP_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 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
|
||||
|
||||
|
||||
|
||||
#define VK_GGP_stream_descriptor_surface 1
|
||||
#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION 1
|
||||
#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME "VK_GGP_stream_descriptor_surface"
|
||||
typedef VkFlags VkStreamDescriptorSurfaceCreateFlagsGGP;
|
||||
typedef struct VkStreamDescriptorSurfaceCreateInfoGGP {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkStreamDescriptorSurfaceCreateFlagsGGP flags;
|
||||
GgpStreamDescriptor streamDescriptor;
|
||||
} VkStreamDescriptorSurfaceCreateInfoGGP;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateStreamDescriptorSurfaceGGP)(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateStreamDescriptorSurfaceGGP(
|
||||
VkInstance instance,
|
||||
const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_GGP_frame_token 1
|
||||
#define VK_GGP_FRAME_TOKEN_SPEC_VERSION 1
|
||||
#define VK_GGP_FRAME_TOKEN_EXTENSION_NAME "VK_GGP_frame_token"
|
||||
typedef struct VkPresentFrameTokenGGP {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
GgpFrameToken frameToken;
|
||||
} VkPresentFrameTokenGGP;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
47
externals/Vulkan-Headers/include/vulkan/vulkan_ios.h
vendored
Executable file
47
externals/Vulkan-Headers/include/vulkan/vulkan_ios.h
vendored
Executable file
@@ -0,0 +1,47 @@
|
||||
#ifndef VULKAN_IOS_H_
|
||||
#define VULKAN_IOS_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 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
|
||||
|
||||
|
||||
|
||||
#define VK_MVK_ios_surface 1
|
||||
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 2
|
||||
#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
|
||||
typedef VkFlags VkIOSSurfaceCreateFlagsMVK;
|
||||
typedef struct VkIOSSurfaceCreateInfoMVK {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkIOSSurfaceCreateFlagsMVK flags;
|
||||
const void* pView;
|
||||
} VkIOSSurfaceCreateInfoMVK;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK(
|
||||
VkInstance instance,
|
||||
const VkIOSSurfaceCreateInfoMVK* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
47
externals/Vulkan-Headers/include/vulkan/vulkan_macos.h
vendored
Executable file
47
externals/Vulkan-Headers/include/vulkan/vulkan_macos.h
vendored
Executable file
@@ -0,0 +1,47 @@
|
||||
#ifndef VULKAN_MACOS_H_
|
||||
#define VULKAN_MACOS_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 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
|
||||
|
||||
|
||||
|
||||
#define VK_MVK_macos_surface 1
|
||||
#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2
|
||||
#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
|
||||
typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
|
||||
typedef struct VkMacOSSurfaceCreateInfoMVK {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkMacOSSurfaceCreateFlagsMVK flags;
|
||||
const void* pView;
|
||||
} VkMacOSSurfaceCreateInfoMVK;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK(
|
||||
VkInstance instance,
|
||||
const VkMacOSSurfaceCreateInfoMVK* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
54
externals/Vulkan-Headers/include/vulkan/vulkan_metal.h
vendored
Executable file
54
externals/Vulkan-Headers/include/vulkan/vulkan_metal.h
vendored
Executable file
@@ -0,0 +1,54 @@
|
||||
#ifndef VULKAN_METAL_H_
|
||||
#define VULKAN_METAL_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 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
|
||||
|
||||
|
||||
|
||||
#define VK_EXT_metal_surface 1
|
||||
|
||||
#ifdef __OBJC__
|
||||
@class CAMetalLayer;
|
||||
#else
|
||||
typedef void CAMetalLayer;
|
||||
#endif
|
||||
|
||||
#define VK_EXT_METAL_SURFACE_SPEC_VERSION 1
|
||||
#define VK_EXT_METAL_SURFACE_EXTENSION_NAME "VK_EXT_metal_surface"
|
||||
typedef VkFlags VkMetalSurfaceCreateFlagsEXT;
|
||||
typedef struct VkMetalSurfaceCreateInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkMetalSurfaceCreateFlagsEXT flags;
|
||||
const CAMetalLayer* pLayer;
|
||||
} VkMetalSurfaceCreateInfoEXT;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT(
|
||||
VkInstance instance,
|
||||
const VkMetalSurfaceCreateInfoEXT* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
47
externals/Vulkan-Headers/include/vulkan/vulkan_vi.h
vendored
Executable file
47
externals/Vulkan-Headers/include/vulkan/vulkan_vi.h
vendored
Executable file
@@ -0,0 +1,47 @@
|
||||
#ifndef VULKAN_VI_H_
|
||||
#define VULKAN_VI_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 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
|
||||
|
||||
|
||||
|
||||
#define VK_NN_vi_surface 1
|
||||
#define VK_NN_VI_SURFACE_SPEC_VERSION 1
|
||||
#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
|
||||
typedef VkFlags VkViSurfaceCreateFlagsNN;
|
||||
typedef struct VkViSurfaceCreateInfoNN {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkViSurfaceCreateFlagsNN flags;
|
||||
void* window;
|
||||
} VkViSurfaceCreateInfoNN;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN(
|
||||
VkInstance instance,
|
||||
const VkViSurfaceCreateInfoNN* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
54
externals/Vulkan-Headers/include/vulkan/vulkan_wayland.h
vendored
Executable file
54
externals/Vulkan-Headers/include/vulkan/vulkan_wayland.h
vendored
Executable file
@@ -0,0 +1,54 @@
|
||||
#ifndef VULKAN_WAYLAND_H_
|
||||
#define VULKAN_WAYLAND_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 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
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_wayland_surface 1
|
||||
#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
|
||||
typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
|
||||
typedef struct VkWaylandSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkWaylandSurfaceCreateFlagsKHR flags;
|
||||
struct wl_display* display;
|
||||
struct wl_surface* surface;
|
||||
} VkWaylandSurfaceCreateInfoKHR;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
struct wl_display* display);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
315
externals/Vulkan-Headers/include/vulkan/vulkan_win32.h
vendored
Executable file
315
externals/Vulkan-Headers/include/vulkan/vulkan_win32.h
vendored
Executable file
@@ -0,0 +1,315 @@
|
||||
#ifndef VULKAN_WIN32_H_
|
||||
#define VULKAN_WIN32_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 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
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_win32_surface 1
|
||||
#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
|
||||
typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
|
||||
typedef struct VkWin32SurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkWin32SurfaceCreateFlagsKHR flags;
|
||||
HINSTANCE hinstance;
|
||||
HWND hwnd;
|
||||
} VkWin32SurfaceCreateInfoKHR;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_KHR_external_memory_win32 1
|
||||
#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
||||
#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
|
||||
typedef struct VkImportMemoryWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||
HANDLE handle;
|
||||
LPCWSTR name;
|
||||
} VkImportMemoryWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkExportMemoryWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
LPCWSTR name;
|
||||
} VkExportMemoryWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkMemoryWin32HandlePropertiesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint32_t memoryTypeBits;
|
||||
} VkMemoryWin32HandlePropertiesKHR;
|
||||
|
||||
typedef struct VkMemoryGetWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceMemory memory;
|
||||
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||
} VkMemoryGetWin32HandleInfoKHR;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
||||
HANDLE* pHandle);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
|
||||
VkDevice device,
|
||||
VkExternalMemoryHandleTypeFlagBits handleType,
|
||||
HANDLE handle,
|
||||
VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_KHR_win32_keyed_mutex 1
|
||||
#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
|
||||
#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
|
||||
typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t acquireCount;
|
||||
const VkDeviceMemory* pAcquireSyncs;
|
||||
const uint64_t* pAcquireKeys;
|
||||
const uint32_t* pAcquireTimeouts;
|
||||
uint32_t releaseCount;
|
||||
const VkDeviceMemory* pReleaseSyncs;
|
||||
const uint64_t* pReleaseKeys;
|
||||
} VkWin32KeyedMutexAcquireReleaseInfoKHR;
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_external_semaphore_win32 1
|
||||
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
|
||||
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
|
||||
typedef struct VkImportSemaphoreWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkSemaphore semaphore;
|
||||
VkSemaphoreImportFlags flags;
|
||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
||||
HANDLE handle;
|
||||
LPCWSTR name;
|
||||
} VkImportSemaphoreWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkExportSemaphoreWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
LPCWSTR name;
|
||||
} VkExportSemaphoreWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkD3D12FenceSubmitInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t waitSemaphoreValuesCount;
|
||||
const uint64_t* pWaitSemaphoreValues;
|
||||
uint32_t signalSemaphoreValuesCount;
|
||||
const uint64_t* pSignalSemaphoreValues;
|
||||
} VkD3D12FenceSubmitInfoKHR;
|
||||
|
||||
typedef struct VkSemaphoreGetWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkSemaphore semaphore;
|
||||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
||||
} VkSemaphoreGetWin32HandleInfoKHR;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
||||
HANDLE* pHandle);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_KHR_external_fence_win32 1
|
||||
#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
|
||||
#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
|
||||
typedef struct VkImportFenceWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkFence fence;
|
||||
VkFenceImportFlags flags;
|
||||
VkExternalFenceHandleTypeFlagBits handleType;
|
||||
HANDLE handle;
|
||||
LPCWSTR name;
|
||||
} VkImportFenceWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkExportFenceWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
LPCWSTR name;
|
||||
} VkExportFenceWin32HandleInfoKHR;
|
||||
|
||||
typedef struct VkFenceGetWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkFence fence;
|
||||
VkExternalFenceHandleTypeFlagBits handleType;
|
||||
} VkFenceGetWin32HandleInfoKHR;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
|
||||
VkDevice device,
|
||||
const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
||||
HANDLE* pHandle);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_NV_external_memory_win32 1
|
||||
#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
||||
#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
|
||||
typedef struct VkImportMemoryWin32HandleInfoNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkExternalMemoryHandleTypeFlagsNV handleType;
|
||||
HANDLE handle;
|
||||
} VkImportMemoryWin32HandleInfoNV;
|
||||
|
||||
typedef struct VkExportMemoryWin32HandleInfoNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const SECURITY_ATTRIBUTES* pAttributes;
|
||||
DWORD dwAccess;
|
||||
} VkExportMemoryWin32HandleInfoNV;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
|
||||
VkDevice device,
|
||||
VkDeviceMemory memory,
|
||||
VkExternalMemoryHandleTypeFlagsNV handleType,
|
||||
HANDLE* pHandle);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_NV_win32_keyed_mutex 1
|
||||
#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 2
|
||||
#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
|
||||
typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t acquireCount;
|
||||
const VkDeviceMemory* pAcquireSyncs;
|
||||
const uint64_t* pAcquireKeys;
|
||||
const uint32_t* pAcquireTimeoutMilliseconds;
|
||||
uint32_t releaseCount;
|
||||
const VkDeviceMemory* pReleaseSyncs;
|
||||
const uint64_t* pReleaseKeys;
|
||||
} VkWin32KeyedMutexAcquireReleaseInfoNV;
|
||||
|
||||
|
||||
|
||||
#define VK_EXT_full_screen_exclusive 1
|
||||
#define VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION 4
|
||||
#define VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME "VK_EXT_full_screen_exclusive"
|
||||
|
||||
typedef enum VkFullScreenExclusiveEXT {
|
||||
VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0,
|
||||
VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1,
|
||||
VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2,
|
||||
VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3,
|
||||
VK_FULL_SCREEN_EXCLUSIVE_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkFullScreenExclusiveEXT;
|
||||
typedef struct VkSurfaceFullScreenExclusiveInfoEXT {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkFullScreenExclusiveEXT fullScreenExclusive;
|
||||
} VkSurfaceFullScreenExclusiveInfoEXT;
|
||||
|
||||
typedef struct VkSurfaceCapabilitiesFullScreenExclusiveEXT {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkBool32 fullScreenExclusiveSupported;
|
||||
} VkSurfaceCapabilitiesFullScreenExclusiveEXT;
|
||||
|
||||
typedef struct VkSurfaceFullScreenExclusiveWin32InfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
HMONITOR hmonitor;
|
||||
} VkSurfaceFullScreenExclusiveWin32InfoEXT;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkAcquireFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkReleaseFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModes2EXT)(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModes2EXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
|
||||
uint32_t* pPresentModeCount,
|
||||
VkPresentModeKHR* pPresentModes);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireFullScreenExclusiveModeEXT(
|
||||
VkDevice device,
|
||||
VkSwapchainKHR swapchain);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkReleaseFullScreenExclusiveModeEXT(
|
||||
VkDevice device,
|
||||
VkSwapchainKHR swapchain);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT(
|
||||
VkDevice device,
|
||||
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
|
||||
VkDeviceGroupPresentModeFlagsKHR* pModes);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
55
externals/Vulkan-Headers/include/vulkan/vulkan_xcb.h
vendored
Executable file
55
externals/Vulkan-Headers/include/vulkan/vulkan_xcb.h
vendored
Executable file
@@ -0,0 +1,55 @@
|
||||
#ifndef VULKAN_XCB_H_
|
||||
#define VULKAN_XCB_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 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
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_xcb_surface 1
|
||||
#define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface"
|
||||
typedef VkFlags VkXcbSurfaceCreateFlagsKHR;
|
||||
typedef struct VkXcbSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkXcbSurfaceCreateFlagsKHR flags;
|
||||
xcb_connection_t* connection;
|
||||
xcb_window_t window;
|
||||
} VkXcbSurfaceCreateInfoKHR;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
xcb_connection_t* connection,
|
||||
xcb_visualid_t visual_id);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
55
externals/Vulkan-Headers/include/vulkan/vulkan_xlib.h
vendored
Executable file
55
externals/Vulkan-Headers/include/vulkan/vulkan_xlib.h
vendored
Executable file
@@ -0,0 +1,55 @@
|
||||
#ifndef VULKAN_XLIB_H_
|
||||
#define VULKAN_XLIB_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 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
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_xlib_surface 1
|
||||
#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface"
|
||||
typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
|
||||
typedef struct VkXlibSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkXlibSurfaceCreateFlagsKHR flags;
|
||||
Display* dpy;
|
||||
Window window;
|
||||
} VkXlibSurfaceCreateInfoKHR;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(
|
||||
VkInstance instance,
|
||||
const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
Display* dpy,
|
||||
VisualID visualID);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
45
externals/Vulkan-Headers/include/vulkan/vulkan_xlib_xrandr.h
vendored
Executable file
45
externals/Vulkan-Headers/include/vulkan/vulkan_xlib_xrandr.h
vendored
Executable file
@@ -0,0 +1,45 @@
|
||||
#ifndef VULKAN_XLIB_XRANDR_H_
|
||||
#define VULKAN_XLIB_XRANDR_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 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
|
||||
|
||||
|
||||
|
||||
#define VK_EXT_acquire_xlib_display 1
|
||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
|
||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
Display* dpy,
|
||||
VkDisplayKHR display);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
Display* dpy,
|
||||
RROutput rrOutput,
|
||||
VkDisplayKHR* pDisplay);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
405
externals/Vulkan-Headers/registry/cgenerator.py
vendored
Executable file
405
externals/Vulkan-Headers/registry/cgenerator.py
vendored
Executable file
@@ -0,0 +1,405 @@
|
||||
#!/usr/bin/python3 -i
|
||||
#
|
||||
# Copyright (c) 2013-2020 The Khronos Group Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import os
|
||||
import re
|
||||
from generator import (GeneratorOptions, OutputGenerator, noneStr,
|
||||
regSortFeatures, write)
|
||||
|
||||
|
||||
class CGeneratorOptions(GeneratorOptions):
|
||||
"""CGeneratorOptions - subclass of GeneratorOptions.
|
||||
|
||||
Adds options used by COutputGenerator objects during C language header
|
||||
generation."""
|
||||
|
||||
def __init__(self,
|
||||
prefixText="",
|
||||
genFuncPointers=True,
|
||||
protectFile=True,
|
||||
protectFeature=True,
|
||||
protectProto=None,
|
||||
protectProtoStr=None,
|
||||
apicall='',
|
||||
apientry='',
|
||||
apientryp='',
|
||||
indentFuncProto=True,
|
||||
indentFuncPointer=False,
|
||||
alignFuncParam=0,
|
||||
genEnumBeginEndRange=False,
|
||||
genAliasMacro=False,
|
||||
aliasMacro='',
|
||||
**kwargs
|
||||
):
|
||||
"""Constructor.
|
||||
Additional parameters beyond parent class:
|
||||
|
||||
- prefixText - list of strings to prefix generated header with
|
||||
(usually a copyright statement + calling convention macros).
|
||||
- protectFile - True if multiple inclusion protection should be
|
||||
generated (based on the filename) around the entire header.
|
||||
- protectFeature - True if #ifndef..#endif protection should be
|
||||
generated around a feature interface in the header file.
|
||||
- genFuncPointers - True if function pointer typedefs should be
|
||||
generated
|
||||
- protectProto - If conditional protection should be generated
|
||||
around prototype declarations, set to either '#ifdef'
|
||||
to require opt-in (#ifdef protectProtoStr) or '#ifndef'
|
||||
to require opt-out (#ifndef protectProtoStr). Otherwise
|
||||
set to None.
|
||||
- protectProtoStr - #ifdef/#ifndef symbol to use around prototype
|
||||
declarations, if protectProto is set
|
||||
- apicall - string to use for the function declaration prefix,
|
||||
such as APICALL on Windows.
|
||||
- apientry - string to use for the calling convention macro,
|
||||
in typedefs, such as APIENTRY.
|
||||
- apientryp - string to use for the calling convention macro
|
||||
in function pointer typedefs, such as APIENTRYP.
|
||||
- indentFuncProto - True if prototype declarations should put each
|
||||
parameter on a separate line
|
||||
- indentFuncPointer - True if typedefed function pointers should put each
|
||||
parameter on a separate line
|
||||
- alignFuncParam - if nonzero and parameters are being put on a
|
||||
separate line, align parameter names at the specified column
|
||||
- genEnumBeginEndRange - True if BEGIN_RANGE / END_RANGE macros should
|
||||
be generated for enumerated types
|
||||
- genAliasMacro - True if the OpenXR alias macro should be generated
|
||||
for aliased types (unclear what other circumstances this is useful)
|
||||
- aliasMacro - alias macro to inject when genAliasMacro is True"""
|
||||
GeneratorOptions.__init__(self, **kwargs)
|
||||
|
||||
self.prefixText = prefixText
|
||||
"""list of strings to prefix generated header with (usually a copyright statement + calling convention macros)."""
|
||||
|
||||
self.genFuncPointers = genFuncPointers
|
||||
"""True if function pointer typedefs should be generated"""
|
||||
|
||||
self.protectFile = protectFile
|
||||
"""True if multiple inclusion protection should be generated (based on the filename) around the entire header."""
|
||||
|
||||
self.protectFeature = protectFeature
|
||||
"""True if #ifndef..#endif protection should be generated around a feature interface in the header file."""
|
||||
|
||||
self.protectProto = protectProto
|
||||
"""If conditional protection should be generated around prototype declarations, set to either '#ifdef' to require opt-in (#ifdef protectProtoStr) or '#ifndef' to require opt-out (#ifndef protectProtoStr). Otherwise set to None."""
|
||||
|
||||
self.protectProtoStr = protectProtoStr
|
||||
"""#ifdef/#ifndef symbol to use around prototype declarations, if protectProto is set"""
|
||||
|
||||
self.apicall = apicall
|
||||
"""string to use for the function declaration prefix, such as APICALL on Windows."""
|
||||
|
||||
self.apientry = apientry
|
||||
"""string to use for the calling convention macro, in typedefs, such as APIENTRY."""
|
||||
|
||||
self.apientryp = apientryp
|
||||
"""string to use for the calling convention macro in function pointer typedefs, such as APIENTRYP."""
|
||||
|
||||
self.indentFuncProto = indentFuncProto
|
||||
"""True if prototype declarations should put each parameter on a separate line"""
|
||||
|
||||
self.indentFuncPointer = indentFuncPointer
|
||||
"""True if typedefed function pointers should put each parameter on a separate line"""
|
||||
|
||||
self.alignFuncParam = alignFuncParam
|
||||
"""if nonzero and parameters are being put on a separate line, align parameter names at the specified column"""
|
||||
|
||||
self.genEnumBeginEndRange = genEnumBeginEndRange
|
||||
"""True if BEGIN_RANGE / END_RANGE macros should be generated for enumerated types"""
|
||||
|
||||
self.genAliasMacro = genAliasMacro
|
||||
"""True if the OpenXR alias macro should be generated for aliased types (unclear what other circumstances this is useful)"""
|
||||
|
||||
self.aliasMacro = aliasMacro
|
||||
"""alias macro to inject when genAliasMacro is True"""
|
||||
|
||||
self.codeGenerator = True
|
||||
"""True if this generator makes compilable code"""
|
||||
|
||||
|
||||
class COutputGenerator(OutputGenerator):
|
||||
"""Generates C-language API interfaces."""
|
||||
|
||||
# This is an ordered list of sections in the header file.
|
||||
TYPE_SECTIONS = ['include', 'define', 'basetype', 'handle', 'enum',
|
||||
'group', 'bitmask', 'funcpointer', 'struct']
|
||||
ALL_SECTIONS = TYPE_SECTIONS + ['commandPointer', 'command']
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
# Internal state - accumulators for different inner block text
|
||||
self.sections = {section: [] for section in self.ALL_SECTIONS}
|
||||
self.feature_not_empty = False
|
||||
self.may_alias = None
|
||||
|
||||
def beginFile(self, genOpts):
|
||||
OutputGenerator.beginFile(self, genOpts)
|
||||
# C-specific
|
||||
#
|
||||
# Multiple inclusion protection & C++ wrappers.
|
||||
if genOpts.protectFile and self.genOpts.filename:
|
||||
headerSym = re.sub(r'\.h', '_h_',
|
||||
os.path.basename(self.genOpts.filename)).upper()
|
||||
write('#ifndef', headerSym, file=self.outFile)
|
||||
write('#define', headerSym, '1', file=self.outFile)
|
||||
self.newline()
|
||||
|
||||
# User-supplied prefix text, if any (list of strings)
|
||||
if genOpts.prefixText:
|
||||
for s in genOpts.prefixText:
|
||||
write(s, file=self.outFile)
|
||||
|
||||
# C++ extern wrapper - after prefix lines so they can add includes.
|
||||
self.newline()
|
||||
write('#ifdef __cplusplus', file=self.outFile)
|
||||
write('extern "C" {', file=self.outFile)
|
||||
write('#endif', file=self.outFile)
|
||||
self.newline()
|
||||
|
||||
def endFile(self):
|
||||
# C-specific
|
||||
# Finish C++ wrapper and multiple inclusion protection
|
||||
self.newline()
|
||||
write('#ifdef __cplusplus', file=self.outFile)
|
||||
write('}', file=self.outFile)
|
||||
write('#endif', file=self.outFile)
|
||||
if self.genOpts.protectFile and self.genOpts.filename:
|
||||
self.newline()
|
||||
write('#endif', file=self.outFile)
|
||||
# Finish processing in superclass
|
||||
OutputGenerator.endFile(self)
|
||||
|
||||
def beginFeature(self, interface, emit):
|
||||
# Start processing in superclass
|
||||
OutputGenerator.beginFeature(self, interface, emit)
|
||||
# C-specific
|
||||
# Accumulate includes, defines, types, enums, function pointer typedefs,
|
||||
# end function prototypes separately for this feature. They're only
|
||||
# printed in endFeature().
|
||||
self.sections = {section: [] for section in self.ALL_SECTIONS}
|
||||
self.feature_not_empty = False
|
||||
|
||||
def endFeature(self):
|
||||
"Actually write the interface to the output file."
|
||||
# C-specific
|
||||
if self.emit:
|
||||
if self.feature_not_empty:
|
||||
if self.genOpts.conventions.writeFeature(self.featureExtraProtect, self.genOpts.filename):
|
||||
self.newline()
|
||||
if self.genOpts.protectFeature:
|
||||
write('#ifndef', self.featureName, file=self.outFile)
|
||||
# If type declarations are needed by other features based on
|
||||
# this one, it may be necessary to suppress the ExtraProtect,
|
||||
# or move it below the 'for section...' loop.
|
||||
if self.featureExtraProtect is not None:
|
||||
write('#ifdef', self.featureExtraProtect, file=self.outFile)
|
||||
self.newline()
|
||||
write('#define', self.featureName, '1', file=self.outFile)
|
||||
for section in self.TYPE_SECTIONS:
|
||||
contents = self.sections[section]
|
||||
if contents:
|
||||
write('\n'.join(contents), file=self.outFile)
|
||||
if self.genOpts.genFuncPointers and self.sections['commandPointer']:
|
||||
write('\n'.join(self.sections['commandPointer']), file=self.outFile)
|
||||
self.newline()
|
||||
if self.sections['command']:
|
||||
if self.genOpts.protectProto:
|
||||
write(self.genOpts.protectProto,
|
||||
self.genOpts.protectProtoStr, file=self.outFile)
|
||||
write('\n'.join(self.sections['command']), end='', file=self.outFile)
|
||||
if self.genOpts.protectProto:
|
||||
write('#endif', file=self.outFile)
|
||||
else:
|
||||
self.newline()
|
||||
if self.featureExtraProtect is not None:
|
||||
write('#endif /*', self.featureExtraProtect, '*/', file=self.outFile)
|
||||
if self.genOpts.protectFeature:
|
||||
write('#endif /*', self.featureName, '*/', file=self.outFile)
|
||||
# Finish processing in superclass
|
||||
OutputGenerator.endFeature(self)
|
||||
|
||||
def appendSection(self, section, text):
|
||||
"Append a definition to the specified section"
|
||||
# self.sections[section].append('SECTION: ' + section + '\n')
|
||||
self.sections[section].append(text)
|
||||
self.feature_not_empty = True
|
||||
|
||||
def genType(self, typeinfo, name, alias):
|
||||
"Generate type."
|
||||
OutputGenerator.genType(self, typeinfo, name, alias)
|
||||
typeElem = typeinfo.elem
|
||||
|
||||
# Vulkan:
|
||||
# Determine the category of the type, and the type section to add
|
||||
# its definition to.
|
||||
# 'funcpointer' is added to the 'struct' section as a workaround for
|
||||
# internal issue #877, since structures and function pointer types
|
||||
# can have cross-dependencies.
|
||||
category = typeElem.get('category')
|
||||
if category == 'funcpointer':
|
||||
section = 'struct'
|
||||
else:
|
||||
section = category
|
||||
|
||||
if category in ('struct', 'union'):
|
||||
# If the type is a struct type, generate it using the
|
||||
# special-purpose generator.
|
||||
self.genStruct(typeinfo, name, alias)
|
||||
else:
|
||||
# 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'
|
||||
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, don't emit it.
|
||||
body = noneStr(typeElem.text)
|
||||
for elem in typeElem:
|
||||
if elem.tag == 'apientry':
|
||||
body += self.genOpts.apientry + noneStr(elem.tail)
|
||||
else:
|
||||
body += noneStr(elem.text) + noneStr(elem.tail)
|
||||
if body:
|
||||
# Add extra newline after multi-line entries.
|
||||
if '\n' in body[0:-1]:
|
||||
body += '\n'
|
||||
self.appendSection(section, body)
|
||||
|
||||
def genProtectString(self, protect_str):
|
||||
"""Generate protection string.
|
||||
|
||||
Protection strings are the strings defining the OS/Platform/Graphics
|
||||
requirements for a given OpenXR command. When generating the
|
||||
language header files, we need to make sure the items specific to a
|
||||
graphics API or OS platform are properly wrapped in #ifs."""
|
||||
protect_if_str = ''
|
||||
protect_end_str = ''
|
||||
if not protect_str:
|
||||
return (protect_if_str, protect_end_str)
|
||||
|
||||
if ',' in protect_str:
|
||||
protect_list = protect_str.split(",")
|
||||
protect_defs = ('defined(%s)' % 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
|
||||
else:
|
||||
protect_if_str = '#ifdef %s\n' % protect_str
|
||||
protect_end_str = '#endif // %s\n' % protect_str
|
||||
|
||||
return (protect_if_str, protect_end_str)
|
||||
|
||||
def typeMayAlias(self, typeName):
|
||||
if not self.may_alias:
|
||||
# First time we've asked if a type may alias.
|
||||
# So, let's populate the set of all names of types that may.
|
||||
|
||||
# Everyone with an explicit mayalias="true"
|
||||
self.may_alias = set(typeName
|
||||
for typeName, data in self.registry.typedict.items()
|
||||
if data.elem.get('mayalias') == 'true')
|
||||
|
||||
# Every type mentioned in some other type's parentstruct attribute.
|
||||
parent_structs = (otherType.elem.get('parentstruct')
|
||||
for otherType in self.registry.typedict.values())
|
||||
self.may_alias.update(set(x for x in parent_structs
|
||||
if x is not None))
|
||||
return typeName in self.may_alias
|
||||
|
||||
def genStruct(self, typeinfo, typeName, alias):
|
||||
"""Generate struct (e.g. C "struct" type).
|
||||
|
||||
This is a special case of the <type> tag where the contents are
|
||||
interpreted as a set of <member> tags instead of freeform C
|
||||
C type declarations. The <member> tags are just like <param>
|
||||
tags - they are a declaration of a struct or union member.
|
||||
Only simple member declarations are supported (no nested
|
||||
structs etc.)
|
||||
|
||||
If alias is not None, then this struct aliases another; just
|
||||
generate a typedef of that alias."""
|
||||
OutputGenerator.genStruct(self, typeinfo, typeName, alias)
|
||||
|
||||
typeElem = typeinfo.elem
|
||||
|
||||
if alias:
|
||||
body = 'typedef ' + alias + ' ' + typeName + ';\n'
|
||||
else:
|
||||
body = ''
|
||||
(protect_begin, protect_end) = self.genProtectString(typeElem.get('protect'))
|
||||
if protect_begin:
|
||||
body += protect_begin
|
||||
body += '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 += ' ' + typeName + ' {\n'
|
||||
|
||||
targetLen = self.getMaxCParamTypeLength(typeinfo)
|
||||
for member in typeElem.findall('.//member'):
|
||||
body += self.makeCParamDecl(member, targetLen + 4)
|
||||
body += ';\n'
|
||||
body += '} ' + typeName + ';\n'
|
||||
if protect_end:
|
||||
body += protect_end
|
||||
|
||||
self.appendSection('struct', body)
|
||||
|
||||
def genGroup(self, groupinfo, groupName, alias=None):
|
||||
"""Generate groups (e.g. C "enum" type).
|
||||
|
||||
These are concatenated together with other types.
|
||||
|
||||
If alias is not None, it is the name of another group type
|
||||
which aliases this type; just generate that alias."""
|
||||
OutputGenerator.genGroup(self, groupinfo, groupName, alias)
|
||||
groupElem = groupinfo.elem
|
||||
|
||||
# After either enumerated type or alias paths, add the declaration
|
||||
# to the appropriate section for the group being defined.
|
||||
if groupElem.get('type') == 'bitmask':
|
||||
section = 'bitmask'
|
||||
else:
|
||||
section = 'group'
|
||||
|
||||
if alias:
|
||||
# If the group name is aliased, just emit a typedef declaration
|
||||
# for the alias.
|
||||
body = 'typedef ' + alias + ' ' + groupName + ';\n'
|
||||
self.appendSection(section, body)
|
||||
else:
|
||||
(section, body) = self.buildEnumCDecl(self.genOpts.genEnumBeginEndRange, groupinfo, groupName)
|
||||
self.appendSection(section, "\n" + body)
|
||||
|
||||
def genEnum(self, enuminfo, name, alias):
|
||||
"""Generate enumerants.
|
||||
|
||||
<enum> tags may specify their values in several ways, but are usually
|
||||
just integers."""
|
||||
OutputGenerator.genEnum(self, enuminfo, name, alias)
|
||||
(_, strVal) = self.enumToValue(enuminfo.elem, False)
|
||||
body = '#define ' + name.ljust(33) + ' ' + strVal
|
||||
self.appendSection('enum', body)
|
||||
|
||||
def genCmd(self, cmdinfo, name, alias):
|
||||
"Command generation"
|
||||
OutputGenerator.genCmd(self, cmdinfo, name, alias)
|
||||
|
||||
# if alias:
|
||||
# prefix = '// ' + name + ' is an alias of command ' + alias + '\n'
|
||||
# else:
|
||||
# prefix = ''
|
||||
|
||||
prefix = ''
|
||||
decls = self.makeCDecls(cmdinfo.elem)
|
||||
self.appendSection('command', prefix + decls[0] + '\n')
|
||||
if self.genOpts.genFuncPointers:
|
||||
self.appendSection('commandPointer', decls[1])
|
358
externals/Vulkan-Headers/registry/conventions.py
vendored
Executable file
358
externals/Vulkan-Headers/registry/conventions.py
vendored
Executable file
@@ -0,0 +1,358 @@
|
||||
#!/usr/bin/python3 -i
|
||||
#
|
||||
# Copyright (c) 2013-2020 The Khronos Group Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Base class for working-group-specific style conventions,
|
||||
# used in generation.
|
||||
|
||||
from enum import Enum
|
||||
|
||||
# Type categories that respond "False" to isStructAlwaysValid
|
||||
# basetype is home to typedefs like ..Bool32
|
||||
CATEGORIES_REQUIRING_VALIDATION = set(('handle',
|
||||
'enum',
|
||||
'bitmask',
|
||||
'basetype',
|
||||
None))
|
||||
|
||||
# These are basic C types pulled in via openxr_platform_defines.h
|
||||
TYPES_KNOWN_ALWAYS_VALID = set(('char',
|
||||
'float',
|
||||
'int8_t', 'uint8_t',
|
||||
'int32_t', 'uint32_t',
|
||||
'int64_t', 'uint64_t',
|
||||
'size_t',
|
||||
'uintptr_t',
|
||||
'int',
|
||||
))
|
||||
|
||||
|
||||
class ProseListFormats(Enum):
|
||||
"""A connective, possibly with a quantifier."""
|
||||
AND = 0
|
||||
EACH_AND = 1
|
||||
OR = 2
|
||||
ANY_OR = 3
|
||||
|
||||
@classmethod
|
||||
def from_string(cls, s):
|
||||
if s == 'or':
|
||||
return cls.OR
|
||||
if s == 'and':
|
||||
return cls.AND
|
||||
return None
|
||||
|
||||
@property
|
||||
def connective(self):
|
||||
if self in (ProseListFormats.OR, ProseListFormats.ANY_OR):
|
||||
return 'or'
|
||||
return 'and'
|
||||
|
||||
def quantifier(self, n):
|
||||
"""Return the desired quantifier for a list of a given length."""
|
||||
if self == ProseListFormats.ANY_OR:
|
||||
if n > 1:
|
||||
return 'any of '
|
||||
elif self == ProseListFormats.EACH_AND:
|
||||
if n > 2:
|
||||
return 'each of '
|
||||
if n == 2:
|
||||
return 'both of '
|
||||
return ''
|
||||
|
||||
|
||||
class ConventionsBase:
|
||||
"""WG-specific conventions."""
|
||||
|
||||
def __init__(self):
|
||||
self._command_prefix = None
|
||||
self._type_prefix = None
|
||||
|
||||
def formatExtension(self, name):
|
||||
"""Mark up an extension name as a link the spec."""
|
||||
return '`apiext:{}`'.format(name)
|
||||
|
||||
@property
|
||||
def null(self):
|
||||
"""Preferred spelling of NULL."""
|
||||
raise NotImplementedError
|
||||
|
||||
def makeProseList(self, elements, fmt=ProseListFormats.AND, with_verb=False, *args, **kwargs):
|
||||
"""Make a (comma-separated) list for use in prose.
|
||||
|
||||
Adds a connective (by default, 'and')
|
||||
before the last element if there are more than 1.
|
||||
|
||||
Adds the right one of "is" or "are" to the end if with_verb is true.
|
||||
|
||||
Optionally adds a quantifier (like 'any') before a list of 2 or more,
|
||||
if specified by fmt.
|
||||
|
||||
Override with a different method or different call to
|
||||
_implMakeProseList if you want to add a comma for two elements,
|
||||
or not use a serial comma.
|
||||
"""
|
||||
return self._implMakeProseList(elements, fmt, with_verb, *args, **kwargs)
|
||||
|
||||
@property
|
||||
def struct_macro(self):
|
||||
"""Get the appropriate format macro for a structure.
|
||||
|
||||
May override.
|
||||
"""
|
||||
return 'slink:'
|
||||
|
||||
@property
|
||||
def external_macro(self):
|
||||
"""Get the appropriate format macro for an external type like uint32_t.
|
||||
|
||||
May override.
|
||||
"""
|
||||
return 'code:'
|
||||
|
||||
def makeStructName(self, name):
|
||||
"""Prepend the appropriate format macro for a structure to a structure type name.
|
||||
|
||||
Uses struct_macro, so just override that if you want to change behavior.
|
||||
"""
|
||||
return self.struct_macro + name
|
||||
|
||||
def makeExternalTypeName(self, name):
|
||||
"""Prepend the appropriate format macro for an external type like uint32_t to a type name.
|
||||
|
||||
Uses external_macro, so just override that if you want to change behavior.
|
||||
"""
|
||||
return self.external_macro + name
|
||||
|
||||
def _implMakeProseList(self, elements, fmt, with_verb, comma_for_two_elts=False, serial_comma=True):
|
||||
"""Internal-use implementation to make a (comma-separated) list for use in prose.
|
||||
|
||||
Adds a connective (by default, 'and')
|
||||
before the last element if there are more than 1,
|
||||
and only includes commas if there are more than 2
|
||||
(if comma_for_two_elts is False).
|
||||
|
||||
Adds the right one of "is" or "are" to the end if with_verb is true.
|
||||
|
||||
Optionally adds a quantifier (like 'any') before a list of 2 or more,
|
||||
if specified by fmt.
|
||||
|
||||
Don't edit these defaults, override self.makeProseList().
|
||||
"""
|
||||
assert(serial_comma) # didn't implement what we didn't 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])
|
||||
|
||||
if not comma_for_two_elts and len(my_elts) <= 2:
|
||||
prose = ' '.join(my_elts)
|
||||
else:
|
||||
prose = ', '.join(my_elts)
|
||||
|
||||
quantifier = fmt.quantifier(len(my_elts))
|
||||
|
||||
parts = [quantifier, prose]
|
||||
|
||||
if with_verb:
|
||||
if len(my_elts) > 1:
|
||||
parts.append(' are')
|
||||
else:
|
||||
parts.append(' is')
|
||||
return ''.join(parts)
|
||||
|
||||
@property
|
||||
def file_suffix(self):
|
||||
"""Return suffix of generated Asciidoctor files"""
|
||||
raise NotImplementedError
|
||||
|
||||
def api_name(self, spectype=None):
|
||||
"""Return API or specification name for citations in ref pages.
|
||||
|
||||
spectype is the spec this refpage is for.
|
||||
'api' (the default value) is the main API Specification.
|
||||
If an unrecognized spectype is given, returns None.
|
||||
|
||||
Must implement."""
|
||||
raise NotImplementedError
|
||||
|
||||
def should_insert_may_alias_macro(self, genOpts):
|
||||
"""Return true if we should insert a "may alias" macro in this file.
|
||||
|
||||
Only used by OpenXR right now."""
|
||||
return False
|
||||
|
||||
@property
|
||||
def command_prefix(self):
|
||||
"""Return the expected prefix of commands/functions.
|
||||
|
||||
Implemented in terms of api_prefix."""
|
||||
if not self._command_prefix:
|
||||
self._command_prefix = self.api_prefix[:].replace('_', '').lower()
|
||||
return self._command_prefix
|
||||
|
||||
@property
|
||||
def type_prefix(self):
|
||||
"""Return the expected prefix of type names.
|
||||
|
||||
Implemented in terms of command_prefix (and in turn, api_prefix)."""
|
||||
if not self._type_prefix:
|
||||
self._type_prefix = ''.join(
|
||||
(self.command_prefix[0:1].upper(), self.command_prefix[1:]))
|
||||
return self._type_prefix
|
||||
|
||||
@property
|
||||
def api_prefix(self):
|
||||
"""Return API token prefix.
|
||||
|
||||
Typically two uppercase letters followed by an underscore.
|
||||
|
||||
Must implement."""
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
def api_version_prefix(self):
|
||||
"""Return API core version token prefix.
|
||||
|
||||
Implemented in terms of api_prefix.
|
||||
|
||||
May override."""
|
||||
return self.api_prefix + 'VERSION_'
|
||||
|
||||
@property
|
||||
def KHR_prefix(self):
|
||||
"""Return extension name prefix for KHR extensions.
|
||||
|
||||
Implemented in terms of api_prefix.
|
||||
|
||||
May override."""
|
||||
return self.api_prefix + 'KHR_'
|
||||
|
||||
@property
|
||||
def EXT_prefix(self):
|
||||
"""Return extension name prefix for EXT extensions.
|
||||
|
||||
Implemented in terms of api_prefix.
|
||||
|
||||
May override."""
|
||||
return self.api_prefix + 'EXT_'
|
||||
|
||||
def writeFeature(self, featureExtraProtect, filename):
|
||||
"""Return True if OutputGenerator.endFeature should write this feature.
|
||||
|
||||
Defaults to always True.
|
||||
Used in COutputGenerator.
|
||||
|
||||
May override."""
|
||||
return True
|
||||
|
||||
def requires_error_validation(self, return_type):
|
||||
"""Return True if the return_type element is an API result code
|
||||
requiring error validation.
|
||||
|
||||
Defaults to always False.
|
||||
|
||||
May override."""
|
||||
return False
|
||||
|
||||
@property
|
||||
def required_errors(self):
|
||||
"""Return a list of required error codes for validation.
|
||||
|
||||
Defaults to an empty list.
|
||||
|
||||
May override."""
|
||||
return []
|
||||
|
||||
def is_voidpointer_alias(self, tag, text, tail):
|
||||
"""Return True if the declaration components (tag,text,tail) of an
|
||||
element represents a void * type.
|
||||
|
||||
Defaults to a reasonable implementation.
|
||||
|
||||
May override."""
|
||||
return tag == 'type' and text == 'void' and tail.startswith('*')
|
||||
|
||||
def make_voidpointer_alias(self, tail):
|
||||
"""Reformat a void * declaration to include the API alias macro.
|
||||
|
||||
Defaults to a no-op.
|
||||
|
||||
Must override if you actually want to use this feature in your project."""
|
||||
return tail
|
||||
|
||||
def category_requires_validation(self, category):
|
||||
"""Return True if the given type 'category' always requires validation.
|
||||
|
||||
Defaults to a reasonable implementation.
|
||||
|
||||
May override."""
|
||||
return category in CATEGORIES_REQUIRING_VALIDATION
|
||||
|
||||
def type_always_valid(self, typename):
|
||||
"""Return True if the given type name is always valid (never requires validation).
|
||||
|
||||
This is for things like integers.
|
||||
|
||||
Defaults to a reasonable implementation.
|
||||
|
||||
May override."""
|
||||
return typename in TYPES_KNOWN_ALWAYS_VALID
|
||||
|
||||
@property
|
||||
def should_skip_checking_codes(self):
|
||||
"""Return True if more than the basic validation of return codes should
|
||||
be skipped for a command."""
|
||||
|
||||
return False
|
||||
|
||||
@property
|
||||
def generate_index_terms(self):
|
||||
"""Return True if asiidoctor index terms should be generated as part
|
||||
of an API interface from the docgenerator."""
|
||||
|
||||
return False
|
||||
|
||||
@property
|
||||
def generate_enum_table(self):
|
||||
"""Return True if asciidoctor tables describing enumerants in a
|
||||
group should be generated as part of group generation."""
|
||||
return False
|
||||
|
||||
@property
|
||||
def generate_max_enum_in_docs(self):
|
||||
"""Return True if MAX_ENUM tokens should be generated in
|
||||
documentation includes."""
|
||||
return False
|
||||
|
||||
|
||||
def extension_include_string(self, ext):
|
||||
"""Return format string for include:: line for an extension appendix
|
||||
file. ext is an object with the following members:
|
||||
- name - extension string string
|
||||
- vendor - vendor portion of name
|
||||
- barename - remainder of name
|
||||
|
||||
Must implement."""
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
def refpage_generated_include_path(self):
|
||||
"""Return path relative to the generated reference pages, to the
|
||||
generated API include files.
|
||||
|
||||
Must implement."""
|
||||
raise NotImplementedError
|
||||
|
||||
def valid_flag_bit(self, bitpos):
|
||||
"""Return True if bitpos is an allowed numeric bit position for
|
||||
an API flag.
|
||||
|
||||
Behavior depends on the data type used for flags (which may be 32
|
||||
or 64 bits), and may depend on assumptions about compiler
|
||||
handling of sign bits in enumerated types, as well."""
|
||||
return True
|
1001
externals/Vulkan-Headers/registry/generator.py
vendored
Executable file
1001
externals/Vulkan-Headers/registry/generator.py
vendored
Executable file
File diff suppressed because it is too large
Load Diff
611
externals/Vulkan-Headers/registry/genvk.py
vendored
Executable file
611
externals/Vulkan-Headers/registry/genvk.py
vendored
Executable file
@@ -0,0 +1,611 @@
|
||||
#!/usr/bin/python3
|
||||
#
|
||||
# Copyright (c) 2013-2020 The Khronos Group Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import argparse
|
||||
import pdb
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
import xml.etree.ElementTree as etree
|
||||
|
||||
from cgenerator import CGeneratorOptions, COutputGenerator
|
||||
from docgenerator import DocGeneratorOptions, DocOutputGenerator
|
||||
from extensionmetadocgenerator import (ExtensionMetaDocGeneratorOptions,
|
||||
ExtensionMetaDocOutputGenerator)
|
||||
from interfacedocgenerator import InterfaceDocGenerator
|
||||
from generator import write
|
||||
from hostsyncgenerator import HostSynchronizationOutputGenerator
|
||||
from pygenerator import PyOutputGenerator
|
||||
from reflib import logDiag, logWarn, setLogFile
|
||||
from reg import Registry
|
||||
from validitygenerator import ValidityOutputGenerator
|
||||
from vkconventions import VulkanConventions
|
||||
|
||||
|
||||
# Simple timer functions
|
||||
startTime = None
|
||||
|
||||
|
||||
def startTimer(timeit):
|
||||
global startTime
|
||||
if timeit:
|
||||
startTime = time.process_time()
|
||||
|
||||
|
||||
def endTimer(timeit, msg):
|
||||
global startTime
|
||||
if timeit:
|
||||
endTime = time.process_time()
|
||||
logDiag(msg, endTime - startTime)
|
||||
startTime = None
|
||||
|
||||
|
||||
def makeREstring(strings, default=None, strings_are_regex=False):
|
||||
"""Turn a list of strings into a regexp string matching exactly those strings."""
|
||||
if strings or default is None:
|
||||
if not strings_are_regex:
|
||||
strings = (re.escape(s) for s in strings)
|
||||
return '^(' + '|'.join(strings) + ')$'
|
||||
return default
|
||||
|
||||
|
||||
def makeGenOpts(args):
|
||||
"""Returns a directory of [ generator function, generator options ] indexed
|
||||
by specified short names. The generator options incorporate the following
|
||||
parameters:
|
||||
|
||||
args is an parsed argument object; see below for the fields that are used."""
|
||||
global genOpts
|
||||
genOpts = {}
|
||||
|
||||
# Default class of extensions to include, or None
|
||||
defaultExtensions = args.defaultExtensions
|
||||
|
||||
# Additional extensions to include (list of extensions)
|
||||
extensions = args.extension
|
||||
|
||||
# Extensions to remove (list of extensions)
|
||||
removeExtensions = args.removeExtensions
|
||||
|
||||
# Extensions to emit (list of extensions)
|
||||
emitExtensions = args.emitExtensions
|
||||
|
||||
# Features to include (list of features)
|
||||
features = args.feature
|
||||
|
||||
# Whether to disable inclusion protect in headers
|
||||
protect = args.protect
|
||||
|
||||
# Output target directory
|
||||
directory = args.directory
|
||||
|
||||
# Path to generated files, particularly api.py
|
||||
genpath = args.genpath
|
||||
|
||||
# Descriptive names for various regexp patterns used to select
|
||||
# versions and extensions
|
||||
allFeatures = allExtensions = r'.*'
|
||||
|
||||
# Turn lists of names/patterns into matching regular expressions
|
||||
addExtensionsPat = makeREstring(extensions, None)
|
||||
removeExtensionsPat = makeREstring(removeExtensions, None)
|
||||
emitExtensionsPat = makeREstring(emitExtensions, allExtensions)
|
||||
featuresPat = makeREstring(features, allFeatures)
|
||||
|
||||
# Copyright text prefixing all headers (list of strings).
|
||||
# The SPDX formatting below works around constraints of the 'reuse' tool
|
||||
prefixStrings = [
|
||||
'/*',
|
||||
'** Copyright (c) 2015-2020 The Khronos Group Inc.',
|
||||
'**',
|
||||
'** SPDX' + '-License-Identifier: Apache-2.0',
|
||||
'*/',
|
||||
''
|
||||
]
|
||||
|
||||
# Text specific to Vulkan headers
|
||||
vkPrefixStrings = [
|
||||
'/*',
|
||||
'** This header is generated from the Khronos Vulkan XML API Registry.',
|
||||
'**',
|
||||
'*/',
|
||||
''
|
||||
]
|
||||
|
||||
# Defaults for generating re-inclusion protection wrappers (or not)
|
||||
protectFile = protect
|
||||
|
||||
# An API style conventions object
|
||||
conventions = VulkanConventions()
|
||||
|
||||
# API include files for spec and ref pages
|
||||
# Overwrites include subdirectories in spec source tree
|
||||
# The generated include files do not include the calling convention
|
||||
# macros (apientry etc.), unlike the header files.
|
||||
# Because the 1.0 core branch includes ref pages for extensions,
|
||||
# all the extension interfaces need to be generated, even though
|
||||
# none are used by the core spec itself.
|
||||
genOpts['apiinc'] = [
|
||||
DocOutputGenerator,
|
||||
DocGeneratorOptions(
|
||||
conventions = conventions,
|
||||
filename = 'timeMarker',
|
||||
directory = directory,
|
||||
genpath = genpath,
|
||||
apiname = 'vulkan',
|
||||
profile = None,
|
||||
versions = featuresPat,
|
||||
emitversions = featuresPat,
|
||||
defaultExtensions = None,
|
||||
addExtensions = addExtensionsPat,
|
||||
removeExtensions = removeExtensionsPat,
|
||||
emitExtensions = emitExtensionsPat,
|
||||
prefixText = prefixStrings + vkPrefixStrings,
|
||||
apicall = '',
|
||||
apientry = '',
|
||||
apientryp = '*',
|
||||
alignFuncParam = 48,
|
||||
expandEnumerants = False)
|
||||
]
|
||||
|
||||
# Python representation of API information, used by scripts that
|
||||
# don't need to load the full XML.
|
||||
genOpts['api.py'] = [
|
||||
PyOutputGenerator,
|
||||
DocGeneratorOptions(
|
||||
conventions = conventions,
|
||||
filename = 'api.py',
|
||||
directory = directory,
|
||||
genpath = None,
|
||||
apiname = 'vulkan',
|
||||
profile = None,
|
||||
versions = featuresPat,
|
||||
emitversions = featuresPat,
|
||||
defaultExtensions = None,
|
||||
addExtensions = addExtensionsPat,
|
||||
removeExtensions = removeExtensionsPat,
|
||||
emitExtensions = emitExtensionsPat,
|
||||
reparentEnums = False)
|
||||
]
|
||||
|
||||
# API validity files for spec
|
||||
genOpts['validinc'] = [
|
||||
ValidityOutputGenerator,
|
||||
DocGeneratorOptions(
|
||||
conventions = conventions,
|
||||
filename = 'timeMarker',
|
||||
directory = directory,
|
||||
genpath = None,
|
||||
apiname = 'vulkan',
|
||||
profile = None,
|
||||
versions = featuresPat,
|
||||
emitversions = featuresPat,
|
||||
defaultExtensions = None,
|
||||
addExtensions = addExtensionsPat,
|
||||
removeExtensions = removeExtensionsPat,
|
||||
emitExtensions = emitExtensionsPat)
|
||||
]
|
||||
|
||||
# API host sync table files for spec
|
||||
genOpts['hostsyncinc'] = [
|
||||
HostSynchronizationOutputGenerator,
|
||||
DocGeneratorOptions(
|
||||
conventions = conventions,
|
||||
filename = 'timeMarker',
|
||||
directory = directory,
|
||||
genpath = None,
|
||||
apiname = 'vulkan',
|
||||
profile = None,
|
||||
versions = featuresPat,
|
||||
emitversions = featuresPat,
|
||||
defaultExtensions = None,
|
||||
addExtensions = addExtensionsPat,
|
||||
removeExtensions = removeExtensionsPat,
|
||||
emitExtensions = emitExtensionsPat,
|
||||
reparentEnums = False)
|
||||
]
|
||||
|
||||
# Extension metainformation for spec extension appendices
|
||||
# Includes all extensions by default, but only so that the generated
|
||||
# 'promoted_extensions_*' files refer to all extensions that were
|
||||
# promoted to a core version.
|
||||
genOpts['extinc'] = [
|
||||
ExtensionMetaDocOutputGenerator,
|
||||
ExtensionMetaDocGeneratorOptions(
|
||||
conventions = conventions,
|
||||
filename = 'timeMarker',
|
||||
directory = directory,
|
||||
genpath = None,
|
||||
apiname = 'vulkan',
|
||||
profile = None,
|
||||
versions = featuresPat,
|
||||
emitversions = None,
|
||||
defaultExtensions = defaultExtensions,
|
||||
addExtensions = addExtensionsPat,
|
||||
removeExtensions = None,
|
||||
emitExtensions = emitExtensionsPat)
|
||||
]
|
||||
|
||||
# Version and extension interface docs for version/extension appendices
|
||||
# Includes all extensions by default.
|
||||
genOpts['interfaceinc'] = [
|
||||
InterfaceDocGenerator,
|
||||
DocGeneratorOptions(
|
||||
conventions = conventions,
|
||||
filename = 'timeMarker',
|
||||
directory = directory,
|
||||
genpath = None,
|
||||
apiname = 'vulkan',
|
||||
profile = None,
|
||||
versions = featuresPat,
|
||||
emitversions = featuresPat,
|
||||
defaultExtensions = None,
|
||||
addExtensions = addExtensionsPat,
|
||||
removeExtensions = removeExtensionsPat,
|
||||
emitExtensions = emitExtensionsPat,
|
||||
reparentEnums = False)
|
||||
]
|
||||
|
||||
# Platform extensions, in their own header files
|
||||
# Each element of the platforms[] array defines information for
|
||||
# generating a single platform:
|
||||
# [0] is the generated header file name
|
||||
# [1] is the set of platform extensions to generate
|
||||
# [2] is additional extensions whose interfaces should be considered,
|
||||
# but suppressed in the output, to avoid duplicate definitions of
|
||||
# dependent types like VkDisplayKHR and VkSurfaceKHR which come from
|
||||
# non-platform extensions.
|
||||
|
||||
# Track all platform extensions, for exclusion from vulkan_core.h
|
||||
allPlatformExtensions = []
|
||||
|
||||
# Extensions suppressed for all WSI platforms (WSI extensions required
|
||||
# by all platforms)
|
||||
commonSuppressExtensions = [ 'VK_KHR_display', 'VK_KHR_swapchain' ]
|
||||
|
||||
# Extensions required and suppressed for beta "platform". This can
|
||||
# probably eventually be derived from the requires= attributes of
|
||||
# the extension blocks.
|
||||
betaRequireExtensions = [ 'VK_KHR_ray_tracing', 'VK_KHR_deferred_host_operations', 'VK_KHR_pipeline_library' ]
|
||||
betaSuppressExtensions = [ 'VK_NV_ray_tracing' ]
|
||||
|
||||
platforms = [
|
||||
[ 'vulkan_android.h', [ 'VK_KHR_android_surface',
|
||||
'VK_ANDROID_external_memory_android_hardware_buffer'
|
||||
], commonSuppressExtensions ],
|
||||
[ 'vulkan_fuchsia.h', [ 'VK_FUCHSIA_imagepipe_surface'], commonSuppressExtensions ],
|
||||
[ 'vulkan_ggp.h', [ 'VK_GGP_stream_descriptor_surface',
|
||||
'VK_GGP_frame_token' ], commonSuppressExtensions ],
|
||||
[ 'vulkan_ios.h', [ 'VK_MVK_ios_surface' ], commonSuppressExtensions ],
|
||||
[ 'vulkan_macos.h', [ 'VK_MVK_macos_surface' ], commonSuppressExtensions ],
|
||||
[ 'vulkan_vi.h', [ 'VK_NN_vi_surface' ], commonSuppressExtensions ],
|
||||
[ 'vulkan_wayland.h', [ 'VK_KHR_wayland_surface' ], commonSuppressExtensions ],
|
||||
[ 'vulkan_win32.h', [ 'VK_.*_win32(|_.*)', 'VK_EXT_full_screen_exclusive' ],
|
||||
commonSuppressExtensions +
|
||||
[ 'VK_KHR_external_semaphore',
|
||||
'VK_KHR_external_memory_capabilities',
|
||||
'VK_KHR_external_fence',
|
||||
'VK_KHR_external_fence_capabilities',
|
||||
'VK_KHR_get_surface_capabilities2',
|
||||
'VK_NV_external_memory_capabilities',
|
||||
] ],
|
||||
[ 'vulkan_xcb.h', [ 'VK_KHR_xcb_surface' ], commonSuppressExtensions ],
|
||||
[ 'vulkan_xlib.h', [ 'VK_KHR_xlib_surface' ], commonSuppressExtensions ],
|
||||
[ 'vulkan_xlib_xrandr.h', [ 'VK_EXT_acquire_xlib_display' ], commonSuppressExtensions ],
|
||||
[ 'vulkan_metal.h', [ 'VK_EXT_metal_surface' ], commonSuppressExtensions ],
|
||||
[ 'vulkan_beta.h', betaRequireExtensions, betaSuppressExtensions ],
|
||||
]
|
||||
|
||||
for platform in platforms:
|
||||
headername = platform[0]
|
||||
|
||||
allPlatformExtensions += platform[1]
|
||||
|
||||
addPlatformExtensionsRE = makeREstring(
|
||||
platform[1] + platform[2], strings_are_regex=True)
|
||||
emitPlatformExtensionsRE = makeREstring(
|
||||
platform[1], strings_are_regex=True)
|
||||
|
||||
opts = CGeneratorOptions(
|
||||
conventions = conventions,
|
||||
filename = headername,
|
||||
directory = directory,
|
||||
genpath = None,
|
||||
apiname = 'vulkan',
|
||||
profile = None,
|
||||
versions = featuresPat,
|
||||
emitversions = None,
|
||||
defaultExtensions = None,
|
||||
addExtensions = addPlatformExtensionsRE,
|
||||
removeExtensions = None,
|
||||
emitExtensions = emitPlatformExtensionsRE,
|
||||
prefixText = prefixStrings + vkPrefixStrings,
|
||||
genFuncPointers = True,
|
||||
protectFile = protectFile,
|
||||
protectFeature = False,
|
||||
protectProto = '#ifndef',
|
||||
protectProtoStr = 'VK_NO_PROTOTYPES',
|
||||
apicall = 'VKAPI_ATTR ',
|
||||
apientry = 'VKAPI_CALL ',
|
||||
apientryp = 'VKAPI_PTR *',
|
||||
alignFuncParam = 48)
|
||||
|
||||
genOpts[headername] = [ COutputGenerator, opts ]
|
||||
|
||||
# Header for core API + extensions.
|
||||
# To generate just the core API,
|
||||
# change to 'defaultExtensions = None' below.
|
||||
#
|
||||
# By default this adds all enabled, non-platform extensions.
|
||||
# It removes all platform extensions (from the platform headers options
|
||||
# constructed above) as well as any explicitly specified removals.
|
||||
|
||||
removeExtensionsPat = makeREstring(
|
||||
allPlatformExtensions + removeExtensions, None, strings_are_regex=True)
|
||||
|
||||
genOpts['vulkan_core.h'] = [
|
||||
COutputGenerator,
|
||||
CGeneratorOptions(
|
||||
conventions = conventions,
|
||||
filename = 'vulkan_core.h',
|
||||
directory = directory,
|
||||
genpath = None,
|
||||
apiname = 'vulkan',
|
||||
profile = None,
|
||||
versions = featuresPat,
|
||||
emitversions = featuresPat,
|
||||
defaultExtensions = defaultExtensions,
|
||||
addExtensions = addExtensionsPat,
|
||||
removeExtensions = removeExtensionsPat,
|
||||
emitExtensions = emitExtensionsPat,
|
||||
prefixText = prefixStrings + vkPrefixStrings,
|
||||
genFuncPointers = True,
|
||||
protectFile = protectFile,
|
||||
protectFeature = False,
|
||||
protectProto = '#ifndef',
|
||||
protectProtoStr = 'VK_NO_PROTOTYPES',
|
||||
apicall = 'VKAPI_ATTR ',
|
||||
apientry = 'VKAPI_CALL ',
|
||||
apientryp = 'VKAPI_PTR *',
|
||||
alignFuncParam = 48)
|
||||
]
|
||||
|
||||
# Unused - vulkan10.h target.
|
||||
# It is possible to generate a header with just the Vulkan 1.0 +
|
||||
# extension interfaces defined, but since the promoted KHR extensions
|
||||
# are now defined in terms of the 1.1 interfaces, such a header is very
|
||||
# similar to vulkan_core.h.
|
||||
genOpts['vulkan10.h'] = [
|
||||
COutputGenerator,
|
||||
CGeneratorOptions(
|
||||
conventions = conventions,
|
||||
filename = 'vulkan10.h',
|
||||
directory = directory,
|
||||
genpath = None,
|
||||
apiname = 'vulkan',
|
||||
profile = None,
|
||||
versions = 'VK_VERSION_1_0',
|
||||
emitversions = 'VK_VERSION_1_0',
|
||||
defaultExtensions = None,
|
||||
addExtensions = None,
|
||||
removeExtensions = None,
|
||||
emitExtensions = None,
|
||||
prefixText = prefixStrings + vkPrefixStrings,
|
||||
genFuncPointers = True,
|
||||
protectFile = protectFile,
|
||||
protectFeature = False,
|
||||
protectProto = '#ifndef',
|
||||
protectProtoStr = 'VK_NO_PROTOTYPES',
|
||||
apicall = 'VKAPI_ATTR ',
|
||||
apientry = 'VKAPI_CALL ',
|
||||
apientryp = 'VKAPI_PTR *',
|
||||
alignFuncParam = 48)
|
||||
]
|
||||
|
||||
# Unused - vulkan11.h target.
|
||||
# It is possible to generate a header with just the Vulkan 1.0 +
|
||||
# extension interfaces defined, but since the promoted KHR extensions
|
||||
# are now defined in terms of the 1.1 interfaces, such a header is very
|
||||
# similar to vulkan_core.h.
|
||||
genOpts['vulkan11.h'] = [
|
||||
COutputGenerator,
|
||||
CGeneratorOptions(
|
||||
conventions = conventions,
|
||||
filename = 'vulkan11.h',
|
||||
directory = directory,
|
||||
genpath = None,
|
||||
apiname = 'vulkan',
|
||||
profile = None,
|
||||
versions = '^VK_VERSION_1_[01]$',
|
||||
emitversions = '^VK_VERSION_1_[01]$',
|
||||
defaultExtensions = None,
|
||||
addExtensions = None,
|
||||
removeExtensions = None,
|
||||
emitExtensions = None,
|
||||
prefixText = prefixStrings + vkPrefixStrings,
|
||||
genFuncPointers = True,
|
||||
protectFile = protectFile,
|
||||
protectFeature = False,
|
||||
protectProto = '#ifndef',
|
||||
protectProtoStr = 'VK_NO_PROTOTYPES',
|
||||
apicall = 'VKAPI_ATTR ',
|
||||
apientry = 'VKAPI_CALL ',
|
||||
apientryp = 'VKAPI_PTR *',
|
||||
alignFuncParam = 48)
|
||||
]
|
||||
|
||||
genOpts['alias.h'] = [
|
||||
COutputGenerator,
|
||||
CGeneratorOptions(
|
||||
conventions = conventions,
|
||||
filename = 'alias.h',
|
||||
directory = directory,
|
||||
genpath = None,
|
||||
apiname = 'vulkan',
|
||||
profile = None,
|
||||
versions = featuresPat,
|
||||
emitversions = featuresPat,
|
||||
defaultExtensions = defaultExtensions,
|
||||
addExtensions = None,
|
||||
removeExtensions = removeExtensionsPat,
|
||||
emitExtensions = emitExtensionsPat,
|
||||
prefixText = None,
|
||||
genFuncPointers = False,
|
||||
protectFile = False,
|
||||
protectFeature = False,
|
||||
protectProto = '',
|
||||
protectProtoStr = '',
|
||||
apicall = '',
|
||||
apientry = '',
|
||||
apientryp = '',
|
||||
alignFuncParam = 36)
|
||||
]
|
||||
|
||||
|
||||
def genTarget(args):
|
||||
"""Create an API generator and corresponding generator options based on
|
||||
the requested target and command line options.
|
||||
|
||||
This is encapsulated in a function so it can be profiled and/or timed.
|
||||
The args parameter is an parsed argument object containing the following
|
||||
fields that are used:
|
||||
|
||||
- target - target to generate
|
||||
- directory - directory to generate it in
|
||||
- protect - True if re-inclusion wrappers should be created
|
||||
- extensions - list of additional extensions to include in generated interfaces"""
|
||||
|
||||
# Create generator options with parameters specified on command line
|
||||
makeGenOpts(args)
|
||||
|
||||
# Select a generator matching the requested target
|
||||
if args.target in genOpts:
|
||||
createGenerator = genOpts[args.target][0]
|
||||
options = genOpts[args.target][1]
|
||||
|
||||
logDiag('* Building', options.filename)
|
||||
logDiag('* options.versions =', options.versions)
|
||||
logDiag('* options.emitversions =', options.emitversions)
|
||||
logDiag('* options.defaultExtensions =', options.defaultExtensions)
|
||||
logDiag('* options.addExtensions =', options.addExtensions)
|
||||
logDiag('* options.removeExtensions =', options.removeExtensions)
|
||||
logDiag('* options.emitExtensions =', options.emitExtensions)
|
||||
|
||||
gen = createGenerator(errFile=errWarn,
|
||||
warnFile=errWarn,
|
||||
diagFile=diag)
|
||||
return (gen, options)
|
||||
else:
|
||||
logErr('No generator options for unknown target:', args.target)
|
||||
return None
|
||||
|
||||
|
||||
# -feature name
|
||||
# -extension name
|
||||
# For both, "name" may be a single name, or a space-separated list
|
||||
# of names, or a regular expression.
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument('-defaultExtensions', action='store',
|
||||
default='vulkan',
|
||||
help='Specify a single class of extensions to add to targets')
|
||||
parser.add_argument('-extension', action='append',
|
||||
default=[],
|
||||
help='Specify an extension or extensions to add to targets')
|
||||
parser.add_argument('-removeExtensions', action='append',
|
||||
default=[],
|
||||
help='Specify an extension or extensions to remove from targets')
|
||||
parser.add_argument('-emitExtensions', action='append',
|
||||
default=[],
|
||||
help='Specify an extension or extensions to emit in targets')
|
||||
parser.add_argument('-feature', action='append',
|
||||
default=[],
|
||||
help='Specify a core API feature name or names to add to targets')
|
||||
parser.add_argument('-debug', action='store_true',
|
||||
help='Enable debugging')
|
||||
parser.add_argument('-dump', action='store_true',
|
||||
help='Enable dump to stderr')
|
||||
parser.add_argument('-diagfile', action='store',
|
||||
default=None,
|
||||
help='Write diagnostics to specified file')
|
||||
parser.add_argument('-errfile', action='store',
|
||||
default=None,
|
||||
help='Write errors and warnings to specified file instead of stderr')
|
||||
parser.add_argument('-noprotect', dest='protect', action='store_false',
|
||||
help='Disable inclusion protection in output headers')
|
||||
parser.add_argument('-profile', action='store_true',
|
||||
help='Enable profiling')
|
||||
parser.add_argument('-registry', action='store',
|
||||
default='vk.xml',
|
||||
help='Use specified registry file instead of vk.xml')
|
||||
parser.add_argument('-time', action='store_true',
|
||||
help='Enable timing')
|
||||
parser.add_argument('-validate', action='store_true',
|
||||
help='Enable XML group validation')
|
||||
parser.add_argument('-genpath', action='store', default='gen',
|
||||
help='Path to generated files')
|
||||
parser.add_argument('-o', action='store', dest='directory',
|
||||
default='.',
|
||||
help='Create target and related files in specified directory')
|
||||
parser.add_argument('target', metavar='target', nargs='?',
|
||||
help='Specify target')
|
||||
parser.add_argument('-quiet', action='store_true', default=True,
|
||||
help='Suppress script output during normal execution.')
|
||||
parser.add_argument('-verbose', action='store_false', dest='quiet', default=True,
|
||||
help='Enable script output during normal execution.')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
# This splits arguments which are space-separated lists
|
||||
args.feature = [name for arg in args.feature for name in arg.split()]
|
||||
args.extension = [name for arg in args.extension for name in arg.split()]
|
||||
|
||||
# create error/warning & diagnostic files
|
||||
if args.errfile:
|
||||
errWarn = open(args.errfile, 'w', encoding='utf-8')
|
||||
else:
|
||||
errWarn = sys.stderr
|
||||
|
||||
if args.diagfile:
|
||||
diag = open(args.diagfile, 'w', encoding='utf-8')
|
||||
else:
|
||||
diag = None
|
||||
|
||||
# Create the API generator & generator options
|
||||
(gen, options) = genTarget(args)
|
||||
|
||||
# Create the registry object with the specified generator and generator
|
||||
# options. The options are set before XML loading as they may affect it.
|
||||
reg = Registry(gen, options)
|
||||
|
||||
# Parse the specified registry XML into an ElementTree object
|
||||
startTimer(args.time)
|
||||
tree = etree.parse(args.registry)
|
||||
endTimer(args.time, '* Time to make ElementTree =')
|
||||
|
||||
# Load the XML tree into the registry object
|
||||
startTimer(args.time)
|
||||
reg.loadElementTree(tree)
|
||||
endTimer(args.time, '* Time to parse ElementTree =')
|
||||
|
||||
if args.validate:
|
||||
reg.validateGroups()
|
||||
|
||||
if args.dump:
|
||||
logDiag('* Dumping registry to regdump.txt')
|
||||
reg.dumpReg(filehandle=open('regdump.txt', 'w', encoding='utf-8'))
|
||||
|
||||
# Finally, use the output generator to create the requested target
|
||||
if args.debug:
|
||||
pdb.run('reg.apiGen()')
|
||||
else:
|
||||
startTimer(args.time)
|
||||
reg.apiGen()
|
||||
endTimer(args.time, '* Time to generate ' + options.filename + ' =')
|
||||
|
||||
if not args.quiet:
|
||||
logDiag('* Generated', options.filename)
|
1324
externals/Vulkan-Headers/registry/reg.py
vendored
Executable file
1324
externals/Vulkan-Headers/registry/reg.py
vendored
Executable file
File diff suppressed because it is too large
Load Diff
58
externals/Vulkan-Headers/registry/spec_tools/util.py
vendored
Executable file
58
externals/Vulkan-Headers/registry/spec_tools/util.py
vendored
Executable file
@@ -0,0 +1,58 @@
|
||||
"""Utility functions not closely tied to other spec_tools types."""
|
||||
# Copyright (c) 2018-2019 Collabora, Ltd.
|
||||
# Copyright (c) 2013-2020 The Khronos Group Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
def getElemName(elem, default=None):
|
||||
"""Get the name associated with an element, either a name child or name attribute."""
|
||||
name_elem = elem.find('name')
|
||||
if name_elem is not None:
|
||||
return name_elem.text
|
||||
# Fallback if there is no child.
|
||||
return elem.get('name', default)
|
||||
|
||||
|
||||
def getElemType(elem, default=None):
|
||||
"""Get the type associated with an element, either a type child or type attribute."""
|
||||
type_elem = elem.find('type')
|
||||
if type_elem is not None:
|
||||
return type_elem.text
|
||||
# Fallback if there is no child.
|
||||
return elem.get('type', default)
|
||||
|
||||
|
||||
def findFirstWithPredicate(collection, pred):
|
||||
"""Return the first element that satisfies the predicate, or None if none exist.
|
||||
|
||||
NOTE: Some places where this is used might be better served by changing to a dictionary.
|
||||
"""
|
||||
for elt in collection:
|
||||
if pred(elt):
|
||||
return elt
|
||||
return None
|
||||
|
||||
|
||||
def findNamedElem(elems, name):
|
||||
"""Traverse a collection of elements with 'name' nodes or attributes, looking for and returning one with the right name.
|
||||
|
||||
NOTE: Many places where this is used might be better served by changing to a dictionary.
|
||||
"""
|
||||
return findFirstWithPredicate(elems, lambda elem: getElemName(elem) == name)
|
||||
|
||||
|
||||
def findTypedElem(elems, typename):
|
||||
"""Traverse a collection of elements with 'type' nodes or attributes, looking for and returning one with the right typename.
|
||||
|
||||
NOTE: Many places where this is used might be better served by changing to a dictionary.
|
||||
"""
|
||||
return findFirstWithPredicate(elems, lambda elem: getElemType(elem) == typename)
|
||||
|
||||
|
||||
def findNamedObject(collection, name):
|
||||
"""Traverse a collection of elements with 'name' attributes, looking for and returning one with the right name.
|
||||
|
||||
NOTE: Many places where this is used might be better served by changing to a dictionary.
|
||||
"""
|
||||
return findFirstWithPredicate(collection, lambda elt: elt.name == name)
|
30490
externals/Vulkan-Headers/registry/validusage.json
vendored
Executable file
30490
externals/Vulkan-Headers/registry/validusage.json
vendored
Executable file
File diff suppressed because one or more lines are too long
13827
externals/Vulkan-Headers/registry/vk.xml
vendored
Executable file
13827
externals/Vulkan-Headers/registry/vk.xml
vendored
Executable file
File diff suppressed because it is too large
Load Diff
261
externals/Vulkan-Headers/registry/vkconventions.py
vendored
Executable file
261
externals/Vulkan-Headers/registry/vkconventions.py
vendored
Executable file
@@ -0,0 +1,261 @@
|
||||
#!/usr/bin/python3 -i
|
||||
#
|
||||
# Copyright (c) 2013-2020 The Khronos Group Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Working-group-specific style conventions,
|
||||
# used in generation.
|
||||
|
||||
import re
|
||||
import os
|
||||
|
||||
from conventions import ConventionsBase
|
||||
|
||||
|
||||
# Modified from default implementation - see category_requires_validation() below
|
||||
CATEGORIES_REQUIRING_VALIDATION = set(('handle', 'enum', 'bitmask'))
|
||||
|
||||
# Tokenize into "words" for structure types, approximately per spec "Implicit Valid Usage" section 2.7.2
|
||||
# This first set is for things we recognize explicitly as words,
|
||||
# as exceptions to the general regex.
|
||||
# Ideally these would be listed in the spec as exceptions, as OpenXR does.
|
||||
SPECIAL_WORDS = set((
|
||||
'16Bit', # VkPhysicalDevice16BitStorageFeatures
|
||||
'8Bit', # VkPhysicalDevice8BitStorageFeaturesKHR
|
||||
'AABB', # VkGeometryAABBNV
|
||||
'ASTC', # VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT
|
||||
'D3D12', # VkD3D12FenceSubmitInfoKHR
|
||||
'Float16', # VkPhysicalDeviceShaderFloat16Int8FeaturesKHR
|
||||
'ImagePipe', # VkImagePipeSurfaceCreateInfoFUCHSIA
|
||||
'Int64', # VkPhysicalDeviceShaderAtomicInt64FeaturesKHR
|
||||
'Int8', # VkPhysicalDeviceShaderFloat16Int8FeaturesKHR
|
||||
'MacOS', # VkMacOSSurfaceCreateInfoMVK
|
||||
'Uint8', # VkPhysicalDeviceIndexTypeUint8FeaturesEXT
|
||||
'Win32', # VkWin32SurfaceCreateInfoKHR
|
||||
))
|
||||
# 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))
|
||||
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))
|
||||
|
||||
|
||||
class VulkanConventions(ConventionsBase):
|
||||
@property
|
||||
def null(self):
|
||||
"""Preferred spelling of NULL."""
|
||||
return '`NULL`'
|
||||
|
||||
@property
|
||||
def struct_macro(self):
|
||||
"""Get the appropriate format macro for a structure.
|
||||
|
||||
Primarily affects generated valid usage statements.
|
||||
"""
|
||||
|
||||
return 'slink:'
|
||||
|
||||
@property
|
||||
def constFlagBits(self):
|
||||
"""Returns True if static const flag bits should be generated, False if an enumerated type should be generated."""
|
||||
return False
|
||||
|
||||
@property
|
||||
def structtype_member_name(self):
|
||||
"""Return name of the structure type member"""
|
||||
return 'sType'
|
||||
|
||||
@property
|
||||
def nextpointer_member_name(self):
|
||||
"""Return name of the structure pointer chain member"""
|
||||
return 'pNext'
|
||||
|
||||
@property
|
||||
def valid_pointer_prefix(self):
|
||||
"""Return prefix to pointers which must themselves be valid"""
|
||||
return 'valid'
|
||||
|
||||
def is_structure_type_member(self, paramtype, paramname):
|
||||
"""Determine if member type and name match the structure type member."""
|
||||
return paramtype == 'VkStructureType' and paramname == self.structtype_member_name
|
||||
|
||||
def is_nextpointer_member(self, paramtype, paramname):
|
||||
"""Determine if member type and name match the next pointer chain member."""
|
||||
return paramtype == 'void' and paramname == self.nextpointer_member_name
|
||||
|
||||
def generate_structure_type_from_name(self, structname):
|
||||
"""Generate a structure type name, like VK_STRUCTURE_TYPE_CREATE_INSTANCE_INFO"""
|
||||
structure_type_parts = []
|
||||
# Tokenize into "words"
|
||||
for elem in MAIN_RE.findall(structname):
|
||||
word = elem[0]
|
||||
if word == 'Vk':
|
||||
structure_type_parts.append('VK_STRUCTURE_TYPE')
|
||||
else:
|
||||
structure_type_parts.append(word.upper())
|
||||
return '_'.join(structure_type_parts)
|
||||
|
||||
@property
|
||||
def warning_comment(self):
|
||||
"""Return warning comment to be placed in header of generated Asciidoctor files"""
|
||||
return '// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry'
|
||||
|
||||
@property
|
||||
def file_suffix(self):
|
||||
"""Return suffix of generated Asciidoctor files"""
|
||||
return '.txt'
|
||||
|
||||
def api_name(self, spectype='api'):
|
||||
"""Return API or specification name for citations in ref pages.ref
|
||||
pages should link to for
|
||||
|
||||
spectype is the spec this refpage is for: 'api' is the Vulkan API
|
||||
Specification. Defaults to 'api'. If an unrecognized spectype is
|
||||
given, returns None.
|
||||
"""
|
||||
if spectype == 'api' or spectype is None:
|
||||
return 'Vulkan'
|
||||
else:
|
||||
return None
|
||||
|
||||
@property
|
||||
def api_prefix(self):
|
||||
"""Return API token prefix"""
|
||||
return 'VK_'
|
||||
|
||||
@property
|
||||
def write_contacts(self):
|
||||
"""Return whether contact list should be written to extension appendices"""
|
||||
return True
|
||||
|
||||
@property
|
||||
def write_refpage_include(self):
|
||||
"""Return whether refpage include should be written to extension appendices"""
|
||||
return True
|
||||
|
||||
@property
|
||||
def member_used_for_unique_vuid(self):
|
||||
"""Return the member name used in the VUID-...-...-unique ID."""
|
||||
return self.structtype_member_name
|
||||
|
||||
def is_externsync_command(self, protoname):
|
||||
"""Returns True if the protoname element is an API command requiring
|
||||
external synchronization
|
||||
"""
|
||||
return protoname is not None and 'vkCmd' in protoname
|
||||
|
||||
def is_api_name(self, name):
|
||||
"""Returns True if name is in the reserved API namespace.
|
||||
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'
|
||||
|
||||
def specURL(self, spectype='api'):
|
||||
"""Return public registry URL which ref pages should link to for the
|
||||
current all-extensions HTML specification, so xrefs in the
|
||||
asciidoc source that aren't to ref pages can link into it
|
||||
instead. N.b. this may need to change on a per-refpage basis if
|
||||
there are multiple documents involved.
|
||||
"""
|
||||
return 'https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html'
|
||||
|
||||
@property
|
||||
def xml_api_name(self):
|
||||
"""Return the name used in the default API XML registry for the default API"""
|
||||
return 'vulkan'
|
||||
|
||||
@property
|
||||
def registry_path(self):
|
||||
"""Return relpath to the default API XML registry in this project."""
|
||||
return 'xml/vk.xml'
|
||||
|
||||
@property
|
||||
def specification_path(self):
|
||||
"""Return relpath to the Asciidoctor specification sources in this project."""
|
||||
return '{generated}/meta'
|
||||
|
||||
@property
|
||||
def special_use_section_anchor(self):
|
||||
"""Return asciidoctor anchor name in the API Specification of the
|
||||
section describing extension special uses in detail."""
|
||||
return 'extendingvulkan-compatibility-specialuse'
|
||||
|
||||
@property
|
||||
def extra_refpage_headers(self):
|
||||
"""Return any extra text to add to refpage headers."""
|
||||
return 'include::{config}/attribs.txt[]'
|
||||
|
||||
@property
|
||||
def extension_index_prefixes(self):
|
||||
"""Return a list of extension prefixes used to group extension refpages."""
|
||||
return ['VK_KHR', 'VK_EXT', 'VK']
|
||||
|
||||
@property
|
||||
def unified_flag_refpages(self):
|
||||
"""Return True if Flags/FlagBits refpages are unified, False if
|
||||
they're separate.
|
||||
"""
|
||||
return False
|
||||
|
||||
@property
|
||||
def spec_reflow_path(self):
|
||||
"""Return the path to the spec source folder to reflow"""
|
||||
return os.getcwd()
|
||||
|
||||
@property
|
||||
def spec_no_reflow_dirs(self):
|
||||
"""Return a set of directories not to automatically descend into
|
||||
when reflowing spec text
|
||||
"""
|
||||
return ('scripts', 'style')
|
||||
|
||||
@property
|
||||
def zero(self):
|
||||
return '`0`'
|
||||
|
||||
def category_requires_validation(self, category):
|
||||
"""Return True if the given type 'category' always requires validation.
|
||||
|
||||
Overridden because Vulkan doesn't require "valid" text for basetype in the spec right now."""
|
||||
return category in CATEGORIES_REQUIRING_VALIDATION
|
||||
|
||||
@property
|
||||
def should_skip_checking_codes(self):
|
||||
"""Return True if more than the basic validation of return codes should
|
||||
be skipped for a command.
|
||||
|
||||
Vulkan mostly relies on the validation layers rather than API
|
||||
builtin error checking, so these checks are not appropriate.
|
||||
|
||||
For example, passing in a VkFormat parameter will not potentially
|
||||
generate a VK_ERROR_FORMAT_NOT_SUPPORTED code."""
|
||||
|
||||
return True
|
||||
|
||||
def extension_include_string(self, ext):
|
||||
"""Return format string for include:: line for an extension appendix
|
||||
file. ext is an object with the following members:
|
||||
- name - extension string string
|
||||
- vendor - vendor portion of name
|
||||
- barename - remainder of name"""
|
||||
|
||||
return 'include::{{appendices}}/{name}{suffix}[]'.format(
|
||||
name=ext.name, suffix=self.file_suffix)
|
||||
|
||||
@property
|
||||
def refpage_generated_include_path(self):
|
||||
"""Return path relative to the generated reference pages, to the
|
||||
generated API include files."""
|
||||
return "{generated}"
|
||||
|
||||
def valid_flag_bit(self, bitpos):
|
||||
"""Return True if bitpos is an allowed numeric bit position for
|
||||
an API flag bit.
|
||||
|
||||
Vulkan uses 32 bit Vk*Flags types, and assumes C compilers may
|
||||
cause Vk*FlagBits values with bit 31 set to result in a 64 bit
|
||||
enumerated type, so disallows such flags."""
|
||||
return bitpos >= 0 and bitpos < 31
|
Reference in New Issue
Block a user