mirror of
https://github.com/italicsjenga/portability.git
synced 2024-11-22 15:01:31 +11:00
Merge #221
221: Support VK_KHR_portability_subset r=kvark a=kvark
Our extension IDs were messed up. Good thing to clean them up now, since otherwise nobody would be able to make this work 😅
Also, the test native example is now fully trying to initialize the portability extension and gather the relevant info. Output on my machine:
```
vkEnumerateInstanceExtensionProperties: res=0 count=5
vkEnumeratePhysicalDevices: res=0 count=1
vkEnumerateDeviceExtensionProperties: res=0 count=3
gfxGetPhysicalDeviceProperties2KHR
minVertexInputBindingStrideAlignment = 4
gfxGetPhysicalDeviceFeatures2KHR
events = 1
pointPolygons = 0
separateStencilMaskRef = 1
triangleFans = 0
```
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This commit is contained in:
commit
e109587bf0
7
.monocodus
Normal file
7
.monocodus
Normal file
|
@ -0,0 +1,7 @@
|
|||
rust:
|
||||
formatter:
|
||||
- name: rustfmt
|
||||
repo_checkers:
|
||||
- name: rust-clippy
|
||||
|
||||
c:
|
85
Cargo.lock
generated
85
Cargo.lock
generated
|
@ -67,9 +67,9 @@ checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
|
|||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.59"
|
||||
version = "1.0.60"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381"
|
||||
checksum = "ef611cc68ff783f18535d77ddd080185275713d852c4f5cbb6122c462a7a825c"
|
||||
dependencies = [
|
||||
"jobserver",
|
||||
]
|
||||
|
@ -120,7 +120,7 @@ checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318"
|
|||
dependencies = [
|
||||
"bitflags",
|
||||
"block",
|
||||
"core-foundation 0.9.0",
|
||||
"core-foundation 0.9.1",
|
||||
"core-graphics-types",
|
||||
"foreign-types",
|
||||
"libc",
|
||||
|
@ -145,11 +145,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "core-foundation"
|
||||
version = "0.9.0"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3b5ed8e7e76c45974e15e41bfa8d5b0483cd90191639e01d8f5f1e606299d3fb"
|
||||
checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62"
|
||||
dependencies = [
|
||||
"core-foundation-sys 0.8.0",
|
||||
"core-foundation-sys 0.8.1",
|
||||
"libc",
|
||||
]
|
||||
|
||||
|
@ -164,9 +164,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "core-foundation-sys"
|
||||
version = "0.8.0"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a21fa21941700a3cd8fcb4091f361a6a712fac632f85d9f487cc892045d55c6"
|
||||
checksum = "c0af3b5e4601de3837c9332e29e0aae47a0d46ebfa246d12b82f564bac233393"
|
||||
|
||||
[[package]]
|
||||
name = "core-graphics"
|
||||
|
@ -182,12 +182,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "core-graphics-types"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e92f5d519093a4178296707dbaa3880eae85a5ef5386675f361a1cf25376e93c"
|
||||
checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"core-foundation 0.9.0",
|
||||
"core-foundation 0.9.1",
|
||||
"foreign-types",
|
||||
"libc",
|
||||
]
|
||||
|
@ -251,9 +251,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.1.14"
|
||||
version = "0.1.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"
|
||||
checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
|
@ -263,7 +263,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gfx-auxil"
|
||||
version = "0.5.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#bf52789dc7c8838c70b395eb21ee20a932bf1214"
|
||||
source = "git+https://github.com/gfx-rs/gfx#db7a4aa3e7aa909764a2e8bc60e252972676ea2d"
|
||||
dependencies = [
|
||||
"fxhash",
|
||||
"gfx-hal",
|
||||
|
@ -273,7 +273,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gfx-backend-dx11"
|
||||
version = "0.6.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#bf52789dc7c8838c70b395eb21ee20a932bf1214"
|
||||
source = "git+https://github.com/gfx-rs/gfx#db7a4aa3e7aa909764a2e8bc60e252972676ea2d"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"gfx-auxil",
|
||||
|
@ -292,7 +292,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gfx-backend-dx12"
|
||||
version = "0.6.2"
|
||||
source = "git+https://github.com/gfx-rs/gfx#bf52789dc7c8838c70b395eb21ee20a932bf1214"
|
||||
source = "git+https://github.com/gfx-rs/gfx#db7a4aa3e7aa909764a2e8bc60e252972676ea2d"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"d3d12",
|
||||
|
@ -309,7 +309,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gfx-backend-empty"
|
||||
version = "0.6.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#bf52789dc7c8838c70b395eb21ee20a932bf1214"
|
||||
source = "git+https://github.com/gfx-rs/gfx#db7a4aa3e7aa909764a2e8bc60e252972676ea2d"
|
||||
dependencies = [
|
||||
"gfx-hal",
|
||||
"log",
|
||||
|
@ -319,7 +319,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gfx-backend-metal"
|
||||
version = "0.6.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#bf52789dc7c8838c70b395eb21ee20a932bf1214"
|
||||
source = "git+https://github.com/gfx-rs/gfx#db7a4aa3e7aa909764a2e8bc60e252972676ea2d"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"bitflags",
|
||||
|
@ -344,7 +344,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gfx-backend-vulkan"
|
||||
version = "0.6.1"
|
||||
source = "git+https://github.com/gfx-rs/gfx#bf52789dc7c8838c70b395eb21ee20a932bf1214"
|
||||
source = "git+https://github.com/gfx-rs/gfx#db7a4aa3e7aa909764a2e8bc60e252972676ea2d"
|
||||
dependencies = [
|
||||
"arrayvec",
|
||||
"ash",
|
||||
|
@ -365,7 +365,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gfx-hal"
|
||||
version = "0.6.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#bf52789dc7c8838c70b395eb21ee20a932bf1214"
|
||||
source = "git+https://github.com/gfx-rs/gfx#db7a4aa3e7aa909764a2e8bc60e252972676ea2d"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"raw-window-handle",
|
||||
|
@ -451,9 +451,12 @@ checksum = "dd01a2a73f2f399df96b22dc88ea687ef4d76226284e7531ae3c7ee1dc5cb534"
|
|||
|
||||
[[package]]
|
||||
name = "instant"
|
||||
version = "0.1.6"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5b141fdc7836c525d4d594027d318c84161ca17aaf8113ab1f81ab93ae897485"
|
||||
checksum = "63312a18f7ea8760cdd0a7c5aac1a619752a246b833545e3e36d1f81f7cd9e66"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jobserver"
|
||||
|
@ -466,9 +469,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.44"
|
||||
version = "0.3.45"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "85a7e2c92a4804dd459b86c339278d0fe87cf93757fae222c3fa3ae75458bc73"
|
||||
checksum = "ca059e81d9486668f12d455a4ea6daa600bd408134cd17e3d3fb5a32d1f016f8"
|
||||
dependencies = [
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
@ -499,9 +502,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
|||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.76"
|
||||
version = "0.2.77"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3"
|
||||
checksum = "f2f96b10ec2560088a8e76961b00d47107b3a625fecb76dedb29ee7ccbf98235"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
|
@ -684,9 +687,9 @@ checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20"
|
|||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.20"
|
||||
version = "1.0.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "175c513d55719db99da20232b06cda8bab6b83ec2d04e3283edf0213c37c1a29"
|
||||
checksum = "36e28516df94f3dd551a587da5357459d9b36d945a7c37c3557928c1c2ff2a2c"
|
||||
dependencies = [
|
||||
"unicode-xid",
|
||||
]
|
||||
|
@ -750,7 +753,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "range-alloc"
|
||||
version = "0.1.1"
|
||||
source = "git+https://github.com/gfx-rs/gfx#bf52789dc7c8838c70b395eb21ee20a932bf1214"
|
||||
source = "git+https://github.com/gfx-rs/gfx#db7a4aa3e7aa909764a2e8bc60e252972676ea2d"
|
||||
|
||||
[[package]]
|
||||
name = "raw-window-handle"
|
||||
|
@ -852,9 +855,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.40"
|
||||
version = "1.0.41"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "963f7d3cc59b59b9325165add223142bbf1df27655d07789f109896d353d8350"
|
||||
checksum = "6690e3e9f692504b941dc6c3b188fd28df054f7fb8469ab40680df52fdcc842b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -919,9 +922,9 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.67"
|
||||
version = "0.2.68"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0563a9a4b071746dd5aedbc3a28c6fe9be4586fb3fbadb67c400d4f53c6b16c"
|
||||
checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"wasm-bindgen-macro",
|
||||
|
@ -929,9 +932,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-backend"
|
||||
version = "0.2.67"
|
||||
version = "0.2.68"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bc71e4c5efa60fb9e74160e89b93353bc24059999c0ae0fb03affc39770310b0"
|
||||
checksum = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"lazy_static 1.4.0",
|
||||
|
@ -944,9 +947,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.67"
|
||||
version = "0.2.68"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "97c57cefa5fa80e2ba15641578b44d36e7a64279bc5ed43c6dbaf329457a2ed2"
|
||||
checksum = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"wasm-bindgen-macro-support",
|
||||
|
@ -954,9 +957,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.67"
|
||||
version = "0.2.68"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "841a6d1c35c6f596ccea1f82504a192a60378f64b3bb0261904ad8f2f5657556"
|
||||
checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
@ -967,9 +970,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.67"
|
||||
version = "0.2.68"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "93b162580e34310e5931c4b792560108b10fd14d64915d7fff8ff00180e70092"
|
||||
checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307"
|
||||
|
||||
[[package]]
|
||||
name = "wayland-client"
|
||||
|
|
|
@ -2,19 +2,9 @@
|
|||
// File: vk_platform.h
|
||||
//
|
||||
/*
|
||||
** Copyright (c) 2014-2017 The Khronos Group Inc.
|
||||
** Copyright (c) 2014-2020 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -2,19 +2,9 @@
|
|||
#define VULKAN_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "vk_platform.h"
|
||||
|
@ -38,6 +28,9 @@
|
|||
#include "vulkan_macos.h"
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_METAL_EXT
|
||||
#include "vulkan_metal.h"
|
||||
#endif
|
||||
|
||||
#ifdef VK_USE_PLATFORM_VI_NN
|
||||
#include "vulkan_vi.h"
|
||||
|
@ -68,10 +61,27 @@
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_DIRECTFB_EXT
|
||||
#include <directfb.h>
|
||||
#include "vulkan_directfb.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/Xrandr.h>
|
||||
#include "vulkan_xlib_xrandr.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_USE_PLATFORM_GGP
|
||||
#include <ggp_c/vulkan_types.h>
|
||||
#include "vulkan_ggp.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VK_ENABLE_BETA_EXTENSIONS
|
||||
#include "vulkan_beta.h"
|
||||
#endif
|
||||
|
||||
#endif // VULKAN_H_
|
||||
|
|
|
@ -1,24 +1,10 @@
|
|||
#ifndef VULKAN_ANDROID_H_
|
||||
#define VULKAN_ANDROID_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -27,14 +13,17 @@ extern "C" {
|
|||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_android_surface 1
|
||||
struct ANativeWindow;
|
||||
|
||||
#define VK_KHR_ANDROID_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_ANDROID_SURFACE_EXTENSION_NAME "VK_KHR_android_surface"
|
||||
|
||||
typedef VkFlags VkAndroidSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkAndroidSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -42,7 +31,6 @@ typedef struct VkAndroidSurfaceCreateInfoKHR {
|
|||
struct ANativeWindow* window;
|
||||
} VkAndroidSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateAndroidSurfaceKHR)(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
|
@ -53,12 +41,11 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
|
|||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_ANDROID_external_memory_android_hardware_buffer 1
|
||||
struct AHardwareBuffer;
|
||||
|
||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3
|
||||
#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
|
||||
|
||||
typedef struct VkAndroidHardwareBufferUsageANDROID {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
|
@ -103,7 +90,6 @@ typedef struct VkExternalFormatANDROID {
|
|||
uint64_t externalFormat;
|
||||
} VkExternalFormatANDROID;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
|
||||
|
||||
|
|
459
headers/vulkan/vulkan_beta.h
Normal file
459
headers/vulkan/vulkan_beta.h
Normal file
|
@ -0,0 +1,459 @@
|
|||
#ifndef VULKAN_BETA_H_
|
||||
#define VULKAN_BETA_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_portability_subset 1
|
||||
#define VK_KHR_PORTABILITY_SUBSET_SPEC_VERSION 1
|
||||
#define VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME "VK_KHR_portability_subset"
|
||||
typedef struct VkPhysicalDevicePortabilitySubsetFeaturesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkBool32 constantAlphaColorBlendFactors;
|
||||
VkBool32 events;
|
||||
VkBool32 imageViewFormatReinterpretation;
|
||||
VkBool32 imageViewFormatSwizzle;
|
||||
VkBool32 imageView2DOn3DImage;
|
||||
VkBool32 multisampleArrayImage;
|
||||
VkBool32 mutableComparisonSamplers;
|
||||
VkBool32 pointPolygons;
|
||||
VkBool32 samplerMipLodBias;
|
||||
VkBool32 separateStencilMaskRef;
|
||||
VkBool32 shaderSampleRateInterpolationFunctions;
|
||||
VkBool32 tessellationIsolines;
|
||||
VkBool32 tessellationPointMode;
|
||||
VkBool32 triangleFans;
|
||||
VkBool32 vertexAttributeAccessBeyondStride;
|
||||
} VkPhysicalDevicePortabilitySubsetFeaturesKHR;
|
||||
|
||||
typedef struct VkPhysicalDevicePortabilitySubsetPropertiesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint32_t minVertexInputBindingStrideAlignment;
|
||||
} VkPhysicalDevicePortabilitySubsetPropertiesKHR;
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_deferred_host_operations 1
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeferredOperationKHR)
|
||||
#define VK_KHR_DEFERRED_HOST_OPERATIONS_SPEC_VERSION 3
|
||||
#define VK_KHR_DEFERRED_HOST_OPERATIONS_EXTENSION_NAME "VK_KHR_deferred_host_operations"
|
||||
typedef struct VkDeferredOperationInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeferredOperationKHR operationHandle;
|
||||
} VkDeferredOperationInfoKHR;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateDeferredOperationKHR)(VkDevice device, const VkAllocationCallbacks* pAllocator, VkDeferredOperationKHR* pDeferredOperation);
|
||||
typedef void (VKAPI_PTR *PFN_vkDestroyDeferredOperationKHR)(VkDevice device, VkDeferredOperationKHR operation, const VkAllocationCallbacks* pAllocator);
|
||||
typedef uint32_t (VKAPI_PTR *PFN_vkGetDeferredOperationMaxConcurrencyKHR)(VkDevice device, VkDeferredOperationKHR operation);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetDeferredOperationResultKHR)(VkDevice device, VkDeferredOperationKHR operation);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkDeferredOperationJoinKHR)(VkDevice device, VkDeferredOperationKHR operation);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDeferredOperationKHR(
|
||||
VkDevice device,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkDeferredOperationKHR* pDeferredOperation);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkDestroyDeferredOperationKHR(
|
||||
VkDevice device,
|
||||
VkDeferredOperationKHR operation,
|
||||
const VkAllocationCallbacks* pAllocator);
|
||||
|
||||
VKAPI_ATTR uint32_t VKAPI_CALL vkGetDeferredOperationMaxConcurrencyKHR(
|
||||
VkDevice device,
|
||||
VkDeferredOperationKHR operation);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetDeferredOperationResultKHR(
|
||||
VkDevice device,
|
||||
VkDeferredOperationKHR operation);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkDeferredOperationJoinKHR(
|
||||
VkDevice device,
|
||||
VkDeferredOperationKHR operation);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_KHR_pipeline_library 1
|
||||
#define VK_KHR_PIPELINE_LIBRARY_SPEC_VERSION 1
|
||||
#define VK_KHR_PIPELINE_LIBRARY_EXTENSION_NAME "VK_KHR_pipeline_library"
|
||||
typedef struct VkPipelineLibraryCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t libraryCount;
|
||||
const VkPipeline* pLibraries;
|
||||
} VkPipelineLibraryCreateInfoKHR;
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_ray_tracing 1
|
||||
#define VK_KHR_RAY_TRACING_SPEC_VERSION 8
|
||||
#define VK_KHR_RAY_TRACING_EXTENSION_NAME "VK_KHR_ray_tracing"
|
||||
|
||||
typedef enum VkAccelerationStructureBuildTypeKHR {
|
||||
VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_KHR = 0,
|
||||
VK_ACCELERATION_STRUCTURE_BUILD_TYPE_DEVICE_KHR = 1,
|
||||
VK_ACCELERATION_STRUCTURE_BUILD_TYPE_HOST_OR_DEVICE_KHR = 2,
|
||||
VK_ACCELERATION_STRUCTURE_BUILD_TYPE_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkAccelerationStructureBuildTypeKHR;
|
||||
typedef union VkDeviceOrHostAddressKHR {
|
||||
VkDeviceAddress deviceAddress;
|
||||
void* hostAddress;
|
||||
} VkDeviceOrHostAddressKHR;
|
||||
|
||||
typedef union VkDeviceOrHostAddressConstKHR {
|
||||
VkDeviceAddress deviceAddress;
|
||||
const void* hostAddress;
|
||||
} VkDeviceOrHostAddressConstKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureBuildOffsetInfoKHR {
|
||||
uint32_t primitiveCount;
|
||||
uint32_t primitiveOffset;
|
||||
uint32_t firstVertex;
|
||||
uint32_t transformOffset;
|
||||
} VkAccelerationStructureBuildOffsetInfoKHR;
|
||||
|
||||
typedef struct VkRayTracingShaderGroupCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkRayTracingShaderGroupTypeKHR type;
|
||||
uint32_t generalShader;
|
||||
uint32_t closestHitShader;
|
||||
uint32_t anyHitShader;
|
||||
uint32_t intersectionShader;
|
||||
const void* pShaderGroupCaptureReplayHandle;
|
||||
} VkRayTracingShaderGroupCreateInfoKHR;
|
||||
|
||||
typedef struct VkRayTracingPipelineInterfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
uint32_t maxPayloadSize;
|
||||
uint32_t maxAttributeSize;
|
||||
uint32_t maxCallableSize;
|
||||
} VkRayTracingPipelineInterfaceCreateInfoKHR;
|
||||
|
||||
typedef struct VkRayTracingPipelineCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkPipelineCreateFlags flags;
|
||||
uint32_t stageCount;
|
||||
const VkPipelineShaderStageCreateInfo* pStages;
|
||||
uint32_t groupCount;
|
||||
const VkRayTracingShaderGroupCreateInfoKHR* pGroups;
|
||||
uint32_t maxRecursionDepth;
|
||||
VkPipelineLibraryCreateInfoKHR libraries;
|
||||
const VkRayTracingPipelineInterfaceCreateInfoKHR* pLibraryInterface;
|
||||
VkPipelineLayout layout;
|
||||
VkPipeline basePipelineHandle;
|
||||
int32_t basePipelineIndex;
|
||||
} VkRayTracingPipelineCreateInfoKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureGeometryTrianglesDataKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkFormat vertexFormat;
|
||||
VkDeviceOrHostAddressConstKHR vertexData;
|
||||
VkDeviceSize vertexStride;
|
||||
VkIndexType indexType;
|
||||
VkDeviceOrHostAddressConstKHR indexData;
|
||||
VkDeviceOrHostAddressConstKHR transformData;
|
||||
} VkAccelerationStructureGeometryTrianglesDataKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureGeometryAabbsDataKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceOrHostAddressConstKHR data;
|
||||
VkDeviceSize stride;
|
||||
} VkAccelerationStructureGeometryAabbsDataKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureGeometryInstancesDataKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkBool32 arrayOfPointers;
|
||||
VkDeviceOrHostAddressConstKHR data;
|
||||
} VkAccelerationStructureGeometryInstancesDataKHR;
|
||||
|
||||
typedef union VkAccelerationStructureGeometryDataKHR {
|
||||
VkAccelerationStructureGeometryTrianglesDataKHR triangles;
|
||||
VkAccelerationStructureGeometryAabbsDataKHR aabbs;
|
||||
VkAccelerationStructureGeometryInstancesDataKHR instances;
|
||||
} VkAccelerationStructureGeometryDataKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureGeometryKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkGeometryTypeKHR geometryType;
|
||||
VkAccelerationStructureGeometryDataKHR geometry;
|
||||
VkGeometryFlagsKHR flags;
|
||||
} VkAccelerationStructureGeometryKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureBuildGeometryInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkAccelerationStructureTypeKHR type;
|
||||
VkBuildAccelerationStructureFlagsKHR flags;
|
||||
VkBool32 update;
|
||||
VkAccelerationStructureKHR srcAccelerationStructure;
|
||||
VkAccelerationStructureKHR dstAccelerationStructure;
|
||||
VkBool32 geometryArrayOfPointers;
|
||||
uint32_t geometryCount;
|
||||
const VkAccelerationStructureGeometryKHR* const* ppGeometries;
|
||||
VkDeviceOrHostAddressKHR scratchData;
|
||||
} VkAccelerationStructureBuildGeometryInfoKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureCreateGeometryTypeInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkGeometryTypeKHR geometryType;
|
||||
uint32_t maxPrimitiveCount;
|
||||
VkIndexType indexType;
|
||||
uint32_t maxVertexCount;
|
||||
VkFormat vertexFormat;
|
||||
VkBool32 allowsTransforms;
|
||||
} VkAccelerationStructureCreateGeometryTypeInfoKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceSize compactedSize;
|
||||
VkAccelerationStructureTypeKHR type;
|
||||
VkBuildAccelerationStructureFlagsKHR flags;
|
||||
uint32_t maxGeometryCount;
|
||||
const VkAccelerationStructureCreateGeometryTypeInfoKHR* pGeometryInfos;
|
||||
VkDeviceAddress deviceAddress;
|
||||
} VkAccelerationStructureCreateInfoKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureMemoryRequirementsInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkAccelerationStructureMemoryRequirementsTypeKHR type;
|
||||
VkAccelerationStructureBuildTypeKHR buildType;
|
||||
VkAccelerationStructureKHR accelerationStructure;
|
||||
} VkAccelerationStructureMemoryRequirementsInfoKHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceRayTracingFeaturesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkBool32 rayTracing;
|
||||
VkBool32 rayTracingShaderGroupHandleCaptureReplay;
|
||||
VkBool32 rayTracingShaderGroupHandleCaptureReplayMixed;
|
||||
VkBool32 rayTracingAccelerationStructureCaptureReplay;
|
||||
VkBool32 rayTracingIndirectTraceRays;
|
||||
VkBool32 rayTracingIndirectAccelerationStructureBuild;
|
||||
VkBool32 rayTracingHostAccelerationStructureCommands;
|
||||
VkBool32 rayQuery;
|
||||
VkBool32 rayTracingPrimitiveCulling;
|
||||
} VkPhysicalDeviceRayTracingFeaturesKHR;
|
||||
|
||||
typedef struct VkPhysicalDeviceRayTracingPropertiesKHR {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
uint32_t shaderGroupHandleSize;
|
||||
uint32_t maxRecursionDepth;
|
||||
uint32_t maxShaderGroupStride;
|
||||
uint32_t shaderGroupBaseAlignment;
|
||||
uint64_t maxGeometryCount;
|
||||
uint64_t maxInstanceCount;
|
||||
uint64_t maxPrimitiveCount;
|
||||
uint32_t maxDescriptorSetAccelerationStructures;
|
||||
uint32_t shaderGroupHandleCaptureReplaySize;
|
||||
} VkPhysicalDeviceRayTracingPropertiesKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureDeviceAddressInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkAccelerationStructureKHR accelerationStructure;
|
||||
} VkAccelerationStructureDeviceAddressInfoKHR;
|
||||
|
||||
typedef struct VkAccelerationStructureVersionKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const uint8_t* versionData;
|
||||
} VkAccelerationStructureVersionKHR;
|
||||
|
||||
typedef struct VkStridedBufferRegionKHR {
|
||||
VkBuffer buffer;
|
||||
VkDeviceSize offset;
|
||||
VkDeviceSize stride;
|
||||
VkDeviceSize size;
|
||||
} VkStridedBufferRegionKHR;
|
||||
|
||||
typedef struct VkTraceRaysIndirectCommandKHR {
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t depth;
|
||||
} VkTraceRaysIndirectCommandKHR;
|
||||
|
||||
typedef struct VkCopyAccelerationStructureToMemoryInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkAccelerationStructureKHR src;
|
||||
VkDeviceOrHostAddressKHR dst;
|
||||
VkCopyAccelerationStructureModeKHR mode;
|
||||
} VkCopyAccelerationStructureToMemoryInfoKHR;
|
||||
|
||||
typedef struct VkCopyMemoryToAccelerationStructureInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDeviceOrHostAddressConstKHR src;
|
||||
VkAccelerationStructureKHR dst;
|
||||
VkCopyAccelerationStructureModeKHR mode;
|
||||
} VkCopyMemoryToAccelerationStructureInfoKHR;
|
||||
|
||||
typedef struct VkCopyAccelerationStructureInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkAccelerationStructureKHR src;
|
||||
VkAccelerationStructureKHR dst;
|
||||
VkCopyAccelerationStructureModeKHR mode;
|
||||
} VkCopyAccelerationStructureInfoKHR;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateAccelerationStructureKHR)(VkDevice device, const VkAccelerationStructureCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkAccelerationStructureKHR* pAccelerationStructure);
|
||||
typedef void (VKAPI_PTR *PFN_vkGetAccelerationStructureMemoryRequirementsKHR)(VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoKHR* pInfo, VkMemoryRequirements2* pMemoryRequirements);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdBuildAccelerationStructureKHR)(VkCommandBuffer commandBuffer, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildOffsetInfoKHR* const* ppOffsetInfos);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdBuildAccelerationStructureIndirectKHR)(VkCommandBuffer commandBuffer, const VkAccelerationStructureBuildGeometryInfoKHR* pInfo, VkBuffer indirectBuffer, VkDeviceSize indirectOffset, uint32_t indirectStride);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkBuildAccelerationStructureKHR)(VkDevice device, uint32_t infoCount, const VkAccelerationStructureBuildGeometryInfoKHR* pInfos, const VkAccelerationStructureBuildOffsetInfoKHR* const* ppOffsetInfos);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCopyAccelerationStructureKHR)(VkDevice device, const VkCopyAccelerationStructureInfoKHR* pInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCopyAccelerationStructureToMemoryKHR)(VkDevice device, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCopyMemoryToAccelerationStructureKHR)(VkDevice device, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkWriteAccelerationStructuresPropertiesKHR)(VkDevice device, uint32_t accelerationStructureCount, const VkAccelerationStructureKHR* pAccelerationStructures, VkQueryType queryType, size_t dataSize, void* pData, size_t stride);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdCopyAccelerationStructureKHR)(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureInfoKHR* pInfo);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdCopyAccelerationStructureToMemoryKHR)(VkCommandBuffer commandBuffer, const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdCopyMemoryToAccelerationStructureKHR)(VkCommandBuffer commandBuffer, const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdTraceRaysKHR)(VkCommandBuffer commandBuffer, const VkStridedBufferRegionKHR* pRaygenShaderBindingTable, const VkStridedBufferRegionKHR* pMissShaderBindingTable, const VkStridedBufferRegionKHR* pHitShaderBindingTable, const VkStridedBufferRegionKHR* pCallableShaderBindingTable, uint32_t width, uint32_t height, uint32_t depth);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateRayTracingPipelinesKHR)(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkRayTracingPipelineCreateInfoKHR* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines);
|
||||
typedef VkDeviceAddress (VKAPI_PTR *PFN_vkGetAccelerationStructureDeviceAddressKHR)(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetRayTracingCaptureReplayShaderGroupHandlesKHR)(VkDevice device, VkPipeline pipeline, uint32_t firstGroup, uint32_t groupCount, size_t dataSize, void* pData);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdTraceRaysIndirectKHR)(VkCommandBuffer commandBuffer, const VkStridedBufferRegionKHR* pRaygenShaderBindingTable, const VkStridedBufferRegionKHR* pMissShaderBindingTable, const VkStridedBufferRegionKHR* pHitShaderBindingTable, const VkStridedBufferRegionKHR* pCallableShaderBindingTable, VkBuffer buffer, VkDeviceSize offset);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceAccelerationStructureCompatibilityKHR)(VkDevice device, const VkAccelerationStructureVersionKHR* version);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateAccelerationStructureKHR(
|
||||
VkDevice device,
|
||||
const VkAccelerationStructureCreateInfoKHR* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkAccelerationStructureKHR* pAccelerationStructure);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkGetAccelerationStructureMemoryRequirementsKHR(
|
||||
VkDevice device,
|
||||
const VkAccelerationStructureMemoryRequirementsInfoKHR* pInfo,
|
||||
VkMemoryRequirements2* pMemoryRequirements);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdBuildAccelerationStructureKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
uint32_t infoCount,
|
||||
const VkAccelerationStructureBuildGeometryInfoKHR* pInfos,
|
||||
const VkAccelerationStructureBuildOffsetInfoKHR* const* ppOffsetInfos);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdBuildAccelerationStructureIndirectKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkAccelerationStructureBuildGeometryInfoKHR* pInfo,
|
||||
VkBuffer indirectBuffer,
|
||||
VkDeviceSize indirectOffset,
|
||||
uint32_t indirectStride);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkBuildAccelerationStructureKHR(
|
||||
VkDevice device,
|
||||
uint32_t infoCount,
|
||||
const VkAccelerationStructureBuildGeometryInfoKHR* pInfos,
|
||||
const VkAccelerationStructureBuildOffsetInfoKHR* const* ppOffsetInfos);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCopyAccelerationStructureKHR(
|
||||
VkDevice device,
|
||||
const VkCopyAccelerationStructureInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCopyAccelerationStructureToMemoryKHR(
|
||||
VkDevice device,
|
||||
const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCopyMemoryToAccelerationStructureKHR(
|
||||
VkDevice device,
|
||||
const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkWriteAccelerationStructuresPropertiesKHR(
|
||||
VkDevice device,
|
||||
uint32_t accelerationStructureCount,
|
||||
const VkAccelerationStructureKHR* pAccelerationStructures,
|
||||
VkQueryType queryType,
|
||||
size_t dataSize,
|
||||
void* pData,
|
||||
size_t stride);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdCopyAccelerationStructureKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkCopyAccelerationStructureInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdCopyAccelerationStructureToMemoryKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdCopyMemoryToAccelerationStructureKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdTraceRaysKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkStridedBufferRegionKHR* pRaygenShaderBindingTable,
|
||||
const VkStridedBufferRegionKHR* pMissShaderBindingTable,
|
||||
const VkStridedBufferRegionKHR* pHitShaderBindingTable,
|
||||
const VkStridedBufferRegionKHR* pCallableShaderBindingTable,
|
||||
uint32_t width,
|
||||
uint32_t height,
|
||||
uint32_t depth);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateRayTracingPipelinesKHR(
|
||||
VkDevice device,
|
||||
VkPipelineCache pipelineCache,
|
||||
uint32_t createInfoCount,
|
||||
const VkRayTracingPipelineCreateInfoKHR* pCreateInfos,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkPipeline* pPipelines);
|
||||
|
||||
VKAPI_ATTR VkDeviceAddress VKAPI_CALL vkGetAccelerationStructureDeviceAddressKHR(
|
||||
VkDevice device,
|
||||
const VkAccelerationStructureDeviceAddressInfoKHR* pInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetRayTracingCaptureReplayShaderGroupHandlesKHR(
|
||||
VkDevice device,
|
||||
VkPipeline pipeline,
|
||||
uint32_t firstGroup,
|
||||
uint32_t groupCount,
|
||||
size_t dataSize,
|
||||
void* pData);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdTraceRaysIndirectKHR(
|
||||
VkCommandBuffer commandBuffer,
|
||||
const VkStridedBufferRegionKHR* pRaygenShaderBindingTable,
|
||||
const VkStridedBufferRegionKHR* pMissShaderBindingTable,
|
||||
const VkStridedBufferRegionKHR* pHitShaderBindingTable,
|
||||
const VkStridedBufferRegionKHR* pCallableShaderBindingTable,
|
||||
VkBuffer buffer,
|
||||
VkDeviceSize offset);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceAccelerationStructureCompatibilityKHR(
|
||||
VkDevice device,
|
||||
const VkAccelerationStructureVersionKHR* version);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load diff
54
headers/vulkan/vulkan_directfb.h
Normal file
54
headers/vulkan/vulkan_directfb.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
#ifndef VULKAN_DIRECTFB_H_
|
||||
#define VULKAN_DIRECTFB_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_EXT_directfb_surface 1
|
||||
#define VK_EXT_DIRECTFB_SURFACE_SPEC_VERSION 1
|
||||
#define VK_EXT_DIRECTFB_SURFACE_EXTENSION_NAME "VK_EXT_directfb_surface"
|
||||
typedef VkFlags VkDirectFBSurfaceCreateFlagsEXT;
|
||||
typedef struct VkDirectFBSurfaceCreateInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDirectFBSurfaceCreateFlagsEXT flags;
|
||||
IDirectFB* dfb;
|
||||
IDirectFBSurface* surface;
|
||||
} VkDirectFBSurfaceCreateInfoEXT;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateDirectFBSurfaceEXT)(VkInstance instance, const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB* dfb);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateDirectFBSurfaceEXT(
|
||||
VkInstance instance,
|
||||
const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
|
||||
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceDirectFBPresentationSupportEXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
uint32_t queueFamilyIndex,
|
||||
IDirectFB* dfb);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,24 +1,10 @@
|
|||
#ifndef VULKAN_FUCHSIA_H_
|
||||
#define VULKAN_FUCHSIA_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -27,12 +13,16 @@ extern "C" {
|
|||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_FUCHSIA_imagepipe_surface 1
|
||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1
|
||||
#define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface"
|
||||
|
||||
typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA;
|
||||
|
||||
typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -40,7 +30,6 @@ typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA {
|
|||
zx_handle_t imagePipeHandle;
|
||||
} VkImagePipeSurfaceCreateInfoFUCHSIA;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
|
|
58
headers/vulkan/vulkan_ggp.h
Normal file
58
headers/vulkan/vulkan_ggp.h
Normal file
|
@ -0,0 +1,58 @@
|
|||
#ifndef VULKAN_GGP_H_
|
||||
#define VULKAN_GGP_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_GGP_stream_descriptor_surface 1
|
||||
#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION 1
|
||||
#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME "VK_GGP_stream_descriptor_surface"
|
||||
typedef VkFlags VkStreamDescriptorSurfaceCreateFlagsGGP;
|
||||
typedef struct VkStreamDescriptorSurfaceCreateInfoGGP {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkStreamDescriptorSurfaceCreateFlagsGGP flags;
|
||||
GgpStreamDescriptor streamDescriptor;
|
||||
} VkStreamDescriptorSurfaceCreateInfoGGP;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateStreamDescriptorSurfaceGGP)(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateStreamDescriptorSurfaceGGP(
|
||||
VkInstance instance,
|
||||
const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_GGP_frame_token 1
|
||||
#define VK_GGP_FRAME_TOKEN_SPEC_VERSION 1
|
||||
#define VK_GGP_FRAME_TOKEN_EXTENSION_NAME "VK_GGP_frame_token"
|
||||
typedef struct VkPresentFrameTokenGGP {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
GgpFrameToken frameToken;
|
||||
} VkPresentFrameTokenGGP;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,24 +1,10 @@
|
|||
#ifndef VULKAN_IOS_H_
|
||||
#define VULKAN_IOS_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -27,12 +13,16 @@ extern "C" {
|
|||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_MVK_ios_surface 1
|
||||
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 2
|
||||
#define VK_MVK_IOS_SURFACE_SPEC_VERSION 3
|
||||
#define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface"
|
||||
|
||||
typedef VkFlags VkIOSSurfaceCreateFlagsMVK;
|
||||
|
||||
typedef struct VkIOSSurfaceCreateInfoMVK {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -40,7 +30,6 @@ typedef struct VkIOSSurfaceCreateInfoMVK {
|
|||
const void* pView;
|
||||
} VkIOSSurfaceCreateInfoMVK;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
|
|
|
@ -1,24 +1,10 @@
|
|||
#ifndef VULKAN_MACOS_H_
|
||||
#define VULKAN_MACOS_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -27,12 +13,16 @@ extern "C" {
|
|||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_MVK_macos_surface 1
|
||||
#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2
|
||||
#define VK_MVK_MACOS_SURFACE_SPEC_VERSION 3
|
||||
#define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface"
|
||||
|
||||
typedef VkFlags VkMacOSSurfaceCreateFlagsMVK;
|
||||
|
||||
typedef struct VkMacOSSurfaceCreateInfoMVK {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -40,7 +30,6 @@ typedef struct VkMacOSSurfaceCreateInfoMVK {
|
|||
const void* pView;
|
||||
} VkMacOSSurfaceCreateInfoMVK;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
|
|
54
headers/vulkan/vulkan_metal.h
Normal file
54
headers/vulkan/vulkan_metal.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
#ifndef VULKAN_METAL_H_
|
||||
#define VULKAN_METAL_H_ 1
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
** This header is generated from the Khronos Vulkan XML API Registry.
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_EXT_metal_surface 1
|
||||
|
||||
#ifdef __OBJC__
|
||||
@class CAMetalLayer;
|
||||
#else
|
||||
typedef void CAMetalLayer;
|
||||
#endif
|
||||
|
||||
#define VK_EXT_METAL_SURFACE_SPEC_VERSION 1
|
||||
#define VK_EXT_METAL_SURFACE_EXTENSION_NAME "VK_EXT_metal_surface"
|
||||
typedef VkFlags VkMetalSurfaceCreateFlagsEXT;
|
||||
typedef struct VkMetalSurfaceCreateInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkMetalSurfaceCreateFlagsEXT flags;
|
||||
const CAMetalLayer* pLayer;
|
||||
} VkMetalSurfaceCreateInfoEXT;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT(
|
||||
VkInstance instance,
|
||||
const VkMetalSurfaceCreateInfoEXT* pCreateInfo,
|
||||
const VkAllocationCallbacks* pAllocator,
|
||||
VkSurfaceKHR* pSurface);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,24 +1,10 @@
|
|||
#ifndef VULKAN_VI_H_
|
||||
#define VULKAN_VI_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -27,12 +13,16 @@ extern "C" {
|
|||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_NN_vi_surface 1
|
||||
#define VK_NN_VI_SURFACE_SPEC_VERSION 1
|
||||
#define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface"
|
||||
|
||||
typedef VkFlags VkViSurfaceCreateFlagsNN;
|
||||
|
||||
typedef struct VkViSurfaceCreateInfoNN {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -40,7 +30,6 @@ typedef struct VkViSurfaceCreateInfoNN {
|
|||
void* window;
|
||||
} VkViSurfaceCreateInfoNN;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
|
|
|
@ -1,24 +1,10 @@
|
|||
#ifndef VULKAN_WAYLAND_H_
|
||||
#define VULKAN_WAYLAND_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -27,12 +13,16 @@ extern "C" {
|
|||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_wayland_surface 1
|
||||
#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
|
||||
|
||||
typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkWaylandSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -41,7 +31,6 @@ typedef struct VkWaylandSurfaceCreateInfoKHR {
|
|||
struct wl_surface* surface;
|
||||
} VkWaylandSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
|
||||
|
||||
|
|
|
@ -1,24 +1,10 @@
|
|||
#ifndef VULKAN_WIN32_H_
|
||||
#define VULKAN_WIN32_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -27,12 +13,16 @@ extern "C" {
|
|||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_win32_surface 1
|
||||
#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
|
||||
|
||||
typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkWin32SurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -41,7 +31,6 @@ typedef struct VkWin32SurfaceCreateInfoKHR {
|
|||
HWND hwnd;
|
||||
} VkWin32SurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
|
||||
|
||||
|
@ -57,10 +46,10 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
|
|||
uint32_t queueFamilyIndex);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_KHR_external_memory_win32 1
|
||||
#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
||||
#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
|
||||
|
||||
typedef struct VkImportMemoryWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -90,7 +79,6 @@ typedef struct VkMemoryGetWin32HandleInfoKHR {
|
|||
VkExternalMemoryHandleTypeFlagBits handleType;
|
||||
} VkMemoryGetWin32HandleInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
||||
|
||||
|
@ -107,10 +95,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
|
|||
VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_KHR_win32_keyed_mutex 1
|
||||
#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
|
||||
#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
|
||||
|
||||
typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -128,7 +116,6 @@ typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
|
|||
#define VK_KHR_external_semaphore_win32 1
|
||||
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
|
||||
#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
|
||||
|
||||
typedef struct VkImportSemaphoreWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -163,7 +150,6 @@ typedef struct VkSemaphoreGetWin32HandleInfoKHR {
|
|||
VkExternalSemaphoreHandleTypeFlagBits handleType;
|
||||
} VkSemaphoreGetWin32HandleInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||
|
||||
|
@ -178,10 +164,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
|
|||
HANDLE* pHandle);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_KHR_external_fence_win32 1
|
||||
#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
|
||||
#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
|
||||
|
||||
typedef struct VkImportFenceWin32HandleInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -207,7 +193,6 @@ typedef struct VkFenceGetWin32HandleInfoKHR {
|
|||
VkExternalFenceHandleTypeFlagBits handleType;
|
||||
} VkFenceGetWin32HandleInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
||||
|
||||
|
@ -222,10 +207,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
|
|||
HANDLE* pHandle);
|
||||
#endif
|
||||
|
||||
|
||||
#define VK_NV_external_memory_win32 1
|
||||
#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
|
||||
#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
|
||||
|
||||
typedef struct VkImportMemoryWin32HandleInfoNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -240,7 +225,6 @@ typedef struct VkExportMemoryWin32HandleInfoNV {
|
|||
DWORD dwAccess;
|
||||
} VkExportMemoryWin32HandleInfoNV;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
|
@ -251,10 +235,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
|
|||
HANDLE* pHandle);
|
||||
#endif
|
||||
|
||||
#define VK_NV_win32_keyed_mutex 1
|
||||
#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
|
||||
#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
|
||||
|
||||
#define VK_NV_win32_keyed_mutex 1
|
||||
#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 2
|
||||
#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
|
||||
typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -269,6 +253,61 @@ typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
|
|||
|
||||
|
||||
|
||||
#define VK_EXT_full_screen_exclusive 1
|
||||
#define VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION 4
|
||||
#define VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME "VK_EXT_full_screen_exclusive"
|
||||
|
||||
typedef enum VkFullScreenExclusiveEXT {
|
||||
VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0,
|
||||
VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1,
|
||||
VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2,
|
||||
VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3,
|
||||
VK_FULL_SCREEN_EXCLUSIVE_MAX_ENUM_EXT = 0x7FFFFFFF
|
||||
} VkFullScreenExclusiveEXT;
|
||||
typedef struct VkSurfaceFullScreenExclusiveInfoEXT {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkFullScreenExclusiveEXT fullScreenExclusive;
|
||||
} VkSurfaceFullScreenExclusiveInfoEXT;
|
||||
|
||||
typedef struct VkSurfaceCapabilitiesFullScreenExclusiveEXT {
|
||||
VkStructureType sType;
|
||||
void* pNext;
|
||||
VkBool32 fullScreenExclusiveSupported;
|
||||
} VkSurfaceCapabilitiesFullScreenExclusiveEXT;
|
||||
|
||||
typedef struct VkSurfaceFullScreenExclusiveWin32InfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
HMONITOR hmonitor;
|
||||
} VkSurfaceFullScreenExclusiveWin32InfoEXT;
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkAcquireFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkReleaseFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModes2EXT)(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModes2EXT(
|
||||
VkPhysicalDevice physicalDevice,
|
||||
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
|
||||
uint32_t* pPresentModeCount,
|
||||
VkPresentModeKHR* pPresentModes);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireFullScreenExclusiveModeEXT(
|
||||
VkDevice device,
|
||||
VkSwapchainKHR swapchain);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkReleaseFullScreenExclusiveModeEXT(
|
||||
VkDevice device,
|
||||
VkSwapchainKHR swapchain);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT(
|
||||
VkDevice device,
|
||||
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
|
||||
VkDeviceGroupPresentModeFlagsKHR* pModes);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,24 +1,10 @@
|
|||
#ifndef VULKAN_XCB_H_
|
||||
#define VULKAN_XCB_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -27,12 +13,16 @@ extern "C" {
|
|||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_xcb_surface 1
|
||||
#define VK_KHR_XCB_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_XCB_SURFACE_EXTENSION_NAME "VK_KHR_xcb_surface"
|
||||
|
||||
typedef VkFlags VkXcbSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkXcbSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -41,7 +31,6 @@ typedef struct VkXcbSurfaceCreateInfoKHR {
|
|||
xcb_window_t window;
|
||||
} VkXcbSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, const VkXcbSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id);
|
||||
|
||||
|
|
|
@ -1,24 +1,10 @@
|
|||
#ifndef VULKAN_XLIB_H_
|
||||
#define VULKAN_XLIB_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -27,12 +13,16 @@ extern "C" {
|
|||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_KHR_xlib_surface 1
|
||||
#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
|
||||
#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface"
|
||||
|
||||
typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkXlibSurfaceCreateInfoKHR {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
|
@ -41,7 +31,6 @@ typedef struct VkXlibSurfaceCreateInfoKHR {
|
|||
Window window;
|
||||
} VkXlibSurfaceCreateInfoKHR;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID);
|
||||
|
||||
|
|
|
@ -1,24 +1,10 @@
|
|||
#ifndef VULKAN_XLIB_XRANDR_H_
|
||||
#define VULKAN_XLIB_XRANDR_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2015-2019 The Khronos Group Inc.
|
||||
** Copyright (c) 2015-2020 The Khronos Group Inc.
|
||||
**
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -27,10 +13,15 @@ extern "C" {
|
|||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define VK_EXT_acquire_xlib_display 1
|
||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
|
||||
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
|
||||
|
||||
|
|
|
@ -4706,7 +4706,7 @@ pub unsafe extern "C" fn gfxQueuePresentKHR(
|
|||
.iter()
|
||||
.position(|&(frame, _)| frame == index)
|
||||
.expect("Frame was not acquired properly!");
|
||||
let frame = sc.active.swap_remove(active_pos).1;
|
||||
let (_, frame) = sc.active.swap_remove(active_pos);
|
||||
let sem = wait_semaphores.first().map(|s| &s.raw);
|
||||
if let Err(_) = queue.present(&mut *sc.surface, frame, sem) {
|
||||
return VkResult::VK_ERROR_SURFACE_LOST_KHR;
|
||||
|
|
|
@ -380,7 +380,7 @@ pub const VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION: ::std::os::raw::c_ui
|
|||
pub const VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME: &'static [u8; 36usize] =
|
||||
b"VK_KHR_sampler_mirror_clamp_to_edge\x00";
|
||||
pub const VK_KHR_get_physical_device_properties2: ::std::os::raw::c_uint = 1;
|
||||
pub const VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION: ::std::os::raw::c_uint = 1;
|
||||
pub const VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION: ::std::os::raw::c_uint = 2;
|
||||
pub const VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME: &'static [u8; 39usize] =
|
||||
b"VK_KHR_get_physical_device_properties2\x00";
|
||||
pub const VK_KHR_get_surface_capabilities2: ::std::os::raw::c_uint = 1;
|
||||
|
@ -860,10 +860,9 @@ pub enum VkStructureType {
|
|||
VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT = 1000099001,
|
||||
VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK = 1000122000,
|
||||
VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
|
||||
VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT = 1000248000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR = 1000164000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR = 1000164001,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_SUPPORT_EXTX = 100163002,
|
||||
VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT = 1000217000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR = 1000163000,
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR = 1000163001,
|
||||
VK_STRUCTURE_TYPE_MAX_ENUM = 2147483647,
|
||||
}
|
||||
pub const VkSystemAllocationScope_VK_SYSTEM_ALLOCATION_SCOPE_BEGIN_RANGE: VkSystemAllocationScope =
|
||||
|
@ -7603,22 +7602,6 @@ impl Clone for VkPhysicalDevicePortabilitySubsetPropertiesKHR {
|
|||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct VkPhysicalDeviceImageViewSupportEXTX {
|
||||
pub sType: VkStructureType,
|
||||
pub pNext: *const ::std::os::raw::c_void,
|
||||
pub flags: VkImageViewCreateFlags,
|
||||
pub viewType: VkImageViewType,
|
||||
pub format: VkFormat,
|
||||
pub components: VkComponentMapping,
|
||||
pub aspectMask: VkImageAspectFlags,
|
||||
}
|
||||
impl Clone for VkPhysicalDeviceImageViewSupportEXTX {
|
||||
fn clone(&self) -> Self {
|
||||
*self
|
||||
}
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy)]
|
||||
pub struct VkMetalSurfaceCreateInfoEXT {
|
||||
pub sType: VkStructureType,
|
||||
pub pNext: *const ::std::os::raw::c_void,
|
||||
|
|
|
@ -295,6 +295,16 @@ pub unsafe extern "C" fn vkCreateMacOSSurfaceMVK(
|
|||
gfxCreateMacOSSurfaceMVK(instance, pCreateInfos, pAllocator, pSurface)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn vkCreateMetalSurfaceEXT(
|
||||
instance: VkInstance,
|
||||
pCreateInfos: *const VkMetalSurfaceCreateInfoEXT,
|
||||
pAllocator: *const VkAllocationCallbacks,
|
||||
pSurface: *mut VkSurfaceKHR,
|
||||
) -> VkResult {
|
||||
gfxCreateMetalSurfaceEXT(instance, pCreateInfos, pAllocator, pSurface)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn vkCreateXcbSurfaceKHR(
|
||||
instance: VkInstance,
|
||||
|
@ -380,6 +390,13 @@ pub unsafe extern "C" fn vkGetPhysicalDeviceFeatures(
|
|||
gfxGetPhysicalDeviceFeatures(physicalDevice, pFeatures)
|
||||
}
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn vkGetPhysicalDeviceFeatures2KHR(
|
||||
physicalDevice: VkPhysicalDevice,
|
||||
pFeatures: *mut VkPhysicalDeviceFeatures2KHR,
|
||||
) {
|
||||
gfxGetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures)
|
||||
}
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn vkGetPhysicalDeviceImageFormatProperties(
|
||||
physicalDevice: VkPhysicalDevice,
|
||||
format: VkFormat,
|
||||
|
@ -407,6 +424,13 @@ pub unsafe extern "C" fn vkGetPhysicalDeviceProperties(
|
|||
gfxGetPhysicalDeviceProperties(physicalDevice, pProperties)
|
||||
}
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn vkGetPhysicalDeviceProperties2KHR(
|
||||
physicalDevice: VkPhysicalDevice,
|
||||
pProperties: *mut VkPhysicalDeviceProperties2KHR,
|
||||
) {
|
||||
gfxGetPhysicalDeviceProperties2KHR(physicalDevice, pProperties)
|
||||
}
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn vkEnumerateDeviceExtensionProperties(
|
||||
physicalDevice: VkPhysicalDevice,
|
||||
pLayerName: *const ::std::os::raw::c_char,
|
||||
|
|
139
native/test.cpp
139
native/test.cpp
|
@ -22,7 +22,14 @@
|
|||
|
||||
#ifdef _WIN32
|
||||
#define VK_USE_PLATFORM_WIN32_KHR
|
||||
#define USE_SURFACE 1
|
||||
#elif __APPLE__
|
||||
#define VK_USE_PLATFORM_METAL_EXT
|
||||
#define USE_SURFACE 0
|
||||
#else
|
||||
#define USE_SURFACE 1
|
||||
#endif
|
||||
#define VK_ENABLE_BETA_EXTENSIONS
|
||||
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <assert.h>
|
||||
|
@ -54,15 +61,57 @@ bool memory_type_from_properties(
|
|||
return false;
|
||||
}
|
||||
|
||||
bool has_extension(VkExtensionProperties *props, unsigned count, const char* name, uint32_t version) {
|
||||
//printf("\tLooking for %s ver=%d\n", name, version);
|
||||
for (unsigned i = 0; i < count; i++) {
|
||||
//printf("\t\tFound %s ver=%d\n", props[i].extensionName, props[i].specVersion);
|
||||
if (!strcmp(props[i].extensionName, name) && props[i].specVersion == version) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int main() {
|
||||
printf("starting the portability test\n");
|
||||
|
||||
VkInstance instance;
|
||||
VkResult res = (VkResult)0;
|
||||
unsigned int i;
|
||||
unsigned int i = 0;
|
||||
|
||||
uint32_t instance_extension_count = 10;
|
||||
VkExtensionProperties instance_ext_properties[10] = {};
|
||||
res = vkEnumerateInstanceExtensionProperties(NULL, &instance_extension_count, instance_ext_properties);
|
||||
printf("\tvkEnumerateInstanceExtensionProperties: res=%d count=%d\n", res, instance_extension_count);
|
||||
assert(!res);
|
||||
assert(has_extension(
|
||||
instance_ext_properties, instance_extension_count,
|
||||
VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION
|
||||
));
|
||||
|
||||
VkInstanceCreateInfo inst_info = {};
|
||||
inst_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
||||
#ifdef _WIN32
|
||||
assert(has_extension(
|
||||
instance_ext_properties, instance_extension_count,
|
||||
VK_KHR_WIN32_SURFACE_EXTENSION_NAME, VK_KHR_WIN32_SURFACE_SPEC_VERSION
|
||||
));
|
||||
const char* window_extension = VK_KHR_WIN32_SURFACE_EXTENSION_NAME;
|
||||
#elif __APPLE__
|
||||
assert(has_extension(
|
||||
instance_ext_properties, instance_extension_count,
|
||||
VK_EXT_METAL_SURFACE_EXTENSION_NAME, VK_KHR_PORTABILITY_SUBSET_SPEC_VERSION
|
||||
));
|
||||
const char* window_extension = VK_EXT_METAL_SURFACE_EXTENSION_NAME;
|
||||
#else
|
||||
const char* window_extension = VK_KHR_SURFACE_EXTENSION_NAME;
|
||||
#endif
|
||||
const char* enabled_instance_extensions[2] = {
|
||||
window_extension,
|
||||
VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME,
|
||||
};
|
||||
inst_info.ppEnabledExtensionNames = enabled_instance_extensions;
|
||||
inst_info.enabledExtensionCount = 2;
|
||||
res = vkCreateInstance(&inst_info, NULL, &instance);
|
||||
if (res == VK_ERROR_INCOMPATIBLE_DRIVER) {
|
||||
printf("cannot find a compatible Vulkan ICD\n");
|
||||
|
@ -79,6 +128,7 @@ int main() {
|
|||
Config config = { 10, 10, width, height };
|
||||
Window window = new_window(config);
|
||||
|
||||
#if USE_SURFACE
|
||||
VkSurfaceKHR surface = 0;
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -87,26 +137,69 @@ int main() {
|
|||
surface_info.hinstance = window.instance;
|
||||
surface_info.hwnd = window.window;
|
||||
vkCreateWin32SurfaceKHR(instance, &surface_info, NULL, &surface);
|
||||
#elif __APPLE__
|
||||
VkMetalSurfaceCreateInfoEXT surface_info = {};
|
||||
surface_info.sType = VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT;
|
||||
surface_info.pLayer = window.layer;
|
||||
vkCreateMetalSurfaceEXT(instance, &surface_info, NULL, &surface);
|
||||
#endif
|
||||
printf("\tvkCreateSurfaceKHR\n");
|
||||
#endif //USE_SURFACE
|
||||
|
||||
uint32_t adapter_count = 1;
|
||||
VkPhysicalDevice physical_devices[1] = {};
|
||||
res = vkEnumeratePhysicalDevices(instance, &adapter_count, physical_devices);
|
||||
VkPhysicalDevice physical_device = {};
|
||||
res = vkEnumeratePhysicalDevices(instance, &adapter_count, &physical_device);
|
||||
printf("\tvkEnumeratePhysicalDevices: res=%d count=%d\n", res, adapter_count);
|
||||
assert(!res && adapter_count);
|
||||
|
||||
uint32_t device_extension_count = 10;
|
||||
VkExtensionProperties device_ext_properties[10] = {};
|
||||
res = vkEnumerateDeviceExtensionProperties(physical_device, NULL, &device_extension_count, device_ext_properties);
|
||||
printf("\tvkEnumerateDeviceExtensionProperties: res=%d count=%d\n", res, device_extension_count);
|
||||
assert(!res);
|
||||
assert(!res && has_extension(
|
||||
device_ext_properties, device_extension_count,
|
||||
VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME, VK_KHR_PORTABILITY_SUBSET_SPEC_VERSION
|
||||
));
|
||||
|
||||
VkPhysicalDevicePortabilitySubsetPropertiesKHR subset_properties = {
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR,
|
||||
};
|
||||
VkPhysicalDeviceProperties2KHR device_properties = {
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2_KHR,
|
||||
&subset_properties,
|
||||
};
|
||||
vkGetPhysicalDeviceProperties2KHR(physical_device, &device_properties);
|
||||
printf("\tgfxGetPhysicalDeviceProperties2KHR\n");
|
||||
printf("\t\tminVertexInputBindingStrideAlignment = %d\n", subset_properties.minVertexInputBindingStrideAlignment);
|
||||
|
||||
VkPhysicalDevicePortabilitySubsetFeaturesKHR subset_features = {
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR,
|
||||
};
|
||||
VkPhysicalDeviceFeatures2KHR device_features = {
|
||||
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2_KHR,
|
||||
&subset_features,
|
||||
};
|
||||
vkGetPhysicalDeviceFeatures2KHR(physical_device, &device_features);
|
||||
printf("\tgfxGetPhysicalDeviceFeatures2KHR\n");
|
||||
printf("\t\tevents = %d\n", subset_features.events);
|
||||
printf("\t\tpointPolygons = %d\n", subset_features.pointPolygons);
|
||||
printf("\t\tseparateStencilMaskRef = %d\n", subset_features.separateStencilMaskRef);
|
||||
printf("\t\ttriangleFans = %d\n", subset_features.triangleFans);
|
||||
|
||||
VkQueueFamilyProperties queue_family_properties[5];
|
||||
uint32_t queue_family_count = sizeof(queue_family_properties) / sizeof(VkQueueFamilyProperties);
|
||||
|
||||
vkGetPhysicalDeviceQueueFamilyProperties(physical_devices[0], &queue_family_count, queue_family_properties);
|
||||
vkGetPhysicalDeviceQueueFamilyProperties(physical_device, &queue_family_count, queue_family_properties);
|
||||
printf("\tvkGetPhysicalDeviceQueueFamilyProperties: count=%d\n", queue_family_count);
|
||||
assert(queue_family_count);
|
||||
|
||||
int queue_family_index = -1;
|
||||
for (i = 0; i < queue_family_count; i++) {
|
||||
VkBool32 supports_present = 0;
|
||||
vkGetPhysicalDeviceSurfaceSupportKHR(physical_devices[0], i, surface, &supports_present);
|
||||
VkBool32 supports_present = !USE_SURFACE;
|
||||
#if USE_SURFACE
|
||||
vkGetPhysicalDeviceSurfaceSupportKHR(physical_device, i, surface, &supports_present);
|
||||
#endif
|
||||
if ((queue_family_properties[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) && supports_present) {
|
||||
queue_family_index = i;
|
||||
break;
|
||||
|
@ -116,7 +209,7 @@ int main() {
|
|||
assert(queue_family_index >= 0);
|
||||
|
||||
VkPhysicalDeviceMemoryProperties memory_properties = {};
|
||||
vkGetPhysicalDeviceMemoryProperties(physical_devices[0], &memory_properties);
|
||||
vkGetPhysicalDeviceMemoryProperties(physical_device, &memory_properties);
|
||||
printf("\tvkGetPhysicalDeviceMemoryProperties\n");
|
||||
|
||||
VkDeviceQueueCreateInfo queue_info = {};
|
||||
|
@ -125,29 +218,35 @@ int main() {
|
|||
queue_info.queueCount = 1;
|
||||
queue_info.pQueuePriorities = queue_priorities;
|
||||
|
||||
const char* enabled_device_extensions[1] = {
|
||||
VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME,
|
||||
};
|
||||
VkDeviceCreateInfo device_info = {};
|
||||
device_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
|
||||
device_info.queueCreateInfoCount = 1;
|
||||
device_info.pQueueCreateInfos = &queue_info;
|
||||
device_info.enabledExtensionCount = 1;
|
||||
device_info.ppEnabledExtensionNames = enabled_device_extensions;
|
||||
|
||||
VkDevice device = 0;
|
||||
res = vkCreateDevice(physical_devices[0], &device_info, NULL, &device);
|
||||
res = vkCreateDevice(physical_device, &device_info, NULL, &device);
|
||||
printf("\tvkCreateDevice: res=%d\n", res);
|
||||
assert(!res);
|
||||
|
||||
#if USE_SURFACE
|
||||
VkSurfaceFormatKHR surfFormats[20];
|
||||
uint32_t formatCount = sizeof(surfFormats) / sizeof(surfFormats[0]);
|
||||
res = vkGetPhysicalDeviceSurfaceFormatsKHR(physical_devices[0], surface, &formatCount, surfFormats);
|
||||
res = vkGetPhysicalDeviceSurfaceFormatsKHR(physical_device, surface, &formatCount, surfFormats);
|
||||
printf("\tvkGetPhysicalDeviceSurfaceFormatsKHR: res=%d, count=%d\n", res, formatCount);
|
||||
assert(!res);
|
||||
|
||||
VkSurfaceCapabilitiesKHR surfCapabilities;
|
||||
res = vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physical_devices[0], surface, &surfCapabilities);
|
||||
res = vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physical_device, surface, &surfCapabilities);
|
||||
assert(!res);
|
||||
|
||||
VkPresentModeKHR presentModes[10];
|
||||
uint32_t presentModeCount = sizeof(presentModes) / sizeof(presentModes[0]);
|
||||
res = vkGetPhysicalDeviceSurfacePresentModesKHR(physical_devices[0], surface, &presentModeCount, presentModes);
|
||||
res = vkGetPhysicalDeviceSurfacePresentModesKHR(physical_device, surface, &presentModeCount, presentModes);
|
||||
printf("\tvkGetPhysicalDeviceSurfacePresentModesKHR: res=%d, count=%d\n", res, presentModeCount);
|
||||
assert(!res);
|
||||
|
||||
|
@ -225,11 +324,12 @@ int main() {
|
|||
printf("\tvkCreateImageView: res=%d\n", res);
|
||||
assert(!res);
|
||||
}
|
||||
#endif //USE_SURFACE
|
||||
|
||||
VkImageCreateInfo image_info = {};
|
||||
const VkFormat depth_format = VK_FORMAT_D16_UNORM;
|
||||
VkFormatProperties props;
|
||||
vkGetPhysicalDeviceFormatProperties(physical_devices[0], depth_format, &props);
|
||||
vkGetPhysicalDeviceFormatProperties(physical_device, depth_format, &props);
|
||||
printf("\tvkGetPhysicalDeviceFormatProperties\n");
|
||||
printf(
|
||||
"\t\tlinear_tiling_features: %x\n"
|
||||
|
@ -416,10 +516,13 @@ int main() {
|
|||
printf("\tvkAllocateCommandBuffers: res=%d\n", res);
|
||||
assert(!res);
|
||||
|
||||
#if USE_SURFACE
|
||||
printf("polling...");
|
||||
// Some work...
|
||||
while(poll_events()) {
|
||||
|
||||
}
|
||||
#endif //USE_SURFACE
|
||||
|
||||
vkDestroyBuffer(device, uniform_buf, NULL);
|
||||
printf("\tvkDestroyBuffer\n");
|
||||
|
@ -433,18 +536,22 @@ int main() {
|
|||
vkFreeMemory(device, depth_memory, NULL);
|
||||
printf("\tvkFreeMemory\n");
|
||||
|
||||
vkFreeCommandBuffers(device, cmd_pool, 1, &cmd_buffer);
|
||||
printf("\tvkFreeCommandBuffers\n");
|
||||
vkDestroyCommandPool(device, cmd_pool, NULL);
|
||||
printf("\tvkDestroyCommandPool\n");
|
||||
|
||||
#if USE_SURFACE
|
||||
for(auto view : swapchain_views) {
|
||||
vkDestroyImageView(device, view, NULL);
|
||||
printf("\tvkDestroyImageView\n");
|
||||
}
|
||||
vkDestroySwapchainKHR(device, swapchain, NULL);
|
||||
printf("\tvkDestroySwapchainKHR\n");
|
||||
vkFreeCommandBuffers(device, cmd_pool, 1, &cmd_buffer);
|
||||
printf("\tvkFreeCommandBuffers\n");
|
||||
vkDestroyCommandPool(device, cmd_pool, NULL);
|
||||
printf("\tvkDestroyCommandPool\n");
|
||||
vkDestroySurfaceKHR(instance, surface, NULL);
|
||||
printf("\tvkDestroySurfaceKHR\n");
|
||||
#endif
|
||||
|
||||
vkDestroyDevice(device, NULL);
|
||||
printf("\tvkDestroyDevice\n");
|
||||
vkDestroyInstance(instance, NULL);
|
||||
|
|
|
@ -17,6 +17,7 @@ struct Window {
|
|||
HINSTANCE instance;
|
||||
HWND window;
|
||||
#elif __APPLE__
|
||||
void *layer;
|
||||
#else
|
||||
xcb_connection_t *connection;
|
||||
xcb_drawable_t window;
|
||||
|
|
Loading…
Reference in a new issue