Compare commits
64 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
cbf8b58154 | |
|
|
f4fd11e2b6 | |
|
|
cb5783d49d | |
|
|
73121db60b | |
|
|
6bbd8ccd68 | |
|
|
bdda01dc49 | |
|
|
21d217d163 | |
|
|
8e79f71c15 | |
|
|
9747e68285 | |
|
|
7c480ca5aa | |
|
|
5cd5bcf6de | |
|
|
c75dcdc0bb | |
|
|
15f4b3024f | |
|
|
1491456a64 | |
|
|
9423ad7f69 | |
|
|
63a3afa9b2 | |
|
|
36b276f0a2 | |
|
|
b4d30a5fb5 | |
|
|
cda66a2513 | |
|
|
e511715fce | |
|
|
d0b04b733a | |
|
|
3a948949cc | |
|
|
95d69172ba | |
|
|
6f9677513d | |
|
|
4bc2057ad8 | |
|
|
053269201d | |
|
|
878fb0d390 | |
|
|
0a7333161d | |
|
|
1958615077 | |
|
|
f25993be90 | |
|
|
3c1a2e5f10 | |
|
|
9ab0f0602b | |
|
|
75e7718add | |
|
|
aab9fc1ada | |
|
|
767fce85b7 | |
|
|
ed449ac36f | |
|
|
7adfc34c5f | |
|
|
608f95fb9f | |
|
|
d7f08491dc | |
|
|
af898d1c28 | |
|
|
9e9b735e35 | |
|
|
2d30af554e | |
|
|
07a9e8911c | |
|
|
34acbf0712 | |
|
|
fda19f0bb3 | |
|
|
4ff98ef7a8 | |
|
|
2c17c62600 | |
|
|
ed9a0a586b | |
|
|
10578463ae | |
|
|
e0f4656f23 | |
|
|
f522d73454 | |
|
|
40596212e8 | |
|
|
202f053855 | |
|
|
1a9644fbda | |
|
|
938a2c36d2 | |
|
|
857bb352ea | |
|
|
e418dd91fb | |
|
|
7519cc05ad | |
|
|
8578ac94d5 | |
|
|
4bbdbb434d | |
|
|
db104e1c01 | |
|
|
8f2955ba0d | |
|
|
df7099a77e | |
|
|
88d2ac296b |
|
|
@ -8,7 +8,7 @@ on:
|
|||
jobs:
|
||||
build:
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-14, macos-15]
|
||||
|
|
@ -27,10 +27,10 @@ jobs:
|
|||
uses: ashutoshvarma/setup-ninja@master
|
||||
with:
|
||||
version: 1.11.0
|
||||
|
||||
|
||||
- name: Install glm, glfw and glslang
|
||||
run: |
|
||||
cd glm
|
||||
cd glm
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=11 \
|
||||
|
|
@ -64,7 +64,7 @@ jobs:
|
|||
cmake --build build --parallel
|
||||
sudo cmake --install build
|
||||
cd ..
|
||||
|
||||
|
||||
- name: Generate headers
|
||||
run: |
|
||||
cmake -B build -G Ninja \
|
||||
|
|
@ -72,7 +72,6 @@ jobs:
|
|||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
|
|
@ -86,7 +85,6 @@ jobs:
|
|||
-D VULKAN_HPP_RUN_GENERATOR=ON \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
|
|
@ -108,7 +106,6 @@ jobs:
|
|||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=ON \
|
||||
-D VULKAN_HPP_TESTS_BUILD=ON \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
compiler: [clang++-13, clang++-14, clang++-15, g++-10, g++-11]
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
|
@ -32,7 +32,7 @@ jobs:
|
|||
|
||||
- name: Install glm, glfw and glslang
|
||||
run: |
|
||||
cd glm
|
||||
cd glm
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=11 \
|
||||
|
|
@ -74,7 +74,6 @@ jobs:
|
|||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
|
|
@ -88,7 +87,6 @@ jobs:
|
|||
-D VULKAN_HPP_RUN_GENERATOR=ON \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
|
|
@ -96,13 +94,15 @@ jobs:
|
|||
-D CMAKE_CXX_STANDARD=20 \
|
||||
-D CMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --parallel --clean-first
|
||||
|
||||
|
||||
- name: Build samples and tests
|
||||
run: |
|
||||
for CXX_STANDARD in 11 14 17 20 23; do
|
||||
for BUILD_TYPE in Debug Release; do
|
||||
if [ ${{matrix.compiler}} == g++-10 ] && [ $CXX_STANDARD == 23 ]; then
|
||||
continue
|
||||
if [ ${{matrix.compiler}} == g++-10 ]; then
|
||||
if [ $CXX_STANDARD == 20 ] || [ $CXX_STANDARD == 23 ]; then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "================================================================================="
|
||||
|
|
@ -114,7 +114,6 @@ jobs:
|
|||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=ON \
|
||||
-D VULKAN_HPP_TESTS_BUILD=ON \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
compiler: [clang++-16, clang++-17, clang++-18, g++-12, g++-13, g++-14]
|
||||
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
|
@ -32,7 +32,7 @@ jobs:
|
|||
|
||||
- name: Install glm, glfw and glslang
|
||||
run: |
|
||||
cd glm
|
||||
cd glm
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_CXX_COMPILER=${{matrix.compiler}} \
|
||||
-D CMAKE_CXX_STANDARD=11 \
|
||||
|
|
@ -66,7 +66,7 @@ jobs:
|
|||
cmake --build build --parallel
|
||||
sudo cmake --install build
|
||||
cd ..
|
||||
|
||||
|
||||
- name: Generate headers
|
||||
run: |
|
||||
cmake -B build -G Ninja \
|
||||
|
|
@ -74,7 +74,6 @@ jobs:
|
|||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
|
|
@ -88,7 +87,6 @@ jobs:
|
|||
-D VULKAN_HPP_RUN_GENERATOR=ON \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
|
|
@ -115,13 +113,12 @@ jobs:
|
|||
echo "================================================================================="
|
||||
echo "Building C++$CXX_STANDARD in $BUILD_TYPE"
|
||||
echo "================================================================================="
|
||||
|
||||
|
||||
cmake -B build -G Ninja --fresh \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=OFF \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=ON \
|
||||
-D VULKAN_HPP_TESTS_BUILD=ON \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=$CXX_MODULES \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
|
|
|
|||
|
|
@ -0,0 +1,136 @@
|
|||
|
||||
name: CI Ubuntu EXT
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
clang_version: [19, 20]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install libraries
|
||||
run: sudo apt update && sudo apt install libgl-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev
|
||||
|
||||
- name: Install Ninja
|
||||
uses: ashutoshvarma/setup-ninja@master
|
||||
with:
|
||||
version: 1.11.0
|
||||
- name: Install Clang and CMake
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install lsb-release gpg software-properties-common wget
|
||||
wget https://apt.llvm.org/llvm.sh
|
||||
chmod +x llvm.sh
|
||||
sudo ./llvm.sh ${{matrix.clang_version}} all
|
||||
|
||||
sudo apt purge --auto-remove cmake
|
||||
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
|
||||
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ noble main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
|
||||
sudo apt update && sudo apt install cmake
|
||||
|
||||
- name: Install glm, glfw and glslang
|
||||
run: |
|
||||
cd glm
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_CXX_COMPILER=clang++-${{matrix.clang_version}} \
|
||||
-D CMAKE_CXX_STANDARD=11 \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D GLM_BUILD_LIBRARY=ON \
|
||||
-D GLM_BUILD_INSTALL=ON \
|
||||
-D GLM_BUILD_TESTS=OFF
|
||||
cmake --build build --parallel
|
||||
sudo cmake --install build
|
||||
|
||||
cd ../glfw
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_CXX_COMPILER=clang++-${{matrix.clang_version}} \
|
||||
-D CMAKE_CXX_STANDARD=11 \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D GLFW_BUILD_EXAMPLES=OFF \
|
||||
-D GLFW_BUILD_TESTS=OFF \
|
||||
-D GLFW_BUILD_DOCS=OFF \
|
||||
-D GLFW_INSTALL=ON
|
||||
cmake --build build --parallel
|
||||
sudo cmake --install build
|
||||
|
||||
cd ../glslang
|
||||
cmake -B build -G Ninja \
|
||||
-D CMAKE_CXX_COMPILER=clang++-${{matrix.clang_version}} \
|
||||
-D CMAKE_CXX_STANDARD=11 \
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D ENABLE_OPT=OFF \
|
||||
-D GLSLANG_TESTS_DEFAULT=OFF \
|
||||
-D GLSLANG_ENABLE_INSTALL_DEFAULT=ON
|
||||
cmake --build build --parallel
|
||||
sudo cmake --install build
|
||||
cd ..
|
||||
|
||||
- name: Generate headers
|
||||
run: |
|
||||
cmake -B build -G Ninja \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=ON \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_COMPILER=clang++-${{matrix.clang_version}} \
|
||||
-D CMAKE_CXX_STANDARD=20 \
|
||||
-D CMAKE_BUILD_TYPE=Debug
|
||||
cmake --build build --parallel
|
||||
|
||||
cmake -B build -G Ninja --fresh \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=ON \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=ON \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_COMPILER=clang++-${{matrix.clang_version}} \
|
||||
-D CMAKE_CXX_STANDARD=20 \
|
||||
-D CMAKE_BUILD_TYPE=Release
|
||||
cmake --build build --parallel --clean-first
|
||||
|
||||
- name: Build samples and tests
|
||||
run: |
|
||||
for CXX_STANDARD in 11 14 17 20 23; do
|
||||
for BUILD_TYPE in Debug Release; do
|
||||
|
||||
CXX_MODULES=ON
|
||||
if [ $CXX_STANDARD -lt 20 ]; then
|
||||
CXX_MODULES=OFF
|
||||
fi
|
||||
|
||||
echo "================================================================================="
|
||||
echo "Building C++$CXX_STANDARD in $BUILD_TYPE"
|
||||
echo "================================================================================="
|
||||
|
||||
cmake -B build -G Ninja --fresh \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=OFF \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=ON \
|
||||
-D VULKAN_HPP_TESTS_BUILD=ON \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_COMPILER=clang++-${{matrix.clang_version}} \
|
||||
-D CMAKE_CXX_STANDARD=$CXX_STANDARD \
|
||||
-D CMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
cmake --build build --parallel --clean-first
|
||||
done
|
||||
done
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
name: CI Windows
|
||||
name: CI Windows Clang
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
|
@ -8,15 +8,15 @@ on:
|
|||
jobs:
|
||||
build:
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-2022, windows-2025]
|
||||
architecture: [x86, x64]
|
||||
architecture: [x64]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
|
@ -27,36 +27,39 @@ jobs:
|
|||
uses: TheMrMilchmann/setup-msvc-dev@v2
|
||||
with:
|
||||
arch: ${{matrix.architecture}}
|
||||
|
||||
|
||||
# - name: Install glm, glfw and glslang
|
||||
# run: |
|
||||
# cd glm
|
||||
# cmake -B build \
|
||||
# -D CMAKE_CXX_STANDARD=11 \
|
||||
# -D CMAKE_BUILD_TYPE=Release \
|
||||
# -D GLM_BUILD_LIBRARY=ON \
|
||||
# -D GLM_BUILD_INSTALL=ON \
|
||||
# cd glm
|
||||
# cmake -B build -G Ninja \
|
||||
# -D CMAKE_CXX_COMPILER=clang-cl \
|
||||
# -D CMAKE_CXX_STANDARD=11 \
|
||||
# -D CMAKE_BUILD_TYPE=Release \
|
||||
# -D GLM_BUILD_LIBRARY=ON \
|
||||
# -D GLM_BUILD_INSTALL=ON \
|
||||
# -D GLM_BUILD_TESTS=OFF
|
||||
# cmake --build build --parallel
|
||||
# cmake --install build
|
||||
|
||||
# cd ../glfw
|
||||
# cmake -B build \
|
||||
# -D CMAKE_CXX_STANDARD=11 \
|
||||
# -D CMAKE_BUILD_TYPE=Release \
|
||||
# -D GLFW_BUILD_EXAMPLES=OFF \
|
||||
# -D GLFW_BUILD_TESTS=OFF \
|
||||
# -D GLFW_BUILD_DOCS=OFF \
|
||||
# cmake -B build -G Ninja \
|
||||
# -D CMAKE_C_COMPILER=clang-cl \
|
||||
# -D CMAKE_BUILD_TYPE=Release \
|
||||
# -D GLFW_BUILD_EXAMPLES=OFF \
|
||||
# -D GLFW_BUILD_TESTS=OFF \
|
||||
# -D GLFW_BUILD_DOCS=OFF \
|
||||
# -D GLFW_INSTALL=ON
|
||||
# cmake --build build --parallel
|
||||
# cmake --install build
|
||||
|
||||
# cd ../glslang
|
||||
# cmake -B build \
|
||||
# -D CMAKE_CXX_STANDARD=11 \
|
||||
# -D CMAKE_BUILD_TYPE=Release \
|
||||
# -D ENABLE_OPT=OFF \
|
||||
# -D GLSLANG_TESTS_DEFAULT=OFF \
|
||||
# cmake -B build -G Ninja \
|
||||
# -D CMAKE_C_COMPILER=clang-cl \
|
||||
# -D CMAKE_CXX_COMPILER=clang-cl \
|
||||
# -D CMAKE_CXX_STANDARD=11 \
|
||||
# -D CMAKE_BUILD_TYPE=Release \
|
||||
# -D ENABLE_OPT=OFF \
|
||||
# -D GLSLANG_TESTS_DEFAULT=OFF \
|
||||
# -D GLSLANG_ENABLE_INSTALL_DEFAULT=ON
|
||||
# cmake --build build --parallel
|
||||
# cmake --install build
|
||||
|
|
@ -64,56 +67,52 @@ jobs:
|
|||
|
||||
- name: Generate headers
|
||||
run: |
|
||||
cmake -B build \
|
||||
cmake -B build -G Ninja \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=ON \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_STANDARD=20 \
|
||||
-D CMAKE_BUILD_TYPE=Debug
|
||||
-D CMAKE_BUILD_TYPE=Debug \
|
||||
-D CMAKE_CXX_COMPILER=clang-cl \
|
||||
-D CMAKE_CXX_STANDARD=20
|
||||
cmake --build build --parallel
|
||||
|
||||
cmake -B build --fresh \
|
||||
cmake -B build -G Ninja --fresh \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=ON \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=ON \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_STANDARD=20 \
|
||||
-D CMAKE_BUILD_TYPE=Release
|
||||
-D CMAKE_BUILD_TYPE=Release \
|
||||
-D CMAKE_CXX_COMPILER=clang-cl \
|
||||
-D CMAKE_CXX_STANDARD=20
|
||||
cmake --build build --parallel --clean-first
|
||||
|
||||
- name: Build samples and tests
|
||||
run: |
|
||||
for CXX_STANDARD in 11 14 17 20 23; do
|
||||
for BUILD_TYPE in Debug Release; do
|
||||
CXX_MODULES=ON
|
||||
if [ ${{matrix.compiler}} == "windows-2019" ] || [ $CXX_STANDARD -lt 20 ]; then
|
||||
CXX_MODULES=OFF
|
||||
fi
|
||||
|
||||
echo "================================================================================="
|
||||
echo "Building C++$CXX_STANDARD in $BUILD_TYPE with architecture ${{matrix.architecture}}"
|
||||
echo "================================================================================="
|
||||
|
||||
cmake -B build --fresh \
|
||||
cmake -B build -G Ninja --fresh \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=OFF \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=ON \
|
||||
-D VULKAN_HPP_TESTS_BUILD=ON \
|
||||
-D VULKAN_HPP_ENABLE_CPP20_MODULES=$CXX_MODULES \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_STANDARD=$CXX_STANDARD \
|
||||
-D CMAKE_BUILD_TYPE=$BUILD_TYPE
|
||||
-D CMAKE_BUILD_TYPE=$BUILD_TYPE \
|
||||
-D CMAKE_C_COMPILER=clang-cl \
|
||||
-D CMAKE_CXX_COMPILER=clang-cl \
|
||||
-D CMAKE_CXX_STANDARD=$CXX_STANDARD
|
||||
cmake --build build --parallel --clean-first
|
||||
done
|
||||
done
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
|
||||
name: CI Windows MSVC
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{matrix.os}}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-2022, windows-2025]
|
||||
architecture: [x86, x64]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup MSVC
|
||||
uses: TheMrMilchmann/setup-msvc-dev@v2
|
||||
with:
|
||||
arch: ${{matrix.architecture}}
|
||||
|
||||
# - name: Install glm, glfw and glslang
|
||||
# run: |
|
||||
# cd glm
|
||||
# cmake -B build \
|
||||
# -D CMAKE_CXX_STANDARD=11 \
|
||||
# -D GLM_BUILD_LIBRARY=ON \
|
||||
# -D GLM_BUILD_INSTALL=ON \
|
||||
# -D GLM_BUILD_TESTS=OFF
|
||||
# cmake --build build --parallel --config Release
|
||||
# cmake --install build --config Release
|
||||
|
||||
# cd ../glfw
|
||||
# cmake -B build \
|
||||
# -D CMAKE_CXX_STANDARD=11 \
|
||||
# -D GLFW_BUILD_EXAMPLES=OFF \
|
||||
# -D GLFW_BUILD_TESTS=OFF \
|
||||
# -D GLFW_BUILD_DOCS=OFF \
|
||||
# -D GLFW_INSTALL=ON
|
||||
# cmake --build build --parallel --config Release
|
||||
# cmake --install build --config Release
|
||||
|
||||
# cd ../glslang
|
||||
# cmake -B build \
|
||||
# -D CMAKE_CXX_STANDARD=11 \
|
||||
# -D ENABLE_OPT=OFF \
|
||||
# -D GLSLANG_TESTS_DEFAULT=OFF \
|
||||
# -D GLSLANG_ENABLE_INSTALL_DEFAULT=ON
|
||||
# cmake --build build --parallel --config Release
|
||||
# cmake --install build --config Release
|
||||
# cd ..
|
||||
|
||||
- name: Generate headers
|
||||
run: |
|
||||
cmake -B build \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=ON \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=OFF \
|
||||
-D VULKAN_HPP_TESTS_BUILD=OFF \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_STANDARD=20
|
||||
cmake --build build --parallel --config Debug
|
||||
cmake --build build --parallel --config Release
|
||||
|
||||
- name: Build samples and tests
|
||||
run: |
|
||||
for CXX_STANDARD in 11 14 17 20 23; do
|
||||
echo "================================================================================="
|
||||
echo "Building C++$CXX_STANDARD in Debug with architecture ${{matrix.architecture}}"
|
||||
echo "================================================================================="
|
||||
cmake -B build --fresh \
|
||||
-D VULKAN_HPP_GENERATOR_BUILD=OFF \
|
||||
-D VULKAN_HPP_RUN_GENERATOR=OFF \
|
||||
-D VULKAN_HPP_SAMPLES_BUILD=ON \
|
||||
-D VULKAN_HPP_TESTS_BUILD=ON \
|
||||
-D VULKAN_HPP_DISPATCH_LOADER_DYNAMIC=ON \
|
||||
-D VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP=ON \
|
||||
-D VULKAN_HPP_PRECOMPILE=OFF \
|
||||
-D CMAKE_CXX_STANDARD=$CXX_STANDARD
|
||||
cmake --build build --parallel --clean-first --config Debug
|
||||
|
||||
echo "================================================================================="
|
||||
echo "Building C++$CXX_STANDARD in Release with architecture ${{matrix.architecture}}"
|
||||
echo "================================================================================="
|
||||
cmake --build build --parallel --config Release
|
||||
done
|
||||
|
|
@ -24,14 +24,10 @@
|
|||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
cmake_minimum_required( VERSION 3.12 )
|
||||
cmake_minimum_required( VERSION 3.22 )
|
||||
include( CMakeDependentOption )
|
||||
project( VulkanHppGenerator LANGUAGES CXX )
|
||||
|
||||
if( CMAKE_VERSION VERSION_LESS "3.21" )
|
||||
# https://cmake.org/cmake/help/latest/variable/PROJECT_IS_TOP_LEVEL.html
|
||||
string( COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} PROJECT_IS_TOP_LEVEL )
|
||||
endif()
|
||||
|
||||
if ( NOT DEFINED CMAKE_CXX_STANDARD AND PROJECT_IS_TOP_LEVEL )
|
||||
set( CMAKE_CXX_STANDARD 11 )
|
||||
endif()
|
||||
|
|
@ -43,12 +39,13 @@ option( VULKAN_HPP_GENERATOR_BUILD "Build the HPP generator" ${PROJECT_IS_TOP_LE
|
|||
option( VULKAN_HPP_SAMPLES_BUILD "Build samples" OFF )
|
||||
option( VULKAN_HPP_TESTS_BUILD "Build tests" OFF )
|
||||
option( VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP "Build with local Vulkan headers" ON )
|
||||
option( VULKAN_HPP_ENABLE_CPP20_MODULES "Build Vulkan-Hpp as C++20 module; requires minimum CMake version 3.28" OFF )
|
||||
option( VULKAN_HPP_ENABLE_STD_MODULE "Build Vulkan-Hpp with import std; requires minimum CMake version 3.30" OFF )
|
||||
cmake_dependent_option( VULKAN_HPP_BUILD_CXX_MODULE "Build and test the C++ named module." ON [[ TARGET __CMAKE::CXX23 ]] OFF)
|
||||
|
||||
# options for vulkan hpp compile definitions (see https://github.com/KhronosGroup/Vulkan-Hpp/tree/main?tab=readme-ov-file#configuration-options for details)
|
||||
option( VULKAN_HPP_DISABLE_ENHANCED_MODE "Disable all enhanced functionality apart from scoped enums, bitmasks, default initialization and vk::StructureChain" OFF )
|
||||
option( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC "Select the dynamic (ON) or static (OFF) dispatch loader (defaults to VK_NO_PROTOTYPES)" ${VK_NO_PROTOTYPES} )
|
||||
option( VULKAN_HPP_FLAGS_MASK_TYPE_AS_PUBLIC "Change the m_mask access modifier in vk::Flags to public" OFF )
|
||||
option( VULKAN_HPP_HANDLE_ERROR_OUT_OF_DATE_AS_SUCCESS "Handles VK_ERROR_OUT_OF_DATE_KHR like a success code" OFF )
|
||||
option( VULKAN_HPP_HANDLES_MOVE_EXCHANGE "Enable 'm_handle = exchange( rhs.m_handle, {} )' in move constructors" OFF )
|
||||
option( VULKAN_HPP_NO_CONSTRUCTORS "Remove constructors from structs and unions to enable C++20 designated initializers" OFF )
|
||||
option( VULKAN_HPP_NO_EXCEPTIONS "Do not throw exceptions when vulkan functions return an error code" OFF )
|
||||
|
|
@ -184,7 +181,7 @@ if( VULKAN_HPP_RUN_GENERATOR )
|
|||
set( VulkanHeaders_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
file( TO_NATIVE_PATH ${VulkanHeaders_INCLUDE_DIR}/vulkan/vulkan.hpp vulkan_hpp )
|
||||
string( REPLACE "\\" "\\\\" vulkan_hpp ${vulkan_hpp} )
|
||||
|
||||
|
|
@ -248,6 +245,9 @@ endif()
|
|||
if( VULKAN_HPP_FLAGS_MASK_TYPE_AS_PUBLIC )
|
||||
target_compile_definitions(VulkanHpp INTERFACE "VULKAN_HPP_FLAGS_MASK_TYPE_AS_PUBLIC" )
|
||||
endif()
|
||||
if( VULKAN_HPP_HANDLE_ERROR_OUT_OF_DATE_AS_SUCCESS )
|
||||
target_compile_definitions(VulkanHpp INTERFACE "VULKAN_HPP_HANDLE_ERROR_OUT_OF_DATE_AS_SUCCESS" )
|
||||
endif()
|
||||
if( VULKAN_HPP_SMART_HANDLE_IMPLICIT_CAST )
|
||||
target_compile_definitions(VulkanHpp INTERFACE "VULKAN_HPP_SMART_HANDLE_IMPLICIT_CAST" )
|
||||
endif()
|
||||
|
|
@ -284,7 +284,7 @@ function( vulkan_hpp__setup_vulkan_include )
|
|||
set( oneValueArgs NAME )
|
||||
set( multiValueArgs )
|
||||
cmake_parse_arguments( TARGET "{options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
||||
|
||||
|
||||
if( VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP )
|
||||
# Vulkan C++ headers
|
||||
target_link_libraries( ${TARGET_NAME} PUBLIC Vulkan::Hpp )
|
||||
|
|
@ -316,17 +316,8 @@ function( vulkan_hpp__setup_vulkan_module )
|
|||
add_library(${TARGET_ALIAS_NAME} ALIAS ${TARGET_NAME})
|
||||
endforeach()
|
||||
|
||||
# Clang 16's module support can be broken with extensions enabled
|
||||
if ( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "16.0" )
|
||||
set_target_properties( ${TARGET_NAME} PROPERTIES CXX_EXTENSIONS OFF )
|
||||
endif()
|
||||
|
||||
if ( VULKAN_HPP_ENABLE_STD_MODULE )
|
||||
target_compile_features( ${TARGET_NAME} PUBLIC cxx_std_23 )
|
||||
set_target_properties( ${TARGET_NAME} PROPERTIES CXX_MODULE_STD ON )
|
||||
else()
|
||||
target_compile_features( ${TARGET_NAME} PUBLIC cxx_std_20 )
|
||||
endif()
|
||||
target_compile_features( ${TARGET_NAME} PUBLIC cxx_std_23 )
|
||||
set_target_properties( ${TARGET_NAME} PROPERTIES CXX_MODULE_STD ON )
|
||||
|
||||
if ( NOT TARGET_FILE_SET )
|
||||
message( FATAL_ERROR "FILE_SET must be defined in vulkan_hpp__setup_module" )
|
||||
|
|
@ -346,22 +337,14 @@ function( vulkan_hpp__setup_vulkan_module )
|
|||
endfunction()
|
||||
|
||||
# Build Vulkan-Hpp as a module
|
||||
if( VULKAN_HPP_ENABLE_CPP20_MODULES )
|
||||
if ( VULKAN_HPP_ENABLE_STD_MODULE AND CMAKE_VERSION VERSION_LESS "3.30" )
|
||||
message( FATAL_ERROR "Vulkan-Hpp: C++20 modules with import std require CMake 3.30 or later" )
|
||||
elseif ( CMAKE_VERSION VERSION_LESS "3.28" )
|
||||
message( FATAL_ERROR "Vulkan-Hpp: C++20 modules require CMake 3.28 or later" )
|
||||
endif()
|
||||
|
||||
# create targets providing VulkanHpp and VulkanVideoHpp as C++20 modules
|
||||
if( VULKAN_HPP_BUILD_CXX_MODULE )
|
||||
# create targets providing VulkanHpp and VulkanVideoHpp as C++ named modules
|
||||
vulkan_hpp__setup_vulkan_module( NAME VulkanHppModule
|
||||
FILE_SET_NAME vulkan_module_file
|
||||
FILE_SET vulkan/vulkan.cppm
|
||||
FILE_SET
|
||||
vulkan/vulkan.cppm
|
||||
vulkan/vulkan_video.cppm
|
||||
ALIAS Vulkan::HppModule ) # TODO: respect VULKAN_HPP_BUILD_WITH_LOCAL_VULKAN_HPP
|
||||
vulkan_hpp__setup_vulkan_module( NAME VulkanVideoHppModule
|
||||
FILE_SET_NAME vulkan_video_module_file
|
||||
FILE_SET vulkan/vulkan_video.cppm
|
||||
ALIAS Vulkan::VideoHppModule )
|
||||
endif()
|
||||
|
||||
function( vulkan_hpp__setup_platform )
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
|
||||
/* VULKAN_KEY_START */
|
||||
|
||||
vk::DebugUtilsObjectNameInfoEXT debugUtilsObjectNameInfo( vk::ObjectType::eImage, NON_DISPATCHABLE_HANDLE_TO_UINT64_CAST( VkImage, *image ), "Image name" );
|
||||
device.setDebugUtilsObjectNameEXT( debugUtilsObjectNameInfo );
|
||||
device.setDebugUtilsObjectNameEXT( *image, "Image name" );
|
||||
|
||||
/* VULKAN_KEY_END */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
#if defined( _MSC_VER )
|
||||
// no need to ignore any warnings with MSVC
|
||||
#elif defined( __clang__ )
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
#if defined( _MSC_VER )
|
||||
// no need to ignore any warnings with MSVC
|
||||
#elif defined( __clang__ )
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
|
|
|
|||
|
|
@ -142,8 +142,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
/* VULKAN_KEY_START */
|
||||
|
||||
// Check disk for existing cache data
|
||||
size_t startCacheSize = 0;
|
||||
char * startCacheData = nullptr;
|
||||
std::vector<char> startCacheData;
|
||||
|
||||
std::string cacheFileName = "pipeline_cache_data.bin";
|
||||
std::ifstream readCacheStream( cacheFileName, std::ios_base::in | std::ios_base::binary );
|
||||
|
|
@ -151,14 +150,14 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
{
|
||||
// Determine cache size
|
||||
readCacheStream.seekg( 0, readCacheStream.end );
|
||||
startCacheSize = static_cast<size_t>( readCacheStream.tellg() );
|
||||
size_t startCacheSize = static_cast<size_t>( readCacheStream.tellg() );
|
||||
readCacheStream.seekg( 0, readCacheStream.beg );
|
||||
|
||||
// Allocate memory to hold the initial cache data
|
||||
startCacheData = (char *)std::malloc( startCacheSize );
|
||||
startCacheData.resize( startCacheSize );
|
||||
|
||||
// Read the data into our buffer
|
||||
readCacheStream.read( startCacheData, startCacheSize );
|
||||
readCacheStream.read( startCacheData.data(), startCacheData.size() );
|
||||
|
||||
// Clean up and print results
|
||||
readCacheStream.close();
|
||||
|
|
@ -171,7 +170,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
std::cout << " Pipeline cache miss!\n";
|
||||
}
|
||||
|
||||
if ( startCacheData != nullptr )
|
||||
if ( !startCacheData.empty() )
|
||||
{
|
||||
// Check for cache validity
|
||||
//
|
||||
|
|
@ -207,11 +206,12 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
uint32_t deviceID = 0;
|
||||
uint8_t pipelineCacheUUID[VK_UUID_SIZE] = {};
|
||||
|
||||
memcpy( &headerLength, (uint8_t *)startCacheData + 0, 4 );
|
||||
memcpy( &cacheHeaderVersion, (uint8_t *)startCacheData + 4, 4 );
|
||||
memcpy( &vendorID, (uint8_t *)startCacheData + 8, 4 );
|
||||
memcpy( &deviceID, (uint8_t *)startCacheData + 12, 4 );
|
||||
memcpy( pipelineCacheUUID, (uint8_t *)startCacheData + 16, VK_UUID_SIZE );
|
||||
uint8_t * startCacheDataPtr = reinterpret_cast<uint8_t *>( startCacheData.data() );
|
||||
memcpy( &headerLength, startCacheDataPtr + 0, 4 );
|
||||
memcpy( &cacheHeaderVersion, startCacheDataPtr + 4, 4 );
|
||||
memcpy( &vendorID, startCacheDataPtr + 8, 4 );
|
||||
memcpy( &deviceID, startCacheDataPtr + 12, 4 );
|
||||
memcpy( pipelineCacheUUID, startCacheDataPtr + 16, VK_UUID_SIZE );
|
||||
|
||||
// Check each field and report bad values before freeing existing cache
|
||||
bool badCache = false;
|
||||
|
|
@ -257,9 +257,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
if ( badCache )
|
||||
{
|
||||
// Don't submit initial cache data if any version info is incorrect
|
||||
free( startCacheData );
|
||||
startCacheSize = 0;
|
||||
startCacheData = nullptr;
|
||||
startCacheData.clear();
|
||||
|
||||
// And clear out the old cache file for use in next run
|
||||
std::cout << " Deleting cache entry " << cacheFileName << " to repopulate.\n";
|
||||
|
|
@ -272,12 +270,11 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
}
|
||||
|
||||
// Feed the initial cache data into cache creation
|
||||
vk::PipelineCacheCreateInfo pipelineCacheCreateInfo( {}, startCacheSize, startCacheData );
|
||||
vk::PipelineCacheCreateInfo pipelineCacheCreateInfo( {}, startCacheData.size(), startCacheData.data() );
|
||||
vk::raii::PipelineCache pipelineCache( device, pipelineCacheCreateInfo );
|
||||
|
||||
// Free our initialData now that pipeline cache has been created
|
||||
free( startCacheData );
|
||||
startCacheData = NULL;
|
||||
startCacheData.clear();
|
||||
|
||||
// Time (roughly) taken to create the graphics pipeline
|
||||
timestamp_t start = getMilliseconds();
|
||||
|
|
|
|||
19
README.md
19
README.md
|
|
@ -64,6 +64,7 @@ The goal of the Vulkan-Hpp is to provide header only C++ bindings for the Vulkan
|
|||
- [VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL](#enable_dynamic_loader_tool)
|
||||
- [VULKAN_HPP_EXPECTED](#expected)
|
||||
- [VULKAN_HPP_FLAGS_MASK_TYPE_AS_PUBLIC](#flags_mask_type_as_public)
|
||||
- [VULKAN_HPP_HANDLE_ERROR_OUT_OF_DATE_AS_SUCCESS](#handle_error_out_of_date_as_success)
|
||||
- [VULKAN_HPP_HANDLES_MOVE_EXCHANGE](#handles_move_exchange)
|
||||
- [VULKAN_HPP_HASH_COMBINE](#hash_combine)
|
||||
- [VULKAN_HPP_INLINE](#inline)
|
||||
|
|
@ -74,6 +75,7 @@ The goal of the Vulkan-Hpp is to provide header only C++ bindings for the Vulkan
|
|||
- [VULKAN_HPP_NO_SETTERS](#no_setters)
|
||||
- [VULKAN_HPP_NO_SMART_HANDLE](#no_smart_handle)
|
||||
- [VULKAN_HPP_NO_SPACESHIP_OPERATOR](#no_spaceship_operator)
|
||||
- [VULKAN_HPP_NO_STD_MODULE](#no_std_module)
|
||||
- [VULKAN_HPP_NO_TO_STRING](#no_to_string)
|
||||
- [VULKAN_HPP_NO_WIN32_PROTOTYPES](#no_win32_prototypes)
|
||||
- [VULKAN_HPP_RAII_NO_EXCEPTIONS](#raii_no_exceptions)
|
||||
|
|
@ -147,6 +149,10 @@ The file `VulkanHpp.natvis` provides a custom view on `vk::Flags` for Visual Stu
|
|||
|
||||
We seriously try to keep the API for all flavours of the Vulkan-Hpp constant or backwards compatible. But every now and then, some breaking changes might get in. Here is a list of those changes, sorted by version.
|
||||
|
||||
### v1.4.334
|
||||
|
||||
The `vulkan_hpp` module has been renamed to `vulkan`.
|
||||
|
||||
### v1.4.324 <a id='breaking_changes_324'>
|
||||
|
||||
With PR [#2226](https://github.com/KhronosGroup/Vulkan-Hpp/pull/2226), the return type of `vk::raii::Device::acquireNextImage2KHR` and `vk::raii::SwapchainKHR::acquireNextImage` changed from `std::pair<vk::Result,uint32_t>` to the equivalent `vk::ResultValue<uint32_t>`
|
||||
|
|
@ -795,7 +801,7 @@ Some functions might provide information that depends on the vulkan version. As
|
|||
|
||||
#### Overview <a id='named_module_overview'>
|
||||
|
||||
Vulkan-Hpp provides a [C++ named module](https://en.cppreference.com/w/cpp/language/modules), `vulkan_hpp` in [`vulkan.cppm`](vulkan/vulkan.cppm).
|
||||
Vulkan-Hpp provides a [C++ named module](https://en.cppreference.com/w/cpp/language/modules), `vulkan` in [`vulkan.cppm`](vulkan/vulkan.cppm).
|
||||
C++ modules are intended to supersede header files. Modules have potential to drastically improve compilation times for large projects, as declarations and definitions may be easily shared across translation units without repeatedly parsing headers.
|
||||
Vulkan-Hpp has some extremely long headers (e.g. [`vulkan_structs.hpp`](vulkan/vulkan_structs.hpp)), and the C++ module is likely to shorten compile times for projects currently using it.
|
||||
|
||||
|
|
@ -880,7 +886,7 @@ target_link_libraries( VulkanHppModule PUBLIC Vulkan::Headers )
|
|||
Finally, supply the macro `VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE` exactly once in your source code, just as in the non-module case. In order to have that macro available, include [`vulkan_hpp_macros.hpp`](vulkan/vulkan_hpp_macros.hpp), a lightweight header providing all Vulkan-Hpp related macros and defines. And as explained above, you need to initialize that dispatcher in two or three steps:
|
||||
|
||||
```cpp
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
|
||||
#include <vulkan/vulkan_hpp_macros.hpp>
|
||||
|
||||
|
|
@ -1013,6 +1019,10 @@ When this is not externally defined and `VULKAN_HPP_CPP_VERSION` is at least `23
|
|||
|
||||
By default, the member `m_mask` of the `Flags` class template is private. This is to prevent accidentally setting a `Flags` with some inappropriate value. But it also prevents using a `Flags`, or a structure holding a `Flags`, to be used as a non-type template parameter. If you really need that functionality, and accept the reduced security, you can use this define to change the access specifier for `m_mask` from private to public, which allows using a `Flags` as a non-type template parameter.
|
||||
|
||||
#### VULKAN_HPP_HANDLE_ERROR_OUT_OF_DATE_AS_SUCCESS <a id='handle_error_out_of_date_as_success'>
|
||||
|
||||
By default, `VK_ERROR_OUT_OF_DATE_KHR` is an error code. To prevent throwing an exception or, in case exceptions are turned off via `VULKAN_HPP_NO_EXCEPTIONS`, firing an assertion on this return value, you can define `VULKAN_HPP_HANDLE_ERROR_OUT_OF_DATE_AS_SUCCESS`. `VK_ERROR_OUT_OF_DATE_KHR` will then be handled like a success code.
|
||||
|
||||
#### VULKAN_HPP_HANDLES_MOVE_EXCHANGE <a id='handles_move_exchange'>
|
||||
|
||||
This define can be used to enable `m_handle = exchange( rhs.m_handle, {} )` in move constructors of Vulkan-Hpp handles, which default-initializes the `rhs` underlying value. By default Vulkan-Hpp handles behave like trivial types -- move constructors copying value.
|
||||
|
|
@ -1053,6 +1063,11 @@ By defining `VULKAN_HPP_NO_SMART_HANDLE` before including `vulkan.hpp`, the help
|
|||
|
||||
With C++20, the so-called spaceship-operator `<=>` is introduced. If that operator is supported, all the structs and classes in vulkan.hpp use the default implementation of it. As currently some implementations of this operator are very slow, and others seem to be incomplete, by defining `VULKAN_HPP_NO_SPACESHIP_OPERATOR` before including `vulkan.hpp` you can remove that operator from those structs and classes.
|
||||
|
||||
#### VULKAN_HPP_NO_STD_MODULE <a id='no_std_module'>
|
||||
|
||||
When compiling the `vulkan.cppm` module with C++23, it will automatically try to use `import std`.
|
||||
There might be cases where your toolchain is not set up to deal with `import std` or wrongfully defines `__cpp_lib_modules`, for which you can define `VULKAN_HPP_NO_STD_MODULE` to disable `import std` altogether.
|
||||
|
||||
#### VULKAN_HPP_NO_TO_STRING <a id='no_to_string'>
|
||||
|
||||
By default, the file [`vulkan_to_string.hpp`](vulkan/vulkan_to_string.hpp) is included by `vulkan.hpp` and provides functions `vk::to_string` for enums and bitmasks. If you don't need those functions, you can define `VULKAN_HPP_NO_TO_STRING` to prevent that inclusion. If you have certain files where you want to use those functions nevertheless, you can explicitly include `vulkan_to_string.hpp` there.
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit d1cd37e925510a167d4abef39340dbdea47d8989
|
||||
Subproject commit 6aefb8eb95c8e170d0805fd0f2d02832ec1e099a
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -248,6 +248,13 @@ private:
|
|||
std::map<std::string, DefineData> values = {};
|
||||
};
|
||||
|
||||
struct EnumConstantData
|
||||
{
|
||||
std::string name = {};
|
||||
std::string value = {};
|
||||
int xmlLine = {};
|
||||
};
|
||||
|
||||
struct RequireFeature
|
||||
{
|
||||
std::vector<std::string> name = {};
|
||||
|
|
@ -266,14 +273,14 @@ private:
|
|||
|
||||
struct RequireData
|
||||
{
|
||||
std::string api = {};
|
||||
std::string depends = {};
|
||||
std::vector<NameLine> commands = {};
|
||||
std::map<std::string, std::string> enumConstants = {};
|
||||
std::vector<std::string> constants = {};
|
||||
std::vector<RequireFeature> features = {};
|
||||
std::vector<NameLine> types = {};
|
||||
int xmlLine = {};
|
||||
std::string api = {};
|
||||
std::string depends = {};
|
||||
std::vector<NameLine> commands = {};
|
||||
std::vector<EnumConstantData> enumConstants = {};
|
||||
std::vector<NameLine> constants = {};
|
||||
std::vector<RequireFeature> features = {};
|
||||
std::vector<NameLine> types = {};
|
||||
int xmlLine = {};
|
||||
};
|
||||
|
||||
struct DeprecateData
|
||||
|
|
@ -309,6 +316,8 @@ private:
|
|||
std::vector<std::string> api = {};
|
||||
std::string name = {};
|
||||
std::string number = {};
|
||||
bool isInternal = false;
|
||||
std::vector<std::string> depends = {};
|
||||
std::vector<DeprecateData> deprecateData = {};
|
||||
std::vector<RemoveData> removeData = {};
|
||||
std::vector<RequireData> requireData = {};
|
||||
|
|
@ -402,6 +411,7 @@ private:
|
|||
std::string bitCount = {};
|
||||
std::string deprecated = {};
|
||||
std::vector<std::string> lenExpressions = {};
|
||||
std::string limitType = {};
|
||||
std::vector<std::pair<std::string, size_t>> lenMembers = {};
|
||||
bool noAutoValidity = {};
|
||||
std::vector<bool> optional = {};
|
||||
|
|
@ -417,12 +427,13 @@ private:
|
|||
int xmlLine = {};
|
||||
};
|
||||
|
||||
struct StructureData
|
||||
struct StructData
|
||||
{
|
||||
std::map<std::string, int> aliases = {};
|
||||
bool allowDuplicate = {};
|
||||
bool isExtended = {};
|
||||
bool isUnion = {};
|
||||
bool requiredLimitType = {};
|
||||
bool returnedOnly = {};
|
||||
bool mutualExclusiveLens = {};
|
||||
std::vector<MemberData> members = {};
|
||||
|
|
@ -545,22 +556,27 @@ private:
|
|||
void checkRequireTypesCorrectness( RequireData const & require ) const;
|
||||
void checkSpirVCapabilityCorrectness() const;
|
||||
void checkStructCorrectness() const;
|
||||
void checkStructMemberArraySizesAreValid( std::vector<std::string> const & arraySizes, int line ) const;
|
||||
void checkStructMemberCorrectness( std::string const & structureName, std::vector<MemberData> const & members, std::set<std::string> & sTypeValues ) const;
|
||||
void checkStructMemberSelectorConnection( std::string const & selector, std::vector<MemberData> const & members, std::string const & memberType ) const;
|
||||
void checkStructMemberTypeIsKnown( std::string const & memberType, int line ) const;
|
||||
void checkStructMemberTypeIsRequired( std::string const & memberType, int line, std::string const & structureName ) const;
|
||||
void checkStructMemberValueIsValid( std::string const & memberValue,
|
||||
std::string const & memberType,
|
||||
std::string const & memberName,
|
||||
int line,
|
||||
bool structUsed,
|
||||
std::string const & structureName,
|
||||
std::set<std::string> & sTypeValues ) const;
|
||||
void checkSyncAccessCorrectness() const;
|
||||
void checkSyncStageCorrectness() const;
|
||||
std::string combineDataTypes( std::map<size_t, VectorParamData> const & vectorParams,
|
||||
std::vector<size_t> const & returnParams,
|
||||
bool enumerating,
|
||||
std::vector<std::string> const & dataTypes,
|
||||
CommandFlavourFlags flavourFlags,
|
||||
bool raii ) const;
|
||||
bool contains( std::vector<EnumValueData> const & enumValues, std::string const & name ) const;
|
||||
bool containsArray( std::string const & type ) const;
|
||||
bool containsDeprecated( std::vector<MemberData> const & members ) const;
|
||||
bool containsFuncPointer( std::string const & type ) const;
|
||||
bool containsFloatingPoints( std::vector<MemberData> const & members ) const;
|
||||
bool containsUnion( std::string const & type ) const;
|
||||
bool describesVector( StructureData const & structure, std::string const & type = "" ) const;
|
||||
bool containsArray( std::string const & type ) const;
|
||||
bool containsDeprecated( std::vector<MemberData> const & members ) const;
|
||||
bool containsFuncPointer( std::string const & type ) const;
|
||||
bool containsFloatingPoints( std::vector<MemberData> const & members ) const;
|
||||
bool containsName( std::vector<EnumValueData> const & enumValues, std::string const & name ) const;
|
||||
bool containsUnion( std::string const & type ) const;
|
||||
bool describesVector( StructData const & structure, std::string const & type = "" ) const;
|
||||
std::vector<size_t> determineChainedReturnParams( std::vector<ParamData> const & params, std::vector<size_t> const & returnParams ) const;
|
||||
std::vector<size_t> determineConstPointerParams( std::vector<ParamData> const & params ) const;
|
||||
std::vector<std::string> determineDataTypes( std::vector<VulkanHppGenerator::ParamData> const & params,
|
||||
|
|
@ -575,49 +591,57 @@ private:
|
|||
std::vector<std::map<std::string, CommandData>::const_iterator>
|
||||
determineRAIIHandleConstructors( std::string const & handleType, std::map<std::string, CommandData>::const_iterator destructorIt ) const;
|
||||
std::map<std::string, CommandData>::const_iterator determineRAIIHandleDestructor( std::string const & handleType ) const;
|
||||
std::set<size_t> determineSingularParams( size_t returnParam, std::map<size_t, VectorParamData> const & vectorParams ) const;
|
||||
std::set<size_t> determineSkippedParams( std::vector<ParamData> const & params,
|
||||
size_t initialSkipCount,
|
||||
std::map<size_t, VectorParamData> const & vectorParams,
|
||||
std::vector<size_t> const & returnParam,
|
||||
bool singular ) const;
|
||||
std::string determineSubStruct( std::pair<std::string, StructureData> const & structure ) const;
|
||||
std::map<size_t, VectorParamData> determineVectorParams( std::vector<ParamData> const & params ) const;
|
||||
std::set<size_t> determineVoidPointerParams( std::vector<ParamData> const & params ) const;
|
||||
void distributeEnumExtends();
|
||||
void distributeEnumValueAliases();
|
||||
void distributeRequirements();
|
||||
void distributeRequirements( std::vector<RequireData> const & requireData, std::string const & requiredBy );
|
||||
void distributeStructAliases();
|
||||
void filterLenMembers();
|
||||
std::map<std::string, NameLine>::const_iterator findAlias( std::string const & name, std::map<std::string, NameLine> const & aliases ) const;
|
||||
std::string findBaseName( std::string aliasName, std::map<std::string, NameLine> const & aliases ) const;
|
||||
std::vector<FeatureData>::const_iterator findFeature( std::string const & name ) const;
|
||||
std::vector<ParamData>::const_iterator findParamIt( std::string const & name, std::vector<ParamData> const & paramData ) const;
|
||||
std::vector<MemberData>::const_iterator findStructMemberIt( std::string const & name, std::vector<MemberData> const & memberData ) const;
|
||||
std::vector<MemberData>::const_iterator findStructMemberItByType( std::string const & type, std::vector<MemberData> const & memberData ) const;
|
||||
std::vector<ExtensionData>::const_iterator findSupportedExtension( std::string const & name ) const;
|
||||
std::string findTag( std::string const & name, std::string const & postfix = "" ) const;
|
||||
void forEachRequiredCommand( std::vector<RequireData> const & requireData,
|
||||
std::function<void( NameLine const &, std::pair<std::string, CommandData> const & )> const & commandAction ) const;
|
||||
std::set<std::string> gatherResultCodes() const;
|
||||
std::pair<std::string, std::string> generateAllocatorTemplates( std::vector<size_t> const & returnParams,
|
||||
std::vector<std::string> const & returnDataTypes,
|
||||
std::map<size_t, VectorParamData> const & vectorParams,
|
||||
std::vector<size_t> const & chainedReturnParams,
|
||||
CommandFlavourFlags flavourFlags,
|
||||
bool definition ) const;
|
||||
std::string generateArgumentListEnhanced( std::vector<ParamData> const & params,
|
||||
std::vector<size_t> const & returnParams,
|
||||
std::map<size_t, VectorParamData> const & vectorParams,
|
||||
std::set<size_t> const & skippedParams,
|
||||
std::set<size_t> const & singularParams,
|
||||
std::set<size_t> const & templatedParams,
|
||||
std::vector<size_t> const & chainedReturnParams,
|
||||
bool raii,
|
||||
bool definition,
|
||||
CommandFlavourFlags flavourFlags,
|
||||
bool withDispatcher ) const;
|
||||
std::set<size_t> determineSingularParams( size_t returnParam, std::map<size_t, VectorParamData> const & vectorParams ) const;
|
||||
std::set<size_t> determineSkippedParams( std::vector<ParamData> const & params,
|
||||
size_t initialSkipCount,
|
||||
std::map<size_t, VectorParamData> const & vectorParams,
|
||||
std::vector<size_t> const & returnParam,
|
||||
bool singular ) const;
|
||||
std::string determineSubStruct( std::pair<std::string, StructData> const & structure ) const;
|
||||
std::map<size_t, VectorParamData> determineVectorParams( std::vector<ParamData> const & params ) const;
|
||||
std::set<size_t> determineVoidPointerParams( std::vector<ParamData> const & params ) const;
|
||||
void distributeEnumValueAliases();
|
||||
void distributeRequirements();
|
||||
void distributeRequirements( std::vector<RequireData> const & requireData, std::string const & requiredBy );
|
||||
void distributeStructAliases();
|
||||
void extendSpecialCommands( std::string const & name, bool definition, bool raii, std::string & cmd ) const;
|
||||
void filterLenMembers();
|
||||
std::string findTag( std::string const & name, std::string const & postfix = "" ) const;
|
||||
void forEachRequiredBitmask( std::vector<RequireData> const & requireData,
|
||||
std::set<std::string> & encounteredBitmasks,
|
||||
std::function<void( std::pair<std::string, BitmaskData> const & )> const & bitmaskAction ) const;
|
||||
void forEachRequiredCommand( std::vector<RequireData> const & requireData,
|
||||
std::function<void( NameLine const &, std::pair<std::string, CommandData> const & )> const & commandAction ) const;
|
||||
void forEachRequiredConstant( std::vector<RequireData> const & requireData,
|
||||
std::set<std::string> & encounteredConstants,
|
||||
std::function<void( std::pair<std::string, ConstantData> const & )> const & constantAction ) const;
|
||||
void forEachRequiredEnumConstant( std::vector<RequireData> const & requireData,
|
||||
std::set<std::string> & encounteredEnumConstants,
|
||||
std::function<void( EnumConstantData const & )> const & enumConstantAction ) const;
|
||||
void forEachRequiredFuncPointer( std::vector<RequireData> const & requireData,
|
||||
std::function<void( std::pair<std::string, FuncPointerData> const & )> const & funcPointerAction ) const;
|
||||
void forEachRequiredHandle( std::vector<RequireData> const & requireData,
|
||||
std::function<void( std::pair<std::string, HandleData> const & )> const & handleAction ) const;
|
||||
void forEachRequiredStruct( std::vector<RequireData> const & requireData,
|
||||
std::function<void( std::pair<std::string, StructData> const & )> const & structAction ) const;
|
||||
std::set<std::string> gatherResultCodes() const;
|
||||
std::pair<std::string, std::string> generateAllocatorTemplates( std::vector<size_t> const & returnParams,
|
||||
std::vector<std::string> const & returnDataTypes,
|
||||
std::map<size_t, VectorParamData> const & vectorParams,
|
||||
std::vector<size_t> const & chainedReturnParams,
|
||||
CommandFlavourFlags flavourFlags,
|
||||
bool definition ) const;
|
||||
std::string generateArgumentListEnhanced( std::vector<ParamData> const & params,
|
||||
std::vector<size_t> const & returnParams,
|
||||
std::map<size_t, VectorParamData> const & vectorParams,
|
||||
std::set<size_t> const & skippedParams,
|
||||
std::set<size_t> const & singularParams,
|
||||
std::set<size_t> const & templatedParams,
|
||||
std::vector<size_t> const & chainedReturnParams,
|
||||
bool raii,
|
||||
bool definition,
|
||||
CommandFlavourFlags flavourFlags,
|
||||
bool withDispatcher ) const;
|
||||
std::string
|
||||
generateArgumentListStandard( std::vector<ParamData> const & params, std::set<size_t> const & skippedParams, bool definition, bool withDispatcher ) const;
|
||||
std::string generateArgumentTemplates( std::vector<ParamData> const & params,
|
||||
|
|
@ -630,7 +654,7 @@ private:
|
|||
std::string generateBitmask( std::map<std::string, BitmaskData>::const_iterator bitmaskIt, std::string const & surroundingProtect ) const;
|
||||
std::string generateBitmasksToString() const;
|
||||
std::string generateBitmasksToString( std::vector<RequireData> const & requireData, std::set<std::string> & listedBitmasks, std::string const & title ) const;
|
||||
std::string generateBitmaskToString( std::map<std::string, BitmaskData>::const_iterator bitmaskIt ) const;
|
||||
std::string generateBitmaskToString( std::pair<std::string, BitmaskData> const & bitmaskData ) const;
|
||||
std::string generateCallArgumentsEnhanced( CommandData const & commandData,
|
||||
size_t initialSkipCount,
|
||||
bool nonConstPointerAsNullptr,
|
||||
|
|
@ -768,7 +792,7 @@ private:
|
|||
bool definition,
|
||||
std::vector<size_t> const & returnParamIndices,
|
||||
bool raii ) const;
|
||||
std::string generateConstexprString( std::pair<std::string, StructureData> const & structData ) const;
|
||||
std::string generateConstexprString( std::pair<std::string, StructData> const & structData ) const;
|
||||
std::string generateConstexprDefines() const;
|
||||
std::string generateConstexprUsings() const;
|
||||
std::string generateCppModuleFuncpointerUsings() const;
|
||||
|
|
@ -1012,7 +1036,7 @@ private:
|
|||
std::string generateRAIIHandleContext( std::pair<std::string, HandleData> const & handle, std::set<std::string> const & specialFunctions ) const;
|
||||
std::string generateRAIIHandleDestructorCallArguments( std::string const & handleType,
|
||||
std::map<std::string, CommandData>::const_iterator destructorIt ) const;
|
||||
std::tuple<std::string, std::string, std::string, std::string, std::string, std::string, std::string>
|
||||
std::tuple<std::string, std::string, std::string, std::string, std::string, std::string, std::string, std::string, std::string>
|
||||
generateRAIIHandleDetails( std::pair<std::string, HandleData> const & handle ) const;
|
||||
std::string generateRAIIHandleForwardDeclarations( std::vector<RequireData> const & requireData, std::string const & title ) const;
|
||||
std::string generateRAIIHandles() const;
|
||||
|
|
@ -1030,6 +1054,12 @@ private:
|
|||
bool enumerating,
|
||||
bool raii ) const;
|
||||
std::string generateResultExceptions() const;
|
||||
std::string generateReturnDataType( std::map<size_t, VectorParamData> const & vectorParams,
|
||||
std::vector<size_t> const & returnParams,
|
||||
bool enumerating,
|
||||
std::vector<std::string> const & dataTypes,
|
||||
CommandFlavourFlags flavourFlags,
|
||||
bool raii ) const;
|
||||
std::string generateReturnStatement( std::string const & commandName,
|
||||
CommandData const & commandData,
|
||||
std::string const & returnVariable,
|
||||
|
|
@ -1054,26 +1084,26 @@ private:
|
|||
generateSizeCheck( std::vector<std::vector<MemberData>::const_iterator> const & arrayIts, std::string const & structName, bool mutualExclusiveLens ) const;
|
||||
std::string generateStaticAssertions() const;
|
||||
std::string generateStaticAssertions( std::vector<RequireData> const & requireData, std::string const & title, std::set<std::string> & listedStructs ) const;
|
||||
std::string generateStruct( std::pair<std::string, StructureData> const & structure, std::set<std::string> & listedStructs ) const;
|
||||
std::string generateStructCastAssignments( std::pair<std::string, StructureData> const & structData ) const;
|
||||
std::string generateStructCompareOperators( std::pair<std::string, StructureData> const & structure ) const;
|
||||
std::string generateStructConstructors( std::pair<std::string, StructureData> const & structData ) const;
|
||||
std::string generateStructConstructorsEnhanced( std::pair<std::string, StructureData> const & structData ) const;
|
||||
std::string generateStruct( std::pair<std::string, StructData> const & structure, std::set<std::string> & listedStructs ) const;
|
||||
std::string generateStructCastAssignments( std::pair<std::string, StructData> const & structData ) const;
|
||||
std::string generateStructCompareOperators( std::pair<std::string, StructData> const & structure ) const;
|
||||
std::string generateStructConstructors( std::pair<std::string, StructData> const & structData ) const;
|
||||
std::string generateStructConstructorsEnhanced( std::pair<std::string, StructData> const & structData ) const;
|
||||
std::string generateStructConstructorArgument( MemberData const & memberData, bool withDefault ) const;
|
||||
std::string generateStructHashStructure( std::pair<std::string, StructureData> const & structure, std::set<std::string> & listedStructs ) const;
|
||||
std::string generateStructHashStructure( std::pair<std::string, StructData> const & structure, std::set<std::string> & listedStructs ) const;
|
||||
std::string generateStructHashStructures() const;
|
||||
std::string generateStructHashSum( std::string const & structName, std::vector<MemberData> const & members ) const;
|
||||
std::string generateStructs() const;
|
||||
std::string generateStructure( std::pair<std::string, StructureData> const & structure ) const;
|
||||
std::string generateStructure( std::pair<std::string, StructData> const & structure ) const;
|
||||
std::string generateStructExtendsStructs() const;
|
||||
std::string
|
||||
generateStructExtendsStructs( std::vector<RequireData> const & requireData, std::set<std::string> & listedStructs, std::string const & title ) const;
|
||||
std::string generateStructForwardDeclarations() const;
|
||||
std::string
|
||||
generateStructForwardDeclarations( std::vector<RequireData> const & requireData, std::string const & title, std::set<std::string> & listedStructs ) const;
|
||||
std::tuple<std::string, std::string, std::string, std::string> generateStructMembers( std::pair<std::string, StructureData> const & structData ) const;
|
||||
std::tuple<std::string, std::string, std::string, std::string> generateStructMembers( std::pair<std::string, StructData> const & structData ) const;
|
||||
std::string generateStructSetter( std::string const & structureName, std::vector<MemberData> const & memberData, size_t index ) const;
|
||||
std::string generateStructSubConstructor( std::pair<std::string, StructureData> const & structData ) const;
|
||||
std::string generateStructSubConstructor( std::pair<std::string, StructData> const & structData ) const;
|
||||
std::string generateSuccessCheck( std::vector<std::string> const & successCodes ) const;
|
||||
std::string generateSuccessCode( std::string const & code ) const;
|
||||
std::string generateSuccessCodeList( std::vector<std::string> const & successCodes, bool enumerating ) const;
|
||||
|
|
@ -1084,7 +1114,7 @@ private:
|
|||
bool definition,
|
||||
std::vector<std::string> const & dataTypes,
|
||||
CommandFlavourFlags flavourFlags ) const;
|
||||
std::string generateUnion( std::pair<std::string, StructureData> const & structure ) const;
|
||||
std::string generateUnion( std::pair<std::string, StructData> const & structure ) const;
|
||||
std::string generateUniqueHandle( std::pair<std::string, HandleData> const & handleData ) const;
|
||||
std::string generateUniqueHandle( std::vector<RequireData> const & requireData, std::string const & title, std::set<std::string> & listedHandles ) const;
|
||||
std::string generateUniqueHandles() const;
|
||||
|
|
@ -1143,6 +1173,8 @@ private:
|
|||
bool isUnsupportedFeature( std::string const & name ) const;
|
||||
bool isVectorByStructure( std::string const & type ) const;
|
||||
void markExtendedStructs();
|
||||
void mergeInternalFeatures();
|
||||
void mergeInternalFeatures( std::vector<std::string> const & depends, FeatureData & feature, std::map<std::string, FeatureData> & internalFeatures );
|
||||
bool needsStructureChainResize( std::map<size_t, VectorParamData> const & vectorParams, std::vector<size_t> const & chainedReturnParams ) const;
|
||||
std::pair<bool, std::map<size_t, std::vector<size_t>>> needsVectorSizeCheck( std::vector<ParamData> const & params,
|
||||
std::map<size_t, VectorParamData> const & vectorParams,
|
||||
|
|
@ -1233,27 +1265,26 @@ private:
|
|||
MemberData const & vectorMemberByStructure( std::string const & structureType ) const;
|
||||
|
||||
private:
|
||||
std::string m_api;
|
||||
std::map<std::string, BaseTypeData> m_baseTypes;
|
||||
std::map<std::string, BitmaskData> m_bitmasks;
|
||||
std::set<std::string> m_commandQueues;
|
||||
std::map<std::string, CommandData> m_commands;
|
||||
std::map<std::string, ConstantData> m_constants;
|
||||
std::map<std::string, DefineData> m_defines;
|
||||
DefinesPartition m_definesPartition; // partition defined macros into mutually-exclusive sets of callees, callers, and values
|
||||
std::map<std::string, std::vector<EnumExtendData>> m_enumExtends;
|
||||
std::map<std::string, EnumData> m_enums;
|
||||
std::vector<ExtensionData> m_extensions;
|
||||
std::map<std::string, ExternalTypeData> m_externalTypes;
|
||||
std::vector<FeatureData> m_features;
|
||||
std::map<std::string, FormatData> m_formats;
|
||||
std::map<std::string, FuncPointerData> m_funcPointers;
|
||||
std::map<std::string, HandleData> m_handles;
|
||||
std::map<std::string, IncludeData> m_includes;
|
||||
std::map<std::string, PlatformData> m_platforms;
|
||||
std::set<std::string> m_RAIISpecialFunctions;
|
||||
std::map<std::string, SpirVCapabilityData> m_spirVCapabilities;
|
||||
std::map<std::string, StructureData> m_structs;
|
||||
std::string m_api;
|
||||
std::map<std::string, BaseTypeData> m_baseTypes;
|
||||
std::map<std::string, BitmaskData> m_bitmasks;
|
||||
std::set<std::string> m_commandQueues;
|
||||
std::map<std::string, CommandData> m_commands;
|
||||
std::map<std::string, ConstantData> m_constants;
|
||||
std::map<std::string, DefineData> m_defines;
|
||||
DefinesPartition m_definesPartition; // partition defined macros into mutually-exclusive sets of callees, callers, and values
|
||||
std::map<std::string, EnumData> m_enums;
|
||||
std::vector<ExtensionData> m_extensions;
|
||||
std::map<std::string, ExternalTypeData> m_externalTypes;
|
||||
std::vector<FeatureData> m_features;
|
||||
std::map<std::string, FormatData> m_formats;
|
||||
std::map<std::string, FuncPointerData> m_funcPointers;
|
||||
std::map<std::string, HandleData> m_handles;
|
||||
std::map<std::string, IncludeData> m_includes;
|
||||
std::map<std::string, PlatformData> m_platforms;
|
||||
std::set<std::string> m_RAIISpecialFunctions;
|
||||
std::map<std::string, SpirVCapabilityData> m_spirVCapabilities;
|
||||
std::map<std::string, StructData> m_structs;
|
||||
std::vector<std::pair<std::string, NameLine>> m_structsAliases; // temporary storage for aliases, as they might be listed before the actual struct is listed
|
||||
std::map<std::string, NameLine> m_syncAccesses;
|
||||
std::map<std::string, NameLine> m_syncStages;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
#if defined( _MSC_VER )
|
||||
// no need to ignore any warnings with MSVC
|
||||
#elif defined( __clang__ )
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
|
|
|
|||
|
|
@ -55,8 +55,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
|
||||
/* VULKAN_KEY_START */
|
||||
|
||||
vk::DebugUtilsObjectNameInfoEXT debugUtilsObjectNameInfo( vk::ObjectType::eImage, NON_DISPATCHABLE_HANDLE_TO_UINT64_CAST( VkImage, image ), "Image name" );
|
||||
device.setDebugUtilsObjectNameEXT( debugUtilsObjectNameInfo );
|
||||
device.setDebugUtilsObjectNameEXT( image, "Image name" );
|
||||
|
||||
/* VULKAN_KEY_END */
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
#if defined( _MSC_VER )
|
||||
// no need to ignore any warnings with MSVC
|
||||
#elif defined( __clang__ )
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
#if defined( _MSC_VER )
|
||||
// no need to ignore any warnings with MSVC
|
||||
#elif defined( __clang__ )
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
|
|
|
|||
|
|
@ -140,8 +140,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
/* VULKAN_KEY_START */
|
||||
|
||||
// Check disk for existing cache data
|
||||
size_t startCacheSize = 0;
|
||||
char * startCacheData = nullptr;
|
||||
std::vector<char> startCacheData;
|
||||
|
||||
std::string cacheFileName = "pipeline_cache_data.bin";
|
||||
std::ifstream readCacheStream( cacheFileName, std::ios_base::in | std::ios_base::binary );
|
||||
|
|
@ -149,14 +148,14 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
{
|
||||
// Determine cache size
|
||||
readCacheStream.seekg( 0, readCacheStream.end );
|
||||
startCacheSize = static_cast<size_t>( readCacheStream.tellg() );
|
||||
size_t startCacheSize = static_cast<size_t>( readCacheStream.tellg() );
|
||||
readCacheStream.seekg( 0, readCacheStream.beg );
|
||||
|
||||
// Allocate memory to hold the initial cache data
|
||||
startCacheData = (char *)std::malloc( startCacheSize );
|
||||
startCacheData.resize( startCacheSize );
|
||||
|
||||
// Read the data into our buffer
|
||||
readCacheStream.read( startCacheData, startCacheSize );
|
||||
readCacheStream.read( startCacheData.data(), startCacheData.size() );
|
||||
|
||||
// Clean up and print results
|
||||
readCacheStream.close();
|
||||
|
|
@ -169,7 +168,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
std::cout << " Pipeline cache miss!\n";
|
||||
}
|
||||
|
||||
if ( startCacheData != nullptr )
|
||||
if ( !startCacheData.empty() )
|
||||
{
|
||||
// Check for cache validity
|
||||
//
|
||||
|
|
@ -205,11 +204,12 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
uint32_t deviceID = 0;
|
||||
uint8_t pipelineCacheUUID[VK_UUID_SIZE] = {};
|
||||
|
||||
memcpy( &headerLength, (uint8_t *)startCacheData + 0, 4 );
|
||||
memcpy( &cacheHeaderVersion, (uint8_t *)startCacheData + 4, 4 );
|
||||
memcpy( &vendorID, (uint8_t *)startCacheData + 8, 4 );
|
||||
memcpy( &deviceID, (uint8_t *)startCacheData + 12, 4 );
|
||||
memcpy( pipelineCacheUUID, (uint8_t *)startCacheData + 16, VK_UUID_SIZE );
|
||||
uint8_t * startCacheDataPtr = reinterpret_cast<uint8_t *>( startCacheData.data() );
|
||||
memcpy( &headerLength, startCacheDataPtr + 0, 4 );
|
||||
memcpy( &cacheHeaderVersion, startCacheDataPtr + 4, 4 );
|
||||
memcpy( &vendorID, startCacheDataPtr + 8, 4 );
|
||||
memcpy( &deviceID, startCacheDataPtr + 12, 4 );
|
||||
memcpy( pipelineCacheUUID, startCacheDataPtr + 16, VK_UUID_SIZE );
|
||||
|
||||
// Check each field and report bad values before freeing existing cache
|
||||
bool badCache = false;
|
||||
|
|
@ -255,9 +255,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
if ( badCache )
|
||||
{
|
||||
// Don't submit initial cache data if any version info is incorrect
|
||||
free( startCacheData );
|
||||
startCacheSize = 0;
|
||||
startCacheData = nullptr;
|
||||
startCacheData.clear();
|
||||
|
||||
// And clear out the old cache file for use in next run
|
||||
std::cout << " Deleting cache entry " << cacheFileName << " to repopulate.\n";
|
||||
|
|
@ -271,11 +269,10 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
|
||||
// Feed the initial cache data into cache creation
|
||||
vk::PipelineCache pipelineCache =
|
||||
device.createPipelineCache( vk::PipelineCacheCreateInfo( vk::PipelineCacheCreateFlags(), startCacheSize, startCacheData ) );
|
||||
device.createPipelineCache( vk::PipelineCacheCreateInfo( vk::PipelineCacheCreateFlags(), startCacheData.size(), startCacheData.data() ) );
|
||||
|
||||
// Free our initialData now that pipeline cache has been created
|
||||
free( startCacheData );
|
||||
startCacheData = NULL;
|
||||
startCacheData.clear();
|
||||
|
||||
// Time (roughly) taken to create the graphics pipeline
|
||||
timestamp_t start = getMilliseconds();
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public:
|
|||
VkResult err = glfwCreateWindowSurface( instance.get(), window.handle, nullptr, &surface );
|
||||
if ( err != VK_SUCCESS )
|
||||
throw std::runtime_error( "Failed to create window!" );
|
||||
vk::SharedSurfaceKHR sharedSurface{ surface, instance };
|
||||
vk::SharedSurfaceKHR sharedSurface{ static_cast<vk::SurfaceKHR>( surface ), instance };
|
||||
|
||||
auto graphicsAndPresentQueueFamilyIndex = vk::su::findGraphicsAndPresentQueueFamilyIndex( physicalDevice, sharedSurface.get() );
|
||||
device = vk::SharedDevice{ vk::su::createDevice( physicalDevice, graphicsAndPresentQueueFamilyIndex.first, vk::su::getDeviceExtensions() ) };
|
||||
|
|
@ -109,16 +109,12 @@ public:
|
|||
std::transform( swapChainData.images.begin(),
|
||||
swapChainData.images.end(),
|
||||
std::back_inserter( images ),
|
||||
[this]( vk::Image image ) {
|
||||
return vk::SharedImage{ image, device, vk::SwapchainOwns::yes };
|
||||
} );
|
||||
[this]( vk::Image image ) { return vk::SharedImage{ image, device, vk::SwapchainOwns::yes }; } );
|
||||
|
||||
std::transform( swapChainData.imageViews.begin(),
|
||||
swapChainData.imageViews.end(),
|
||||
std::back_inserter( imageViews ),
|
||||
[this]( vk::ImageView imageView ) {
|
||||
return vk::SharedImageView{ imageView, device };
|
||||
} );
|
||||
[this]( vk::ImageView imageView ) { return vk::SharedImageView{ imageView, device }; } );
|
||||
commandPool =
|
||||
vk::SharedCommandPool{ device->createCommandPool( { vk::CommandPoolCreateFlagBits::eResetCommandBuffer, graphicsAndPresentQueueFamilyIndex.first } ),
|
||||
device };
|
||||
|
|
@ -230,9 +226,9 @@ public:
|
|||
vk::Result result = presentQueue->presentKHR( vk::PresentInfoKHR( {}, swap, currentBuffer ) );
|
||||
switch ( result )
|
||||
{
|
||||
case vk::Result::eSuccess: break;
|
||||
case vk::Result::eSuccess : break;
|
||||
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n"; break;
|
||||
default: assert( false ); // an unexpected result is returned !
|
||||
default : assert( false ); // an unexpected result is returned !
|
||||
}
|
||||
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,18 @@
|
|||
${licenseHeader}
|
||||
|
||||
// Note: This module is still in an experimental state.
|
||||
// Any feedback is welcome on https://github.com/KhronosGroup/Vulkan-Hpp/issues.
|
||||
|
||||
module;
|
||||
|
||||
#define VULKAN_HPP_CXX_MODULE 1
|
||||
|
||||
#include <vulkan/vulkan_hpp_macros.hpp>
|
||||
|
||||
#if defined( __cpp_lib_modules ) && !defined( VULKAN_HPP_ENABLE_STD_MODULE )
|
||||
#define VULKAN_HPP_ENABLE_STD_MODULE
|
||||
#if !defined( VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING )
|
||||
# define VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING \
|
||||
"\n\tThe Vulkan-Hpp C++ named module is experimental. It is subject to change without prior notice.\n" \
|
||||
"\tTo silence this warning, define the VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING macro.\n" \
|
||||
"\tFor feedback, go to: https://github.com/KhronosGroup/Vulkan-Hpp/issues"
|
||||
|
||||
VULKAN_HPP_COMPILE_WARNING( VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING )
|
||||
#endif
|
||||
|
||||
#include <vulkan/${api}.hpp>
|
||||
|
|
@ -17,11 +21,10 @@ module;
|
|||
#include <vulkan/${api}_hash.hpp>
|
||||
#include <vulkan/${api}_raii.hpp>
|
||||
#include <vulkan/${api}_shared.hpp>
|
||||
#ifndef VULKAN_HPP_NO_TO_STRING
|
||||
#include <vulkan/${api}_to_string.hpp>
|
||||
#endif
|
||||
|
||||
export module ${api}_hpp;
|
||||
export module ${api};
|
||||
export import :video;
|
||||
export import std;
|
||||
|
||||
export namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
|
|
@ -49,8 +52,11 @@ export namespace std
|
|||
#endif
|
||||
}
|
||||
|
||||
// This VkFlags type is used as part of a bitfield in some structure.
|
||||
// As it can't be mimicked by vk-data types, we need to export just that!!
|
||||
export using ::VkGeometryInstanceFlagsKHR;
|
||||
export
|
||||
{
|
||||
// This VkFlags type is used as part of a bitfield in some structures.
|
||||
// As it can't be mimicked by vk-data types, we need to export just that.
|
||||
using ::VkGeometryInstanceFlagsKHR;
|
||||
|
||||
${pfnCommands}
|
||||
${pfnCommands}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,3 +20,10 @@
|
|||
bool m_valid = true;
|
||||
#endif
|
||||
};
|
||||
|
||||
template <typename Type>
|
||||
struct isDispatchLoader
|
||||
{
|
||||
static VULKAN_HPP_CONST_OR_CONSTEXPR bool value = false;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -101,9 +101,9 @@
|
|||
T getProcAddress( const char* function ) const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
# if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNX__ ) || defined(__Fuchsia__)
|
||||
return (T)dlsym( m_library, function );
|
||||
return (T)(void*)dlsym( m_library, function );
|
||||
# elif defined( _WIN32 )
|
||||
return (T)::GetProcAddress( m_library, function );
|
||||
return (T)(void*)::GetProcAddress( m_library, function );
|
||||
# else
|
||||
# error unsupported platform
|
||||
# endif
|
||||
|
|
|
|||
|
|
@ -4,9 +4,11 @@ ${licenseHeader}
|
|||
# define VULKAN_ENUMS_HPP
|
||||
|
||||
// include-what-you-use: make sure, vulkan.hpp is used by code-completers
|
||||
// IWYU pragma: private; include "vulkan.hpp"
|
||||
// IWYU pragma: private, include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <type_traits> // for std::underlying_type
|
||||
#if !defined( VULKAN_HPP_CXX_MODULE )
|
||||
# include <type_traits> // for std::underlying_type
|
||||
#endif
|
||||
|
||||
namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
|
|
@ -15,4 +17,4 @@ ${Flags}
|
|||
${enums}
|
||||
${objectTypeToDebugReportObjectType}
|
||||
} // namespace VULKAN_HPP_NAMESPACE
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@ ${licenseHeader}
|
|||
#ifndef VULKAN_EXTENSION_INSPECTION_HPP
|
||||
#define VULKAN_EXTENSION_INSPECTION_HPP
|
||||
|
||||
#if defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE )
|
||||
import VULKAN_HPP_STD_MODULE;
|
||||
#else
|
||||
#if !defined( VULKAN_HPP_CXX_MODULE )
|
||||
# include <map>
|
||||
# include <set>
|
||||
# include <string>
|
||||
|
|
@ -70,7 +68,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
{
|
||||
#if !defined( NDEBUG )
|
||||
static std::set<std::string> versions = { ${versions} };
|
||||
assert( versions.find( version ) != versions.end() );
|
||||
VULKAN_HPP_ASSERT( versions.find( version ) != versions.end() );
|
||||
#endif
|
||||
static std::vector<std::vector<std::string>> noDependencies;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ ${licenseHeader}
|
|||
# define VULKAN_FUNCS_HPP
|
||||
|
||||
// include-what-you-use: make sure, vulkan.hpp is used by code-completers
|
||||
// IWYU pragma: private; include "vulkan.hpp"
|
||||
// IWYU pragma: private, include "vulkan/vulkan.hpp"
|
||||
|
||||
namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ ${licenseHeader}
|
|||
# define VULKAN_HANDLES_HPP
|
||||
|
||||
// include-what-you-use: make sure, vulkan.hpp is used by code-completers
|
||||
// IWYU pragma: private; include "vulkan.hpp"
|
||||
// IWYU pragma: private, include "vulkan/vulkan.hpp"
|
||||
|
||||
namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ ${licenseHeader}
|
|||
|
||||
${includes}
|
||||
|
||||
static_assert( VK_HEADER_VERSION == ${headerVersion}, "Wrong VK_HEADER_VERSION!" );
|
||||
VULKAN_HPP_STATIC_ASSERT( VK_HEADER_VERSION == ${headerVersion}, "Wrong VK_HEADER_VERSION!" );
|
||||
|
||||
${defines}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,20 @@ ${licenseHeader}
|
|||
# include <ciso646>
|
||||
#endif
|
||||
|
||||
#define VULKAN_HPP_STRINGIFY2( text ) #text
|
||||
#define VULKAN_HPP_STRINGIFY( text ) VULKAN_HPP_STRINGIFY2( text )
|
||||
#define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE )
|
||||
|
||||
#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__)
|
||||
# define VULKAN_HPP_COMPILE_WARNING( text ) \
|
||||
_Pragma( VULKAN_HPP_STRINGIFY( GCC warning text ))
|
||||
#elif defined(_MSC_VER)
|
||||
# define VULKAN_HPP_COMPILE_WARNING( text ) \
|
||||
_Pragma( VULKAN_HPP_STRINGIFY( message(__FILE__ "(" VULKAN_HPP_STRINGIFY(__LINE__) "): warning: " text )))
|
||||
#else
|
||||
# define VULKAN_HPP_COMPILE_WARNING( text )
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
|
||||
# if !defined( VULKAN_HPP_NO_SMART_HANDLE )
|
||||
# define VULKAN_HPP_NO_SMART_HANDLE
|
||||
|
|
@ -82,8 +96,8 @@ ${licenseHeader}
|
|||
# define VULKAN_HPP_SUPPORT_SPAN
|
||||
#endif
|
||||
|
||||
#if defined( __cpp_lib_modules ) && !defined( VULKAN_HPP_STD_MODULE ) && defined( VULKAN_HPP_ENABLE_STD_MODULE )
|
||||
# define VULKAN_HPP_STD_MODULE std.compat
|
||||
#if defined( VULKAN_HPP_CXX_MODULE ) && !( defined( __cpp_modules ) && defined( __cpp_lib_modules ) )
|
||||
VULKAN_HPP_COMPILE_WARNING( "This is a non-conforming implementation of C++ named modules and the standard library module." )
|
||||
#endif
|
||||
|
||||
${vulkan_64_bit_ptr_defines}
|
||||
|
|
@ -213,10 +227,6 @@ ${vulkan_64_bit_ptr_defines}
|
|||
# define VULKAN_HPP_NAMESPACE vk
|
||||
#endif
|
||||
|
||||
#define VULKAN_HPP_STRINGIFY2( text ) #text
|
||||
#define VULKAN_HPP_STRINGIFY( text ) VULKAN_HPP_STRINGIFY2( text )
|
||||
#define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE )
|
||||
|
||||
#if !defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC )
|
||||
# if defined( VK_NO_PROTOTYPES )
|
||||
# define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1
|
||||
|
|
@ -295,18 +305,15 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
#endif
|
||||
|
||||
#if defined( VULKAN_HPP_NO_DEFAULT_DISPATCHER )
|
||||
# define VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT
|
||||
# define VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT
|
||||
# define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT
|
||||
# define VULKAN_HPP_DEFAULT_ASSIGNMENT( assignment )
|
||||
#else
|
||||
# define VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT = {}
|
||||
# define VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT = nullptr
|
||||
# define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT = VULKAN_HPP_DEFAULT_DISPATCHER
|
||||
# define VULKAN_HPP_DEFAULT_ASSIGNMENT( assignment ) = assignment
|
||||
#endif
|
||||
#define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT VULKAN_HPP_DEFAULT_ASSIGNMENT( VULKAN_HPP_DEFAULT_DISPATCHER )
|
||||
|
||||
#if !defined( VULKAN_HPP_RAII_NAMESPACE )
|
||||
# define VULKAN_HPP_RAII_NAMESPACE raii
|
||||
# define VULKAN_HPP_RAII_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE::VULKAN_HPP_RAII_NAMESPACE )
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ public:
|
|||
ObjectDestroy() = default;
|
||||
|
||||
ObjectDestroy( OwnerType owner,
|
||||
Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
||||
Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
||||
Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT
|
||||
: m_owner( owner )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
public:
|
||||
ObjectFree() = default;
|
||||
|
||||
ObjectFree( OwnerType owner,
|
||||
Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
||||
ObjectFree( OwnerType owner,
|
||||
Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
||||
Dispatch const & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT
|
||||
: m_owner( owner )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ ${licenseHeader}
|
|||
#define VULKAN_RAII_HPP
|
||||
|
||||
#include <vulkan/${api}.hpp>
|
||||
#if !( defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) )
|
||||
#if !defined( VULKAN_HPP_CXX_MODULE )
|
||||
# include <memory> // std::unique_ptr
|
||||
# include <utility> // std::forward
|
||||
#endif
|
||||
|
|
@ -52,4 +52,4 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
} // namespace VULKAN_HPP_RAII_NAMESPACE
|
||||
} // namespace VULKAN_HPP_NAMESPACE
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -35,25 +35,25 @@
|
|||
|
||||
T const * operator->() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
assert( has_value() );
|
||||
VULKAN_HPP_ASSERT( has_value() );
|
||||
return &value;
|
||||
}
|
||||
|
||||
T * operator->() VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
assert( has_value() );
|
||||
VULKAN_HPP_ASSERT( has_value() );
|
||||
return &value;
|
||||
}
|
||||
|
||||
T const & operator*() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
assert(has_value ());
|
||||
VULKAN_HPP_ASSERT(has_value ());
|
||||
return value;
|
||||
}
|
||||
|
||||
T & operator*() VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
assert(has_value ());
|
||||
VULKAN_HPP_ASSERT(has_value ());
|
||||
return value;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ ${licenseHeader}
|
|||
|
||||
#include <vulkan/${api}.hpp>
|
||||
|
||||
#if !( defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) )
|
||||
#if !defined( VULKAN_HPP_CXX_MODULE )
|
||||
#include <atomic> // std::atomic_size_t
|
||||
#endif
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
template <typename DestructorType, typename Deleter>
|
||||
struct SharedHeader
|
||||
{
|
||||
SharedHeader( SharedHandle<DestructorType> parent, Deleter deleter = Deleter() ) VULKAN_HPP_NOEXCEPT
|
||||
SharedHeader( SharedHandle<DestructorType> parent, Deleter deleter VULKAN_HPP_DEFAULT_ASSIGNMENT( Deleter() ) ) VULKAN_HPP_NOEXCEPT
|
||||
: parent( std::move( parent ) )
|
||||
, deleter( std::move( deleter ) )
|
||||
{
|
||||
|
|
@ -92,7 +92,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
template <typename Deleter>
|
||||
struct SharedHeader<NoDestructor, Deleter>
|
||||
{
|
||||
SharedHeader( Deleter deleter = Deleter() ) VULKAN_HPP_NOEXCEPT : deleter( std::move( deleter ) ) {}
|
||||
SharedHeader( Deleter deleter VULKAN_HPP_DEFAULT_ASSIGNMENT( Deleter() ) ) VULKAN_HPP_NOEXCEPT : deleter( std::move( deleter ) ) {}
|
||||
|
||||
Deleter deleter;
|
||||
};
|
||||
|
|
@ -126,7 +126,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
public:
|
||||
std::atomic_size_t m_ref_cnt{ 1 };
|
||||
HeaderType m_header{};
|
||||
HeaderType m_header;
|
||||
};
|
||||
|
||||
//=====================================================================================================================
|
||||
|
|
@ -277,7 +277,9 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
SharedHandle() = default;
|
||||
|
||||
template <typename T = HandleType, typename = typename std::enable_if<HasDestructor<T>::value && !HasPoolType<T>::value>::type>
|
||||
explicit SharedHandle( HandleType handle, SharedHandle<DestructorTypeOf<HandleType>> parent, DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT
|
||||
explicit SharedHandle( HandleType handle,
|
||||
SharedHandle<DestructorTypeOf<HandleType>> parent,
|
||||
DeleterType deleter VULKAN_HPP_DEFAULT_ASSIGNMENT( DeleterType() ) ) VULKAN_HPP_NOEXCEPT
|
||||
: BaseType( handle, std::move( parent ), std::move( deleter ) )
|
||||
{
|
||||
}
|
||||
|
|
@ -294,7 +296,9 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
template <typename T = HandleType, typename = typename std::enable_if<!HasDestructor<T>::value>::type>
|
||||
explicit SharedHandle( HandleType handle, DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT : BaseType( handle, std::move( deleter ) )
|
||||
explicit SharedHandle( HandleType handle,
|
||||
DeleterType deleter VULKAN_HPP_DEFAULT_ASSIGNMENT( DeleterType() ) ) VULKAN_HPP_NOEXCEPT
|
||||
: BaseType( handle, std::move( deleter ) )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -313,13 +317,12 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
# pragma clang diagnostic ignored "-Wcast-function-type"
|
||||
# endif
|
||||
|
||||
template <typename HandleType>
|
||||
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
class ObjectDestroyShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType =
|
||||
typename std::conditional<HasDestructor<HandleType>::value,
|
||||
void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const,
|
||||
|
|
@ -327,10 +330,9 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
using SelectorType = typename std::conditional<HasDestructor<HandleType>::value, DestructorType, HandleType>::type;
|
||||
|
||||
template <typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
ObjectDestroyShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &SelectorType::destroy ) ) )
|
||||
ObjectDestroyShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &SelectorType::destroy ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
{
|
||||
|
|
@ -352,24 +354,22 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
};
|
||||
|
||||
template <typename HandleType>
|
||||
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
class ObjectFreeShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const;
|
||||
|
||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
ObjectFreeShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
|
||||
ObjectFreeShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::free ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
{
|
||||
|
|
@ -383,23 +383,21 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
};
|
||||
|
||||
template <typename HandleType>
|
||||
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
class ObjectReleaseShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const Dispatcher & ) const;
|
||||
|
||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
ObjectReleaseShared( const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::release ) ) )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::release ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
{
|
||||
}
|
||||
|
|
@ -412,11 +410,11 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
};
|
||||
|
||||
template <typename HandleType, typename PoolType>
|
||||
template <typename HandleType, typename PoolType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
class PoolFreeShared
|
||||
{
|
||||
public:
|
||||
|
|
@ -424,17 +422,14 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
using PoolTypeExport = PoolType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using ReturnType = decltype( std::declval<DestructorType>().free( PoolType(), 0u, nullptr, Dispatcher() ) );
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType = ReturnType<Dispatcher> ( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const;
|
||||
using DestroyFunctionPointerType = ReturnType( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const;
|
||||
|
||||
PoolFreeShared() = default;
|
||||
|
||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
PoolFreeShared( SharedHandle<PoolType> pool, const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::free ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
, m_pool( std::move( pool ) )
|
||||
{
|
||||
|
|
@ -448,9 +443,9 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
SharedHandle<PoolType> m_pool{};
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
SharedHandle<PoolType> m_pool{};
|
||||
};
|
||||
|
||||
# if defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __INTEL_COMPILER )
|
||||
|
|
@ -459,7 +454,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
# pragma clang diagnostic pop
|
||||
# endif
|
||||
}
|
||||
|
||||
|
||||
${sharedHandles}
|
||||
|
||||
// a number of SharedHandle specializations
|
||||
|
|
@ -472,7 +467,8 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
struct ImageHeader : SharedHeader<DestructorTypeOf<Image>, typename SharedHandleTraits<Image>::deleter>
|
||||
{
|
||||
ImageHeader( SharedHandle<DestructorTypeOf<Image>> parent,
|
||||
typename SharedHandleTraits<Image>::deleter deleter = typename SharedHandleTraits<Image>::deleter(),
|
||||
typename SharedHandleTraits<Image>::deleter deleter
|
||||
VULKAN_HPP_DEFAULT_ASSIGNMENT( typename SharedHandleTraits<Image>::deleter() ),
|
||||
SwapchainOwns swapchainOwned = SwapchainOwns::no ) VULKAN_HPP_NOEXCEPT
|
||||
: SharedHeader<DestructorTypeOf<Image>, typename SharedHandleTraits<Image>::deleter>( std::move( parent ), std::move( deleter ) )
|
||||
, swapchainOwned( swapchainOwned )
|
||||
|
|
@ -494,8 +490,8 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
explicit SharedHandle( Image handle,
|
||||
SharedHandle<DestructorTypeOf<Image>> parent,
|
||||
SwapchainOwns swapchain_owned = SwapchainOwns::no,
|
||||
DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT
|
||||
SwapchainOwns swapchain_owned VULKAN_HPP_DEFAULT_ASSIGNMENT( SwapchainOwns::no ),
|
||||
DeleterType deleter VULKAN_HPP_DEFAULT_ASSIGNMENT( DeleterType() ) ) VULKAN_HPP_NOEXCEPT
|
||||
: BaseType( handle, std::move( parent ), std::move( deleter ), swapchain_owned )
|
||||
{
|
||||
}
|
||||
|
|
@ -514,16 +510,17 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
{
|
||||
SwapchainHeader( SharedHandle<SurfaceKHR> surface,
|
||||
SharedHandle<DestructorTypeOf<SwapchainKHR>> parent,
|
||||
typename SharedHandleTraits<SwapchainKHR>::deleter deleter = typename SharedHandleTraits<SwapchainKHR>::deleter() ) VULKAN_HPP_NOEXCEPT
|
||||
typename SharedHandleTraits<SwapchainKHR>::deleter deleter
|
||||
VULKAN_HPP_DEFAULT_ASSIGNMENT( typename SharedHandleTraits<SwapchainKHR>::deleter() ) ) VULKAN_HPP_NOEXCEPT
|
||||
: surface( std::move( surface ) )
|
||||
, parent( std::move( parent ) )
|
||||
, deleter( std::move( deleter ) )
|
||||
{
|
||||
}
|
||||
|
||||
SharedHandle<SurfaceKHR> surface{};
|
||||
SharedHandle<DestructorTypeOf<SwapchainKHR>> parent{};
|
||||
typename SharedHandleTraits<SwapchainKHR>::deleter deleter{};
|
||||
SharedHandle<SurfaceKHR> surface;
|
||||
SharedHandle<DestructorTypeOf<SwapchainKHR>> parent;
|
||||
typename SharedHandleTraits<SwapchainKHR>::deleter deleter;
|
||||
};
|
||||
|
||||
template <>
|
||||
|
|
@ -539,7 +536,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
explicit SharedHandle( SwapchainKHR handle,
|
||||
SharedHandle<DestructorTypeOf<SwapchainKHR>> parent,
|
||||
SharedHandle<SurfaceKHR> surface,
|
||||
DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT
|
||||
DeleterType deleter VULKAN_HPP_DEFAULT_ASSIGNMENT( DeleterType() ) ) VULKAN_HPP_NOEXCEPT
|
||||
: BaseType( handle, std::move( surface ), std::move( parent ), std::move( deleter ) )
|
||||
{
|
||||
}
|
||||
|
|
@ -572,4 +569,4 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
${sharedHandlesNoDestroy}
|
||||
#endif // !VULKAN_HPP_NO_SMART_HANDLE
|
||||
} // namespace VULKAN_HPP_NAMESPACE
|
||||
#endif // VULKAN_SHARED_HPP
|
||||
#endif // VULKAN_SHARED_HPP
|
||||
|
|
|
|||
|
|
@ -4,12 +4,14 @@ ${licenseHeader}
|
|||
# define VULKAN_STRUCTS_HPP
|
||||
|
||||
// include-what-you-use: make sure, vulkan.hpp is used by code-completers
|
||||
// IWYU pragma: private; include "vulkan.hpp"
|
||||
// IWYU pragma: private, include "vulkan/vulkan.hpp"
|
||||
|
||||
#include <cstring> // strcmp
|
||||
#if !defined( VULKAN_HPP_CXX_MODULE )
|
||||
# include <cstring> // strcmp
|
||||
#endif
|
||||
|
||||
namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
${structs}
|
||||
} // namespace VULKAN_HPP_NAMESPACE
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -55,13 +55,13 @@
|
|||
public:
|
||||
StructureChain() VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
static_assert( StructureChainValidation<sizeof...( ChainElements ) - 1, ChainElements...>::valid, "The structure chain is not valid!" );
|
||||
VULKAN_HPP_STATIC_ASSERT( StructureChainValidation<sizeof...( ChainElements ) - 1, ChainElements...>::valid, "The structure chain is not valid!" );
|
||||
link<sizeof...( ChainElements ) - 1>();
|
||||
}
|
||||
|
||||
StructureChain( StructureChain const & rhs ) VULKAN_HPP_NOEXCEPT : std::tuple<ChainElements...>( rhs )
|
||||
{
|
||||
static_assert( StructureChainValidation<sizeof...( ChainElements ) - 1, ChainElements...>::valid, "The structure chain is not valid!" );
|
||||
VULKAN_HPP_STATIC_ASSERT( StructureChainValidation<sizeof...( ChainElements ) - 1, ChainElements...>::valid, "The structure chain is not valid!" );
|
||||
link( &std::get<0>( *this ),
|
||||
&std::get<0>( rhs ),
|
||||
reinterpret_cast<VkBaseOutStructure *>( &std::get<0>( *this ) ),
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
|
||||
StructureChain( ChainElements const &... elems ) VULKAN_HPP_NOEXCEPT : std::tuple<ChainElements...>( elems... )
|
||||
{
|
||||
static_assert( StructureChainValidation<sizeof...( ChainElements ) - 1, ChainElements...>::valid, "The structure chain is not valid!" );
|
||||
VULKAN_HPP_STATIC_ASSERT( StructureChainValidation<sizeof...( ChainElements ) - 1, ChainElements...>::valid, "The structure chain is not valid!" );
|
||||
link<sizeof...( ChainElements ) - 1>();
|
||||
}
|
||||
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
typename std::enable_if<!std::is_same<ClassType, typename std::tuple_element<0, std::tuple<ChainElements...>>::type>::value || ( Which != 0 ), bool>::type
|
||||
isLinked() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
static_assert( IsPartOfStructureChain<ClassType, ChainElements...>::valid, "Can't unlink Structure that's not part of this StructureChain!" );
|
||||
VULKAN_HPP_STATIC_ASSERT( IsPartOfStructureChain<ClassType, ChainElements...>::valid, "Can't unlink Structure that's not part of this StructureChain!" );
|
||||
return isLinked( reinterpret_cast<VkBaseInStructure const *>( &get<ClassType, Which>() ) );
|
||||
}
|
||||
|
||||
|
|
@ -138,7 +138,7 @@
|
|||
typename std::enable_if<!std::is_same<ClassType, typename std::tuple_element<0, std::tuple<ChainElements...>>::type>::value || ( Which != 0 ), void>::type
|
||||
relink() VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
static_assert( IsPartOfStructureChain<ClassType, ChainElements...>::valid, "Can't relink Structure that's not part of this StructureChain!" );
|
||||
VULKAN_HPP_STATIC_ASSERT( IsPartOfStructureChain<ClassType, ChainElements...>::valid, "Can't relink Structure that's not part of this StructureChain!" );
|
||||
auto pNext = reinterpret_cast<VkBaseInStructure *>( &get<ClassType, Which>() );
|
||||
VULKAN_HPP_ASSERT( !isLinked( pNext ) );
|
||||
auto & headElement = std::get<0>( static_cast<std::tuple<ChainElements...> &>( *this ) );
|
||||
|
|
@ -150,7 +150,7 @@
|
|||
typename std::enable_if<!std::is_same<ClassType, typename std::tuple_element<0, std::tuple<ChainElements...>>::type>::value || ( Which != 0 ), void>::type
|
||||
unlink() VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
static_assert( IsPartOfStructureChain<ClassType, ChainElements...>::valid, "Can't unlink Structure that's not part of this StructureChain!" );
|
||||
VULKAN_HPP_STATIC_ASSERT( IsPartOfStructureChain<ClassType, ChainElements...>::valid, "Can't unlink Structure that's not part of this StructureChain!" );
|
||||
unlink( reinterpret_cast<VkBaseOutStructure const *>( &get<ClassType, Which>() ) );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ ${licenseHeader}
|
|||
#ifndef VULKAN_TO_STRING_HPP
|
||||
# define VULKAN_TO_STRING_HPP
|
||||
|
||||
#include <vulkan/${api}.hpp>
|
||||
#if !defined( VULKAN_HPP_CXX_MODULE )
|
||||
# include <vulkan/${api}.hpp>
|
||||
#endif
|
||||
|
||||
// ignore warnings on using deprecated enum values in this header
|
||||
#if defined( __clang__ ) || defined( __GNUC__ )
|
||||
|
|
@ -13,10 +15,8 @@ ${licenseHeader}
|
|||
# pragma warning( disable : 4996 )
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE )
|
||||
import VULKAN_HPP_STD_MODULE;
|
||||
#else
|
||||
# if __cpp_lib_format
|
||||
#if !defined( VULKAN_HPP_CXX_MODULE )
|
||||
# if defined( __cpp_lib_format )
|
||||
# include <format> // std::format
|
||||
# else
|
||||
# include <sstream> // std::stringstream
|
||||
|
|
@ -35,4 +35,4 @@ ${enumsToString}
|
|||
# pragma warning( pop )
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,24 +1,25 @@
|
|||
${copyrightMessage}
|
||||
|
||||
// Note: This module is still in an experimental state.
|
||||
// Any feedback is welcome on https://github.com/KhronosGroup/Vulkan-Hpp/issues.
|
||||
|
||||
module;
|
||||
|
||||
#define VULKAN_HPP_CXX_MODULE 1
|
||||
|
||||
#include <vulkan/vulkan_hpp_macros.hpp>
|
||||
|
||||
#if defined( __cpp_lib_modules ) && !defined( VULKAN_HPP_ENABLE_STD_MODULE )
|
||||
#define VULKAN_HPP_ENABLE_STD_MODULE
|
||||
#if !defined( VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING )
|
||||
# define VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING \
|
||||
"\n\tThe Vulkan-Hpp C++ named module is experimental. It is subject to change without prior notice.\n" \
|
||||
"\tTo silence this warning, define the VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING macro.\n" \
|
||||
"\tFor feedback, go to: https://github.com/KhronosGroup/Vulkan-Hpp/issues"
|
||||
|
||||
VULKAN_HPP_COMPILE_WARNING( VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING )
|
||||
#endif
|
||||
|
||||
#include <vulkan/vulkan_video.hpp>
|
||||
|
||||
export module vulkan_video_hpp;
|
||||
export module vulkan_hpp:video;
|
||||
|
||||
export namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
namespace VULKAN_HPP_VIDEO_NAMESPACE
|
||||
export namespace VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE
|
||||
{
|
||||
${usings}
|
||||
} // namespace VULKAN_HPP_VIDEO_NAMESPACE
|
||||
} // namespace VULKAN_HPP_NAMESPACE
|
||||
} // namespace VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
#include <vulkan/vulkan_hpp_macros.hpp>
|
||||
|
||||
#if defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE )
|
||||
# include <cassert>
|
||||
# include <string.h>
|
||||
import VULKAN_HPP_STD_MODULE;
|
||||
#else
|
||||
#include <vulkan/${vulkan_h}>
|
||||
#if !defined( VULKAN_HPP_CXX_MODULE )
|
||||
// clang-format off
|
||||
# include <vulkan/vulkan_hpp_macros.hpp>
|
||||
// clang-format on
|
||||
# include <algorithm>
|
||||
# include <array> // ArrayWrapperND
|
||||
# include <cassert>
|
||||
|
|
@ -27,8 +25,11 @@ import VULKAN_HPP_STD_MODULE;
|
|||
# if defined( VULKAN_HPP_SUPPORT_SPAN )
|
||||
# include <span>
|
||||
# endif
|
||||
#else
|
||||
# include <cassert>
|
||||
# include <cstring>
|
||||
import std;
|
||||
#endif
|
||||
#include <vulkan/${vulkan_h}>
|
||||
|
||||
#if VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL == 1
|
||||
# if defined( __unix__ ) || defined( __APPLE__ ) || defined( __QNX__ ) || defined( __Fuchsia__ )
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
#if defined( _MSC_VER )
|
||||
// no need to ignore any warnings with MSVC
|
||||
#elif defined( __clang__ )
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
|
|
@ -25,12 +26,16 @@
|
|||
// unknown compiler... just ignore the warnings for yourselves ;)
|
||||
#endif
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
# include <vulkan/vulkan_hpp_macros.hpp>
|
||||
import vulkan_hpp;
|
||||
# ifdef VULKAN_HPP_SUPPORT_SPAN
|
||||
# include <span>
|
||||
# endif
|
||||
import vulkan;
|
||||
#else
|
||||
# include <vulkan/vulkan.hpp>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -14,5 +14,8 @@
|
|||
|
||||
vulkan_hpp__setup_test( NAME ArrayProxy )
|
||||
if( VULKAN_HPP_ENABLE_CPP20_MODULES )
|
||||
# vulkan_hpp__setup_test( NAME ArrayProxy CXX_MODULE ) # error with GCC
|
||||
# gcc versions <= 15.x fail to ignore -Winit-list-lifetime when importing vulkan_hpp
|
||||
if ( NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "16") )
|
||||
vulkan_hpp__setup_test( NAME ArrayProxy CXX_MODULE )
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
#if defined( _MSC_VER )
|
||||
// no need to ignore any warnings with MSVC
|
||||
#elif defined( __clang__ )
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
|
|
@ -31,7 +32,7 @@
|
|||
#include <iostream>
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
# include <vulkan/vulkan_hpp_macros.hpp>
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include <vulkan/vulkan.hpp>
|
||||
#endif
|
||||
|
|
@ -207,9 +208,9 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
fctc( sv1 );
|
||||
|
||||
// getVector
|
||||
// fct( getConstVector() ); // not supported: cannot convert argument 1 from 'const std::vector<int,std::allocator<int>>' to 'vk::ArrayProxyNoTemporaries<int>'
|
||||
// fctc( getConstVector() ); // not supported: cannot convert argument 1 from 'const std::vector<int,std::allocator<int>>' to 'vk::ArrayProxyNoTemporaries<const int32_t>'
|
||||
// fct( getVector() ); // not supported: cannot convert argument 1 from 'std::vector<int,std::allocator<int>>' to 'vk::ArrayProxyNoTemporaries<int>'
|
||||
// fct( getConstVector() ); // not supported: cannot convert argument 1 from 'const std::vector<int,std::allocator<int>>' to 'vk::ArrayProxyNoTemporaries<int>'
|
||||
// fctc( getConstVector() ); // not supported: cannot convert argument 1 from 'const std::vector<int,std::allocator<int>>' to 'vk::ArrayProxyNoTemporaries<const int32_t>'
|
||||
// fct( getVector() ); // not supported: cannot convert argument 1 from 'std::vector<int,std::allocator<int>>' to 'vk::ArrayProxyNoTemporaries<int>'
|
||||
// fctc( getVector() ); // not supported: cannot convert argument 1 from 'std::vector<int,std::allocator<int>>' to 'vk::ArrayProxyNoTemporaries<const int32_t>'
|
||||
|
||||
vk::ArrayProxyNoTemporaries<int> apnt18 = sv0;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include <vulkan/vulkan.hpp>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -36,9 +36,12 @@ if( CMAKE_CXX_STANDARD GREATER_EQUAL 20 )
|
|||
endif()
|
||||
add_subdirectory( Flags )
|
||||
add_subdirectory( FormatTraits )
|
||||
add_subdirectory( FunctionCalls )
|
||||
add_subdirectory( FunctionCallsRAII )
|
||||
add_subdirectory( Handles )
|
||||
add_subdirectory( HandlesMoveExchange )
|
||||
add_subdirectory( Hash )
|
||||
add_subdirectory( NoDefaultDispatcher )
|
||||
add_subdirectory( NoExceptions )
|
||||
if( ( CMAKE_CXX_STANDARD GREATER_EQUAL 23 ) AND NOT ( ( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" ) AND ( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0 ) ) )
|
||||
# This test is for C++23 only... but clang++13 and clang++14 seem to have a problem with it
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include <string> // std::string
|
||||
#include <iostream> // std::cout
|
||||
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
|
||||
static std::string AppName = "Cpp20Modules";
|
||||
static std::string EngineName = "Vulkan.cppm";
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
// Compile test on using c++20 modules
|
||||
|
||||
import std;
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
|
||||
#if defined( _MSC_VER )
|
||||
# pragma warning( disable : 4189 ) // local variable is initialized but not referenced
|
||||
|
|
|
|||
|
|
@ -18,18 +18,24 @@
|
|||
#include <cstdint>
|
||||
#include <type_traits>
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
# include <vulkan/vulkan.h>
|
||||
# include <vulkan/vulkan_hpp_macros.hpp>
|
||||
import vulkan_hpp;
|
||||
# include <vulkan/vulkan.h>
|
||||
# include <vulkan/vulkan_hpp_macros.hpp>
|
||||
import vulkan;
|
||||
#else
|
||||
# include <vulkan/vulkan.hpp>
|
||||
# include <vulkan/vulkan_raii.hpp>
|
||||
# include <vulkan/vulkan.hpp>
|
||||
# include <vulkan/vulkan_raii.hpp>
|
||||
#endif
|
||||
|
||||
static_assert( std::is_same<vk::CppType<vk::IndexType, vk::IndexType::eUint16>::Type, uint16_t>::value, "" );
|
||||
static_assert( std::is_same<vk::CppType<vk::ObjectType, vk::ObjectType::eInstance>::Type, vk::Instance>::value, "" );
|
||||
static_assert( std::is_same<vk::CppType<vk::DebugReportObjectTypeEXT, vk::DebugReportObjectTypeEXT ::eInstance>::Type, vk::Instance>::value, "" );
|
||||
|
||||
#if 20 <= VULKAN_HPP_CPP_VERSION
|
||||
static_assert( std::is_same<vk::CppType<VkAabbPositionsKHR>::Type, vk::AabbPositionsKHR>::value, "" );
|
||||
static_assert( std::is_same<vk::CppType<VkDeviceOrHostAddressConstKHR>::Type, vk::DeviceOrHostAddressConstKHR>::value, "" );
|
||||
static_assert( std::is_same<vk::CppType<VkAccelerationStructureGeometryTrianglesDataKHR>::Type, vk::AccelerationStructureGeometryTrianglesDataKHR>::value, "" );
|
||||
#endif
|
||||
|
||||
#if ( VK_USE_64_BIT_PTR_DEFINES == 1 )
|
||||
static_assert( std::is_same<vk::CppType<VkInstance>::Type, vk::Instance>::value, "" );
|
||||
#endif
|
||||
|
|
@ -39,4 +45,4 @@ static_assert( std::is_same<vk::raii::Instance::CppType, vk::Instance>::value, "
|
|||
int main( int /*argc*/, char ** /*argv*/ )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,11 +17,12 @@
|
|||
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
# include <vulkan/vulkan_hpp_macros.hpp>
|
||||
import vulkan_hpp;
|
||||
# include <vulkan/vulkan_hpp_macros.hpp>
|
||||
import vulkan;
|
||||
#else
|
||||
# include <vulkan/vulkan.hpp>
|
||||
# include <vulkan/vulkan.hpp>
|
||||
#endif
|
||||
|
||||
#if defined( __clang__ ) || defined( __GNUC__ )
|
||||
|
|
@ -91,6 +92,15 @@ int main( int /*argc*/, char ** /*argv*/ )
|
|||
|
||||
vk::ApplicationInfo ai5{ .pEngineName = engineName };
|
||||
vk::ApplicationInfo ai6{ .pApplicationName = appName, .apiVersion = vk::ApiVersion12 };
|
||||
|
||||
std::vector<vk::DeviceQueueCreateInfo> queueCreateInfos;
|
||||
std::vector<char const *> extensions;
|
||||
vk::DeviceCreateInfo info_device{
|
||||
.queueCreateInfoCount = (uint32_t)queueCreateInfos.size(),
|
||||
.pQueueCreateInfos = queueCreateInfos.data(),
|
||||
.enabledExtensionCount = (uint32_t)extensions.size(),
|
||||
.ppEnabledExtensionNames = extensions.data(),
|
||||
};
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include <vulkan/vulkan.hpp>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include <cassert>
|
||||
#include <iostream>
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include <vulkan/vulkan.hpp>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@
|
|||
// ignore warning 4189: local variable is initialized but not referenced
|
||||
#if defined( _MSC_VER )
|
||||
# pragma warning( disable : 4189 )
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
|
|
@ -26,7 +29,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include <vulkan/vulkan.hpp>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
// ignore warning 4189: local variable is initialized but not referenced
|
||||
#if defined( _MSC_VER )
|
||||
# pragma warning( disable : 4189 )
|
||||
#elif defined( __clang__ )
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
|
|
@ -28,7 +29,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include <vulkan/vulkan_extension_inspection.hpp>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -20,7 +20,12 @@
|
|||
|
||||
// in this test, we ignore some warnings
|
||||
// You should not do that in production code !!
|
||||
#if defined( __GNUC__ )
|
||||
#if defined( _MSC_VER )
|
||||
// no need to ignore any warnings with MSVC
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#else
|
||||
// unknow compiler... just ignore the warnings for yourselves ;)
|
||||
|
|
@ -30,7 +35,7 @@
|
|||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
# include <compare> // necessary due to MSVC "design": https://developercommunity.visualstudio.com/t/Template-exports-requiring-importing-of-/1425979#T-N1435887
|
||||
# include <vulkan/vulkan_core.h>
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include <vulkan/vulkan.hpp>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -15,15 +15,15 @@
|
|||
// VulkanHpp Samples : FormatTraits
|
||||
// Compile test on using format traits functions
|
||||
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <cstring>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include <vulkan/vulkan_format_traits.hpp>
|
||||
# include <vulkan/vulkan_format_traits.hpp>
|
||||
#endif
|
||||
|
||||
int main( int /*argc*/, char ** /*argv*/ )
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
# Copyright(c) 2018, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
|
||||
vulkan_hpp__setup_test( NAME FunctionCalls )
|
||||
if( VULKAN_HPP_ENABLE_CPP20_MODULES )
|
||||
vulkan_hpp__setup_test( NAME FunctionCalls CXX_MODULE )
|
||||
endif()
|
||||
|
|
@ -0,0 +1,631 @@
|
|||
// Copyright(c) 2018, NVIDIA CORPORATION. All rights reserved.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// VulkanHpp Samples : FunctionCalls
|
||||
// Compile test on using function calls to catch API changes
|
||||
|
||||
#if defined( _MSC_VER )
|
||||
# pragma warning( disable : 4189 ) // local variable is initialized but not referenced
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
#else
|
||||
// unknown compiler... just ignore the warnings for yourselves ;)
|
||||
#endif
|
||||
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
|
||||
|
||||
int main( int /*argc*/, char ** /*argv*/ )
|
||||
{
|
||||
//=== VK_VERSION_1_0 ===
|
||||
// Device initialization
|
||||
{
|
||||
vk::InstanceCreateInfo instanceCreateInfo;
|
||||
vk::Instance instance;
|
||||
vk::Result result = vk::createInstance( &instanceCreateInfo, nullptr, &instance );
|
||||
}
|
||||
{
|
||||
vk::InstanceCreateInfo instanceCreateInfo;
|
||||
vk::Instance instance = vk::createInstance( instanceCreateInfo );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Instance instance;
|
||||
instance.destroy();
|
||||
}
|
||||
|
||||
{
|
||||
vk::Instance instance;
|
||||
uint32_t physicalDeviceCount;
|
||||
vk::Result result = instance.enumeratePhysicalDevices( &physicalDeviceCount, nullptr );
|
||||
if ( result == vk::Result::eSuccess )
|
||||
{
|
||||
std::vector<vk::PhysicalDevice> physicalDevices( physicalDeviceCount );
|
||||
result = instance.enumeratePhysicalDevices( &physicalDeviceCount, physicalDevices.data() );
|
||||
}
|
||||
}
|
||||
{
|
||||
vk::Instance instance;
|
||||
std::vector<vk::PhysicalDevice> physicalDevices = instance.enumeratePhysicalDevices();
|
||||
}
|
||||
{
|
||||
vk::Instance instance;
|
||||
std::allocator<vk::PhysicalDevice> allocator;
|
||||
std::vector<vk::PhysicalDevice> physicalDevices = instance.enumeratePhysicalDevices( allocator );
|
||||
}
|
||||
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::PhysicalDeviceFeatures physicalDeviceFeatures;
|
||||
physicalDevice.getFeatures( &physicalDeviceFeatures );
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::PhysicalDeviceFeatures physicalDeviceFeatures = physicalDevice.getFeatures();
|
||||
}
|
||||
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::Format format = {};
|
||||
vk::FormatProperties formatProperties;
|
||||
physicalDevice.getFormatProperties( format, &formatProperties );
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::Format format = {};
|
||||
vk::FormatProperties formatProperties = physicalDevice.getFormatProperties( format );
|
||||
}
|
||||
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::Format format = {};
|
||||
vk::ImageType imageType = {};
|
||||
vk::ImageTiling imageTiling = {};
|
||||
vk::ImageUsageFlags imageUsageFlags;
|
||||
vk::ImageCreateFlags imageCreateFlags;
|
||||
vk::ImageFormatProperties imageFormatProperties;
|
||||
vk::Result result = physicalDevice.getImageFormatProperties( format, imageType, imageTiling, imageUsageFlags, imageCreateFlags, &imageFormatProperties );
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::Format format = {};
|
||||
vk::ImageType imageType = {};
|
||||
vk::ImageTiling imageTiling = {};
|
||||
vk::ImageUsageFlags imageUsageFlags;
|
||||
vk::ImageCreateFlags imageCreateFlags;
|
||||
vk::ImageFormatProperties imageFormatProperties =
|
||||
physicalDevice.getImageFormatProperties( format, imageType, imageTiling, imageUsageFlags, imageCreateFlags );
|
||||
}
|
||||
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::PhysicalDeviceProperties physicalDeviceProperties;
|
||||
physicalDevice.getProperties( &physicalDeviceProperties );
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::PhysicalDeviceProperties physicalDeviceProperties = physicalDevice.getProperties();
|
||||
}
|
||||
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
uint32_t queueFamilyPropertyCount;
|
||||
physicalDevice.getQueueFamilyProperties( &queueFamilyPropertyCount, nullptr );
|
||||
std::vector<vk::QueueFamilyProperties> queueFamilyProperties( queueFamilyPropertyCount );
|
||||
physicalDevice.getQueueFamilyProperties( &queueFamilyPropertyCount, queueFamilyProperties.data() );
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
std::vector<vk::QueueFamilyProperties> queueFamilyProperties = physicalDevice.getQueueFamilyProperties();
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
std::allocator<vk::QueueFamilyProperties> allocator;
|
||||
std::vector<vk::QueueFamilyProperties> queueFamilyProperties = physicalDevice.getQueueFamilyProperties( allocator );
|
||||
}
|
||||
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::PhysicalDeviceMemoryProperties memoryProperties;
|
||||
physicalDevice.getMemoryProperties( &memoryProperties );
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::PhysicalDeviceMemoryProperties memoryProperties = physicalDevice.getMemoryProperties();
|
||||
}
|
||||
|
||||
{
|
||||
vk::Instance instance;
|
||||
PFN_vkVoidFunction voidFunction = instance.getProcAddr( "vkCreateInstance" );
|
||||
}
|
||||
{
|
||||
vk::Instance instance;
|
||||
std::string name = "vkCreateInstance";
|
||||
PFN_vkVoidFunction voidFunction = instance.getProcAddr( name );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
PFN_vkVoidFunction voidFunction = device.getProcAddr( "vkCreateInstance" );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
std::string name = "vkCreateInstance";
|
||||
PFN_vkVoidFunction voidFunction = device.getProcAddr( name );
|
||||
}
|
||||
|
||||
// Device commands
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::DeviceCreateInfo deviceCreateInfo;
|
||||
vk::Device device;
|
||||
vk::Result result = physicalDevice.createDevice( &deviceCreateInfo, nullptr, &device );
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::DeviceCreateInfo deviceCreateInfo;
|
||||
vk::Device device = physicalDevice.createDevice( deviceCreateInfo );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
device.destroy();
|
||||
}
|
||||
|
||||
// Extension discovery commands
|
||||
{
|
||||
uint32_t propertyCount;
|
||||
vk::Result result = vk::enumerateInstanceExtensionProperties( nullptr, &propertyCount, nullptr );
|
||||
if ( result == vk::Result::eSuccess )
|
||||
{
|
||||
std::vector<vk::ExtensionProperties> properties( propertyCount );
|
||||
result = vk::enumerateInstanceExtensionProperties( nullptr, &propertyCount, properties.data() );
|
||||
}
|
||||
}
|
||||
{
|
||||
std::vector<vk::ExtensionProperties> properties = vk::enumerateInstanceExtensionProperties( nullptr );
|
||||
}
|
||||
{
|
||||
using Allocator = std::allocator<vk::ExtensionProperties>;
|
||||
Allocator allocator;
|
||||
std::vector<vk::ExtensionProperties, Allocator> properties = vk::enumerateInstanceExtensionProperties( nullptr, allocator );
|
||||
}
|
||||
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
uint32_t propertyCount;
|
||||
vk::Result result = physicalDevice.enumerateDeviceExtensionProperties( nullptr, &propertyCount, nullptr );
|
||||
if ( result == vk::Result::eSuccess )
|
||||
{
|
||||
std::vector<vk::ExtensionProperties> properties( propertyCount );
|
||||
result = physicalDevice.enumerateDeviceExtensionProperties( nullptr, &propertyCount, properties.data() );
|
||||
}
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
std::vector<vk::ExtensionProperties> properties = physicalDevice.enumerateDeviceExtensionProperties( nullptr );
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
using Allocator = std::allocator<vk::ExtensionProperties>;
|
||||
Allocator allocator;
|
||||
std::vector<vk::ExtensionProperties, Allocator> properties = physicalDevice.enumerateDeviceExtensionProperties( nullptr, allocator );
|
||||
}
|
||||
|
||||
// Layer discovery commands
|
||||
{
|
||||
uint32_t propertyCount;
|
||||
vk::Result result = vk::enumerateInstanceLayerProperties( &propertyCount, nullptr );
|
||||
if ( result == vk::Result::eSuccess )
|
||||
{
|
||||
std::vector<vk::LayerProperties> properties( propertyCount );
|
||||
result = vk::enumerateInstanceLayerProperties( &propertyCount, properties.data() );
|
||||
}
|
||||
}
|
||||
{
|
||||
std::vector<vk::LayerProperties> properties = vk::enumerateInstanceLayerProperties();
|
||||
}
|
||||
{
|
||||
using Allocator = std::allocator<vk::LayerProperties>;
|
||||
Allocator allocator;
|
||||
std::vector<vk::LayerProperties, Allocator> properties = vk::enumerateInstanceLayerProperties( allocator );
|
||||
}
|
||||
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
uint32_t propertyCount;
|
||||
vk::Result result = physicalDevice.enumerateDeviceLayerProperties( &propertyCount, nullptr );
|
||||
if ( result == vk::Result::eSuccess )
|
||||
{
|
||||
std::vector<vk::LayerProperties> properties( propertyCount );
|
||||
result = physicalDevice.enumerateDeviceLayerProperties( &propertyCount, properties.data() );
|
||||
}
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
std::vector<vk::LayerProperties> properties = physicalDevice.enumerateDeviceLayerProperties();
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
using Allocator = std::allocator<vk::LayerProperties>;
|
||||
Allocator allocator;
|
||||
std::vector<vk::LayerProperties, Allocator> properties = physicalDevice.enumerateDeviceLayerProperties( allocator );
|
||||
}
|
||||
|
||||
// Queue commands
|
||||
{
|
||||
vk::Device device;
|
||||
uint32_t queueFamilyIndex = 0;
|
||||
uint32_t queueIndex = 0;
|
||||
vk::Queue queue;
|
||||
device.getQueue( queueFamilyIndex, queueIndex, &queue );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
uint32_t queueFamilyIndex = 0;
|
||||
uint32_t queueIndex = 0;
|
||||
vk::Queue queue = device.getQueue( queueFamilyIndex, queueIndex );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Queue queue;
|
||||
uint32_t submitCount = 1;
|
||||
vk::SubmitInfo submitInfo;
|
||||
vk::Fence fence;
|
||||
vk::Result result = queue.submit( submitCount, &submitInfo, fence );
|
||||
}
|
||||
{
|
||||
vk::Queue queue;
|
||||
vk::SubmitInfo submitInfo;
|
||||
vk::Fence fence;
|
||||
queue.submit( submitInfo, fence );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Queue queue;
|
||||
queue.waitIdle();
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
device.waitIdle();
|
||||
}
|
||||
|
||||
// Memory commands
|
||||
{
|
||||
vk::Device device;
|
||||
vk::MemoryAllocateInfo memoryAllocateInfo;
|
||||
vk::DeviceMemory memory;
|
||||
vk::Result result = device.allocateMemory( &memoryAllocateInfo, nullptr, &memory );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::MemoryAllocateInfo memoryAllocateInfo;
|
||||
vk::DeviceMemory memory = device.allocateMemory( memoryAllocateInfo );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
vk::DeviceMemory memory;
|
||||
device.freeMemory( memory );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
vk::DeviceMemory memory;
|
||||
vk::DeviceSize offset = 0;
|
||||
vk::DeviceSize size = vk::WholeSize;
|
||||
vk::MemoryMapFlags memoryMapFlags = {};
|
||||
void * pData;
|
||||
vk::Result result = device.mapMemory( memory, offset, size, memoryMapFlags, &pData );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::DeviceMemory memory;
|
||||
vk::DeviceSize offset = 0;
|
||||
vk::DeviceSize size = vk::WholeSize;
|
||||
vk::MemoryMapFlags memoryMapFlags = {};
|
||||
void * pData = device.mapMemory( memory, offset, size, memoryMapFlags );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
vk::DeviceMemory memory;
|
||||
device.unmapMemory( memory );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
vk::DeviceMemory memory;
|
||||
vk::MappedMemoryRange mappedMemoryRange;
|
||||
vk::Result result = device.flushMappedMemoryRanges( 1, &mappedMemoryRange );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
std::vector<vk::MappedMemoryRange> mappedMemoryRanges;
|
||||
device.flushMappedMemoryRanges( mappedMemoryRanges );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
vk::MappedMemoryRange mappedMemoryRange;
|
||||
vk::Result result = device.invalidateMappedMemoryRanges( 1, &mappedMemoryRange );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
std::vector<vk::MappedMemoryRange> mappedMemoryRanges;
|
||||
device.invalidateMappedMemoryRanges( mappedMemoryRanges );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
vk::DeviceMemory memory;
|
||||
vk::DeviceSize commitment;
|
||||
device.getMemoryCommitment( memory, &commitment );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::DeviceMemory memory;
|
||||
vk::DeviceSize commitment = device.getMemoryCommitment( memory );
|
||||
}
|
||||
|
||||
// Memory management API commands
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Buffer buffer;
|
||||
vk::DeviceMemory deviceMemory;
|
||||
vk::DeviceSize memoryOffset = 0;
|
||||
device.bindBufferMemory( buffer, deviceMemory, memoryOffset );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Image image;
|
||||
vk::DeviceMemory deviceMemory;
|
||||
vk::DeviceSize memoryOffset = 0;
|
||||
device.bindImageMemory( image, deviceMemory, memoryOffset );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Buffer buffer;
|
||||
vk::MemoryRequirements memoryRequirements;
|
||||
device.getBufferMemoryRequirements( buffer, &memoryRequirements );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Buffer buffer;
|
||||
vk::MemoryRequirements memoryRequirements = device.getBufferMemoryRequirements( buffer );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Image image;
|
||||
vk::MemoryRequirements memoryRequirements;
|
||||
device.getImageMemoryRequirements( image, &memoryRequirements );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Image image;
|
||||
vk::MemoryRequirements memoryRequirements = device.getImageMemoryRequirements( image );
|
||||
}
|
||||
|
||||
// Sparse resource memory management API commands (optional)
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Image image;
|
||||
uint32_t sparseMemoryRequirementCount;
|
||||
device.getImageSparseMemoryRequirements( image, &sparseMemoryRequirementCount, nullptr );
|
||||
if ( sparseMemoryRequirementCount )
|
||||
{
|
||||
std::vector<vk::SparseImageMemoryRequirements> sparseImageMemoryRequirements( sparseMemoryRequirementCount );
|
||||
device.getImageSparseMemoryRequirements( image, &sparseMemoryRequirementCount, sparseImageMemoryRequirements.data() );
|
||||
}
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Image image;
|
||||
std::vector<vk::SparseImageMemoryRequirements> sparseImageMemoryRequirementss = device.getImageSparseMemoryRequirements( image );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Image image;
|
||||
using Allocator = std::allocator<vk::SparseImageMemoryRequirements>;
|
||||
Allocator allocator;
|
||||
std::vector<vk::SparseImageMemoryRequirements, Allocator> sparseImageMemoryRequirementss = device.getImageSparseMemoryRequirements( image, allocator );
|
||||
}
|
||||
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::Format format = {};
|
||||
vk::ImageType type = {};
|
||||
vk::SampleCountFlagBits samples = {};
|
||||
vk::ImageUsageFlags usage = {};
|
||||
vk::ImageTiling tiling = {};
|
||||
uint32_t propertyCount = 0;
|
||||
physicalDevice.getSparseImageFormatProperties( format, type, samples, usage, tiling, &propertyCount, nullptr );
|
||||
if ( propertyCount )
|
||||
{
|
||||
std::vector<vk::SparseImageFormatProperties> sparseImageFormatProperties( propertyCount );
|
||||
physicalDevice.getSparseImageFormatProperties( format, type, samples, usage, tiling, &propertyCount, sparseImageFormatProperties.data() );
|
||||
}
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::Format format = {};
|
||||
vk::ImageType type = {};
|
||||
vk::SampleCountFlagBits samples = {};
|
||||
vk::ImageUsageFlags usage = {};
|
||||
vk::ImageTiling tiling = {};
|
||||
std::vector<vk::SparseImageFormatProperties> sparseImageFormatProperties =
|
||||
physicalDevice.getSparseImageFormatProperties( format, type, samples, usage, tiling );
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::Format format = {};
|
||||
vk::ImageType type = {};
|
||||
vk::SampleCountFlagBits samples = {};
|
||||
vk::ImageUsageFlags usage = {};
|
||||
vk::ImageTiling tiling = {};
|
||||
using Allocator = std::allocator<vk::SparseImageFormatProperties>;
|
||||
Allocator allocator;
|
||||
std::vector<vk::SparseImageFormatProperties, Allocator> sparseImageFormatProperties =
|
||||
physicalDevice.getSparseImageFormatProperties( format, type, samples, usage, tiling, allocator );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Queue queue;
|
||||
uint32_t bindInfoCount = 1;
|
||||
vk::BindSparseInfo bindSparseInfo;
|
||||
vk::Fence fence;
|
||||
vk::Result result = queue.bindSparse( bindInfoCount, &bindSparseInfo, fence );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Queue queue;
|
||||
vk::BindSparseInfo bindSparseInfo;
|
||||
vk::Fence fence;
|
||||
queue.bindSparse( bindSparseInfo, fence );
|
||||
}
|
||||
|
||||
// Fence commands
|
||||
{
|
||||
vk::Device device;
|
||||
vk::FenceCreateInfo fenceCreateInfo;
|
||||
vk::AllocationCallbacks allocationCallbacks;
|
||||
vk::Fence fence;
|
||||
vk::Result result = device.createFence( &fenceCreateInfo, &allocationCallbacks, &fence );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::FenceCreateInfo fenceCreateInfo;
|
||||
vk::Fence fence = device.createFence( fenceCreateInfo );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Fence fence;
|
||||
vk::AllocationCallbacks allocationCallbacks;
|
||||
device.destroyFence( fence, &allocationCallbacks );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Fence fence;
|
||||
device.destroyFence( fence );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
uint32_t fenceCount = 1;
|
||||
vk::Fence fence;
|
||||
vk::Result result = device.resetFences( fenceCount, &fence );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Fence fence;
|
||||
device.resetFences( fence );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Fence fence;
|
||||
vk::Result result = device.getFenceStatus( fence );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
uint32_t fenceCount = 1;
|
||||
vk::Fence fence;
|
||||
vk::Bool32 waitAll = vk::True;
|
||||
uint64_t timeout = 1000000000;
|
||||
vk::Result result = device.waitForFences( fenceCount, &fence, waitAll, timeout );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Fence fence;
|
||||
vk::Bool32 waitAll = vk::True;
|
||||
uint64_t timeout = 1000000000;
|
||||
vk::Result result = device.waitForFences( fence, waitAll, timeout );
|
||||
}
|
||||
|
||||
// Queue semaphore commands
|
||||
{
|
||||
vk::Device device;
|
||||
vk::SemaphoreCreateInfo semaphoreCreateInfo;
|
||||
vk::Semaphore semaphore;
|
||||
vk::Result result = device.createSemaphore( &semaphoreCreateInfo, nullptr, &semaphore );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::SemaphoreCreateInfo semaphoreCreateInfo;
|
||||
vk::Semaphore semaphore = device.createSemaphore( semaphoreCreateInfo );
|
||||
}
|
||||
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Semaphore semaphore;
|
||||
vk::AllocationCallbacks allocationCallbacks;
|
||||
device.destroySemaphore( semaphore, &allocationCallbacks );
|
||||
}
|
||||
{
|
||||
vk::Device device;
|
||||
vk::Semaphore semaphore;
|
||||
device.destroySemaphore( semaphore );
|
||||
}
|
||||
|
||||
#if 0
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::SurfaceKHR surface;
|
||||
vk::Bool32 supported;
|
||||
uint32_t queueFamilyIndex;
|
||||
vk::Result result = physicalDevice.getSurfaceSupportKHR( queueFamilyIndex, surface, &supported );
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::SurfaceKHR surface;
|
||||
uint32_t queueFamilyIndex;
|
||||
vk::Bool32 supported = physicalDevice.getSurfaceSupportKHR( queueFamilyIndex, surface );
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::SurfaceKHR surface;
|
||||
uint32_t formatCount;
|
||||
vk::Result result = physicalDevice.getSurfaceFormatsKHR( surface, &formatCount, nullptr );
|
||||
if ( result == vk::Result::eSuccess )
|
||||
{
|
||||
std::vector<vk::SurfaceFormatKHR> formats( formatCount );
|
||||
result = physicalDevice.getSurfaceFormatsKHR( surface, &formatCount, formats.data() );
|
||||
}
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::SurfaceKHR surface;
|
||||
std::vector<vk::SurfaceFormatKHR> formats = physicalDevice.getSurfaceFormatsKHR( surface );
|
||||
}
|
||||
{
|
||||
vk::PhysicalDevice physicalDevice;
|
||||
vk::SurfaceKHR surface;
|
||||
std::allocator<vk::SurfaceFormatKHR> allocator;
|
||||
std::vector<vk::SurfaceFormatKHR> formats = physicalDevice.getSurfaceFormatsKHR( surface, allocator );
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
# Copyright(c) 2018, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
|
||||
vulkan_hpp__setup_test( NAME FunctionCallsRAII )
|
||||
if( VULKAN_HPP_ENABLE_CPP20_MODULES )
|
||||
vulkan_hpp__setup_test( NAME FunctionCallsRAII CXX_MODULE )
|
||||
endif()
|
||||
|
|
@ -0,0 +1,303 @@
|
|||
// Copyright(c) 2018, NVIDIA CORPORATION. All rights reserved.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// VulkanHpp Samples : FunctionCallsRAII
|
||||
// Compile test on using function calls to catch API changes
|
||||
|
||||
#if defined( _MSC_VER )
|
||||
# pragma warning( disable : 4189 ) // local variable is initialized but not referenced
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
#else
|
||||
// unknown compiler... just ignore the warnings for yourselves ;)
|
||||
#endif
|
||||
|
||||
#include <vulkan/vulkan_raii.hpp>
|
||||
|
||||
int main( int /*argc*/, char ** /*argv*/ )
|
||||
{
|
||||
//=== VK_VERSION_1_0 ===
|
||||
// Device initialization
|
||||
{
|
||||
vk::raii::Context context;
|
||||
vk::InstanceCreateInfo instanceCreateInfo;
|
||||
vk::raii::Instance instance = context.createInstance( instanceCreateInfo );
|
||||
}
|
||||
{
|
||||
vk::raii::Context context;
|
||||
vk::InstanceCreateInfo instanceCreateInfo;
|
||||
vk::raii::Instance instance( context, instanceCreateInfo );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Instance instance = nullptr;
|
||||
std::vector<vk::raii::PhysicalDevice> physicalDevices = instance.enumeratePhysicalDevices();
|
||||
}
|
||||
{
|
||||
vk::raii::Instance instance = nullptr;
|
||||
vk::raii::PhysicalDevices physicalDevices( instance );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::PhysicalDevice physicalDevice = nullptr;
|
||||
vk::PhysicalDeviceFeatures physicalDeviceFeatures = physicalDevice.getFeatures();
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::PhysicalDevice physicalDevice = nullptr;
|
||||
vk::Format format = {};
|
||||
vk::FormatProperties formatProperties = physicalDevice.getFormatProperties( format );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::PhysicalDevice physicalDevice = nullptr;
|
||||
vk::Format format = {};
|
||||
vk::ImageType imageType = {};
|
||||
vk::ImageTiling imageTiling = {};
|
||||
vk::ImageUsageFlags imageUsageFlags;
|
||||
vk::ImageCreateFlags imageCreateFlags;
|
||||
vk::ImageFormatProperties imageFormatProperties =
|
||||
physicalDevice.getImageFormatProperties( format, imageType, imageTiling, imageUsageFlags, imageCreateFlags );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::PhysicalDevice physicalDevice = nullptr;
|
||||
vk::PhysicalDeviceProperties physicalDeviceProperties = physicalDevice.getProperties();
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::PhysicalDevice physicalDevice = nullptr;
|
||||
std::vector<vk::QueueFamilyProperties> queueFamilyProperties = physicalDevice.getQueueFamilyProperties();
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::PhysicalDevice physicalDevice = nullptr;
|
||||
vk::PhysicalDeviceMemoryProperties memoryProperties = physicalDevice.getMemoryProperties();
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Instance instance = nullptr;
|
||||
vk::PFN_VoidFunction voidFunction = instance.getProcAddr( "vkCreateInstance" );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
vk::PFN_VoidFunction voidFunction = device.getProcAddr( "vkCreateInstance" );
|
||||
}
|
||||
|
||||
// Device commands
|
||||
{
|
||||
vk::raii::PhysicalDevice physicalDevice = nullptr;
|
||||
vk::DeviceCreateInfo deviceCreateInfo;
|
||||
vk::raii::Device device = physicalDevice.createDevice( deviceCreateInfo );
|
||||
}
|
||||
{
|
||||
vk::raii::PhysicalDevice physicalDevice = nullptr;
|
||||
vk::DeviceCreateInfo deviceCreateInfo;
|
||||
vk::raii::Device device( physicalDevice, deviceCreateInfo );
|
||||
}
|
||||
|
||||
// Extension discovery commands
|
||||
{
|
||||
vk::raii::Context context;
|
||||
std::vector<vk::ExtensionProperties> properties = context.enumerateInstanceExtensionProperties( nullptr );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::PhysicalDevice physicalDevice = nullptr;
|
||||
std::vector<vk::ExtensionProperties> properties = physicalDevice.enumerateDeviceExtensionProperties( nullptr );
|
||||
}
|
||||
|
||||
// Layer discovery commands
|
||||
{
|
||||
vk::raii::Context context;
|
||||
std::vector<vk::LayerProperties> properties = context.enumerateInstanceLayerProperties();
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::PhysicalDevice physicalDevice = nullptr;
|
||||
std::vector<vk::LayerProperties> properties = physicalDevice.enumerateDeviceLayerProperties();
|
||||
}
|
||||
|
||||
// Queue commands
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
uint32_t queueFamilyIndex = 0;
|
||||
uint32_t queueIndex = 0;
|
||||
vk::raii::Queue queue = device.getQueue( queueFamilyIndex, queueIndex );
|
||||
}
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
uint32_t queueFamilyIndex = 0;
|
||||
uint32_t queueIndex = 0;
|
||||
vk::raii::Queue queue( device, queueFamilyIndex, queueIndex );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Queue queue = nullptr;
|
||||
vk::SubmitInfo submitInfo;
|
||||
vk::Fence fence;
|
||||
queue.submit( submitInfo, fence );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Queue queue = nullptr;
|
||||
queue.waitIdle();
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
device.waitIdle();
|
||||
}
|
||||
|
||||
// Memory commands
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
vk::MemoryAllocateInfo memoryAllocateInfo;
|
||||
vk::raii::DeviceMemory deviceMemory = device.allocateMemory( memoryAllocateInfo );
|
||||
}
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
vk::MemoryAllocateInfo memoryAllocateInfo;
|
||||
vk::raii::DeviceMemory deviceMemory( device, memoryAllocateInfo );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::DeviceMemory deviceMemory = nullptr;
|
||||
vk::DeviceSize offset = 0;
|
||||
vk::DeviceSize size = vk::WholeSize;
|
||||
vk::MemoryMapFlags memoryMapFlags = {};
|
||||
void * pData = deviceMemory.mapMemory( offset, size, memoryMapFlags );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::DeviceMemory deviceMemory = nullptr;
|
||||
deviceMemory.unmapMemory();
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
std::vector<vk::MappedMemoryRange> mappedMemoryRanges;
|
||||
device.flushMappedMemoryRanges( mappedMemoryRanges );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
std::vector<vk::MappedMemoryRange> mappedMemoryRanges;
|
||||
device.invalidateMappedMemoryRanges( mappedMemoryRanges );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::DeviceMemory deviceMemory = nullptr;
|
||||
vk::DeviceSize size = deviceMemory.getCommitment();
|
||||
}
|
||||
|
||||
// Memory management API commands
|
||||
{
|
||||
vk::raii::Buffer buffer = nullptr;
|
||||
vk::DeviceMemory deviceMemory;
|
||||
vk::DeviceSize memoryOffset = 0;
|
||||
buffer.bindMemory( deviceMemory, memoryOffset );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Image image = nullptr;
|
||||
vk::DeviceMemory deviceMemory;
|
||||
vk::DeviceSize memoryOffset = 0;
|
||||
image.bindMemory( deviceMemory, memoryOffset );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Buffer buffer = nullptr;
|
||||
vk::MemoryRequirements memoryRequirements = buffer.getMemoryRequirements();
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Image image = nullptr;
|
||||
vk::MemoryRequirements memoryRequirements = image.getMemoryRequirements();
|
||||
}
|
||||
|
||||
// Sparse resource memory management API commands (optional)
|
||||
{
|
||||
vk::raii::Image image = nullptr;
|
||||
std::vector<vk::SparseImageMemoryRequirements> sparseImageMemoryRequirements = image.getSparseMemoryRequirements();
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::PhysicalDevice physicalDevice = nullptr;
|
||||
vk::Format format = {};
|
||||
vk::ImageType type = {};
|
||||
vk::SampleCountFlagBits samples = {};
|
||||
vk::ImageUsageFlags usage = {};
|
||||
vk::ImageTiling tiling = {};
|
||||
std::vector<vk::SparseImageFormatProperties> sparseImageFormatProperties =
|
||||
physicalDevice.getSparseImageFormatProperties( format, type, samples, usage, tiling );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Queue queue = nullptr;
|
||||
vk::BindSparseInfo bindSparseInfo;
|
||||
vk::Fence fence;
|
||||
queue.bindSparse( bindSparseInfo, fence );
|
||||
}
|
||||
|
||||
// Fence commands
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
vk::FenceCreateInfo fenceCreateInfo;
|
||||
vk::raii::Fence fence = device.createFence( fenceCreateInfo );
|
||||
}
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
vk::FenceCreateInfo fenceCreateInfo;
|
||||
vk::raii::Fence fence( device, fenceCreateInfo );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
vk::Fence fence;
|
||||
device.resetFences( fence );
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Fence fence = nullptr;
|
||||
vk::Result result = fence.getStatus();
|
||||
}
|
||||
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
vk::Fence fence;
|
||||
vk::Bool32 waitAll = vk::True;
|
||||
uint64_t timeout = 1000000000;
|
||||
vk::Result result = device.waitForFences( fence, waitAll, timeout );
|
||||
}
|
||||
|
||||
// Queue semaphore commands
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
vk::SemaphoreCreateInfo semaphoreCreateInfo;
|
||||
vk::raii::Semaphore semaphore = device.createSemaphore( semaphoreCreateInfo );
|
||||
}
|
||||
{
|
||||
vk::raii::Device device = nullptr;
|
||||
vk::SemaphoreCreateInfo semaphoreCreateInfo;
|
||||
vk::raii::Semaphore semaphore( device, semaphoreCreateInfo );
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
#include <iostream>
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
#include <vulkan/vulkan.h>
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include <vulkan/vulkan_raii.hpp>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
#include <cassert>
|
||||
#include <iostream>
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include <vulkan/vulkan.hpp>
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@
|
|||
|
||||
#if defined( _MSC_VER )
|
||||
# pragma warning( disable : 4189 ) // local variable is initialized but not referenced
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#else
|
||||
|
|
@ -29,7 +32,7 @@
|
|||
#include <unordered_set>
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
#include <vulkan/vulkan_hpp_macros.hpp>
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include "vulkan/vulkan_hash.hpp"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
# Copyright(c) 2018, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
|
||||
vulkan_hpp__setup_test( NAME NoDefaultDispatcher )
|
||||
if( VULKAN_HPP_ENABLE_CPP20_MODULES )
|
||||
# gcc versions <= 15.x fail to ignore -Winit-list-lifetime when importing vulkan_hpp
|
||||
if ( NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "16") )
|
||||
vulkan_hpp__setup_test( NAME NoDefaultDispatcher CXX_MODULE )
|
||||
endif()
|
||||
endif()
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
// Copyright(c) 2018, NVIDIA CORPORATION. All rights reserved.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// VulkanHpp Samples : NoDefaultDispatcher
|
||||
// Compile test with VULKAN_HPP_NO_DEFAULT_DISPATCHER defined
|
||||
|
||||
#define VULKAN_HPP_NO_DEFAULT_DISPATCHER
|
||||
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
import vulkan;
|
||||
#else
|
||||
# include <vulkan/vulkan.hpp>
|
||||
# include <vulkan/vulkan_raii.hpp>
|
||||
# include <vulkan/vulkan_shared.hpp>
|
||||
#endif
|
||||
|
||||
int main( int /*argc*/, char ** /*argv*/ )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include "vulkan/vulkan.hpp"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include <cstdint>
|
||||
#include <algorithm>
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include "vulkan/vulkan_raii.hpp"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
#if defined( _MSC_VER )
|
||||
// no need to ignore any warnings with MSVC
|
||||
#elif defined( __clang__ )
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
|
||||
|
|
@ -29,7 +30,7 @@
|
|||
#include <iostream>
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
# include <vulkan/vulkan_hpp_macros.hpp>
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include "vulkan/vulkan.hpp"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@
|
|||
// ignore warning 4189: local variable is initialized but not referenced
|
||||
#if defined( _MSC_VER )
|
||||
# pragma warning( disable : 4189 )
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#else
|
||||
|
|
@ -27,7 +30,7 @@
|
|||
#include <cassert>
|
||||
#include <iostream>
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include "vulkan/vulkan.hpp"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -18,22 +18,24 @@
|
|||
|
||||
#ifdef VULKAN_HPP_USE_CXX_MODULE
|
||||
#include <vulkan/vulkan.h>
|
||||
import vulkan_hpp;
|
||||
import vulkan;
|
||||
#else
|
||||
# include "vulkan/vulkan.hpp"
|
||||
# include "vulkan/vulkan.hpp"
|
||||
#endif
|
||||
|
||||
#if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
|
||||
namespace vk {
|
||||
namespace detail {
|
||||
namespace vk
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
DispatchLoaderDynamic defaultDispatchLoaderDynamic;
|
||||
}
|
||||
}
|
||||
} // namespace detail
|
||||
} // namespace vk
|
||||
#endif
|
||||
|
||||
int main( int /*argc*/, char ** /*argv*/ )
|
||||
{
|
||||
VkSurfaceKHR surface = 0;
|
||||
auto uniqueSurface = vk::UniqueSurfaceKHR( surface, vk::Instance() );
|
||||
auto uniqueSurface = vk::UniqueSurfaceKHR( static_cast<vk::SurfaceKHR>( surface ), vk::Instance() );
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
#if defined( _MSC_VER )
|
||||
# pragma warning( disable : 4101 ) // 'name': unreference local variable
|
||||
#elif defined( __clang__ )
|
||||
#endif
|
||||
#if defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ That is, calling a device-related function is identical for both cases:
|
|||
// call waitIdle from a vk::raii::Device
|
||||
device.waitIdle();
|
||||
|
||||
vk::raii goes one step further. In the vk namespace, most of the functions are members of `vk::Device`. In the vk::raii namespace functions strongly related to a non-dispatchable handle are members of the corresponding vi::raii object. For example, to bind memory to a buffer, in vk namespace you write
|
||||
vk::raii goes one step further. In the vk namespace, most of the functions are members of `vk::Device`. In the vk::raii namespace functions strongly related to a non-dispatchable handle are members of the corresponding vk::raii object. For example, to bind memory to a buffer, in vk namespace you write
|
||||
|
||||
// bind vk::DeviceMemory memory to a vk::Buffer buffer, given vk::DeviceSize memoryOffset
|
||||
device.bindBufferMemory( buffer, memory, memoryOffset );
|
||||
|
|
|
|||
2829
vulkan/vulkan.cppm
2829
vulkan/vulkan.cppm
File diff suppressed because it is too large
Load Diff
3901
vulkan/vulkan.hpp
3901
vulkan/vulkan.hpp
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -35,6 +35,18 @@
|
|||
# include <ciso646>
|
||||
#endif
|
||||
|
||||
#define VULKAN_HPP_STRINGIFY2( text ) #text
|
||||
#define VULKAN_HPP_STRINGIFY( text ) VULKAN_HPP_STRINGIFY2( text )
|
||||
#define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE )
|
||||
|
||||
#if defined( __clang__ ) || defined( __GNUC__ ) || defined( __GNUG__ )
|
||||
# define VULKAN_HPP_COMPILE_WARNING( text ) _Pragma( VULKAN_HPP_STRINGIFY( GCC warning text ) )
|
||||
#elif defined( _MSC_VER )
|
||||
# define VULKAN_HPP_COMPILE_WARNING( text ) _Pragma( VULKAN_HPP_STRINGIFY( message( __FILE__ "(" VULKAN_HPP_STRINGIFY( __LINE__ ) "): warning: " text ) ) )
|
||||
#else
|
||||
# define VULKAN_HPP_COMPILE_WARNING( text )
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
|
||||
# if !defined( VULKAN_HPP_NO_SMART_HANDLE )
|
||||
# define VULKAN_HPP_NO_SMART_HANDLE
|
||||
|
|
@ -87,8 +99,8 @@
|
|||
# define VULKAN_HPP_SUPPORT_SPAN
|
||||
#endif
|
||||
|
||||
#if defined( __cpp_lib_modules ) && !defined( VULKAN_HPP_STD_MODULE ) && defined( VULKAN_HPP_ENABLE_STD_MODULE )
|
||||
# define VULKAN_HPP_STD_MODULE std.compat
|
||||
#if defined( VULKAN_HPP_CXX_MODULE ) && !( defined( __cpp_modules ) && defined( __cpp_lib_modules ) )
|
||||
VULKAN_HPP_COMPILE_WARNING( "This is a non-conforming implementation of C++ named modules and the standard library module." )
|
||||
#endif
|
||||
|
||||
#ifndef VK_USE_64_BIT_PTR_DEFINES
|
||||
|
|
@ -225,10 +237,6 @@
|
|||
# define VULKAN_HPP_NAMESPACE vk
|
||||
#endif
|
||||
|
||||
#define VULKAN_HPP_STRINGIFY2( text ) #text
|
||||
#define VULKAN_HPP_STRINGIFY( text ) VULKAN_HPP_STRINGIFY2( text )
|
||||
#define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE )
|
||||
|
||||
#if !defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC )
|
||||
# if defined( VK_NO_PROTOTYPES )
|
||||
# define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1
|
||||
|
|
@ -307,14 +315,11 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
#endif
|
||||
|
||||
#if defined( VULKAN_HPP_NO_DEFAULT_DISPATCHER )
|
||||
# define VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT
|
||||
# define VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT
|
||||
# define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT
|
||||
# define VULKAN_HPP_DEFAULT_ASSIGNMENT( assignment )
|
||||
#else
|
||||
# define VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT = {}
|
||||
# define VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT = nullptr
|
||||
# define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT = VULKAN_HPP_DEFAULT_DISPATCHER
|
||||
# define VULKAN_HPP_DEFAULT_ASSIGNMENT( assignment ) = assignment
|
||||
#endif
|
||||
#define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT VULKAN_HPP_DEFAULT_ASSIGNMENT( VULKAN_HPP_DEFAULT_DISPATCHER )
|
||||
|
||||
#if !defined( VULKAN_HPP_RAII_NAMESPACE )
|
||||
# define VULKAN_HPP_RAII_NAMESPACE raii
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
#if !( defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) )
|
||||
#if !defined( VULKAN_HPP_CXX_MODULE )
|
||||
# include <atomic> // std::atomic_size_t
|
||||
#endif
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
template <typename DestructorType, typename Deleter>
|
||||
struct SharedHeader
|
||||
{
|
||||
SharedHeader( SharedHandle<DestructorType> parent, Deleter deleter = Deleter() ) VULKAN_HPP_NOEXCEPT
|
||||
SharedHeader( SharedHandle<DestructorType> parent, Deleter deleter VULKAN_HPP_DEFAULT_ASSIGNMENT( Deleter() ) ) VULKAN_HPP_NOEXCEPT
|
||||
: parent( std::move( parent ) )
|
||||
, deleter( std::move( deleter ) )
|
||||
{
|
||||
|
|
@ -97,7 +97,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
template <typename Deleter>
|
||||
struct SharedHeader<NoDestructor, Deleter>
|
||||
{
|
||||
SharedHeader( Deleter deleter = Deleter() ) VULKAN_HPP_NOEXCEPT : deleter( std::move( deleter ) ) {}
|
||||
SharedHeader( Deleter deleter VULKAN_HPP_DEFAULT_ASSIGNMENT( Deleter() ) ) VULKAN_HPP_NOEXCEPT : deleter( std::move( deleter ) ) {}
|
||||
|
||||
Deleter deleter;
|
||||
};
|
||||
|
|
@ -131,7 +131,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
public:
|
||||
std::atomic_size_t m_ref_cnt{ 1 };
|
||||
HeaderType m_header{};
|
||||
HeaderType m_header;
|
||||
};
|
||||
|
||||
//=====================================================================================================================
|
||||
|
|
@ -282,7 +282,9 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
SharedHandle() = default;
|
||||
|
||||
template <typename T = HandleType, typename = typename std::enable_if<HasDestructor<T>::value && !HasPoolType<T>::value>::type>
|
||||
explicit SharedHandle( HandleType handle, SharedHandle<DestructorTypeOf<HandleType>> parent, DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT
|
||||
explicit SharedHandle( HandleType handle,
|
||||
SharedHandle<DestructorTypeOf<HandleType>> parent,
|
||||
DeleterType deleter VULKAN_HPP_DEFAULT_ASSIGNMENT( DeleterType() ) ) VULKAN_HPP_NOEXCEPT
|
||||
: BaseType( handle, std::move( parent ), std::move( deleter ) )
|
||||
{
|
||||
}
|
||||
|
|
@ -299,7 +301,8 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
template <typename T = HandleType, typename = typename std::enable_if<!HasDestructor<T>::value>::type>
|
||||
explicit SharedHandle( HandleType handle, DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT : BaseType( handle, std::move( deleter ) )
|
||||
explicit SharedHandle( HandleType handle, DeleterType deleter VULKAN_HPP_DEFAULT_ASSIGNMENT( DeleterType() ) ) VULKAN_HPP_NOEXCEPT
|
||||
: BaseType( handle, std::move( deleter ) )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -318,13 +321,12 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
# pragma clang diagnostic ignored "-Wcast-function-type"
|
||||
# endif
|
||||
|
||||
template <typename HandleType>
|
||||
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
class ObjectDestroyShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType =
|
||||
typename std::conditional<HasDestructor<HandleType>::value,
|
||||
void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const,
|
||||
|
|
@ -332,10 +334,9 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
using SelectorType = typename std::conditional<HasDestructor<HandleType>::value, DestructorType, HandleType>::type;
|
||||
|
||||
template <typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
ObjectDestroyShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
||||
ObjectDestroyShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &SelectorType::destroy ) ) )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &SelectorType::destroy ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
{
|
||||
|
|
@ -357,24 +358,22 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
};
|
||||
|
||||
template <typename HandleType>
|
||||
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
class ObjectFreeShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const;
|
||||
|
||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
ObjectFreeShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
||||
ObjectFreeShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ASSIGNMENT( nullptr ),
|
||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::free ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
{
|
||||
|
|
@ -388,24 +387,21 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
};
|
||||
|
||||
template <typename HandleType>
|
||||
template <typename HandleType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
class ObjectReleaseShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const Dispatcher & ) const;
|
||||
|
||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
ObjectReleaseShared( const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::release ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::release ) ) ), m_dispatch( &dispatch )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -417,11 +413,11 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
};
|
||||
|
||||
template <typename HandleType, typename PoolType>
|
||||
template <typename HandleType, typename PoolType, typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
class PoolFreeShared
|
||||
{
|
||||
public:
|
||||
|
|
@ -429,17 +425,14 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
using PoolTypeExport = PoolType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using ReturnType = decltype( std::declval<DestructorType>().free( PoolType(), 0u, nullptr, Dispatcher() ) );
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType = ReturnType<Dispatcher> ( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const;
|
||||
using DestroyFunctionPointerType = ReturnType ( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const;
|
||||
|
||||
PoolFreeShared() = default;
|
||||
|
||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
PoolFreeShared( SharedHandle<PoolType> pool, const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType>( &DestructorType::free ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
, m_pool( std::move( pool ) )
|
||||
{
|
||||
|
|
@ -453,9 +446,9 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
SharedHandle<PoolType> m_pool{};
|
||||
DestroyFunctionPointerType m_destroy = nullptr;
|
||||
const Dispatcher * m_dispatch = nullptr;
|
||||
SharedHandle<PoolType> m_pool{};
|
||||
};
|
||||
|
||||
# if defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __INTEL_COMPILER )
|
||||
|
|
@ -520,16 +513,6 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
using SharedSemaphore = SharedHandle<Semaphore>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<Event>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<Event>;
|
||||
};
|
||||
|
||||
using SharedEvent = SharedHandle<Event>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<QueryPool>
|
||||
{
|
||||
|
|
@ -550,16 +533,6 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
using SharedBuffer = SharedHandle<Buffer>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<BufferView>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<BufferView>;
|
||||
};
|
||||
|
||||
using SharedBufferView = SharedHandle<BufferView>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<Image>
|
||||
{
|
||||
|
|
@ -580,6 +553,46 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
using SharedImageView = SharedHandle<ImageView>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<CommandPool>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<CommandPool>;
|
||||
};
|
||||
|
||||
using SharedCommandPool = SharedHandle<CommandPool>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<CommandBuffer>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::PoolFreeShared<CommandBuffer, CommandPool>;
|
||||
};
|
||||
|
||||
using SharedCommandBuffer = SharedHandle<CommandBuffer>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<Event>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<Event>;
|
||||
};
|
||||
|
||||
using SharedEvent = SharedHandle<Event>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<BufferView>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<BufferView>;
|
||||
};
|
||||
|
||||
using SharedBufferView = SharedHandle<BufferView>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<ShaderModule>
|
||||
{
|
||||
|
|
@ -680,38 +693,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
using SharedRenderPass = SharedHandle<RenderPass>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<CommandPool>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<CommandPool>;
|
||||
};
|
||||
|
||||
using SharedCommandPool = SharedHandle<CommandPool>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<CommandBuffer>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::PoolFreeShared<CommandBuffer, CommandPool>;
|
||||
};
|
||||
|
||||
using SharedCommandBuffer = SharedHandle<CommandBuffer>;
|
||||
|
||||
//=== VK_VERSION_1_1 ===
|
||||
template <>
|
||||
class SharedHandleTraits<SamplerYcbcrConversion>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<SamplerYcbcrConversion>;
|
||||
};
|
||||
|
||||
using SharedSamplerYcbcrConversion = SharedHandle<SamplerYcbcrConversion>;
|
||||
using SharedSamplerYcbcrConversionKHR = SharedHandle<SamplerYcbcrConversion>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<DescriptorUpdateTemplate>
|
||||
{
|
||||
|
|
@ -723,6 +705,17 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
using SharedDescriptorUpdateTemplate = SharedHandle<DescriptorUpdateTemplate>;
|
||||
using SharedDescriptorUpdateTemplateKHR = SharedHandle<DescriptorUpdateTemplate>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<SamplerYcbcrConversion>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<SamplerYcbcrConversion>;
|
||||
};
|
||||
|
||||
using SharedSamplerYcbcrConversion = SharedHandle<SamplerYcbcrConversion>;
|
||||
using SharedSamplerYcbcrConversionKHR = SharedHandle<SamplerYcbcrConversion>;
|
||||
|
||||
//=== VK_VERSION_1_3 ===
|
||||
template <>
|
||||
class SharedHandleTraits<PrivateDataSlot>
|
||||
|
|
@ -1051,9 +1044,9 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
struct ImageHeader : SharedHeader<DestructorTypeOf<Image>, typename SharedHandleTraits<Image>::deleter>
|
||||
{
|
||||
ImageHeader( SharedHandle<DestructorTypeOf<Image>> parent,
|
||||
typename SharedHandleTraits<Image>::deleter deleter = typename SharedHandleTraits<Image>::deleter(),
|
||||
SwapchainOwns swapchainOwned = SwapchainOwns::no ) VULKAN_HPP_NOEXCEPT
|
||||
ImageHeader( SharedHandle<DestructorTypeOf<Image>> parent,
|
||||
typename SharedHandleTraits<Image>::deleter deleter VULKAN_HPP_DEFAULT_ASSIGNMENT( typename SharedHandleTraits<Image>::deleter() ),
|
||||
SwapchainOwns swapchainOwned = SwapchainOwns::no ) VULKAN_HPP_NOEXCEPT
|
||||
: SharedHeader<DestructorTypeOf<Image>, typename SharedHandleTraits<Image>::deleter>( std::move( parent ), std::move( deleter ) )
|
||||
, swapchainOwned( swapchainOwned )
|
||||
{
|
||||
|
|
@ -1074,8 +1067,8 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
explicit SharedHandle( Image handle,
|
||||
SharedHandle<DestructorTypeOf<Image>> parent,
|
||||
SwapchainOwns swapchain_owned = SwapchainOwns::no,
|
||||
DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT
|
||||
SwapchainOwns swapchain_owned VULKAN_HPP_DEFAULT_ASSIGNMENT( SwapchainOwns::no ),
|
||||
DeleterType deleter VULKAN_HPP_DEFAULT_ASSIGNMENT( DeleterType() ) ) VULKAN_HPP_NOEXCEPT
|
||||
: BaseType( handle, std::move( parent ), std::move( deleter ), swapchain_owned )
|
||||
{
|
||||
}
|
||||
|
|
@ -1092,18 +1085,19 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
|
||||
struct SwapchainHeader
|
||||
{
|
||||
SwapchainHeader( SharedHandle<SurfaceKHR> surface,
|
||||
SharedHandle<DestructorTypeOf<SwapchainKHR>> parent,
|
||||
typename SharedHandleTraits<SwapchainKHR>::deleter deleter = typename SharedHandleTraits<SwapchainKHR>::deleter() ) VULKAN_HPP_NOEXCEPT
|
||||
SwapchainHeader( SharedHandle<SurfaceKHR> surface,
|
||||
SharedHandle<DestructorTypeOf<SwapchainKHR>> parent,
|
||||
typename SharedHandleTraits<SwapchainKHR>::deleter deleter
|
||||
VULKAN_HPP_DEFAULT_ASSIGNMENT( typename SharedHandleTraits<SwapchainKHR>::deleter() ) ) VULKAN_HPP_NOEXCEPT
|
||||
: surface( std::move( surface ) )
|
||||
, parent( std::move( parent ) )
|
||||
, deleter( std::move( deleter ) )
|
||||
{
|
||||
}
|
||||
|
||||
SharedHandle<SurfaceKHR> surface{};
|
||||
SharedHandle<DestructorTypeOf<SwapchainKHR>> parent{};
|
||||
typename SharedHandleTraits<SwapchainKHR>::deleter deleter{};
|
||||
SharedHandle<SurfaceKHR> surface;
|
||||
SharedHandle<DestructorTypeOf<SwapchainKHR>> parent;
|
||||
typename SharedHandleTraits<SwapchainKHR>::deleter deleter;
|
||||
};
|
||||
|
||||
template <>
|
||||
|
|
@ -1119,7 +1113,7 @@ namespace VULKAN_HPP_NAMESPACE
|
|||
explicit SharedHandle( SwapchainKHR handle,
|
||||
SharedHandle<DestructorTypeOf<SwapchainKHR>> parent,
|
||||
SharedHandle<SurfaceKHR> surface,
|
||||
DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT
|
||||
DeleterType deleter VULKAN_HPP_DEFAULT_ASSIGNMENT( DeleterType() ) ) VULKAN_HPP_NOEXCEPT
|
||||
: BaseType( handle, std::move( surface ), std::move( parent ), std::move( deleter ) )
|
||||
{
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -4,320 +4,321 @@
|
|||
|
||||
// This header is generated from the Khronos Vulkan XML API Registry.
|
||||
|
||||
// Note: This module is still in an experimental state.
|
||||
// Any feedback is welcome on https://github.com/KhronosGroup/Vulkan-Hpp/issues.
|
||||
|
||||
module;
|
||||
|
||||
#define VULKAN_HPP_CXX_MODULE 1
|
||||
|
||||
#include <vulkan/vulkan_hpp_macros.hpp>
|
||||
|
||||
#if defined( __cpp_lib_modules ) && !defined( VULKAN_HPP_ENABLE_STD_MODULE )
|
||||
# define VULKAN_HPP_ENABLE_STD_MODULE
|
||||
#if !defined( VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING )
|
||||
# define VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING \
|
||||
"\n\tThe Vulkan-Hpp C++ named module is experimental. It is subject to change without prior notice.\n" \
|
||||
"\tTo silence this warning, define the VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING macro.\n" \
|
||||
"\tFor feedback, go to: https://github.com/KhronosGroup/Vulkan-Hpp/issues"
|
||||
|
||||
VULKAN_HPP_COMPILE_WARNING( VULKAN_HPP_CXX_MODULE_EXPERIMENTAL_WARNING )
|
||||
#endif
|
||||
|
||||
#include <vulkan/vulkan_video.hpp>
|
||||
|
||||
export module vulkan_video_hpp;
|
||||
export module vulkan_hpp:video;
|
||||
|
||||
export namespace VULKAN_HPP_NAMESPACE
|
||||
export namespace VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE
|
||||
{
|
||||
namespace VULKAN_HPP_VIDEO_NAMESPACE
|
||||
{
|
||||
|
||||
//=================
|
||||
//=== CONSTANTs ===
|
||||
//=================
|
||||
//=================
|
||||
//=== CONSTANTs ===
|
||||
//=================
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_H264STD_H_ )
|
||||
//=== vulkan_video_codec_h264std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264CpbCntListSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264MaxChromaPlanes;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264MaxNumListRef;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264NoReferencePicture;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ScalingList4X4NumElements;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ScalingList4X4NumLists;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ScalingList8X8NumElements;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ScalingList8X8NumLists;
|
||||
//=== vulkan_video_codec_h264std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264CpbCntListSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264MaxChromaPlanes;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264MaxNumListRef;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264NoReferencePicture;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ScalingList4X4NumElements;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ScalingList4X4NumLists;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ScalingList8X8NumElements;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ScalingList8X8NumLists;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ )
|
||||
//=== vulkan_video_codec_h264std_decode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH264FieldOrderCountListSize;
|
||||
//=== vulkan_video_codec_h264std_decode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH264FieldOrderCountListSize;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_H265STD_H_ )
|
||||
//=== vulkan_video_codec_h265std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ChromaQpOffsetListSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ChromaQpOffsetTileColsListSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ChromaQpOffsetTileRowsListSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265CpbCntListSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265MaxChromaPlanes;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265MaxDeltaPoc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265MaxDpbSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265MaxLongTermPics;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265MaxLongTermRefPicsSps;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265MaxNumListRef;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265MaxShortTermRefPicSets;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265NoReferencePicture;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PredictorPaletteCompEntriesListSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PredictorPaletteComponentsListSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList16X16NumElements;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList16X16NumLists;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList32X32NumElements;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList32X32NumLists;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList4X4NumElements;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList4X4NumLists;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList8X8NumElements;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList8X8NumLists;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SublayersListSize;
|
||||
//=== vulkan_video_codec_h265std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ChromaQpOffsetListSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ChromaQpOffsetTileColsListSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ChromaQpOffsetTileRowsListSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265CpbCntListSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265MaxChromaPlanes;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265MaxDeltaPoc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265MaxDpbSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265MaxLongTermPics;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265MaxLongTermRefPicsSps;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265MaxNumListRef;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265MaxShortTermRefPicSets;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265NoReferencePicture;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PredictorPaletteCompEntriesListSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PredictorPaletteComponentsListSize;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList16X16NumElements;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList16X16NumLists;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList32X32NumElements;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList32X32NumLists;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList4X4NumElements;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList4X4NumLists;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList8X8NumElements;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingList8X8NumLists;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SublayersListSize;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_H265STD_DECODE_H_ )
|
||||
//=== vulkan_video_codec_h265std_decode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH265RefPicSetListSize;
|
||||
//=== vulkan_video_codec_h265std_decode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH265RefPicSetListSize;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_VP9STD_H_ )
|
||||
//=== vulkan_video_codec_vp9std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9LoopFilterAdjustments;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9MaxRefFrames;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9MaxSegmentationPredProb;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9MaxSegmentationTreeProbs;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9MaxSegments;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9NumRefFrames;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9RefsPerFrame;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9SegLvlMax;
|
||||
//=== vulkan_video_codec_vp9std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9LoopFilterAdjustments;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9MaxRefFrames;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9MaxSegmentationPredProb;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9MaxSegmentationTreeProbs;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9MaxSegments;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9NumRefFrames;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9RefsPerFrame;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Vp9SegLvlMax;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_AV1STD_H_ )
|
||||
//=== vulkan_video_codec_av1std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1GlobalMotionParams;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1LoopFilterAdjustments;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxCdefFilterStrengths;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxLoopFilterStrengths;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxNumCbPoints;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxNumCrPoints;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxNumPlanes;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxNumPosChroma;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxNumPosLuma;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxNumYPoints;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxSegments;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxTileCols;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxTileRows;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1NumRefFrames;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1PrimaryRefNone;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1RefsPerFrame;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1SegLvlMax;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1SelectIntegerMv;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1SelectScreenContentTools;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1SkipModeFrames;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1TotalRefsPerFrame;
|
||||
//=== vulkan_video_codec_av1std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1GlobalMotionParams;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1LoopFilterAdjustments;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxCdefFilterStrengths;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxLoopFilterStrengths;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxNumCbPoints;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxNumCrPoints;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxNumPlanes;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxNumPosChroma;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxNumPosLuma;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxNumYPoints;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxSegments;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxTileCols;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1MaxTileRows;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1NumRefFrames;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1PrimaryRefNone;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1RefsPerFrame;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1SegLvlMax;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1SelectIntegerMv;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1SelectScreenContentTools;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1SkipModeFrames;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::Av1TotalRefsPerFrame;
|
||||
#endif
|
||||
|
||||
//=============
|
||||
//=== ENUMs ===
|
||||
//=============
|
||||
//=============
|
||||
//=== ENUMs ===
|
||||
//=============
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_H264STD_H_ )
|
||||
//=== vulkan_video_codec_h264std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264AspectRatioIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264CabacInitIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ChromaFormatIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264DisableDeblockingFilterIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264LevelIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264MemMgmtControlOp;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ModificationOfPicNumsIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264NonVclNaluType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264PictureType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264PocType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ProfileIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264SliceType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264WeightedBipredIdc;
|
||||
//=== vulkan_video_codec_h264std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264AspectRatioIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264CabacInitIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ChromaFormatIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264DisableDeblockingFilterIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264LevelIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264MemMgmtControlOp;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ModificationOfPicNumsIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264NonVclNaluType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264PictureType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264PocType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ProfileIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264SliceType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264WeightedBipredIdc;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ )
|
||||
//=== vulkan_video_codec_h264std_decode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH264FieldOrderCount;
|
||||
//=== vulkan_video_codec_h264std_decode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH264FieldOrderCount;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_H265STD_H_ )
|
||||
//=== vulkan_video_codec_h265std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265AspectRatioIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ChromaFormatIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265LevelIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PictureType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ProfileIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SliceType;
|
||||
//=== vulkan_video_codec_h265std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265AspectRatioIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ChromaFormatIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265LevelIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PictureType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ProfileIdc;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SliceType;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_VP9STD_H_ )
|
||||
//=== vulkan_video_codec_vp9std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9ColorSpace;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9FrameType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9InterpolationFilter;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9Level;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9Profile;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9ReferenceName;
|
||||
//=== vulkan_video_codec_vp9std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9ColorSpace;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9FrameType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9InterpolationFilter;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9Level;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9Profile;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9ReferenceName;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_AV1STD_H_ )
|
||||
//=== vulkan_video_codec_av1std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ChromaSamplePosition;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ColorPrimaries;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FrameRestorationType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FrameType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1InterpolationFilter;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1Level;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1MatrixCoefficients;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1Profile;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ReferenceName;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TransferCharacteristics;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TxMode;
|
||||
//=== vulkan_video_codec_av1std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ChromaSamplePosition;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ColorPrimaries;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FrameRestorationType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FrameType;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1InterpolationFilter;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1Level;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1MatrixCoefficients;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1Profile;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ReferenceName;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TransferCharacteristics;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TxMode;
|
||||
#endif
|
||||
|
||||
//===============
|
||||
//=== STRUCTS ===
|
||||
//===============
|
||||
//===============
|
||||
//=== STRUCTS ===
|
||||
//===============
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_H264STD_H_ )
|
||||
//=== vulkan_video_codec_h264std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264HrdParameters;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264PictureParameterSet;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264PpsFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ScalingLists;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264SequenceParameterSet;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264SequenceParameterSetVui;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264SpsFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264SpsVuiFlags;
|
||||
//=== vulkan_video_codec_h264std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264HrdParameters;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264PictureParameterSet;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264PpsFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264ScalingLists;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264SequenceParameterSet;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264SequenceParameterSetVui;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264SpsFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H264SpsVuiFlags;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ )
|
||||
//=== vulkan_video_codec_h264std_decode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH264PictureInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH264PictureInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH264ReferenceInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH264ReferenceInfoFlags;
|
||||
//=== vulkan_video_codec_h264std_decode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH264PictureInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH264PictureInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH264ReferenceInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH264ReferenceInfoFlags;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_ )
|
||||
//=== vulkan_video_codec_h264std_encode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264PictureInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264PictureInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264ReferenceInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264ReferenceInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264ReferenceListsInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264ReferenceListsInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264RefListModEntry;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264RefPicMarkingEntry;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264SliceHeader;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264SliceHeaderFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264WeightTable;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264WeightTableFlags;
|
||||
//=== vulkan_video_codec_h264std_encode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264PictureInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264PictureInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264ReferenceInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264ReferenceInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264ReferenceListsInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264ReferenceListsInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264RefListModEntry;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264RefPicMarkingEntry;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264SliceHeader;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264SliceHeaderFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264WeightTable;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH264WeightTableFlags;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_H265STD_H_ )
|
||||
//=== vulkan_video_codec_h265std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265DecPicBufMgr;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265HrdFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265HrdParameters;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265LongTermRefPicsSps;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PictureParameterSet;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PpsFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PredictorPaletteEntries;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ProfileTierLevel;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ProfileTierLevelFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingLists;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SequenceParameterSet;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SequenceParameterSetVui;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ShortTermRefPicSet;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ShortTermRefPicSetFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SpsFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SpsVuiFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SubLayerHrdParameters;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265VideoParameterSet;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265VpsFlags;
|
||||
//=== vulkan_video_codec_h265std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265DecPicBufMgr;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265HrdFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265HrdParameters;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265LongTermRefPicsSps;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PictureParameterSet;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PpsFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265PredictorPaletteEntries;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ProfileTierLevel;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ProfileTierLevelFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ScalingLists;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SequenceParameterSet;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SequenceParameterSetVui;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ShortTermRefPicSet;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265ShortTermRefPicSetFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SpsFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SpsVuiFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265SubLayerHrdParameters;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265VideoParameterSet;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::H265VpsFlags;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_H265STD_DECODE_H_ )
|
||||
//=== vulkan_video_codec_h265std_decode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH265PictureInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH265PictureInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH265ReferenceInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH265ReferenceInfoFlags;
|
||||
//=== vulkan_video_codec_h265std_decode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH265PictureInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH265PictureInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH265ReferenceInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeH265ReferenceInfoFlags;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_ )
|
||||
//=== vulkan_video_codec_h265std_encode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265LongTermRefPics;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265PictureInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265PictureInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265ReferenceInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265ReferenceInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265ReferenceListsInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265ReferenceListsInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265SliceSegmentHeader;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265SliceSegmentHeaderFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265WeightTable;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265WeightTableFlags;
|
||||
//=== vulkan_video_codec_h265std_encode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265LongTermRefPics;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265PictureInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265PictureInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265ReferenceInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265ReferenceInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265ReferenceListsInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265ReferenceListsInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265SliceSegmentHeader;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265SliceSegmentHeaderFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265WeightTable;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeH265WeightTableFlags;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_VP9STD_H_ )
|
||||
//=== vulkan_video_codec_vp9std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9ColorConfig;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9ColorConfigFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9LoopFilter;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9LoopFilterFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9Segmentation;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9SegmentationFlags;
|
||||
//=== vulkan_video_codec_vp9std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9ColorConfig;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9ColorConfigFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9LoopFilter;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9LoopFilterFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9Segmentation;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::VP9SegmentationFlags;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_VP9STD_DECODE_H_ )
|
||||
//=== vulkan_video_codec_vp9std_decode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeVP9PictureInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeVP9PictureInfoFlags;
|
||||
//=== vulkan_video_codec_vp9std_decode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeVP9PictureInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeVP9PictureInfoFlags;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_AV1STD_H_ )
|
||||
//=== vulkan_video_codec_av1std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1CDEF;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ColorConfig;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ColorConfigFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FilmGrain;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FilmGrainFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1GlobalMotion;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1LoopFilter;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1LoopFilterFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1LoopRestoration;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1Quantization;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1QuantizationFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1Segmentation;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1SequenceHeader;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1SequenceHeaderFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TileInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TileInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TimingInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TimingInfoFlags;
|
||||
//=== vulkan_video_codec_av1std ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1CDEF;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ColorConfig;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1ColorConfigFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FilmGrain;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1FilmGrainFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1GlobalMotion;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1LoopFilter;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1LoopFilterFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1LoopRestoration;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1Quantization;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1QuantizationFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1Segmentation;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1SequenceHeader;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1SequenceHeaderFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TileInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TileInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TimingInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::AV1TimingInfoFlags;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ )
|
||||
//=== vulkan_video_codec_av1std_decode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeAV1PictureInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeAV1PictureInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeAV1ReferenceInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeAV1ReferenceInfoFlags;
|
||||
//=== vulkan_video_codec_av1std_decode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeAV1PictureInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeAV1PictureInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeAV1ReferenceInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::DecodeAV1ReferenceInfoFlags;
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_VIDEO_CODEC_AV1STD_ENCODE_H_ )
|
||||
//=== vulkan_video_codec_av1std_encode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1DecoderModelInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1ExtensionHeader;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1OperatingPointInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1OperatingPointInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1PictureInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1PictureInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1ReferenceInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1ReferenceInfoFlags;
|
||||
//=== vulkan_video_codec_av1std_encode ===
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1DecoderModelInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1ExtensionHeader;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1OperatingPointInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1OperatingPointInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1PictureInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1PictureInfoFlags;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1ReferenceInfo;
|
||||
using VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE::EncodeAV1ReferenceInfoFlags;
|
||||
#endif
|
||||
|
||||
} // namespace VULKAN_HPP_VIDEO_NAMESPACE
|
||||
} // namespace VULKAN_HPP_NAMESPACE
|
||||
} // namespace VULKAN_HPP_NAMESPACE::VULKAN_HPP_VIDEO_NAMESPACE
|
||||
|
|
|
|||
3047
vulkan/vulkansc.cppm
3047
vulkan/vulkansc.cppm
File diff suppressed because it is too large
Load Diff
8626
vulkan/vulkansc.hpp
8626
vulkan/vulkansc.hpp
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,739 +0,0 @@
|
|||
// Copyright 2015-2024 The Khronos Group Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
|
||||
// This header is generated from the Khronos Vulkan XML API Registry.
|
||||
|
||||
#ifndef VULKAN_EXTENSION_INSPECTION_HPP
|
||||
#define VULKAN_EXTENSION_INSPECTION_HPP
|
||||
|
||||
#if defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE )
|
||||
import VULKAN_HPP_STD_MODULE;
|
||||
#else
|
||||
# include <map>
|
||||
# include <set>
|
||||
# include <string>
|
||||
# include <vector>
|
||||
# include <vulkan/vulkansc.hpp>
|
||||
#endif
|
||||
|
||||
namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
//======================================
|
||||
//=== Extension inspection functions ===
|
||||
//======================================
|
||||
|
||||
std::set<std::string> const & getDeviceExtensions();
|
||||
std::set<std::string> const & getInstanceExtensions();
|
||||
std::map<std::string, std::string> const & getDeprecatedExtensions();
|
||||
std::map<std::string, std::vector<std::vector<std::string>>> const & getExtensionDepends( std::string const & extension );
|
||||
|
||||
std::map<std::string, std::string> const & getObsoletedExtensions();
|
||||
std::map<std::string, std::string> const & getPromotedExtensions();
|
||||
VULKAN_HPP_CONSTEXPR_20 std::string getExtensionDeprecatedBy( std::string const & extension );
|
||||
VULKAN_HPP_CONSTEXPR_20 std::string getExtensionObsoletedBy( std::string const & extension );
|
||||
VULKAN_HPP_CONSTEXPR_20 std::string getExtensionPromotedTo( std::string const & extension );
|
||||
VULKAN_HPP_CONSTEXPR_20 bool isDeprecatedExtension( std::string const & extension );
|
||||
VULKAN_HPP_CONSTEXPR_20 bool isDeviceExtension( std::string const & extension );
|
||||
VULKAN_HPP_CONSTEXPR_20 bool isInstanceExtension( std::string const & extension );
|
||||
VULKAN_HPP_CONSTEXPR_20 bool isObsoletedExtension( std::string const & extension );
|
||||
VULKAN_HPP_CONSTEXPR_20 bool isPromotedExtension( std::string const & extension );
|
||||
|
||||
//=====================================================
|
||||
//=== Extension inspection function implementations ===
|
||||
//=====================================================
|
||||
|
||||
VULKAN_HPP_INLINE std::map<std::string, std::string> const & getDeprecatedExtensions()
|
||||
{
|
||||
static const std::map<std::string, std::string> deprecatedExtensions = {
|
||||
{ "VK_EXT_validation_features", "VK_EXT_layer_settings" },
|
||||
#if defined( VK_USE_PLATFORM_SCI )
|
||||
{ "VK_NV_external_sci_sync", "VK_NV_external_sci_sync2" }
|
||||
#endif /*VK_USE_PLATFORM_SCI*/
|
||||
};
|
||||
return deprecatedExtensions;
|
||||
}
|
||||
|
||||
VULKAN_HPP_INLINE std::set<std::string> const & getDeviceExtensions()
|
||||
{
|
||||
static const std::set<std::string> deviceExtensions = {
|
||||
"VK_KHR_swapchain",
|
||||
"VK_KHR_display_swapchain",
|
||||
"VK_EXT_depth_range_unrestricted",
|
||||
"VK_NV_private_vendor_info",
|
||||
"VK_EXT_texture_compression_astc_hdr",
|
||||
"VK_EXT_astc_decode_mode",
|
||||
"VK_KHR_external_memory_fd",
|
||||
"VK_KHR_external_semaphore_fd",
|
||||
"VK_KHR_incremental_present",
|
||||
"VK_EXT_display_control",
|
||||
"VK_EXT_discard_rectangles",
|
||||
"VK_EXT_conservative_rasterization",
|
||||
"VK_EXT_depth_clip_enable",
|
||||
"VK_EXT_hdr_metadata",
|
||||
"VK_KHR_shared_presentable_image",
|
||||
"VK_KHR_external_fence_fd",
|
||||
"VK_KHR_performance_query",
|
||||
"VK_EXT_external_memory_dma_buf",
|
||||
"VK_EXT_queue_family_foreign",
|
||||
"VK_EXT_shader_stencil_export",
|
||||
"VK_EXT_sample_locations",
|
||||
"VK_EXT_blend_operation_advanced",
|
||||
"VK_EXT_post_depth_coverage",
|
||||
"VK_EXT_image_drm_format_modifier",
|
||||
"VK_EXT_filter_cubic",
|
||||
"VK_EXT_external_memory_host",
|
||||
"VK_KHR_shader_clock",
|
||||
"VK_KHR_global_priority",
|
||||
"VK_KHR_swapchain_mutable_format",
|
||||
"VK_EXT_pci_bus_info",
|
||||
"VK_KHR_shader_terminate_invocation",
|
||||
"VK_EXT_subgroup_size_control",
|
||||
"VK_KHR_fragment_shading_rate",
|
||||
"VK_EXT_shader_image_atomic_int64",
|
||||
"VK_EXT_memory_budget",
|
||||
"VK_EXT_fragment_shader_interlock",
|
||||
"VK_EXT_ycbcr_image_arrays",
|
||||
"VK_EXT_line_rasterization",
|
||||
"VK_EXT_shader_atomic_float",
|
||||
"VK_EXT_index_type_uint8",
|
||||
"VK_EXT_extended_dynamic_state",
|
||||
"VK_EXT_shader_demote_to_helper_invocation",
|
||||
"VK_EXT_texel_buffer_alignment",
|
||||
"VK_EXT_robustness2",
|
||||
"VK_EXT_custom_border_color",
|
||||
"VK_KHR_object_refresh",
|
||||
"VK_KHR_synchronization2",
|
||||
"VK_EXT_ycbcr_2plane_444_formats",
|
||||
"VK_EXT_image_robustness",
|
||||
"VK_KHR_copy_commands2",
|
||||
"VK_EXT_4444_formats",
|
||||
#if defined( VK_USE_PLATFORM_WIN32_KHR )
|
||||
"VK_NV_acquire_winrt_display",
|
||||
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
|
||||
"VK_EXT_vertex_input_dynamic_state",
|
||||
#if defined( VK_USE_PLATFORM_SCI )
|
||||
"VK_NV_external_sci_sync",
|
||||
"VK_NV_external_memory_sci_buf",
|
||||
#endif /*VK_USE_PLATFORM_SCI*/
|
||||
"VK_EXT_extended_dynamic_state2",
|
||||
"VK_EXT_color_write_enable",
|
||||
#if defined( VK_USE_PLATFORM_SCI )
|
||||
"VK_NV_external_sci_sync2",
|
||||
#endif /*VK_USE_PLATFORM_SCI*/
|
||||
"VK_KHR_vertex_attribute_divisor",
|
||||
#if defined( VK_USE_PLATFORM_SCREEN_QNX )
|
||||
"VK_QNX_external_memory_screen_buffer",
|
||||
#endif /*VK_USE_PLATFORM_SCREEN_QNX*/
|
||||
"VK_KHR_index_type_uint8",
|
||||
"VK_KHR_line_rasterization",
|
||||
"VK_KHR_calibrated_timestamps"
|
||||
};
|
||||
return deviceExtensions;
|
||||
}
|
||||
|
||||
VULKAN_HPP_INLINE std::set<std::string> const & getInstanceExtensions()
|
||||
{
|
||||
static const std::set<std::string> instanceExtensions = { "VK_KHR_surface",
|
||||
"VK_KHR_display",
|
||||
"VK_EXT_direct_mode_display",
|
||||
"VK_EXT_display_surface_counter",
|
||||
"VK_EXT_swapchain_colorspace",
|
||||
"VK_KHR_get_surface_capabilities2",
|
||||
"VK_KHR_get_display_properties2",
|
||||
"VK_EXT_debug_utils",
|
||||
"VK_EXT_validation_features",
|
||||
"VK_EXT_headless_surface",
|
||||
"VK_EXT_application_parameters",
|
||||
"VK_EXT_layer_settings" };
|
||||
return instanceExtensions;
|
||||
}
|
||||
|
||||
VULKAN_HPP_INLINE std::map<std::string, std::vector<std::vector<std::string>>> const & getExtensionDepends( std::string const & extension )
|
||||
{
|
||||
static const std::map<std::string, std::vector<std::vector<std::string>>> noDependencies;
|
||||
static const std::map<std::string, std::map<std::string, std::vector<std::vector<std::string>>>> dependencies = {
|
||||
{ "VK_KHR_swapchain",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_surface",
|
||||
} } } } },
|
||||
{ "VK_KHR_display",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_surface",
|
||||
} } } } },
|
||||
{ "VK_KHR_display_swapchain",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_swapchain",
|
||||
"VK_KHR_display",
|
||||
} } } } },
|
||||
{ "VK_EXT_texture_compression_astc_hdr",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_astc_decode_mode",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_KHR_external_memory_fd",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_external_memory",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_KHR_external_semaphore_fd",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_external_semaphore",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_KHR_incremental_present",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_swapchain",
|
||||
} } } } },
|
||||
{ "VK_EXT_direct_mode_display",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_display",
|
||||
} } } } },
|
||||
{ "VK_EXT_display_surface_counter",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_display",
|
||||
} } } } },
|
||||
{ "VK_EXT_display_control",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_EXT_display_surface_counter",
|
||||
"VK_KHR_swapchain",
|
||||
} } } } },
|
||||
{ "VK_EXT_discard_rectangles",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_conservative_rasterization",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_depth_clip_enable",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_swapchain_colorspace",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_surface",
|
||||
} } } } },
|
||||
{ "VK_EXT_hdr_metadata",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_swapchain",
|
||||
} } } } },
|
||||
{ "VK_KHR_shared_presentable_image",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_swapchain",
|
||||
"VK_KHR_get_surface_capabilities2",
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1",
|
||||
{ {
|
||||
"VK_KHR_swapchain",
|
||||
"VK_KHR_get_surface_capabilities2",
|
||||
} } } } },
|
||||
{ "VK_KHR_external_fence_fd",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_external_fence",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_KHR_performance_query",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_KHR_get_surface_capabilities2",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_surface",
|
||||
} } } } },
|
||||
{ "VK_KHR_get_display_properties2",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_display",
|
||||
} } } } },
|
||||
{ "VK_EXT_external_memory_dma_buf",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_external_memory_fd",
|
||||
} } } } },
|
||||
{ "VK_EXT_queue_family_foreign",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_external_memory",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_sample_locations",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_blend_operation_advanced",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_image_drm_format_modifier",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_bind_memory2",
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
"VK_KHR_sampler_ycbcr_conversion",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1",
|
||||
{ {
|
||||
"VK_KHR_image_format_list",
|
||||
} } },
|
||||
{ "VK_VERSION_1_2", { {} } } } },
|
||||
{ "VK_EXT_external_memory_host",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_external_memory",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_KHR_shader_clock",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_KHR_global_priority",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_KHR_swapchain_mutable_format",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_swapchain",
|
||||
"VK_KHR_maintenance2",
|
||||
"VK_KHR_image_format_list",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1",
|
||||
{ {
|
||||
"VK_KHR_swapchain",
|
||||
"VK_KHR_image_format_list",
|
||||
} } },
|
||||
{ "VK_VERSION_1_2",
|
||||
{ {
|
||||
"VK_KHR_swapchain",
|
||||
} } } } },
|
||||
{ "VK_EXT_pci_bus_info",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_KHR_shader_terminate_invocation",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_subgroup_size_control", { { "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_KHR_fragment_shading_rate",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1",
|
||||
{ {
|
||||
"VK_KHR_create_renderpass2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_2", { {} } } } },
|
||||
{ "VK_EXT_shader_image_atomic_int64",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_memory_budget",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_fragment_shader_interlock",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_ycbcr_image_arrays",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_sampler_ycbcr_conversion",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_headless_surface",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_surface",
|
||||
} } } } },
|
||||
{ "VK_EXT_line_rasterization",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_shader_atomic_float",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_index_type_uint8",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_extended_dynamic_state",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_shader_demote_to_helper_invocation",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_texel_buffer_alignment",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_robustness2",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_custom_border_color",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_KHR_synchronization2",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_ycbcr_2plane_444_formats",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_sampler_ycbcr_conversion",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_image_robustness",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_KHR_copy_commands2",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_4444_formats",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
#if defined( VK_USE_PLATFORM_WIN32_KHR )
|
||||
{ "VK_NV_acquire_winrt_display",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_EXT_direct_mode_display",
|
||||
} } } } },
|
||||
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
|
||||
{ "VK_EXT_vertex_input_dynamic_state",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
#if defined( VK_USE_PLATFORM_SCI )
|
||||
{ "VK_NV_external_sci_sync", { { "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_NV_external_memory_sci_buf", { { "VK_VERSION_1_1", { {} } } } },
|
||||
#endif /*VK_USE_PLATFORM_SCI*/
|
||||
{ "VK_EXT_extended_dynamic_state2",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_EXT_color_write_enable",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
#if defined( VK_USE_PLATFORM_SCI )
|
||||
{ "VK_NV_external_sci_sync2", { { "VK_VERSION_1_1", { {} } } } },
|
||||
#endif /*VK_USE_PLATFORM_SCI*/
|
||||
{ "VK_KHR_vertex_attribute_divisor",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
#if defined( VK_USE_PLATFORM_SCREEN_QNX )
|
||||
{ "VK_QNX_external_memory_screen_buffer",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_sampler_ycbcr_conversion",
|
||||
"VK_KHR_external_memory",
|
||||
"VK_KHR_dedicated_allocation",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1",
|
||||
{ {
|
||||
"VK_EXT_queue_family_foreign",
|
||||
} } } } },
|
||||
#endif /*VK_USE_PLATFORM_SCREEN_QNX*/
|
||||
{ "VK_KHR_index_type_uint8",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_KHR_line_rasterization",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } },
|
||||
{ "VK_KHR_calibrated_timestamps",
|
||||
{ { "VK_VERSION_1_0",
|
||||
{ {
|
||||
"VK_KHR_get_physical_device_properties2",
|
||||
} } },
|
||||
{ "VK_VERSION_1_1", { {} } } } }
|
||||
};
|
||||
auto depIt = dependencies.find( extension );
|
||||
return ( depIt != dependencies.end() ) ? depIt->second : noDependencies;
|
||||
}
|
||||
|
||||
VULKAN_HPP_INLINE std::map<std::string, std::string> const & getObsoletedExtensions()
|
||||
{
|
||||
static const std::map<std::string, std::string> obsoletedExtensions = {};
|
||||
return obsoletedExtensions;
|
||||
}
|
||||
|
||||
VULKAN_HPP_INLINE std::map<std::string, std::string> const & getPromotedExtensions()
|
||||
{
|
||||
static const std::map<std::string, std::string> promotedExtensions = { { "VK_EXT_texture_compression_astc_hdr", "VK_VERSION_1_3" },
|
||||
{ "VK_KHR_shader_terminate_invocation", "VK_VERSION_1_3" },
|
||||
{ "VK_EXT_subgroup_size_control", "VK_VERSION_1_3" },
|
||||
{ "VK_EXT_line_rasterization", "VK_KHR_line_rasterization" },
|
||||
{ "VK_EXT_index_type_uint8", "VK_KHR_index_type_uint8" },
|
||||
{ "VK_EXT_extended_dynamic_state", "VK_VERSION_1_3" },
|
||||
{ "VK_EXT_shader_demote_to_helper_invocation", "VK_VERSION_1_3" },
|
||||
{ "VK_EXT_texel_buffer_alignment", "VK_VERSION_1_3" },
|
||||
{ "VK_KHR_synchronization2", "VK_VERSION_1_3" },
|
||||
{ "VK_EXT_ycbcr_2plane_444_formats", "VK_VERSION_1_3" },
|
||||
{ "VK_EXT_image_robustness", "VK_VERSION_1_3" },
|
||||
{ "VK_KHR_copy_commands2", "VK_VERSION_1_3" },
|
||||
{ "VK_EXT_4444_formats", "VK_VERSION_1_3" },
|
||||
{ "VK_EXT_extended_dynamic_state2", "VK_VERSION_1_3" } };
|
||||
return promotedExtensions;
|
||||
}
|
||||
|
||||
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 std::string getExtensionDeprecatedBy( std::string const & extension )
|
||||
{
|
||||
(void)extension;
|
||||
|
||||
if ( extension == "VK_EXT_validation_features" )
|
||||
{
|
||||
return "VK_EXT_layer_settings";
|
||||
}
|
||||
#if defined( VK_USE_PLATFORM_SCI )
|
||||
if ( extension == "VK_NV_external_sci_sync" )
|
||||
{
|
||||
return "VK_NV_external_sci_sync2";
|
||||
}
|
||||
#endif /*VK_USE_PLATFORM_SCI*/
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 std::string getExtensionObsoletedBy( std::string const & extension )
|
||||
{
|
||||
(void)extension;
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 std::string getExtensionPromotedTo( std::string const & extension )
|
||||
{
|
||||
if ( extension == "VK_EXT_texture_compression_astc_hdr" )
|
||||
{
|
||||
return "VK_VERSION_1_3";
|
||||
}
|
||||
if ( extension == "VK_KHR_shader_terminate_invocation" )
|
||||
{
|
||||
return "VK_VERSION_1_3";
|
||||
}
|
||||
if ( extension == "VK_EXT_subgroup_size_control" )
|
||||
{
|
||||
return "VK_VERSION_1_3";
|
||||
}
|
||||
if ( extension == "VK_EXT_line_rasterization" )
|
||||
{
|
||||
return "VK_KHR_line_rasterization";
|
||||
}
|
||||
if ( extension == "VK_EXT_index_type_uint8" )
|
||||
{
|
||||
return "VK_KHR_index_type_uint8";
|
||||
}
|
||||
if ( extension == "VK_EXT_extended_dynamic_state" )
|
||||
{
|
||||
return "VK_VERSION_1_3";
|
||||
}
|
||||
if ( extension == "VK_EXT_shader_demote_to_helper_invocation" )
|
||||
{
|
||||
return "VK_VERSION_1_3";
|
||||
}
|
||||
if ( extension == "VK_EXT_texel_buffer_alignment" )
|
||||
{
|
||||
return "VK_VERSION_1_3";
|
||||
}
|
||||
if ( extension == "VK_KHR_synchronization2" )
|
||||
{
|
||||
return "VK_VERSION_1_3";
|
||||
}
|
||||
if ( extension == "VK_EXT_ycbcr_2plane_444_formats" )
|
||||
{
|
||||
return "VK_VERSION_1_3";
|
||||
}
|
||||
if ( extension == "VK_EXT_image_robustness" )
|
||||
{
|
||||
return "VK_VERSION_1_3";
|
||||
}
|
||||
if ( extension == "VK_KHR_copy_commands2" )
|
||||
{
|
||||
return "VK_VERSION_1_3";
|
||||
}
|
||||
if ( extension == "VK_EXT_4444_formats" )
|
||||
{
|
||||
return "VK_VERSION_1_3";
|
||||
}
|
||||
if ( extension == "VK_EXT_extended_dynamic_state2" )
|
||||
{
|
||||
return "VK_VERSION_1_3";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 bool isDeprecatedExtension( std::string const & extension )
|
||||
{
|
||||
(void)extension;
|
||||
return ( extension == "VK_EXT_validation_features" ) ||
|
||||
#if defined( VK_USE_PLATFORM_SCI )
|
||||
( extension == "VK_NV_external_sci_sync" )
|
||||
#endif /*VK_USE_PLATFORM_SCI*/
|
||||
;
|
||||
}
|
||||
|
||||
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 bool isDeviceExtension( std::string const & extension )
|
||||
{
|
||||
return ( extension == "VK_KHR_swapchain" ) || ( extension == "VK_KHR_display_swapchain" ) || ( extension == "VK_EXT_depth_range_unrestricted" ) ||
|
||||
( extension == "VK_NV_private_vendor_info" ) || ( extension == "VK_EXT_texture_compression_astc_hdr" ) ||
|
||||
( extension == "VK_EXT_astc_decode_mode" ) || ( extension == "VK_KHR_external_memory_fd" ) || ( extension == "VK_KHR_external_semaphore_fd" ) ||
|
||||
( extension == "VK_KHR_incremental_present" ) || ( extension == "VK_EXT_display_control" ) || ( extension == "VK_EXT_discard_rectangles" ) ||
|
||||
( extension == "VK_EXT_conservative_rasterization" ) || ( extension == "VK_EXT_depth_clip_enable" ) || ( extension == "VK_EXT_hdr_metadata" ) ||
|
||||
( extension == "VK_KHR_shared_presentable_image" ) || ( extension == "VK_KHR_external_fence_fd" ) || ( extension == "VK_KHR_performance_query" ) ||
|
||||
( extension == "VK_EXT_external_memory_dma_buf" ) || ( extension == "VK_EXT_queue_family_foreign" ) ||
|
||||
( extension == "VK_EXT_shader_stencil_export" ) || ( extension == "VK_EXT_sample_locations" ) ||
|
||||
( extension == "VK_EXT_blend_operation_advanced" ) || ( extension == "VK_EXT_post_depth_coverage" ) ||
|
||||
( extension == "VK_EXT_image_drm_format_modifier" ) || ( extension == "VK_EXT_filter_cubic" ) || ( extension == "VK_EXT_external_memory_host" ) ||
|
||||
( extension == "VK_KHR_shader_clock" ) || ( extension == "VK_KHR_global_priority" ) || ( extension == "VK_KHR_swapchain_mutable_format" ) ||
|
||||
( extension == "VK_EXT_pci_bus_info" ) || ( extension == "VK_KHR_shader_terminate_invocation" ) || ( extension == "VK_EXT_subgroup_size_control" ) ||
|
||||
( extension == "VK_KHR_fragment_shading_rate" ) || ( extension == "VK_EXT_shader_image_atomic_int64" ) || ( extension == "VK_EXT_memory_budget" ) ||
|
||||
( extension == "VK_EXT_fragment_shader_interlock" ) || ( extension == "VK_EXT_ycbcr_image_arrays" ) ||
|
||||
( extension == "VK_EXT_line_rasterization" ) || ( extension == "VK_EXT_shader_atomic_float" ) || ( extension == "VK_EXT_index_type_uint8" ) ||
|
||||
( extension == "VK_EXT_extended_dynamic_state" ) || ( extension == "VK_EXT_shader_demote_to_helper_invocation" ) ||
|
||||
( extension == "VK_EXT_texel_buffer_alignment" ) || ( extension == "VK_EXT_robustness2" ) || ( extension == "VK_EXT_custom_border_color" ) ||
|
||||
( extension == "VK_KHR_object_refresh" ) || ( extension == "VK_KHR_synchronization2" ) || ( extension == "VK_EXT_ycbcr_2plane_444_formats" ) ||
|
||||
( extension == "VK_EXT_image_robustness" ) || ( extension == "VK_KHR_copy_commands2" ) || ( extension == "VK_EXT_4444_formats" )
|
||||
#if defined( VK_USE_PLATFORM_WIN32_KHR )
|
||||
|| ( extension == "VK_NV_acquire_winrt_display" )
|
||||
#endif /*VK_USE_PLATFORM_WIN32_KHR*/
|
||||
|| ( extension == "VK_EXT_vertex_input_dynamic_state" )
|
||||
#if defined( VK_USE_PLATFORM_SCI )
|
||||
|| ( extension == "VK_NV_external_sci_sync" ) || ( extension == "VK_NV_external_memory_sci_buf" )
|
||||
#endif /*VK_USE_PLATFORM_SCI*/
|
||||
|| ( extension == "VK_EXT_extended_dynamic_state2" ) || ( extension == "VK_EXT_color_write_enable" )
|
||||
#if defined( VK_USE_PLATFORM_SCI )
|
||||
|| ( extension == "VK_NV_external_sci_sync2" )
|
||||
#endif /*VK_USE_PLATFORM_SCI*/
|
||||
|| ( extension == "VK_KHR_vertex_attribute_divisor" )
|
||||
#if defined( VK_USE_PLATFORM_SCREEN_QNX )
|
||||
|| ( extension == "VK_QNX_external_memory_screen_buffer" )
|
||||
#endif /*VK_USE_PLATFORM_SCREEN_QNX*/
|
||||
|| ( extension == "VK_KHR_index_type_uint8" ) || ( extension == "VK_KHR_line_rasterization" ) || ( extension == "VK_KHR_calibrated_timestamps" );
|
||||
}
|
||||
|
||||
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 bool isInstanceExtension( std::string const & extension )
|
||||
{
|
||||
return ( extension == "VK_KHR_surface" ) || ( extension == "VK_KHR_display" ) || ( extension == "VK_EXT_direct_mode_display" ) ||
|
||||
( extension == "VK_EXT_display_surface_counter" ) || ( extension == "VK_EXT_swapchain_colorspace" ) ||
|
||||
( extension == "VK_KHR_get_surface_capabilities2" ) || ( extension == "VK_KHR_get_display_properties2" ) || ( extension == "VK_EXT_debug_utils" ) ||
|
||||
( extension == "VK_EXT_validation_features" ) || ( extension == "VK_EXT_headless_surface" ) || ( extension == "VK_EXT_application_parameters" ) ||
|
||||
( extension == "VK_EXT_layer_settings" );
|
||||
}
|
||||
|
||||
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 bool isObsoletedExtension( std::string const & extension )
|
||||
{
|
||||
(void)extension;
|
||||
return false;
|
||||
}
|
||||
|
||||
VULKAN_HPP_INLINE VULKAN_HPP_CONSTEXPR_20 bool isPromotedExtension( std::string const & extension )
|
||||
{
|
||||
return ( extension == "VK_EXT_texture_compression_astc_hdr" ) || ( extension == "VK_KHR_shader_terminate_invocation" ) ||
|
||||
( extension == "VK_EXT_subgroup_size_control" ) || ( extension == "VK_EXT_line_rasterization" ) || ( extension == "VK_EXT_index_type_uint8" ) ||
|
||||
( extension == "VK_EXT_extended_dynamic_state" ) || ( extension == "VK_EXT_shader_demote_to_helper_invocation" ) ||
|
||||
( extension == "VK_EXT_texel_buffer_alignment" ) || ( extension == "VK_KHR_synchronization2" ) ||
|
||||
( extension == "VK_EXT_ycbcr_2plane_444_formats" ) || ( extension == "VK_EXT_image_robustness" ) || ( extension == "VK_KHR_copy_commands2" ) ||
|
||||
( extension == "VK_EXT_4444_formats" ) || ( extension == "VK_EXT_extended_dynamic_state2" );
|
||||
}
|
||||
} // namespace VULKAN_HPP_NAMESPACE
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,326 +0,0 @@
|
|||
// Copyright 2015-2024 The Khronos Group Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
|
||||
// This header is generated from the Khronos Vulkan XML API Registry.
|
||||
|
||||
#ifndef VULKAN_HPP_MACROS_HPP
|
||||
#define VULKAN_HPP_MACROS_HPP
|
||||
|
||||
#if defined( _MSVC_LANG )
|
||||
# define VULKAN_HPP_CPLUSPLUS _MSVC_LANG
|
||||
#else
|
||||
# define VULKAN_HPP_CPLUSPLUS __cplusplus
|
||||
#endif
|
||||
|
||||
#if 202002L < VULKAN_HPP_CPLUSPLUS
|
||||
# define VULKAN_HPP_CPP_VERSION 23
|
||||
#elif 201703L < VULKAN_HPP_CPLUSPLUS
|
||||
# define VULKAN_HPP_CPP_VERSION 20
|
||||
#elif 201402L < VULKAN_HPP_CPLUSPLUS
|
||||
# define VULKAN_HPP_CPP_VERSION 17
|
||||
#elif 201103L < VULKAN_HPP_CPLUSPLUS
|
||||
# define VULKAN_HPP_CPP_VERSION 14
|
||||
#elif 199711L < VULKAN_HPP_CPLUSPLUS
|
||||
# define VULKAN_HPP_CPP_VERSION 11
|
||||
#else
|
||||
# error "vulkansc.hpp needs at least c++ standard version 11"
|
||||
#endif
|
||||
|
||||
// include headers holding feature-test macros
|
||||
#if 20 <= VULKAN_HPP_CPP_VERSION
|
||||
# include <version>
|
||||
#else
|
||||
# include <ciso646>
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_HPP_DISABLE_ENHANCED_MODE )
|
||||
# if !defined( VULKAN_HPP_NO_SMART_HANDLE )
|
||||
# define VULKAN_HPP_NO_SMART_HANDLE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_HPP_NO_CONSTRUCTORS )
|
||||
# if !defined( VULKAN_HPP_NO_STRUCT_CONSTRUCTORS )
|
||||
# define VULKAN_HPP_NO_STRUCT_CONSTRUCTORS
|
||||
# endif
|
||||
# if !defined( VULKAN_HPP_NO_UNION_CONSTRUCTORS )
|
||||
# define VULKAN_HPP_NO_UNION_CONSTRUCTORS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_HPP_NO_SETTERS )
|
||||
# if !defined( VULKAN_HPP_NO_STRUCT_SETTERS )
|
||||
# define VULKAN_HPP_NO_STRUCT_SETTERS
|
||||
# endif
|
||||
# if !defined( VULKAN_HPP_NO_UNION_SETTERS )
|
||||
# define VULKAN_HPP_NO_UNION_SETTERS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined( VULKAN_HPP_ASSERT )
|
||||
# define VULKAN_HPP_ASSERT assert
|
||||
#endif
|
||||
|
||||
#if !defined( VULKAN_HPP_ASSERT_ON_RESULT )
|
||||
# define VULKAN_HPP_ASSERT_ON_RESULT VULKAN_HPP_ASSERT
|
||||
#endif
|
||||
|
||||
#if !defined( VULKAN_HPP_STATIC_ASSERT )
|
||||
# define VULKAN_HPP_STATIC_ASSERT static_assert
|
||||
#endif
|
||||
|
||||
#if !defined( VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL )
|
||||
# define VULKAN_HPP_ENABLE_DYNAMIC_LOADER_TOOL 1
|
||||
#endif
|
||||
|
||||
#if !defined( __has_include )
|
||||
# define __has_include( x ) false
|
||||
#endif
|
||||
|
||||
#if ( 201907 <= __cpp_lib_three_way_comparison ) && __has_include( <compare> ) && !defined( VULKAN_HPP_NO_SPACESHIP_OPERATOR )
|
||||
# define VULKAN_HPP_HAS_SPACESHIP_OPERATOR
|
||||
#endif
|
||||
|
||||
#if ( 201803 <= __cpp_lib_span )
|
||||
# define VULKAN_HPP_SUPPORT_SPAN
|
||||
#endif
|
||||
|
||||
#if defined( __cpp_lib_modules ) && !defined( VULKAN_HPP_STD_MODULE ) && defined( VULKAN_HPP_ENABLE_STD_MODULE )
|
||||
# define VULKAN_HPP_STD_MODULE std.compat
|
||||
#endif
|
||||
|
||||
#ifndef VK_USE_64_BIT_PTR_DEFINES
|
||||
# if defined( __LP64__ ) || defined( _WIN64 ) || ( defined( __x86_64__ ) && !defined( __ILP32__ ) ) || defined( _M_X64 ) || defined( __ia64 ) || \
|
||||
defined( _M_IA64 ) || defined( __aarch64__ ) || defined( __powerpc64__ ) || ( defined( __riscv ) && __riscv_xlen == 64 )
|
||||
# define VK_USE_64_BIT_PTR_DEFINES 1
|
||||
# else
|
||||
# define VK_USE_64_BIT_PTR_DEFINES 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// 32-bit vulkan is not typesafe for non-dispatchable handles, so don't allow copy constructors on this platform by default.
|
||||
// To enable this feature on 32-bit platforms please #define VULKAN_HPP_TYPESAFE_CONVERSION 1
|
||||
// To disable this feature on 64-bit platforms please #define VULKAN_HPP_TYPESAFE_CONVERSION 0
|
||||
#if ( VK_USE_64_BIT_PTR_DEFINES == 1 )
|
||||
# if !defined( VULKAN_HPP_TYPESAFE_CONVERSION )
|
||||
# define VULKAN_HPP_TYPESAFE_CONVERSION 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined( __GNUC__ )
|
||||
# define GCC_VERSION ( __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ )
|
||||
#endif
|
||||
|
||||
#if !defined( VULKAN_HPP_HAS_UNRESTRICTED_UNIONS )
|
||||
# if defined( __clang__ )
|
||||
# if __has_feature( cxx_unrestricted_unions )
|
||||
# define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
|
||||
# endif
|
||||
# elif defined( __GNUC__ )
|
||||
# if 40600 <= GCC_VERSION
|
||||
# define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
|
||||
# endif
|
||||
# elif defined( _MSC_VER )
|
||||
# if 1900 <= _MSC_VER
|
||||
# define VULKAN_HPP_HAS_UNRESTRICTED_UNIONS
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined( VULKAN_HPP_INLINE )
|
||||
# if defined( __clang__ )
|
||||
# if __has_attribute( always_inline )
|
||||
# define VULKAN_HPP_INLINE __attribute__( ( always_inline ) ) __inline__
|
||||
# else
|
||||
# define VULKAN_HPP_INLINE inline
|
||||
# endif
|
||||
# elif defined( __GNUC__ )
|
||||
# define VULKAN_HPP_INLINE __attribute__( ( always_inline ) ) __inline__
|
||||
# elif defined( _MSC_VER )
|
||||
# define VULKAN_HPP_INLINE inline
|
||||
# else
|
||||
# define VULKAN_HPP_INLINE inline
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if ( VULKAN_HPP_TYPESAFE_CONVERSION == 1 )
|
||||
# define VULKAN_HPP_TYPESAFE_EXPLICIT
|
||||
#else
|
||||
# define VULKAN_HPP_TYPESAFE_EXPLICIT explicit
|
||||
#endif
|
||||
|
||||
#if defined( __cpp_constexpr )
|
||||
# define VULKAN_HPP_CONSTEXPR constexpr
|
||||
# if 201304 <= __cpp_constexpr
|
||||
# define VULKAN_HPP_CONSTEXPR_14 constexpr
|
||||
# else
|
||||
# define VULKAN_HPP_CONSTEXPR_14
|
||||
# endif
|
||||
# if ( 201907 <= __cpp_constexpr ) && ( !defined( __GNUC__ ) || ( 110400 < GCC_VERSION ) )
|
||||
# define VULKAN_HPP_CONSTEXPR_20 constexpr
|
||||
# else
|
||||
# define VULKAN_HPP_CONSTEXPR_20
|
||||
# endif
|
||||
# define VULKAN_HPP_CONST_OR_CONSTEXPR constexpr
|
||||
#else
|
||||
# define VULKAN_HPP_CONSTEXPR
|
||||
# define VULKAN_HPP_CONSTEXPR_14
|
||||
# define VULKAN_HPP_CONST_OR_CONSTEXPR const
|
||||
#endif
|
||||
|
||||
#if !defined( VULKAN_HPP_CONSTEXPR_INLINE )
|
||||
# if 201606L <= __cpp_inline_variables
|
||||
# define VULKAN_HPP_CONSTEXPR_INLINE VULKAN_HPP_CONSTEXPR inline
|
||||
# else
|
||||
# define VULKAN_HPP_CONSTEXPR_INLINE VULKAN_HPP_CONSTEXPR
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined( VULKAN_HPP_NOEXCEPT )
|
||||
# if defined( _MSC_VER ) && ( _MSC_VER <= 1800 )
|
||||
# define VULKAN_HPP_NOEXCEPT
|
||||
# else
|
||||
# define VULKAN_HPP_NOEXCEPT noexcept
|
||||
# define VULKAN_HPP_HAS_NOEXCEPT 1
|
||||
# if defined( VULKAN_HPP_NO_EXCEPTIONS )
|
||||
# define VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS noexcept
|
||||
# else
|
||||
# define VULKAN_HPP_NOEXCEPT_WHEN_NO_EXCEPTIONS
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if 14 <= VULKAN_HPP_CPP_VERSION
|
||||
# define VULKAN_HPP_DEPRECATED( msg ) [[deprecated( msg )]]
|
||||
#else
|
||||
# define VULKAN_HPP_DEPRECATED( msg )
|
||||
#endif
|
||||
|
||||
#if 17 <= VULKAN_HPP_CPP_VERSION
|
||||
# define VULKAN_HPP_DEPRECATED_17( msg ) [[deprecated( msg )]]
|
||||
#else
|
||||
# define VULKAN_HPP_DEPRECATED_17( msg )
|
||||
#endif
|
||||
|
||||
#if ( 17 <= VULKAN_HPP_CPP_VERSION ) && !defined( VULKAN_HPP_NO_NODISCARD_WARNINGS )
|
||||
# define VULKAN_HPP_NODISCARD [[nodiscard]]
|
||||
# if defined( VULKAN_HPP_NO_EXCEPTIONS )
|
||||
# define VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS [[nodiscard]]
|
||||
# else
|
||||
# define VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS
|
||||
# endif
|
||||
#else
|
||||
# define VULKAN_HPP_NODISCARD
|
||||
# define VULKAN_HPP_NODISCARD_WHEN_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
#if !defined( VULKAN_HPP_NAMESPACE )
|
||||
# define VULKAN_HPP_NAMESPACE vk
|
||||
#endif
|
||||
|
||||
#define VULKAN_HPP_STRINGIFY2( text ) #text
|
||||
#define VULKAN_HPP_STRINGIFY( text ) VULKAN_HPP_STRINGIFY2( text )
|
||||
#define VULKAN_HPP_NAMESPACE_STRING VULKAN_HPP_STRINGIFY( VULKAN_HPP_NAMESPACE )
|
||||
|
||||
#if !defined( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC )
|
||||
# if defined( VK_NO_PROTOTYPES )
|
||||
# define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1
|
||||
# else
|
||||
# define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined( VULKAN_HPP_STORAGE_API )
|
||||
# if defined( VULKAN_HPP_STORAGE_SHARED )
|
||||
# if defined( _MSC_VER )
|
||||
# if defined( VULKAN_HPP_STORAGE_SHARED_EXPORT )
|
||||
# define VULKAN_HPP_STORAGE_API __declspec( dllexport )
|
||||
# else
|
||||
# define VULKAN_HPP_STORAGE_API __declspec( dllimport )
|
||||
# endif
|
||||
# elif defined( __clang__ ) || defined( __GNUC__ )
|
||||
# if defined( VULKAN_HPP_STORAGE_SHARED_EXPORT )
|
||||
# define VULKAN_HPP_STORAGE_API __attribute__( ( visibility( "default" ) ) )
|
||||
# else
|
||||
# define VULKAN_HPP_STORAGE_API
|
||||
# endif
|
||||
# else
|
||||
# define VULKAN_HPP_STORAGE_API
|
||||
# pragma warning Unknown import / export semantics
|
||||
# endif
|
||||
# else
|
||||
# define VULKAN_HPP_STORAGE_API
|
||||
# endif
|
||||
#endif
|
||||
|
||||
namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
class DispatchLoaderDynamic;
|
||||
|
||||
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER )
|
||||
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
|
||||
extern VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic;
|
||||
# endif
|
||||
#endif
|
||||
} // namespace detail
|
||||
} // namespace VULKAN_HPP_NAMESPACE
|
||||
|
||||
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER )
|
||||
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
|
||||
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::detail::defaultDispatchLoaderDynamic
|
||||
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE \
|
||||
namespace VULKAN_HPP_NAMESPACE \
|
||||
{ \
|
||||
namespace detail \
|
||||
{ \
|
||||
VULKAN_HPP_STORAGE_API DispatchLoaderDynamic defaultDispatchLoaderDynamic; \
|
||||
} \
|
||||
}
|
||||
# else
|
||||
# define VULKAN_HPP_DEFAULT_DISPATCHER ::VULKAN_HPP_NAMESPACE::detail::getDispatchLoaderStatic()
|
||||
# define VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined( VULKAN_HPP_DEFAULT_DISPATCHER_TYPE )
|
||||
# if VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1
|
||||
# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderDynamic
|
||||
# else
|
||||
# define VULKAN_HPP_DEFAULT_DISPATCHER_TYPE ::VULKAN_HPP_NAMESPACE::detail::DispatchLoaderStatic
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_HPP_NO_DEFAULT_DISPATCHER )
|
||||
# define VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT
|
||||
# define VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT
|
||||
# define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT
|
||||
#else
|
||||
# define VULKAN_HPP_DEFAULT_ARGUMENT_ASSIGNMENT = {}
|
||||
# define VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT = nullptr
|
||||
# define VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT = VULKAN_HPP_DEFAULT_DISPATCHER
|
||||
#endif
|
||||
|
||||
#if !defined( VULKAN_HPP_EXPECTED ) && ( 23 <= VULKAN_HPP_CPP_VERSION ) && defined( __cpp_lib_expected )
|
||||
# if !( defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) )
|
||||
# include <expected>
|
||||
# endif
|
||||
# define VULKAN_HPP_EXPECTED std::expected
|
||||
# define VULKAN_HPP_UNEXPECTED std::unexpected
|
||||
#endif
|
||||
|
||||
#if !defined( VULKAN_HPP_RAII_NAMESPACE )
|
||||
# define VULKAN_HPP_RAII_NAMESPACE raii
|
||||
#endif
|
||||
|
||||
#if defined( VULKAN_HPP_NO_EXCEPTIONS ) && defined( VULKAN_HPP_EXPECTED )
|
||||
# define VULKAN_HPP_RAII_NO_EXCEPTIONS
|
||||
# define VULKAN_HPP_RAII_CREATE_NOEXCEPT noexcept
|
||||
#else
|
||||
# define VULKAN_HPP_RAII_CREATE_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#endif
|
||||
11519
vulkan/vulkansc_raii.hpp
11519
vulkan/vulkansc_raii.hpp
File diff suppressed because it is too large
Load Diff
|
|
@ -1,984 +0,0 @@
|
|||
// Copyright 2015-2024 The Khronos Group Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
//
|
||||
|
||||
// This header is generated from the Khronos Vulkan XML API Registry.
|
||||
|
||||
#ifndef VULKAN_SHARED_HPP
|
||||
#define VULKAN_SHARED_HPP
|
||||
|
||||
#include <vulkan/vulkansc.hpp>
|
||||
|
||||
#if !( defined( VULKAN_HPP_ENABLE_STD_MODULE ) && defined( VULKAN_HPP_STD_MODULE ) )
|
||||
# include <atomic> // std::atomic_size_t
|
||||
#endif
|
||||
|
||||
namespace VULKAN_HPP_NAMESPACE
|
||||
{
|
||||
#if !defined( VULKAN_HPP_NO_SMART_HANDLE )
|
||||
|
||||
template <typename HandleType>
|
||||
class SharedHandleTraits;
|
||||
|
||||
class NoDestructor
|
||||
{
|
||||
};
|
||||
|
||||
template <typename HandleType, typename = void>
|
||||
struct HasDestructorType : std::false_type
|
||||
{
|
||||
};
|
||||
|
||||
template <typename HandleType>
|
||||
struct HasDestructorType<HandleType, decltype( (void)typename SharedHandleTraits<HandleType>::DestructorType() )> : std::true_type
|
||||
{
|
||||
};
|
||||
|
||||
template <typename HandleType, typename Enable = void>
|
||||
struct GetDestructorType
|
||||
{
|
||||
using type = NoDestructor;
|
||||
};
|
||||
|
||||
template <typename HandleType>
|
||||
struct GetDestructorType<HandleType, typename std::enable_if<HasDestructorType<HandleType>::value>::type>
|
||||
{
|
||||
using type = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
};
|
||||
|
||||
template <class HandleType>
|
||||
using DestructorTypeOf = typename GetDestructorType<HandleType>::type;
|
||||
|
||||
template <class HandleType>
|
||||
struct HasDestructor : std::integral_constant<bool, !std::is_same<DestructorTypeOf<HandleType>, NoDestructor>::value>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename HandleType, typename = void>
|
||||
struct HasPoolType : std::false_type
|
||||
{
|
||||
};
|
||||
|
||||
template <typename HandleType>
|
||||
struct HasPoolType<HandleType, decltype( (void)typename SharedHandleTraits<HandleType>::deleter::PoolTypeExport() )> : std::true_type
|
||||
{
|
||||
};
|
||||
|
||||
template <typename HandleType, typename Enable = void>
|
||||
struct GetPoolType
|
||||
{
|
||||
using type = NoDestructor;
|
||||
};
|
||||
|
||||
template <typename HandleType>
|
||||
struct GetPoolType<HandleType, typename std::enable_if<HasPoolType<HandleType>::value>::type>
|
||||
{
|
||||
using type = typename SharedHandleTraits<HandleType>::deleter::PoolTypeExport;
|
||||
};
|
||||
|
||||
//=====================================================================================================================
|
||||
|
||||
template <typename HandleType>
|
||||
class SharedHandle;
|
||||
|
||||
template <typename DestructorType, typename Deleter>
|
||||
struct SharedHeader
|
||||
{
|
||||
SharedHeader( SharedHandle<DestructorType> parent, Deleter deleter = Deleter() ) VULKAN_HPP_NOEXCEPT
|
||||
: parent( std::move( parent ) )
|
||||
, deleter( std::move( deleter ) )
|
||||
{
|
||||
}
|
||||
|
||||
SharedHandle<DestructorType> parent;
|
||||
Deleter deleter;
|
||||
};
|
||||
|
||||
template <typename Deleter>
|
||||
struct SharedHeader<NoDestructor, Deleter>
|
||||
{
|
||||
SharedHeader( Deleter deleter = Deleter() ) VULKAN_HPP_NOEXCEPT : deleter( std::move( deleter ) ) {}
|
||||
|
||||
Deleter deleter;
|
||||
};
|
||||
|
||||
//=====================================================================================================================
|
||||
|
||||
template <typename HeaderType>
|
||||
class ReferenceCounter
|
||||
{
|
||||
public:
|
||||
template <typename... Args>
|
||||
ReferenceCounter( Args &&... control_args ) : m_header( std::forward<Args>( control_args )... )
|
||||
{
|
||||
}
|
||||
|
||||
ReferenceCounter( const ReferenceCounter & ) = delete;
|
||||
ReferenceCounter & operator=( const ReferenceCounter & ) = delete;
|
||||
|
||||
public:
|
||||
size_t addRef() VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
// Relaxed memory order is sufficient since this does not impose any ordering on other operations
|
||||
return m_ref_cnt.fetch_add( 1, std::memory_order_relaxed );
|
||||
}
|
||||
|
||||
size_t release() VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
// A release memory order to ensure that all releases are ordered
|
||||
return m_ref_cnt.fetch_sub( 1, std::memory_order_release );
|
||||
}
|
||||
|
||||
public:
|
||||
std::atomic_size_t m_ref_cnt{ 1 };
|
||||
HeaderType m_header{};
|
||||
};
|
||||
|
||||
//=====================================================================================================================
|
||||
|
||||
template <typename HandleType, typename HeaderType, typename ForwardType = SharedHandle<HandleType>>
|
||||
class SharedHandleBase
|
||||
{
|
||||
public:
|
||||
SharedHandleBase() = default;
|
||||
|
||||
template <typename... Args>
|
||||
SharedHandleBase( HandleType handle, Args &&... control_args )
|
||||
: m_control( new ReferenceCounter<HeaderType>( std::forward<Args>( control_args )... ) ), m_handle( handle )
|
||||
{
|
||||
}
|
||||
|
||||
SharedHandleBase( const SharedHandleBase & o ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
o.addRef();
|
||||
m_handle = o.m_handle;
|
||||
m_control = o.m_control;
|
||||
}
|
||||
|
||||
SharedHandleBase( SharedHandleBase && o ) VULKAN_HPP_NOEXCEPT
|
||||
: m_control( o.m_control )
|
||||
, m_handle( o.m_handle )
|
||||
{
|
||||
o.m_handle = nullptr;
|
||||
o.m_control = nullptr;
|
||||
}
|
||||
|
||||
SharedHandleBase & operator=( const SharedHandleBase & o ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
SharedHandleBase( o ).swap( *this );
|
||||
return *this;
|
||||
}
|
||||
|
||||
SharedHandleBase & operator=( SharedHandleBase && o ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
SharedHandleBase( std::move( o ) ).swap( *this );
|
||||
return *this;
|
||||
}
|
||||
|
||||
~SharedHandleBase()
|
||||
{
|
||||
// only this function owns the last reference to the control block
|
||||
// the same principle is used in the default deleter of std::shared_ptr
|
||||
if ( m_control && ( m_control->release() == 1 ) )
|
||||
{
|
||||
// noop in x86, but does thread synchronization in ARM
|
||||
// it is required to ensure that last thread is getting to destroy the control block
|
||||
// by ordering all atomic operations before this fence
|
||||
std::atomic_thread_fence( std::memory_order_acquire );
|
||||
ForwardType::internalDestroy( getHeader(), m_handle );
|
||||
delete m_control;
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
HandleType get() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return m_handle;
|
||||
}
|
||||
|
||||
HandleType operator*() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return m_handle;
|
||||
}
|
||||
|
||||
explicit operator bool() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return bool( m_handle );
|
||||
}
|
||||
|
||||
# if defined( VULKAN_HPP_SMART_HANDLE_IMPLICIT_CAST )
|
||||
operator HandleType() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return m_handle;
|
||||
}
|
||||
# endif
|
||||
|
||||
const HandleType * operator->() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return &m_handle;
|
||||
}
|
||||
|
||||
HandleType * operator->() VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return &m_handle;
|
||||
}
|
||||
|
||||
void reset() VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
SharedHandleBase().swap( *this );
|
||||
}
|
||||
|
||||
void swap( SharedHandleBase & o ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
std::swap( m_handle, o.m_handle );
|
||||
std::swap( m_control, o.m_control );
|
||||
}
|
||||
|
||||
template <typename T = HandleType>
|
||||
typename std::enable_if<HasDestructor<T>::value, const SharedHandle<DestructorTypeOf<HandleType>> &>::type getDestructorType() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return getHeader().parent;
|
||||
}
|
||||
|
||||
protected:
|
||||
template <typename T = HandleType>
|
||||
static typename std::enable_if<!HasDestructor<T>::value, void>::type internalDestroy( const HeaderType & control, HandleType handle ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
control.deleter.destroy( handle );
|
||||
}
|
||||
|
||||
template <typename T = HandleType>
|
||||
static typename std::enable_if<HasDestructor<T>::value, void>::type internalDestroy( const HeaderType & control, HandleType handle ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
control.deleter.destroy( control.parent.get(), handle );
|
||||
}
|
||||
|
||||
const HeaderType & getHeader() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return m_control->m_header;
|
||||
}
|
||||
|
||||
private:
|
||||
void addRef() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
if ( m_control )
|
||||
m_control->addRef();
|
||||
}
|
||||
|
||||
protected:
|
||||
ReferenceCounter<HeaderType> * m_control = nullptr;
|
||||
HandleType m_handle{};
|
||||
};
|
||||
|
||||
template <typename HandleType>
|
||||
class SharedHandle : public SharedHandleBase<HandleType, SharedHeader<DestructorTypeOf<HandleType>, typename SharedHandleTraits<HandleType>::deleter>>
|
||||
{
|
||||
private:
|
||||
using BaseType = SharedHandleBase<HandleType, SharedHeader<DestructorTypeOf<HandleType>, typename SharedHandleTraits<HandleType>::deleter>>;
|
||||
using DeleterType = typename SharedHandleTraits<HandleType>::deleter;
|
||||
friend BaseType;
|
||||
|
||||
public:
|
||||
SharedHandle() = default;
|
||||
|
||||
template <typename T = HandleType, typename = typename std::enable_if<HasDestructor<T>::value && !HasPoolType<T>::value>::type>
|
||||
explicit SharedHandle( HandleType handle, SharedHandle<DestructorTypeOf<HandleType>> parent, DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT
|
||||
: BaseType( handle, std::move( parent ), std::move( deleter ) )
|
||||
{
|
||||
}
|
||||
|
||||
template <typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE,
|
||||
typename T = HandleType,
|
||||
typename = typename std::enable_if<HasDestructor<T>::value && HasPoolType<T>::value>::type>
|
||||
explicit SharedHandle( HandleType handle,
|
||||
SharedHandle<DestructorTypeOf<HandleType>> parent,
|
||||
SharedHandle<typename GetPoolType<HandleType>::type> pool,
|
||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT ) VULKAN_HPP_NOEXCEPT
|
||||
: BaseType( handle, std::move( parent ), DeleterType{ std::move( pool ), dispatch } )
|
||||
{
|
||||
}
|
||||
|
||||
template <typename T = HandleType, typename = typename std::enable_if<!HasDestructor<T>::value>::type>
|
||||
explicit SharedHandle( HandleType handle, DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT : BaseType( handle, std::move( deleter ) )
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
using BaseType::internalDestroy;
|
||||
};
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
// Silence the function cast warnings.
|
||||
# if defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __INTEL_COMPILER )
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wcast-function-type"
|
||||
# endif
|
||||
|
||||
template <typename HandleType>
|
||||
class ObjectDestroyShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType =
|
||||
typename std::conditional<HasDestructor<HandleType>::value,
|
||||
void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const,
|
||||
void ( HandleType::* )( const AllocationCallbacks *, const Dispatcher & ) const>::type;
|
||||
|
||||
using SelectorType = typename std::conditional<HasDestructor<HandleType>::value, DestructorType, HandleType>::type;
|
||||
|
||||
template <typename Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
ObjectDestroyShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &SelectorType::destroy ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
template <typename T = HandleType>
|
||||
typename std::enable_if<HasDestructor<T>::value, void>::type destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
|
||||
( parent.*m_destroy )( handle, m_allocationCallbacks, *m_dispatch );
|
||||
}
|
||||
|
||||
template <typename T = HandleType>
|
||||
typename std::enable_if<!HasDestructor<T>::value, void>::type destroy( HandleType handle ) const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
|
||||
( handle.*m_destroy )( m_allocationCallbacks, *m_dispatch );
|
||||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
};
|
||||
|
||||
template <typename HandleType>
|
||||
class ObjectFreeShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const AllocationCallbacks *, const Dispatcher & ) const;
|
||||
|
||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
ObjectFreeShared( Optional<const AllocationCallbacks> allocationCallbacks VULKAN_HPP_DEFAULT_ARGUMENT_NULLPTR_ASSIGNMENT,
|
||||
const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
, m_allocationCallbacks( allocationCallbacks )
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
void destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
|
||||
( parent.*m_destroy )( handle, m_allocationCallbacks, *m_dispatch );
|
||||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
Optional<const AllocationCallbacks> m_allocationCallbacks = nullptr;
|
||||
};
|
||||
|
||||
template <typename HandleType>
|
||||
class ObjectReleaseShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType = void ( DestructorType::* )( HandleType, const Dispatcher & ) const;
|
||||
|
||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
ObjectReleaseShared( const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::release ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
void destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
VULKAN_HPP_ASSERT( m_destroy && m_dispatch );
|
||||
( parent.*m_destroy )( handle, *m_dispatch );
|
||||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
};
|
||||
|
||||
template <typename HandleType, typename PoolType>
|
||||
class PoolFreeShared
|
||||
{
|
||||
public:
|
||||
using DestructorType = typename SharedHandleTraits<HandleType>::DestructorType;
|
||||
|
||||
using PoolTypeExport = PoolType;
|
||||
|
||||
template <class Dispatcher>
|
||||
using ReturnType = decltype( std::declval<DestructorType>().free( PoolType(), 0u, nullptr, Dispatcher() ) );
|
||||
|
||||
template <class Dispatcher>
|
||||
using DestroyFunctionPointerType = ReturnType<Dispatcher> ( DestructorType::* )( PoolType, uint32_t, const HandleType *, const Dispatcher & ) const;
|
||||
|
||||
PoolFreeShared() = default;
|
||||
|
||||
template <class Dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER_TYPE>
|
||||
PoolFreeShared( SharedHandle<PoolType> pool, const Dispatcher & dispatch VULKAN_HPP_DEFAULT_DISPATCHER_ASSIGNMENT )
|
||||
: m_destroy( reinterpret_cast<decltype( m_destroy )>( static_cast<DestroyFunctionPointerType<Dispatcher>>( &DestructorType::free ) ) )
|
||||
, m_dispatch( &dispatch )
|
||||
, m_pool( std::move( pool ) )
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
void destroy( DestructorType parent, HandleType handle ) const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
VULKAN_HPP_ASSERT( m_destroy && m_dispatch && m_pool );
|
||||
( parent.*m_destroy )( m_pool.get(), 1u, &handle, *m_dispatch );
|
||||
}
|
||||
|
||||
private:
|
||||
DestroyFunctionPointerType<detail::DispatchLoaderBase> m_destroy = nullptr;
|
||||
const detail::DispatchLoaderBase * m_dispatch = nullptr;
|
||||
SharedHandle<PoolType> m_pool{};
|
||||
};
|
||||
|
||||
# if defined( __GNUC__ ) && !defined( __clang__ ) && !defined( __INTEL_COMPILER )
|
||||
# pragma GCC diagnostic pop
|
||||
# endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
//======================
|
||||
//=== SHARED HANDLEs ===
|
||||
//======================
|
||||
|
||||
//=== VK_VERSION_1_0 ===
|
||||
template <>
|
||||
class SharedHandleTraits<Instance>
|
||||
{
|
||||
public:
|
||||
using DestructorType = NoDestructor;
|
||||
using deleter = detail::ObjectDestroyShared<Instance>;
|
||||
};
|
||||
|
||||
using SharedInstance = SharedHandle<Instance>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<Device>
|
||||
{
|
||||
public:
|
||||
using DestructorType = NoDestructor;
|
||||
using deleter = detail::ObjectDestroyShared<Device>;
|
||||
};
|
||||
|
||||
using SharedDevice = SharedHandle<Device>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<Fence>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<Fence>;
|
||||
};
|
||||
|
||||
using SharedFence = SharedHandle<Fence>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<Semaphore>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<Semaphore>;
|
||||
};
|
||||
|
||||
using SharedSemaphore = SharedHandle<Semaphore>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<Event>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<Event>;
|
||||
};
|
||||
|
||||
using SharedEvent = SharedHandle<Event>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<Buffer>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<Buffer>;
|
||||
};
|
||||
|
||||
using SharedBuffer = SharedHandle<Buffer>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<BufferView>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<BufferView>;
|
||||
};
|
||||
|
||||
using SharedBufferView = SharedHandle<BufferView>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<Image>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<Image>;
|
||||
};
|
||||
|
||||
using SharedImage = SharedHandle<Image>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<ImageView>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<ImageView>;
|
||||
};
|
||||
|
||||
using SharedImageView = SharedHandle<ImageView>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<PipelineCache>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<PipelineCache>;
|
||||
};
|
||||
|
||||
using SharedPipelineCache = SharedHandle<PipelineCache>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<Pipeline>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<Pipeline>;
|
||||
};
|
||||
|
||||
using SharedPipeline = SharedHandle<Pipeline>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<PipelineLayout>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<PipelineLayout>;
|
||||
};
|
||||
|
||||
using SharedPipelineLayout = SharedHandle<PipelineLayout>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<Sampler>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<Sampler>;
|
||||
};
|
||||
|
||||
using SharedSampler = SharedHandle<Sampler>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<DescriptorSet>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::PoolFreeShared<DescriptorSet, DescriptorPool>;
|
||||
};
|
||||
|
||||
using SharedDescriptorSet = SharedHandle<DescriptorSet>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<DescriptorSetLayout>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<DescriptorSetLayout>;
|
||||
};
|
||||
|
||||
using SharedDescriptorSetLayout = SharedHandle<DescriptorSetLayout>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<Framebuffer>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<Framebuffer>;
|
||||
};
|
||||
|
||||
using SharedFramebuffer = SharedHandle<Framebuffer>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<RenderPass>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<RenderPass>;
|
||||
};
|
||||
|
||||
using SharedRenderPass = SharedHandle<RenderPass>;
|
||||
|
||||
template <>
|
||||
class SharedHandleTraits<CommandBuffer>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::PoolFreeShared<CommandBuffer, CommandPool>;
|
||||
};
|
||||
|
||||
using SharedCommandBuffer = SharedHandle<CommandBuffer>;
|
||||
|
||||
//=== VK_VERSION_1_1 ===
|
||||
template <>
|
||||
class SharedHandleTraits<SamplerYcbcrConversion>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<SamplerYcbcrConversion>;
|
||||
};
|
||||
|
||||
using SharedSamplerYcbcrConversion = SharedHandle<SamplerYcbcrConversion>;
|
||||
using SharedSamplerYcbcrConversionKHR = SharedHandle<SamplerYcbcrConversion>;
|
||||
|
||||
//=== VK_VERSION_1_3 ===
|
||||
template <>
|
||||
class SharedHandleTraits<PrivateDataSlot>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Device;
|
||||
using deleter = detail::ObjectDestroyShared<PrivateDataSlot>;
|
||||
};
|
||||
|
||||
using SharedPrivateDataSlot = SharedHandle<PrivateDataSlot>;
|
||||
using SharedPrivateDataSlotEXT = SharedHandle<PrivateDataSlot>;
|
||||
|
||||
//=== VK_KHR_surface ===
|
||||
template <>
|
||||
class SharedHandleTraits<SurfaceKHR>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Instance;
|
||||
using deleter = detail::ObjectDestroyShared<SurfaceKHR>;
|
||||
};
|
||||
|
||||
using SharedSurfaceKHR = SharedHandle<SurfaceKHR>;
|
||||
|
||||
//=== VK_KHR_display ===
|
||||
template <>
|
||||
class SharedHandleTraits<DisplayKHR>
|
||||
{
|
||||
public:
|
||||
using DestructorType = PhysicalDevice;
|
||||
using deleter = detail::ObjectDestroyShared<DisplayKHR>;
|
||||
};
|
||||
|
||||
using SharedDisplayKHR = SharedHandle<DisplayKHR>;
|
||||
|
||||
//=== VK_EXT_debug_utils ===
|
||||
template <>
|
||||
class SharedHandleTraits<DebugUtilsMessengerEXT>
|
||||
{
|
||||
public:
|
||||
using DestructorType = Instance;
|
||||
using deleter = detail::ObjectDestroyShared<DebugUtilsMessengerEXT>;
|
||||
};
|
||||
|
||||
using SharedDebugUtilsMessengerEXT = SharedHandle<DebugUtilsMessengerEXT>;
|
||||
|
||||
enum class SwapchainOwns
|
||||
{
|
||||
no,
|
||||
yes,
|
||||
};
|
||||
|
||||
struct ImageHeader : SharedHeader<DestructorTypeOf<VULKAN_HPP_NAMESPACE::Image>, typename SharedHandleTraits<VULKAN_HPP_NAMESPACE::Image>::deleter>
|
||||
{
|
||||
ImageHeader(
|
||||
SharedHandle<DestructorTypeOf<VULKAN_HPP_NAMESPACE::Image>> parent,
|
||||
typename SharedHandleTraits<VULKAN_HPP_NAMESPACE::Image>::deleter deleter = typename SharedHandleTraits<VULKAN_HPP_NAMESPACE::Image>::deleter(),
|
||||
SwapchainOwns swapchainOwned = SwapchainOwns::no ) VULKAN_HPP_NOEXCEPT
|
||||
: SharedHeader<DestructorTypeOf<VULKAN_HPP_NAMESPACE::Image>, typename SharedHandleTraits<VULKAN_HPP_NAMESPACE::Image>::deleter>( std::move( parent ),
|
||||
std::move( deleter ) )
|
||||
, swapchainOwned( swapchainOwned )
|
||||
{
|
||||
}
|
||||
|
||||
SwapchainOwns swapchainOwned = SwapchainOwns::no;
|
||||
};
|
||||
|
||||
template <>
|
||||
class SharedHandle<VULKAN_HPP_NAMESPACE::Image> : public SharedHandleBase<VULKAN_HPP_NAMESPACE::Image, ImageHeader>
|
||||
{
|
||||
using BaseType = SharedHandleBase<VULKAN_HPP_NAMESPACE::Image, ImageHeader>;
|
||||
using DeleterType = typename SharedHandleTraits<VULKAN_HPP_NAMESPACE::Image>::deleter;
|
||||
friend BaseType;
|
||||
|
||||
public:
|
||||
SharedHandle() = default;
|
||||
|
||||
explicit SharedHandle( VULKAN_HPP_NAMESPACE::Image handle,
|
||||
SharedHandle<DestructorTypeOf<VULKAN_HPP_NAMESPACE::Image>> parent,
|
||||
SwapchainOwns swapchain_owned = SwapchainOwns::no,
|
||||
DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT
|
||||
: BaseType( handle, std::move( parent ), std::move( deleter ), swapchain_owned )
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
static void internalDestroy( const ImageHeader & control, VULKAN_HPP_NAMESPACE::Image handle ) VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
if ( control.swapchainOwned == SwapchainOwns::no )
|
||||
{
|
||||
control.deleter.destroy( control.parent.get(), handle );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct SwapchainHeader
|
||||
{
|
||||
SwapchainHeader( SharedHandle<VULKAN_HPP_NAMESPACE::SurfaceKHR> surface,
|
||||
SharedHandle<DestructorTypeOf<VULKAN_HPP_NAMESPACE::SwapchainKHR>> parent,
|
||||
typename SharedHandleTraits<VULKAN_HPP_NAMESPACE::SwapchainKHR>::deleter deleter =
|
||||
typename SharedHandleTraits<VULKAN_HPP_NAMESPACE::SwapchainKHR>::deleter() ) VULKAN_HPP_NOEXCEPT
|
||||
: surface( std::move( surface ) )
|
||||
, parent( std::move( parent ) )
|
||||
, deleter( std::move( deleter ) )
|
||||
{
|
||||
}
|
||||
|
||||
SharedHandle<VULKAN_HPP_NAMESPACE::SurfaceKHR> surface{};
|
||||
SharedHandle<DestructorTypeOf<VULKAN_HPP_NAMESPACE::SwapchainKHR>> parent{};
|
||||
typename SharedHandleTraits<VULKAN_HPP_NAMESPACE::SwapchainKHR>::deleter deleter{};
|
||||
};
|
||||
|
||||
template <>
|
||||
class SharedHandle<VULKAN_HPP_NAMESPACE::SwapchainKHR> : public SharedHandleBase<VULKAN_HPP_NAMESPACE::SwapchainKHR, SwapchainHeader>
|
||||
{
|
||||
using BaseType = SharedHandleBase<VULKAN_HPP_NAMESPACE::SwapchainKHR, SwapchainHeader>;
|
||||
using DeleterType = typename SharedHandleTraits<VULKAN_HPP_NAMESPACE::SwapchainKHR>::deleter;
|
||||
friend BaseType;
|
||||
|
||||
public:
|
||||
SharedHandle() = default;
|
||||
|
||||
explicit SharedHandle( VULKAN_HPP_NAMESPACE::SwapchainKHR handle,
|
||||
SharedHandle<DestructorTypeOf<VULKAN_HPP_NAMESPACE::SwapchainKHR>> parent,
|
||||
SharedHandle<VULKAN_HPP_NAMESPACE::SurfaceKHR> surface,
|
||||
DeleterType deleter = DeleterType() ) VULKAN_HPP_NOEXCEPT
|
||||
: BaseType( handle, std::move( surface ), std::move( parent ), std::move( deleter ) )
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
const SharedHandle<VULKAN_HPP_NAMESPACE::SurfaceKHR> & getSurface() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return getHeader().surface;
|
||||
}
|
||||
|
||||
protected:
|
||||
using BaseType::internalDestroy;
|
||||
};
|
||||
|
||||
template <typename HandleType, typename DestructorType>
|
||||
class SharedHandleBaseNoDestroy : public SharedHandleBase<HandleType, DestructorType>
|
||||
{
|
||||
public:
|
||||
using SharedHandleBase<HandleType, DestructorType>::SharedHandleBase;
|
||||
|
||||
const DestructorType & getDestructorType() const VULKAN_HPP_NOEXCEPT
|
||||
{
|
||||
return SharedHandleBase<HandleType, DestructorType>::getHeader();
|
||||
}
|
||||
|
||||
protected:
|
||||
static void internalDestroy( const DestructorType &, HandleType ) VULKAN_HPP_NOEXCEPT {}
|
||||
};
|
||||
|
||||
//=== VK_VERSION_1_0 ===
|
||||
|
||||
template <>
|
||||
class SharedHandle<PhysicalDevice> : public SharedHandleBaseNoDestroy<PhysicalDevice, SharedInstance>
|
||||
{
|
||||
friend SharedHandleBase<PhysicalDevice, SharedInstance>;
|
||||
|
||||
public:
|
||||
SharedHandle() = default;
|
||||
|
||||
explicit SharedHandle( PhysicalDevice handle, SharedInstance parent ) noexcept
|
||||
: SharedHandleBaseNoDestroy<PhysicalDevice, SharedInstance>( handle, std::move( parent ) )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
using SharedPhysicalDevice = SharedHandle<PhysicalDevice>;
|
||||
|
||||
template <>
|
||||
class SharedHandle<Queue> : public SharedHandleBaseNoDestroy<Queue, SharedDevice>
|
||||
{
|
||||
friend SharedHandleBase<Queue, SharedDevice>;
|
||||
|
||||
public:
|
||||
SharedHandle() = default;
|
||||
|
||||
explicit SharedHandle( Queue handle, SharedDevice parent ) noexcept : SharedHandleBaseNoDestroy<Queue, SharedDevice>( handle, std::move( parent ) ) {}
|
||||
};
|
||||
|
||||
using SharedQueue = SharedHandle<Queue>;
|
||||
|
||||
template <>
|
||||
class SharedHandle<DeviceMemory> : public SharedHandleBaseNoDestroy<DeviceMemory, SharedDevice>
|
||||
{
|
||||
friend SharedHandleBase<DeviceMemory, SharedDevice>;
|
||||
|
||||
public:
|
||||
SharedHandle() = default;
|
||||
|
||||
explicit SharedHandle( DeviceMemory handle, SharedDevice parent ) noexcept
|
||||
: SharedHandleBaseNoDestroy<DeviceMemory, SharedDevice>( handle, std::move( parent ) )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
using SharedDeviceMemory = SharedHandle<DeviceMemory>;
|
||||
|
||||
template <>
|
||||
class SharedHandle<QueryPool> : public SharedHandleBaseNoDestroy<QueryPool, SharedDevice>
|
||||
{
|
||||
friend SharedHandleBase<QueryPool, SharedDevice>;
|
||||
|
||||
public:
|
||||
SharedHandle() = default;
|
||||
|
||||
explicit SharedHandle( QueryPool handle, SharedDevice parent ) noexcept : SharedHandleBaseNoDestroy<QueryPool, SharedDevice>( handle, std::move( parent ) )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
using SharedQueryPool = SharedHandle<QueryPool>;
|
||||
|
||||
template <>
|
||||
class SharedHandle<ShaderModule> : public SharedHandleBaseNoDestroy<ShaderModule, SharedDevice>
|
||||
{
|
||||
friend SharedHandleBase<ShaderModule, SharedDevice>;
|
||||
|
||||
public:
|
||||
SharedHandle() = default;
|
||||
|
||||
explicit SharedHandle( ShaderModule handle, SharedDevice parent ) noexcept
|
||||
: SharedHandleBaseNoDestroy<ShaderModule, SharedDevice>( handle, std::move( parent ) )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
using SharedShaderModule = SharedHandle<ShaderModule>;
|
||||
|
||||
template <>
|
||||
class SharedHandle<DescriptorPool> : public SharedHandleBaseNoDestroy<DescriptorPool, SharedDevice>
|
||||
{
|
||||
friend SharedHandleBase<DescriptorPool, SharedDevice>;
|
||||
|
||||
public:
|
||||
SharedHandle() = default;
|
||||
|
||||
explicit SharedHandle( DescriptorPool handle, SharedDevice parent ) noexcept
|
||||
: SharedHandleBaseNoDestroy<DescriptorPool, SharedDevice>( handle, std::move( parent ) )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
using SharedDescriptorPool = SharedHandle<DescriptorPool>;
|
||||
|
||||
template <>
|
||||
class SharedHandle<CommandPool> : public SharedHandleBaseNoDestroy<CommandPool, SharedDevice>
|
||||
{
|
||||
friend SharedHandleBase<CommandPool, SharedDevice>;
|
||||
|
||||
public:
|
||||
SharedHandle() = default;
|
||||
|
||||
explicit SharedHandle( CommandPool handle, SharedDevice parent ) noexcept
|
||||
: SharedHandleBaseNoDestroy<CommandPool, SharedDevice>( handle, std::move( parent ) )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
using SharedCommandPool = SharedHandle<CommandPool>;
|
||||
|
||||
//=== VK_KHR_swapchain ===
|
||||
|
||||
template <>
|
||||
class SharedHandle<SwapchainKHR> : public SharedHandleBaseNoDestroy<SwapchainKHR, SharedDevice>
|
||||
{
|
||||
friend SharedHandleBase<SwapchainKHR, SharedDevice>;
|
||||
|
||||
public:
|
||||
SharedHandle() = default;
|
||||
|
||||
explicit SharedHandle( SwapchainKHR handle, SharedDevice parent ) noexcept
|
||||
: SharedHandleBaseNoDestroy<SwapchainKHR, SharedDevice>( handle, std::move( parent ) )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
using SharedSwapchainKHR = SharedHandle<SwapchainKHR>;
|
||||
|
||||
//=== VK_KHR_display ===
|
||||
|
||||
template <>
|
||||
class SharedHandle<DisplayModeKHR> : public SharedHandleBaseNoDestroy<DisplayModeKHR, SharedDisplayKHR>
|
||||
{
|
||||
friend SharedHandleBase<DisplayModeKHR, SharedDisplayKHR>;
|
||||
|
||||
public:
|
||||
SharedHandle() = default;
|
||||
|
||||
explicit SharedHandle( DisplayModeKHR handle, SharedDisplayKHR parent ) noexcept
|
||||
: SharedHandleBaseNoDestroy<DisplayModeKHR, SharedDisplayKHR>( handle, std::move( parent ) )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
using SharedDisplayModeKHR = SharedHandle<DisplayModeKHR>;
|
||||
|
||||
# if defined( VK_USE_PLATFORM_SCI )
|
||||
//=== VK_NV_external_sci_sync2 ===
|
||||
|
||||
template <>
|
||||
class SharedHandle<SemaphoreSciSyncPoolNV> : public SharedHandleBaseNoDestroy<SemaphoreSciSyncPoolNV, SharedDevice>
|
||||
{
|
||||
friend SharedHandleBase<SemaphoreSciSyncPoolNV, SharedDevice>;
|
||||
|
||||
public:
|
||||
SharedHandle() = default;
|
||||
|
||||
explicit SharedHandle( SemaphoreSciSyncPoolNV handle, SharedDevice parent ) noexcept
|
||||
: SharedHandleBaseNoDestroy<SemaphoreSciSyncPoolNV, SharedDevice>( handle, std::move( parent ) )
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
using SharedSemaphoreSciSyncPoolNV = SharedHandle<SemaphoreSciSyncPoolNV>;
|
||||
# endif /*VK_USE_PLATFORM_SCI*/
|
||||
#endif // !VULKAN_HPP_NO_SMART_HANDLE
|
||||
} // namespace VULKAN_HPP_NAMESPACE
|
||||
#endif // VULKAN_SHARED_HPP
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue