Update for VulkanSC-Docs 1.0.9 (initial Vulkan SC public release)

This commit is contained in:
Jon Leech 2022-02-25 05:00:42 -08:00
parent 787244e9a2
commit ff9cf1f1f2
36 changed files with 159860 additions and 26 deletions

View file

@ -2,27 +2,13 @@
Vulkan header files and API registry
## Default branch changed to 'main' 2021-09-12
The default branch of this repository is `main`, containing files for the Vulkan API.
As discussed in #222, the default branch of this repository is now 'main'.
This change should be largely transparent to repository users, since github
rewrites many references to the old 'master' branch to 'main'. However, if
you have a checked-out local clone, you may wish to take the following steps
as recommended by github:
```sh
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
```
## Vulkan SC Headers and JSON Files
The `sc_main` branch of this repository contains generated headers and JSON
files for the Vulkan SC specification.
The `sc_main` branch contains files for the Vulkan SC API.
The API XML and some of the scripts in this branch differ slightly from the
equivalent files in the `main` branch for Vulkan.
equivalent files in the `main` branch for Vulkan, and there are additional
generated `.json` files in the `json/` directory.
## Repository Content
@ -33,7 +19,12 @@ If proposking changes to any file originating from a different repository,
please propose such changes in that repository, rather than Vulkan-Headers.
Files in this repository originate from:
### Specification repository (https://github.com/KhronosGroup/Vulkan-Docs)
### Specification repository
For the `main` branch, these files are derived from https://github.com/KhronosGroup/Vulkan-Docs
For the `sc_main` branch, these files are derived from https://github.com/KhronosGroup/VulkanSC-Docs
* registry/cgenerator.py
* registry/conventions.py
@ -45,6 +36,8 @@ Files in this repository originate from:
* registry/vk.xml
* registry/vkconventions.py
* All files under include/vulkan/ which are *not* listed explicitly as originating from another repository.
* For the `sc_main` branch, all `.json` files under `json/`
### This repository (https://github.com/KhronosGroup/Vulkan-Headers)
@ -62,13 +55,14 @@ Files in this repository originate from:
* include/vulkan/vk_layer.h
* include/vulkan/vk_sdk_platform.h
### Vulkan C++ Binding Repository (https://github.com/KhronosGroup/Vulkan-Hpp)
As of the Vulkan-Docs 1.2.182 spec update, the Vulkan-Hpp headers have been
split into multiple files. All of those files are now included in this
repository.
*NOTE*: the `sc_main_ branch does not currently contain C++ headers, which
**Note**: the `sc_main_ branch does not currently contain C++ headers, which
are not currently generated for Vulkan SC.
* include/vulkan/vulkan.hpp
@ -78,14 +72,14 @@ are not currently generated for Vulkan SC.
* include/vulkan/vulkan_raii.hpp
* include/vulkan/vulkan_structs.hpp
## Version Tagging Scheme
Updates to the `Vulkan-Headers` repository which correspond to a new Vulkan
specification release are tagged using the following format:
`v<`_`version`_`>` (e.g., `v1.3.202`).
Updates to `main` branch corresponding to a new Vulkan specification release
are tagged with the format: `v<`_`version`_`>` (e.g., `v1.3.202`).
Updates which correspond to a new Vulkan SC specification release are tagged
using the following format: `vksc<`_`version`_`>` (e.g., `vksc1.0.9`).
Updates to `sc_main` branch corresponding to a new Vulkan SC specification
release are tagged with the format: `vksc<`_`version`_`>` (e.g., `vksc1.0.9`).
**Note**: Marked version releases have undergone thorough testing but do not
imply the same quality level as SDK tags. SDK tags follow the

View file

@ -0,0 +1,84 @@
//
// File: vk_platform.h
//
/*
** Copyright 2014-2021 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
#ifndef VK_PLATFORM_H_
#define VK_PLATFORM_H_
#ifdef __cplusplus
extern "C"
{
#endif // __cplusplus
/*
***************************************************************************************************
* Platform-specific directives and type declarations
***************************************************************************************************
*/
/* Platform-specific calling convention macros.
*
* Platforms should define these so that Vulkan clients call Vulkan commands
* with the same calling conventions that the Vulkan implementation expects.
*
* VKAPI_ATTR - Placed before the return type in function declarations.
* Useful for C++11 and GCC/Clang-style function attribute syntax.
* VKAPI_CALL - Placed after the return type in function declarations.
* Useful for MSVC-style calling convention syntax.
* VKAPI_PTR - Placed between the '(' and '*' in function pointer types.
*
* Function declaration: VKAPI_ATTR void VKAPI_CALL vkCommand(void);
* Function pointer type: typedef void (VKAPI_PTR *PFN_vkCommand)(void);
*/
#if defined(_WIN32)
// On Windows, Vulkan commands use the stdcall convention
#define VKAPI_ATTR
#define VKAPI_CALL __stdcall
#define VKAPI_PTR VKAPI_CALL
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
#error "Vulkan is not supported for the 'armeabi' NDK ABI"
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
// On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
// calling convention, i.e. float parameters are passed in registers. This
// is true even if the rest of the application passes floats on the stack,
// as it does by default when compiling for the armeabi-v7a NDK ABI.
#define VKAPI_ATTR __attribute__((pcs("aapcs-vfp")))
#define VKAPI_CALL
#define VKAPI_PTR VKAPI_ATTR
#else
// On other platforms, use the default calling convention
#define VKAPI_ATTR
#define VKAPI_CALL
#define VKAPI_PTR
#endif
#if !defined(VK_NO_STDDEF_H)
#include <stddef.h>
#endif // !defined(VK_NO_STDDEF_H)
#if !defined(VK_NO_STDINT_H)
#if defined(_MSC_VER) && (_MSC_VER < 1600)
typedef signed __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef signed __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef signed __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else
#include <stdint.h>
#endif
#endif // !defined(VK_NO_STDINT_H)
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
#endif

View file

@ -0,0 +1,25 @@
#ifndef VULKAN_ANDROID_H_
#define VULKAN_ANDROID_H_ 1
/*
** Copyright 2015-2021 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
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,25 @@
#ifndef VULKAN_BETA_H_
#define VULKAN_BETA_H_ 1
/*
** Copyright 2015-2021 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
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,25 @@
#ifndef VULKAN_DIRECTFB_H_
#define VULKAN_DIRECTFB_H_ 1
/*
** Copyright 2015-2021 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
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,25 @@
#ifndef VULKAN_FUCHSIA_H_
#define VULKAN_FUCHSIA_H_ 1
/*
** Copyright 2015-2021 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
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,25 @@
#ifndef VULKAN_GGP_H_
#define VULKAN_GGP_H_ 1
/*
** Copyright 2015-2021 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
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,25 @@
#ifndef VULKAN_IOS_H_
#define VULKAN_IOS_H_ 1
/*
** Copyright 2015-2021 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
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,25 @@
#ifndef VULKAN_MACOS_H_
#define VULKAN_MACOS_H_ 1
/*
** Copyright 2015-2021 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
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,25 @@
#ifndef VULKAN_METAL_H_
#define VULKAN_METAL_H_ 1
/*
** Copyright 2015-2021 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
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,93 @@
#ifndef VULKAN_SC_H_
#define VULKAN_SC_H_ 1
/*
** Copyright 2015-2021 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
#include "vk_platform.h"
#include "vulkan_sc_core.h"
#ifdef VK_USE_PLATFORM_ANDROID_KHR
#include "vulkan_android.h"
#endif
#ifdef VK_USE_PLATFORM_FUCHSIA
#include <zircon/types.h>
#include "vulkan_fuchsia.h"
#endif
#ifdef VK_USE_PLATFORM_IOS_MVK
#include "vulkan_ios.h"
#endif
#ifdef VK_USE_PLATFORM_MACOS_MVK
#include "vulkan_macos.h"
#endif
#ifdef VK_USE_PLATFORM_METAL_EXT
#include "vulkan_metal.h"
#endif
#ifdef VK_USE_PLATFORM_VI_NN
#include "vulkan_vi.h"
#endif
#ifdef VK_USE_PLATFORM_WAYLAND_KHR
#include <wayland-client.h>
#include "vulkan_wayland.h"
#endif
#ifdef VK_USE_PLATFORM_WIN32_KHR
#include <windows.h>
#include "vulkan_win32.h"
#endif
#ifdef VK_USE_PLATFORM_XCB_KHR
#include <xcb/xcb.h>
#include "vulkan_xcb.h"
#endif
#ifdef VK_USE_PLATFORM_XLIB_KHR
#include <X11/Xlib.h>
#include "vulkan_xlib.h"
#endif
#ifdef VK_USE_PLATFORM_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_USE_PLATFORM_SCREEN_QNX
#include <screen/screen.h>
#include "vulkan_screen.h"
#endif
#ifdef VK_ENABLE_BETA_EXTENSIONS
#include "vulkan_beta.h"
#endif
#endif // VULKAN_SC_H_

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,25 @@
#ifndef VULKAN_SCREEN_H_
#define VULKAN_SCREEN_H_ 1
/*
** Copyright 2015-2021 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
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,25 @@
#ifndef VULKAN_VI_H_
#define VULKAN_VI_H_ 1
/*
** Copyright 2015-2021 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
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,25 @@
#ifndef VULKAN_WAYLAND_H_
#define VULKAN_WAYLAND_H_ 1
/*
** Copyright 2015-2021 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
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,25 @@
#ifndef VULKAN_WIN32_H_
#define VULKAN_WIN32_H_ 1
/*
** Copyright 2015-2021 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
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,25 @@
#ifndef VULKAN_XCB_H_
#define VULKAN_XCB_H_ 1
/*
** Copyright 2015-2021 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
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,25 @@
#ifndef VULKAN_XLIB_H_
#define VULKAN_XLIB_H_ 1
/*
** Copyright 2015-2021 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
#ifdef __cplusplus
}
#endif
#endif

View file

@ -0,0 +1,25 @@
#ifndef VULKAN_XLIB_XRANDR_H_
#define VULKAN_XLIB_XRANDR_H_ 1
/*
** Copyright 2015-2021 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
#ifdef __cplusplus
}
#endif
#endif

5255
json/vk.json Normal file

File diff suppressed because it is too large Load diff

60
json/vkpcc.json Normal file
View file

@ -0,0 +1,60 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "https://schema.khronos.org/vulkan/vkpcc.json#",
"title": "JSON schema for Vulkan pipeline state",
"description": "Schema for representing Vulkan pipeline state for use with the offline Pipeline Cache Compiler.",
"type": "object",
"additionalProperties": true,
"definitions": {
"ShaderInfo" : {
"stage" : {"type": "string", "format": "uri"},
"filename" : {"type": "string", "format": "uri"}
},
"GraphicsPipelineState": {
"type": "object",
"additionalProperties": false,
"properties": {
"Renderpass": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkRenderPassCreateInfo"},
"Renderpass2": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkRenderPassCreateInfo2"},
"YcbcrSamplers": {"type": "array", "minItems": 0, "maxItems": 255, "items": {"type": "object", "patternProperties": {"^\\w+$": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkSamplerYcbcrConversionCreateInfo"}}}},
"ImmutableSamplers": {"type": "array", "minItems": 0, "maxItems": 255, "items": {"type": "object", "patternProperties": {"^\\w+$": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkSamplerCreateInfo"}}}},
"DescriptorSetLayouts": {"type": "array", "minItems": 0, "maxItems": 255, "items": {"type": "object", "patternProperties": {"^\\w+$": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkDescriptorSetLayoutCreateInfo"}}}},
"PipelineLayout": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkPipelineLayoutCreateInfo"},
"GraphicsPipeline": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkGraphicsPipelineCreateInfo"},
"ShaderFileNames": {"type": "array", "minItems": 0, "maxItems": 255, "items": {"$ref": "#/definitions/ShaderInfo"}},
"PhysicalDeviceFeatures": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkPhysicalDeviceFeatures2"}
},
"oneOf" : [{"required" : ["Renderpass"]}, {"required" : ["Renderpass2"]}],
"required" : ["PipelineLayout", "GraphicsPipeline", "ShaderFileNames"]
},
"ComputePipelineState": {
"type": "object",
"additionalProperties": false,
"properties": {
"YcbcrSamplers": {"type": "array", "minItems": 0, "maxItems": 255, "items": {"type": "object", "patternProperties": {"^\\w+$": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkSamplerYcbcrConversionCreateInfo"}}}},
"ImmutableSamplers": {"type": "array", "minItems": 0, "maxItems": 255, "items": {"type": "object", "patternProperties": {"^\\w+$": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkSamplerCreateInfo"}}}},
"DescriptorSetLayouts": {"type": "array", "minItems": 0, "maxItems": 255, "items": {"type": "object", "patternProperties": {"^\\w+$": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkDescriptorSetLayoutCreateInfo"}}}},
"PipelineLayout": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkPipelineLayoutCreateInfo"},
"ComputePipeline": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkComputePipelineCreateInfo"},
"ShaderFileNames": {"$ref": "#/definitions/ShaderInfo"},
"PhysicalDeviceFeatures": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/VkPhysicalDeviceFeatures2"}
},
"required" : ["PipelineLayout", "ComputePipeline", "ShaderFileNames"]
}
},
"properties": {
"GraphicsPipelineState" : {"$ref": "#/definitions/GraphicsPipelineState"},
"ComputePipelineState" : {"$ref": "#/definitions/ComputePipelineState"},
"PipelineUUID" : {"type": "array", "minItems": 16, "maxItems": 16, "items": {"$ref": "https://schema.khronos.org/vulkan/vk.json#/definitions/uint8_t"}},
"DeviceExtensions" : {"type": "array", "items": {"type": "string", "format": "uri"}}
},
"anyOf": [
{"required": ["GraphicsPipelineState"]},
{"required": ["ComputePipelineState"]}
]
}

36108
json/vulkan_json_data.hpp Normal file

File diff suppressed because it is too large Load diff

20787
json/vulkan_json_gen.c Normal file

File diff suppressed because it is too large Load diff

975
json/vulkan_json_gen.h Normal file
View file

@ -0,0 +1,975 @@
/*
** Copyright (c) 2020 The Khronos Group Inc.
**
** SPDX-License-Identifier: Apache-2.0
*/
/********************************************************************************************/
/** This code is generated. To make changes, please modify the scripts or the relevant xml **/
/********************************************************************************************/
#pragma once
#include <stdio.h>
#include <vulkan/vulkan.h>
const char* getJSONOutput(void);
void resetJSONOutput(void);
/*************************************** Begin prototypes ***********************************/
void print_VkSampleMask(const VkSampleMask* obj, const char* str, int commaNeeded);
void print_VkBool32(const VkBool32* obj, const char* str, int commaNeeded);
void print_VkFlags(const VkFlags* obj, const char* str, int commaNeeded);
#ifdef VK_KHR_synchronization2
void print_VkFlags64(const VkFlags64* obj, const char* str, int commaNeeded);
#endif
void print_VkDeviceSize(const VkDeviceSize* obj, const char* str, int commaNeeded);
void print_VkDeviceAddress(const VkDeviceAddress* obj, const char* str, int commaNeeded);
void print_VkFramebufferCreateFlags(const VkFramebufferCreateFlags* obj, const char* str, int commaNeeded);
void print_VkQueryPoolCreateFlags(const VkQueryPoolCreateFlags* obj, const char* str, int commaNeeded);
void print_VkRenderPassCreateFlags(const VkRenderPassCreateFlags* obj, const char* str, int commaNeeded);
void print_VkSamplerCreateFlags(const VkSamplerCreateFlags* obj, const char* str, int commaNeeded);
void print_VkPipelineLayoutCreateFlags(const VkPipelineLayoutCreateFlags* obj, const char* str, int commaNeeded);
void print_VkPipelineCacheCreateFlags(const VkPipelineCacheCreateFlags* obj, const char* str, int commaNeeded);
void print_VkPipelineDepthStencilStateCreateFlags(const VkPipelineDepthStencilStateCreateFlags* obj, const char* str, int commaNeeded);
void print_VkPipelineDynamicStateCreateFlags(const VkPipelineDynamicStateCreateFlags* obj, const char* str, int commaNeeded);
void print_VkPipelineColorBlendStateCreateFlags(const VkPipelineColorBlendStateCreateFlags* obj, const char* str, int commaNeeded);
void print_VkPipelineMultisampleStateCreateFlags(const VkPipelineMultisampleStateCreateFlags* obj, const char* str, int commaNeeded);
void print_VkPipelineRasterizationStateCreateFlags(const VkPipelineRasterizationStateCreateFlags* obj, const char* str, int commaNeeded);
void print_VkPipelineViewportStateCreateFlags(const VkPipelineViewportStateCreateFlags* obj, const char* str, int commaNeeded);
void print_VkPipelineTessellationStateCreateFlags(const VkPipelineTessellationStateCreateFlags* obj, const char* str, int commaNeeded);
void print_VkPipelineInputAssemblyStateCreateFlags(const VkPipelineInputAssemblyStateCreateFlags* obj, const char* str, int commaNeeded);
void print_VkPipelineVertexInputStateCreateFlags(const VkPipelineVertexInputStateCreateFlags* obj, const char* str, int commaNeeded);
void print_VkPipelineShaderStageCreateFlags(const VkPipelineShaderStageCreateFlags* obj, const char* str, int commaNeeded);
void print_VkDescriptorSetLayoutCreateFlags(const VkDescriptorSetLayoutCreateFlags* obj, const char* str, int commaNeeded);
void print_VkBufferViewCreateFlags(const VkBufferViewCreateFlags* obj, const char* str, int commaNeeded);
void print_VkInstanceCreateFlags(const VkInstanceCreateFlags* obj, const char* str, int commaNeeded);
void print_VkDeviceCreateFlags(const VkDeviceCreateFlags* obj, const char* str, int commaNeeded);
void print_VkDeviceQueueCreateFlags(const VkDeviceQueueCreateFlags* obj, const char* str, int commaNeeded);
void print_VkQueueFlags(const VkQueueFlags* obj, const char* str, int commaNeeded);
void print_VkMemoryPropertyFlags(const VkMemoryPropertyFlags* obj, const char* str, int commaNeeded);
void print_VkMemoryHeapFlags(const VkMemoryHeapFlags* obj, const char* str, int commaNeeded);
void print_VkAccessFlags(const VkAccessFlags* obj, const char* str, int commaNeeded);
void print_VkBufferUsageFlags(const VkBufferUsageFlags* obj, const char* str, int commaNeeded);
void print_VkBufferCreateFlags(const VkBufferCreateFlags* obj, const char* str, int commaNeeded);
void print_VkShaderStageFlags(const VkShaderStageFlags* obj, const char* str, int commaNeeded);
void print_VkImageUsageFlags(const VkImageUsageFlags* obj, const char* str, int commaNeeded);
void print_VkImageCreateFlags(const VkImageCreateFlags* obj, const char* str, int commaNeeded);
void print_VkImageViewCreateFlags(const VkImageViewCreateFlags* obj, const char* str, int commaNeeded);
void print_VkPipelineCreateFlags(const VkPipelineCreateFlags* obj, const char* str, int commaNeeded);
void print_VkColorComponentFlags(const VkColorComponentFlags* obj, const char* str, int commaNeeded);
void print_VkFenceCreateFlags(const VkFenceCreateFlags* obj, const char* str, int commaNeeded);
void print_VkSemaphoreCreateFlags(const VkSemaphoreCreateFlags* obj, const char* str, int commaNeeded);
void print_VkFormatFeatureFlags(const VkFormatFeatureFlags* obj, const char* str, int commaNeeded);
void print_VkQueryControlFlags(const VkQueryControlFlags* obj, const char* str, int commaNeeded);
void print_VkQueryResultFlags(const VkQueryResultFlags* obj, const char* str, int commaNeeded);
void print_VkEventCreateFlags(const VkEventCreateFlags* obj, const char* str, int commaNeeded);
void print_VkCommandPoolCreateFlags(const VkCommandPoolCreateFlags* obj, const char* str, int commaNeeded);
void print_VkCommandPoolResetFlags(const VkCommandPoolResetFlags* obj, const char* str, int commaNeeded);
void print_VkCommandBufferResetFlags(const VkCommandBufferResetFlags* obj, const char* str, int commaNeeded);
void print_VkCommandBufferUsageFlags(const VkCommandBufferUsageFlags* obj, const char* str, int commaNeeded);
void print_VkQueryPipelineStatisticFlags(const VkQueryPipelineStatisticFlags* obj, const char* str, int commaNeeded);
void print_VkMemoryMapFlags(const VkMemoryMapFlags* obj, const char* str, int commaNeeded);
void print_VkImageAspectFlags(const VkImageAspectFlags* obj, const char* str, int commaNeeded);
void print_VkSubpassDescriptionFlags(const VkSubpassDescriptionFlags* obj, const char* str, int commaNeeded);
void print_VkPipelineStageFlags(const VkPipelineStageFlags* obj, const char* str, int commaNeeded);
void print_VkSampleCountFlags(const VkSampleCountFlags* obj, const char* str, int commaNeeded);
void print_VkAttachmentDescriptionFlags(const VkAttachmentDescriptionFlags* obj, const char* str, int commaNeeded);
void print_VkStencilFaceFlags(const VkStencilFaceFlags* obj, const char* str, int commaNeeded);
void print_VkCullModeFlags(const VkCullModeFlags* obj, const char* str, int commaNeeded);
void print_VkDescriptorPoolCreateFlags(const VkDescriptorPoolCreateFlags* obj, const char* str, int commaNeeded);
void print_VkDescriptorPoolResetFlags(const VkDescriptorPoolResetFlags* obj, const char* str, int commaNeeded);
void print_VkDependencyFlags(const VkDependencyFlags* obj, const char* str, int commaNeeded);
#ifdef VK_VERSION_1_1
void print_VkSubgroupFeatureFlags(const VkSubgroupFeatureFlags* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_performance_query
void print_VkPerformanceCounterDescriptionFlagsKHR(const VkPerformanceCounterDescriptionFlagsKHR* obj, const char* str, int commaNeeded);
void print_VkAcquireProfilingLockFlagsKHR(const VkAcquireProfilingLockFlagsKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkSemaphoreWaitFlags(const VkSemaphoreWaitFlags* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_object_refresh
void print_VkRefreshObjectFlagsKHR(const VkRefreshObjectFlagsKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_synchronization2
void print_VkAccessFlags2KHR(const VkAccessFlags2KHR* obj, const char* str, int commaNeeded);
void print_VkPipelineStageFlags2KHR(const VkPipelineStageFlags2KHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_surface
void print_VkCompositeAlphaFlagsKHR(const VkCompositeAlphaFlagsKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_display
void print_VkDisplayPlaneAlphaFlagsKHR(const VkDisplayPlaneAlphaFlagsKHR* obj, const char* str, int commaNeeded);
void print_VkSurfaceTransformFlagsKHR(const VkSurfaceTransformFlagsKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_swapchain
void print_VkSwapchainCreateFlagsKHR(const VkSwapchainCreateFlagsKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_display
void print_VkDisplayModeCreateFlagsKHR(const VkDisplayModeCreateFlagsKHR* obj, const char* str, int commaNeeded);
void print_VkDisplaySurfaceCreateFlagsKHR(const VkDisplaySurfaceCreateFlagsKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_headless_surface
void print_VkHeadlessSurfaceCreateFlagsEXT(const VkHeadlessSurfaceCreateFlagsEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkPeerMemoryFeatureFlags(const VkPeerMemoryFeatureFlags* obj, const char* str, int commaNeeded);
void print_VkMemoryAllocateFlags(const VkMemoryAllocateFlags* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_swapchain
void print_VkDeviceGroupPresentModeFlagsKHR(const VkDeviceGroupPresentModeFlagsKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkExternalMemoryHandleTypeFlags(const VkExternalMemoryHandleTypeFlags* obj, const char* str, int commaNeeded);
void print_VkExternalMemoryFeatureFlags(const VkExternalMemoryFeatureFlags* obj, const char* str, int commaNeeded);
void print_VkExternalSemaphoreHandleTypeFlags(const VkExternalSemaphoreHandleTypeFlags* obj, const char* str, int commaNeeded);
void print_VkExternalSemaphoreFeatureFlags(const VkExternalSemaphoreFeatureFlags* obj, const char* str, int commaNeeded);
void print_VkSemaphoreImportFlags(const VkSemaphoreImportFlags* obj, const char* str, int commaNeeded);
void print_VkExternalFenceHandleTypeFlags(const VkExternalFenceHandleTypeFlags* obj, const char* str, int commaNeeded);
void print_VkExternalFenceFeatureFlags(const VkExternalFenceFeatureFlags* obj, const char* str, int commaNeeded);
void print_VkFenceImportFlags(const VkFenceImportFlags* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_display_surface_counter
void print_VkSurfaceCounterFlagsEXT(const VkSurfaceCounterFlagsEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_discard_rectangles
void print_VkPipelineDiscardRectangleStateCreateFlagsEXT(const VkPipelineDiscardRectangleStateCreateFlagsEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_debug_utils
void print_VkDebugUtilsMessageSeverityFlagsEXT(const VkDebugUtilsMessageSeverityFlagsEXT* obj, const char* str, int commaNeeded);
void print_VkDebugUtilsMessageTypeFlagsEXT(const VkDebugUtilsMessageTypeFlagsEXT* obj, const char* str, int commaNeeded);
void print_VkDebugUtilsMessengerCreateFlagsEXT(const VkDebugUtilsMessengerCreateFlagsEXT* obj, const char* str, int commaNeeded);
void print_VkDebugUtilsMessengerCallbackDataFlagsEXT(const VkDebugUtilsMessengerCallbackDataFlagsEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_conservative_rasterization
void print_VkPipelineRasterizationConservativeStateCreateFlagsEXT(const VkPipelineRasterizationConservativeStateCreateFlagsEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkDescriptorBindingFlags(const VkDescriptorBindingFlags* obj, const char* str, int commaNeeded);
void print_VkResolveModeFlags(const VkResolveModeFlags* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_depth_clip_enable
void print_VkPipelineRasterizationDepthClipStateCreateFlagsEXT(const VkPipelineRasterizationDepthClipStateCreateFlagsEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_synchronization2
void print_VkSubmitFlagsKHR(const VkSubmitFlagsKHR* obj, const char* str, int commaNeeded);
#endif
void print_VkInstance(const VkInstance* obj, const char* str, int commaNeeded);
void print_VkPhysicalDevice(const VkPhysicalDevice* obj, const char* str, int commaNeeded);
void print_VkDevice(const VkDevice* obj, const char* str, int commaNeeded);
void print_VkQueue(const VkQueue* obj, const char* str, int commaNeeded);
void print_VkCommandBuffer(const VkCommandBuffer* obj, const char* str, int commaNeeded);
void print_VkDeviceMemory(const VkDeviceMemory* obj, const char* str, int commaNeeded);
void print_VkCommandPool(const VkCommandPool* obj, const char* str, int commaNeeded);
void print_VkBuffer(const VkBuffer* obj, const char* str, int commaNeeded);
void print_VkBufferView(const VkBufferView* obj, const char* str, int commaNeeded);
void print_VkImage(const VkImage* obj, const char* str, int commaNeeded);
void print_VkImageView(const VkImageView* obj, const char* str, int commaNeeded);
void print_VkShaderModule(const VkShaderModule* obj, const char* str, int commaNeeded);
void print_VkPipeline(const VkPipeline* obj, const char* str, int commaNeeded);
void print_VkPipelineLayout(const VkPipelineLayout* obj, const char* str, int commaNeeded);
void print_VkSampler(const VkSampler* obj, const char* str, int commaNeeded);
void print_VkDescriptorSet(const VkDescriptorSet* obj, const char* str, int commaNeeded);
void print_VkDescriptorSetLayout(const VkDescriptorSetLayout* obj, const char* str, int commaNeeded);
void print_VkDescriptorPool(const VkDescriptorPool* obj, const char* str, int commaNeeded);
void print_VkFence(const VkFence* obj, const char* str, int commaNeeded);
void print_VkSemaphore(const VkSemaphore* obj, const char* str, int commaNeeded);
void print_VkEvent(const VkEvent* obj, const char* str, int commaNeeded);
void print_VkQueryPool(const VkQueryPool* obj, const char* str, int commaNeeded);
void print_VkFramebuffer(const VkFramebuffer* obj, const char* str, int commaNeeded);
void print_VkRenderPass(const VkRenderPass* obj, const char* str, int commaNeeded);
void print_VkPipelineCache(const VkPipelineCache* obj, const char* str, int commaNeeded);
#ifdef VK_VERSION_1_1
void print_VkSamplerYcbcrConversion(const VkSamplerYcbcrConversion* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_display
void print_VkDisplayKHR(const VkDisplayKHR* obj, const char* str, int commaNeeded);
void print_VkDisplayModeKHR(const VkDisplayModeKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_surface
void print_VkSurfaceKHR(const VkSurfaceKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_swapchain
void print_VkSwapchainKHR(const VkSwapchainKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_debug_utils
void print_VkDebugUtilsMessengerEXT(const VkDebugUtilsMessengerEXT* obj, const char* str, int commaNeeded);
#endif
void print_VkAttachmentLoadOp(const VkAttachmentLoadOp* obj, const char* str, int commaNeeded);
void print_VkAttachmentStoreOp(const VkAttachmentStoreOp* obj, const char* str, int commaNeeded);
void print_VkBlendFactor(const VkBlendFactor* obj, const char* str, int commaNeeded);
void print_VkBlendOp(const VkBlendOp* obj, const char* str, int commaNeeded);
void print_VkBorderColor(const VkBorderColor* obj, const char* str, int commaNeeded);
void print_VkFramebufferCreateFlagBits(const VkFramebufferCreateFlagBits* obj, const char* str, int commaNeeded);
void print_VkRenderPassCreateFlagBits(const VkRenderPassCreateFlagBits* obj, const char* str, int commaNeeded);
void print_VkSamplerCreateFlagBits(const VkSamplerCreateFlagBits* obj, const char* str, int commaNeeded);
void print_VkPipelineCacheHeaderVersion(const VkPipelineCacheHeaderVersion* obj, const char* str, int commaNeeded);
#ifdef VKSC_VERSION_1_0
void print_VkPipelineCacheCreateFlagBits(const VkPipelineCacheCreateFlagBits* obj, const char* str, int commaNeeded);
#endif
void print_VkPipelineShaderStageCreateFlagBits(const VkPipelineShaderStageCreateFlagBits* obj, const char* str, int commaNeeded);
void print_VkDescriptorSetLayoutCreateFlagBits(const VkDescriptorSetLayoutCreateFlagBits* obj, const char* str, int commaNeeded);
#ifdef VK_VERSION_1_1
void print_VkDeviceQueueCreateFlagBits(const VkDeviceQueueCreateFlagBits* obj, const char* str, int commaNeeded);
#endif
void print_VkBufferCreateFlagBits(const VkBufferCreateFlagBits* obj, const char* str, int commaNeeded);
void print_VkBufferUsageFlagBits(const VkBufferUsageFlagBits* obj, const char* str, int commaNeeded);
void print_VkColorComponentFlagBits(const VkColorComponentFlagBits* obj, const char* str, int commaNeeded);
void print_VkComponentSwizzle(const VkComponentSwizzle* obj, const char* str, int commaNeeded);
void print_VkCommandPoolCreateFlagBits(const VkCommandPoolCreateFlagBits* obj, const char* str, int commaNeeded);
void print_VkCommandPoolResetFlagBits(const VkCommandPoolResetFlagBits* obj, const char* str, int commaNeeded);
void print_VkCommandBufferResetFlagBits(const VkCommandBufferResetFlagBits* obj, const char* str, int commaNeeded);
void print_VkCommandBufferLevel(const VkCommandBufferLevel* obj, const char* str, int commaNeeded);
void print_VkCommandBufferUsageFlagBits(const VkCommandBufferUsageFlagBits* obj, const char* str, int commaNeeded);
void print_VkCompareOp(const VkCompareOp* obj, const char* str, int commaNeeded);
void print_VkCullModeFlagBits(const VkCullModeFlagBits* obj, const char* str, int commaNeeded);
void print_VkDescriptorType(const VkDescriptorType* obj, const char* str, int commaNeeded);
void print_VkDynamicState(const VkDynamicState* obj, const char* str, int commaNeeded);
void print_VkFenceCreateFlagBits(const VkFenceCreateFlagBits* obj, const char* str, int commaNeeded);
void print_VkPolygonMode(const VkPolygonMode* obj, const char* str, int commaNeeded);
void print_VkFormat(const VkFormat* obj, const char* str, int commaNeeded);
void print_VkFormatFeatureFlagBits(const VkFormatFeatureFlagBits* obj, const char* str, int commaNeeded);
void print_VkFrontFace(const VkFrontFace* obj, const char* str, int commaNeeded);
void print_VkImageAspectFlagBits(const VkImageAspectFlagBits* obj, const char* str, int commaNeeded);
void print_VkImageCreateFlagBits(const VkImageCreateFlagBits* obj, const char* str, int commaNeeded);
void print_VkImageLayout(const VkImageLayout* obj, const char* str, int commaNeeded);
void print_VkImageTiling(const VkImageTiling* obj, const char* str, int commaNeeded);
void print_VkImageType(const VkImageType* obj, const char* str, int commaNeeded);
void print_VkImageUsageFlagBits(const VkImageUsageFlagBits* obj, const char* str, int commaNeeded);
void print_VkImageViewCreateFlagBits(const VkImageViewCreateFlagBits* obj, const char* str, int commaNeeded);
void print_VkImageViewType(const VkImageViewType* obj, const char* str, int commaNeeded);
void print_VkSharingMode(const VkSharingMode* obj, const char* str, int commaNeeded);
void print_VkIndexType(const VkIndexType* obj, const char* str, int commaNeeded);
void print_VkLogicOp(const VkLogicOp* obj, const char* str, int commaNeeded);
void print_VkMemoryHeapFlagBits(const VkMemoryHeapFlagBits* obj, const char* str, int commaNeeded);
void print_VkAccessFlagBits(const VkAccessFlagBits* obj, const char* str, int commaNeeded);
void print_VkMemoryPropertyFlagBits(const VkMemoryPropertyFlagBits* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceType(const VkPhysicalDeviceType* obj, const char* str, int commaNeeded);
void print_VkPipelineBindPoint(const VkPipelineBindPoint* obj, const char* str, int commaNeeded);
void print_VkPipelineCreateFlagBits(const VkPipelineCreateFlagBits* obj, const char* str, int commaNeeded);
void print_VkPrimitiveTopology(const VkPrimitiveTopology* obj, const char* str, int commaNeeded);
void print_VkQueryControlFlagBits(const VkQueryControlFlagBits* obj, const char* str, int commaNeeded);
void print_VkQueryPipelineStatisticFlagBits(const VkQueryPipelineStatisticFlagBits* obj, const char* str, int commaNeeded);
void print_VkQueryResultFlagBits(const VkQueryResultFlagBits* obj, const char* str, int commaNeeded);
void print_VkQueryType(const VkQueryType* obj, const char* str, int commaNeeded);
void print_VkQueueFlagBits(const VkQueueFlagBits* obj, const char* str, int commaNeeded);
void print_VkSubpassContents(const VkSubpassContents* obj, const char* str, int commaNeeded);
void print_VkResult(const VkResult* obj, const char* str, int commaNeeded);
void print_VkShaderStageFlagBits(const VkShaderStageFlagBits* obj, const char* str, int commaNeeded);
void print_VkStencilFaceFlagBits(const VkStencilFaceFlagBits* obj, const char* str, int commaNeeded);
void print_VkStencilOp(const VkStencilOp* obj, const char* str, int commaNeeded);
void print_VkStructureType(const VkStructureType* obj, const char* str, int commaNeeded);
void print_VkSystemAllocationScope(const VkSystemAllocationScope* obj, const char* str, int commaNeeded);
void print_VkInternalAllocationType(const VkInternalAllocationType* obj, const char* str, int commaNeeded);
void print_VkSamplerAddressMode(const VkSamplerAddressMode* obj, const char* str, int commaNeeded);
void print_VkFilter(const VkFilter* obj, const char* str, int commaNeeded);
void print_VkSamplerMipmapMode(const VkSamplerMipmapMode* obj, const char* str, int commaNeeded);
void print_VkVertexInputRate(const VkVertexInputRate* obj, const char* str, int commaNeeded);
void print_VkPipelineStageFlagBits(const VkPipelineStageFlagBits* obj, const char* str, int commaNeeded);
void print_VkSampleCountFlagBits(const VkSampleCountFlagBits* obj, const char* str, int commaNeeded);
void print_VkAttachmentDescriptionFlagBits(const VkAttachmentDescriptionFlagBits* obj, const char* str, int commaNeeded);
void print_VkDescriptorPoolCreateFlagBits(const VkDescriptorPoolCreateFlagBits* obj, const char* str, int commaNeeded);
void print_VkDependencyFlagBits(const VkDependencyFlagBits* obj, const char* str, int commaNeeded);
void print_VkObjectType(const VkObjectType* obj, const char* str, int commaNeeded);
void print_VkEventCreateFlagBits(const VkEventCreateFlagBits* obj, const char* str, int commaNeeded);
#ifdef VK_EXT_discard_rectangles
void print_VkDiscardRectangleModeEXT(const VkDiscardRectangleModeEXT* obj, const char* str, int commaNeeded);
#endif
void print_VkSubpassDescriptionFlagBits(const VkSubpassDescriptionFlagBits* obj, const char* str, int commaNeeded);
#ifdef VK_VERSION_1_1
void print_VkPointClippingBehavior(const VkPointClippingBehavior* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_global_priority
void print_VkQueueGlobalPriorityEXT(const VkQueueGlobalPriorityEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_calibrated_timestamps
void print_VkTimeDomainEXT(const VkTimeDomainEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_conservative_rasterization
void print_VkConservativeRasterizationModeEXT(const VkConservativeRasterizationModeEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkResolveModeFlagBits(const VkResolveModeFlagBits* obj, const char* str, int commaNeeded);
void print_VkDescriptorBindingFlagBits(const VkDescriptorBindingFlagBits* obj, const char* str, int commaNeeded);
void print_VkSemaphoreType(const VkSemaphoreType* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_performance_query
void print_VkPerformanceCounterScopeKHR(const VkPerformanceCounterScopeKHR* obj, const char* str, int commaNeeded);
void print_VkPerformanceCounterUnitKHR(const VkPerformanceCounterUnitKHR* obj, const char* str, int commaNeeded);
void print_VkPerformanceCounterStorageKHR(const VkPerformanceCounterStorageKHR* obj, const char* str, int commaNeeded);
void print_VkPerformanceCounterDescriptionFlagBitsKHR(const VkPerformanceCounterDescriptionFlagBitsKHR* obj, const char* str, int commaNeeded);
void print_VkAcquireProfilingLockFlagBitsKHR(const VkAcquireProfilingLockFlagBitsKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkSemaphoreWaitFlagBits(const VkSemaphoreWaitFlagBits* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_line_rasterization
void print_VkLineRasterizationModeEXT(const VkLineRasterizationModeEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_object_refresh
void print_VkRefreshObjectFlagBitsKHR(const VkRefreshObjectFlagBitsKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VKSC_VERSION_1_0
void print_VkFaultLevel(const VkFaultLevel* obj, const char* str, int commaNeeded);
void print_VkFaultType(const VkFaultType* obj, const char* str, int commaNeeded);
void print_VkFaultQueryBehavior(const VkFaultQueryBehavior* obj, const char* str, int commaNeeded);
void print_VkPipelineMatchControl(const VkPipelineMatchControl* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_synchronization2
void print_VkAccessFlagBits2KHR(const VkAccessFlagBits2KHR* obj, const char* str, int commaNeeded);
void print_VkPipelineStageFlagBits2KHR(const VkPipelineStageFlagBits2KHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VKSC_VERSION_1_0
void print_VkPipelineCacheValidationVersion(const VkPipelineCacheValidationVersion* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_surface
void print_VkColorSpaceKHR(const VkColorSpaceKHR* obj, const char* str, int commaNeeded);
void print_VkCompositeAlphaFlagBitsKHR(const VkCompositeAlphaFlagBitsKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_display
void print_VkDisplayPlaneAlphaFlagBitsKHR(const VkDisplayPlaneAlphaFlagBitsKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_surface
void print_VkPresentModeKHR(const VkPresentModeKHR* obj, const char* str, int commaNeeded);
void print_VkSurfaceTransformFlagBitsKHR(const VkSurfaceTransformFlagBitsKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_validation_features
void print_VkValidationFeatureEnableEXT(const VkValidationFeatureEnableEXT* obj, const char* str, int commaNeeded);
void print_VkValidationFeatureDisableEXT(const VkValidationFeatureDisableEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkExternalMemoryHandleTypeFlagBits(const VkExternalMemoryHandleTypeFlagBits* obj, const char* str, int commaNeeded);
void print_VkExternalMemoryFeatureFlagBits(const VkExternalMemoryFeatureFlagBits* obj, const char* str, int commaNeeded);
void print_VkExternalSemaphoreHandleTypeFlagBits(const VkExternalSemaphoreHandleTypeFlagBits* obj, const char* str, int commaNeeded);
void print_VkExternalSemaphoreFeatureFlagBits(const VkExternalSemaphoreFeatureFlagBits* obj, const char* str, int commaNeeded);
void print_VkSemaphoreImportFlagBits(const VkSemaphoreImportFlagBits* obj, const char* str, int commaNeeded);
void print_VkExternalFenceHandleTypeFlagBits(const VkExternalFenceHandleTypeFlagBits* obj, const char* str, int commaNeeded);
void print_VkExternalFenceFeatureFlagBits(const VkExternalFenceFeatureFlagBits* obj, const char* str, int commaNeeded);
void print_VkFenceImportFlagBits(const VkFenceImportFlagBits* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_display_surface_counter
void print_VkSurfaceCounterFlagBitsEXT(const VkSurfaceCounterFlagBitsEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_display_control
void print_VkDisplayPowerStateEXT(const VkDisplayPowerStateEXT* obj, const char* str, int commaNeeded);
void print_VkDeviceEventTypeEXT(const VkDeviceEventTypeEXT* obj, const char* str, int commaNeeded);
void print_VkDisplayEventTypeEXT(const VkDisplayEventTypeEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkPeerMemoryFeatureFlagBits(const VkPeerMemoryFeatureFlagBits* obj, const char* str, int commaNeeded);
void print_VkMemoryAllocateFlagBits(const VkMemoryAllocateFlagBits* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_swapchain
void print_VkDeviceGroupPresentModeFlagBitsKHR(const VkDeviceGroupPresentModeFlagBitsKHR* obj, const char* str, int commaNeeded);
void print_VkSwapchainCreateFlagBitsKHR(const VkSwapchainCreateFlagBitsKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkSubgroupFeatureFlagBits(const VkSubgroupFeatureFlagBits* obj, const char* str, int commaNeeded);
void print_VkTessellationDomainOrigin(const VkTessellationDomainOrigin* obj, const char* str, int commaNeeded);
void print_VkSamplerYcbcrModelConversion(const VkSamplerYcbcrModelConversion* obj, const char* str, int commaNeeded);
void print_VkSamplerYcbcrRange(const VkSamplerYcbcrRange* obj, const char* str, int commaNeeded);
void print_VkChromaLocation(const VkChromaLocation* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkSamplerReductionMode(const VkSamplerReductionMode* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_blend_operation_advanced
void print_VkBlendOverlapEXT(const VkBlendOverlapEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_debug_utils
void print_VkDebugUtilsMessageSeverityFlagBitsEXT(const VkDebugUtilsMessageSeverityFlagBitsEXT* obj, const char* str, int commaNeeded);
void print_VkDebugUtilsMessageTypeFlagBitsEXT(const VkDebugUtilsMessageTypeFlagBitsEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkShaderFloatControlsIndependence(const VkShaderFloatControlsIndependence* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_fragment_shading_rate
void print_VkFragmentShadingRateCombinerOpKHR(const VkFragmentShadingRateCombinerOpKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_synchronization2
void print_VkSubmitFlagBitsKHR(const VkSubmitFlagBitsKHR* obj, const char* str, int commaNeeded);
#endif
void print_VkVendorId(const VkVendorId* obj, const char* str, int commaNeeded);
#ifdef VK_VERSION_1_2
void print_VkDriverId(const VkDriverId* obj, const char* str, int commaNeeded);
#endif
void print_VkBaseOutStructure(const VkBaseOutStructure* obj, const char* str, int commaNeeded);
void print_VkBaseInStructure(const VkBaseInStructure* obj, const char* str, int commaNeeded);
void print_VkOffset2D(const VkOffset2D* obj, const char* str, int commaNeeded);
void print_VkOffset3D(const VkOffset3D* obj, const char* str, int commaNeeded);
void print_VkExtent2D(const VkExtent2D* obj, const char* str, int commaNeeded);
void print_VkExtent3D(const VkExtent3D* obj, const char* str, int commaNeeded);
void print_VkViewport(const VkViewport* obj, const char* str, int commaNeeded);
void print_VkRect2D(const VkRect2D* obj, const char* str, int commaNeeded);
void print_VkClearRect(const VkClearRect* obj, const char* str, int commaNeeded);
void print_VkComponentMapping(const VkComponentMapping* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceProperties(const VkPhysicalDeviceProperties* obj, const char* str, int commaNeeded);
void print_VkExtensionProperties(const VkExtensionProperties* obj, const char* str, int commaNeeded);
void print_VkLayerProperties(const VkLayerProperties* obj, const char* str, int commaNeeded);
void print_VkApplicationInfo(const VkApplicationInfo* obj, const char* str, int commaNeeded);
void print_VkAllocationCallbacks(const VkAllocationCallbacks* obj, const char* str, int commaNeeded);
void print_VkDeviceQueueCreateInfo(const VkDeviceQueueCreateInfo* obj, const char* str, int commaNeeded);
void print_VkDeviceCreateInfo(const VkDeviceCreateInfo* obj, const char* str, int commaNeeded);
void print_VkInstanceCreateInfo(const VkInstanceCreateInfo* obj, const char* str, int commaNeeded);
void print_VkQueueFamilyProperties(const VkQueueFamilyProperties* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceMemoryProperties(const VkPhysicalDeviceMemoryProperties* obj, const char* str, int commaNeeded);
void print_VkMemoryAllocateInfo(const VkMemoryAllocateInfo* obj, const char* str, int commaNeeded);
void print_VkMemoryRequirements(const VkMemoryRequirements* obj, const char* str, int commaNeeded);
void print_VkMemoryType(const VkMemoryType* obj, const char* str, int commaNeeded);
void print_VkMemoryHeap(const VkMemoryHeap* obj, const char* str, int commaNeeded);
void print_VkMappedMemoryRange(const VkMappedMemoryRange* obj, const char* str, int commaNeeded);
void print_VkFormatProperties(const VkFormatProperties* obj, const char* str, int commaNeeded);
void print_VkImageFormatProperties(const VkImageFormatProperties* obj, const char* str, int commaNeeded);
void print_VkDescriptorBufferInfo(const VkDescriptorBufferInfo* obj, const char* str, int commaNeeded);
void print_VkDescriptorImageInfo(const VkDescriptorImageInfo* obj, const char* str, int commaNeeded);
void print_VkWriteDescriptorSet(const VkWriteDescriptorSet* obj, const char* str, int commaNeeded);
void print_VkCopyDescriptorSet(const VkCopyDescriptorSet* obj, const char* str, int commaNeeded);
void print_VkBufferCreateInfo(const VkBufferCreateInfo* obj, const char* str, int commaNeeded);
void print_VkBufferViewCreateInfo(const VkBufferViewCreateInfo* obj, const char* str, int commaNeeded);
void print_VkImageSubresource(const VkImageSubresource* obj, const char* str, int commaNeeded);
void print_VkImageSubresourceLayers(const VkImageSubresourceLayers* obj, const char* str, int commaNeeded);
void print_VkImageSubresourceRange(const VkImageSubresourceRange* obj, const char* str, int commaNeeded);
void print_VkMemoryBarrier(const VkMemoryBarrier* obj, const char* str, int commaNeeded);
void print_VkBufferMemoryBarrier(const VkBufferMemoryBarrier* obj, const char* str, int commaNeeded);
void print_VkImageMemoryBarrier(const VkImageMemoryBarrier* obj, const char* str, int commaNeeded);
void print_VkImageCreateInfo(const VkImageCreateInfo* obj, const char* str, int commaNeeded);
void print_VkSubresourceLayout(const VkSubresourceLayout* obj, const char* str, int commaNeeded);
void print_VkImageViewCreateInfo(const VkImageViewCreateInfo* obj, const char* str, int commaNeeded);
void print_VkBufferCopy(const VkBufferCopy* obj, const char* str, int commaNeeded);
void print_VkImageCopy(const VkImageCopy* obj, const char* str, int commaNeeded);
void print_VkImageBlit(const VkImageBlit* obj, const char* str, int commaNeeded);
void print_VkBufferImageCopy(const VkBufferImageCopy* obj, const char* str, int commaNeeded);
void print_VkImageResolve(const VkImageResolve* obj, const char* str, int commaNeeded);
void print_VkDescriptorSetLayoutBinding(const VkDescriptorSetLayoutBinding* obj, const char* str, int commaNeeded);
void print_VkDescriptorSetLayoutCreateInfo(const VkDescriptorSetLayoutCreateInfo* obj, const char* str, int commaNeeded);
void print_VkDescriptorPoolSize(const VkDescriptorPoolSize* obj, const char* str, int commaNeeded);
void print_VkDescriptorPoolCreateInfo(const VkDescriptorPoolCreateInfo* obj, const char* str, int commaNeeded);
void print_VkDescriptorSetAllocateInfo(const VkDescriptorSetAllocateInfo* obj, const char* str, int commaNeeded);
void print_VkSpecializationMapEntry(const VkSpecializationMapEntry* obj, const char* str, int commaNeeded);
void print_VkSpecializationInfo(const VkSpecializationInfo* obj, const char* str, int commaNeeded);
void print_VkPipelineShaderStageCreateInfo(const VkPipelineShaderStageCreateInfo* obj, const char* str, int commaNeeded);
void print_VkComputePipelineCreateInfo(const VkComputePipelineCreateInfo* obj, const char* str, int commaNeeded);
void print_VkVertexInputBindingDescription(const VkVertexInputBindingDescription* obj, const char* str, int commaNeeded);
void print_VkVertexInputAttributeDescription(const VkVertexInputAttributeDescription* obj, const char* str, int commaNeeded);
void print_VkPipelineVertexInputStateCreateInfo(const VkPipelineVertexInputStateCreateInfo* obj, const char* str, int commaNeeded);
void print_VkPipelineInputAssemblyStateCreateInfo(const VkPipelineInputAssemblyStateCreateInfo* obj, const char* str, int commaNeeded);
void print_VkPipelineTessellationStateCreateInfo(const VkPipelineTessellationStateCreateInfo* obj, const char* str, int commaNeeded);
void print_VkPipelineViewportStateCreateInfo(const VkPipelineViewportStateCreateInfo* obj, const char* str, int commaNeeded);
void print_VkPipelineRasterizationStateCreateInfo(const VkPipelineRasterizationStateCreateInfo* obj, const char* str, int commaNeeded);
void print_VkPipelineMultisampleStateCreateInfo(const VkPipelineMultisampleStateCreateInfo* obj, const char* str, int commaNeeded);
void print_VkPipelineColorBlendAttachmentState(const VkPipelineColorBlendAttachmentState* obj, const char* str, int commaNeeded);
void print_VkPipelineColorBlendStateCreateInfo(const VkPipelineColorBlendStateCreateInfo* obj, const char* str, int commaNeeded);
void print_VkPipelineDynamicStateCreateInfo(const VkPipelineDynamicStateCreateInfo* obj, const char* str, int commaNeeded);
void print_VkStencilOpState(const VkStencilOpState* obj, const char* str, int commaNeeded);
void print_VkPipelineDepthStencilStateCreateInfo(const VkPipelineDepthStencilStateCreateInfo* obj, const char* str, int commaNeeded);
void print_VkGraphicsPipelineCreateInfo(const VkGraphicsPipelineCreateInfo* obj, const char* str, int commaNeeded);
void print_VkPipelineCacheCreateInfo(const VkPipelineCacheCreateInfo* obj, const char* str, int commaNeeded);
void print_VkPipelineCacheHeaderVersionOne(const VkPipelineCacheHeaderVersionOne* obj, const char* str, int commaNeeded);
#ifdef VKSC_VERSION_1_0
void print_VkPipelineCacheStageValidationIndexEntry(const VkPipelineCacheStageValidationIndexEntry* obj, const char* str, int commaNeeded);
void print_VkPipelineCacheSafetyCriticalIndexEntry(const VkPipelineCacheSafetyCriticalIndexEntry* obj, const char* str, int commaNeeded);
void print_VkPipelineCacheHeaderVersionSafetyCriticalOne(const VkPipelineCacheHeaderVersionSafetyCriticalOne* obj, const char* str, int commaNeeded);
#endif
void print_VkPushConstantRange(const VkPushConstantRange* obj, const char* str, int commaNeeded);
void print_VkPipelineLayoutCreateInfo(const VkPipelineLayoutCreateInfo* obj, const char* str, int commaNeeded);
void print_VkSamplerCreateInfo(const VkSamplerCreateInfo* obj, const char* str, int commaNeeded);
void print_VkCommandPoolCreateInfo(const VkCommandPoolCreateInfo* obj, const char* str, int commaNeeded);
void print_VkCommandBufferAllocateInfo(const VkCommandBufferAllocateInfo* obj, const char* str, int commaNeeded);
void print_VkCommandBufferInheritanceInfo(const VkCommandBufferInheritanceInfo* obj, const char* str, int commaNeeded);
void print_VkCommandBufferBeginInfo(const VkCommandBufferBeginInfo* obj, const char* str, int commaNeeded);
void print_VkRenderPassBeginInfo(const VkRenderPassBeginInfo* obj, const char* str, int commaNeeded);
void print_VkClearDepthStencilValue(const VkClearDepthStencilValue* obj, const char* str, int commaNeeded);
void print_VkClearAttachment(const VkClearAttachment* obj, const char* str, int commaNeeded);
void print_VkAttachmentDescription(const VkAttachmentDescription* obj, const char* str, int commaNeeded);
void print_VkAttachmentReference(const VkAttachmentReference* obj, const char* str, int commaNeeded);
void print_VkSubpassDescription(const VkSubpassDescription* obj, const char* str, int commaNeeded);
void print_VkSubpassDependency(const VkSubpassDependency* obj, const char* str, int commaNeeded);
void print_VkRenderPassCreateInfo(const VkRenderPassCreateInfo* obj, const char* str, int commaNeeded);
void print_VkEventCreateInfo(const VkEventCreateInfo* obj, const char* str, int commaNeeded);
void print_VkFenceCreateInfo(const VkFenceCreateInfo* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceFeatures(const VkPhysicalDeviceFeatures* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceSparseProperties(const VkPhysicalDeviceSparseProperties* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceLimits(const VkPhysicalDeviceLimits* obj, const char* str, int commaNeeded);
void print_VkSemaphoreCreateInfo(const VkSemaphoreCreateInfo* obj, const char* str, int commaNeeded);
void print_VkQueryPoolCreateInfo(const VkQueryPoolCreateInfo* obj, const char* str, int commaNeeded);
void print_VkFramebufferCreateInfo(const VkFramebufferCreateInfo* obj, const char* str, int commaNeeded);
void print_VkDrawIndirectCommand(const VkDrawIndirectCommand* obj, const char* str, int commaNeeded);
void print_VkDrawIndexedIndirectCommand(const VkDrawIndexedIndirectCommand* obj, const char* str, int commaNeeded);
void print_VkDispatchIndirectCommand(const VkDispatchIndirectCommand* obj, const char* str, int commaNeeded);
void print_VkSubmitInfo(const VkSubmitInfo* obj, const char* str, int commaNeeded);
#ifdef VK_KHR_display
void print_VkDisplayPropertiesKHR(const VkDisplayPropertiesKHR* obj, const char* str, int commaNeeded);
void print_VkDisplayPlanePropertiesKHR(const VkDisplayPlanePropertiesKHR* obj, const char* str, int commaNeeded);
void print_VkDisplayModeParametersKHR(const VkDisplayModeParametersKHR* obj, const char* str, int commaNeeded);
void print_VkDisplayModePropertiesKHR(const VkDisplayModePropertiesKHR* obj, const char* str, int commaNeeded);
void print_VkDisplayModeCreateInfoKHR(const VkDisplayModeCreateInfoKHR* obj, const char* str, int commaNeeded);
void print_VkDisplayPlaneCapabilitiesKHR(const VkDisplayPlaneCapabilitiesKHR* obj, const char* str, int commaNeeded);
void print_VkDisplaySurfaceCreateInfoKHR(const VkDisplaySurfaceCreateInfoKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_display_swapchain
void print_VkDisplayPresentInfoKHR(const VkDisplayPresentInfoKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_surface
void print_VkSurfaceCapabilitiesKHR(const VkSurfaceCapabilitiesKHR* obj, const char* str, int commaNeeded);
void print_VkSurfaceFormatKHR(const VkSurfaceFormatKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_swapchain
void print_VkSwapchainCreateInfoKHR(const VkSwapchainCreateInfoKHR* obj, const char* str, int commaNeeded);
void print_VkPresentInfoKHR(const VkPresentInfoKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_validation_features
void print_VkValidationFeaturesEXT(const VkValidationFeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_application_parameters
void print_VkApplicationParametersEXT(const VkApplicationParametersEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkPhysicalDeviceFeatures2(const VkPhysicalDeviceFeatures2* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceProperties2(const VkPhysicalDeviceProperties2* obj, const char* str, int commaNeeded);
void print_VkFormatProperties2(const VkFormatProperties2* obj, const char* str, int commaNeeded);
void print_VkImageFormatProperties2(const VkImageFormatProperties2* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceImageFormatInfo2(const VkPhysicalDeviceImageFormatInfo2* obj, const char* str, int commaNeeded);
void print_VkQueueFamilyProperties2(const VkQueueFamilyProperties2* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceMemoryProperties2(const VkPhysicalDeviceMemoryProperties2* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkConformanceVersion(const VkConformanceVersion* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceDriverProperties(const VkPhysicalDeviceDriverProperties* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_incremental_present
void print_VkPresentRegionsKHR(const VkPresentRegionsKHR* obj, const char* str, int commaNeeded);
void print_VkPresentRegionKHR(const VkPresentRegionKHR* obj, const char* str, int commaNeeded);
void print_VkRectLayerKHR(const VkRectLayerKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkPhysicalDeviceVariablePointersFeatures(const VkPhysicalDeviceVariablePointersFeatures* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceVariablePointerFeatures(const VkPhysicalDeviceVariablePointerFeatures* obj, const char* str, int commaNeeded);
void print_VkExternalMemoryProperties(const VkExternalMemoryProperties* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceExternalImageFormatInfo(const VkPhysicalDeviceExternalImageFormatInfo* obj, const char* str, int commaNeeded);
void print_VkExternalImageFormatProperties(const VkExternalImageFormatProperties* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceExternalBufferInfo(const VkPhysicalDeviceExternalBufferInfo* obj, const char* str, int commaNeeded);
void print_VkExternalBufferProperties(const VkExternalBufferProperties* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceIDProperties(const VkPhysicalDeviceIDProperties* obj, const char* str, int commaNeeded);
void print_VkExternalMemoryImageCreateInfo(const VkExternalMemoryImageCreateInfo* obj, const char* str, int commaNeeded);
void print_VkExternalMemoryBufferCreateInfo(const VkExternalMemoryBufferCreateInfo* obj, const char* str, int commaNeeded);
void print_VkExportMemoryAllocateInfo(const VkExportMemoryAllocateInfo* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_external_memory_fd
void print_VkImportMemoryFdInfoKHR(const VkImportMemoryFdInfoKHR* obj, const char* str, int commaNeeded);
void print_VkMemoryFdPropertiesKHR(const VkMemoryFdPropertiesKHR* obj, const char* str, int commaNeeded);
void print_VkMemoryGetFdInfoKHR(const VkMemoryGetFdInfoKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkPhysicalDeviceExternalSemaphoreInfo(const VkPhysicalDeviceExternalSemaphoreInfo* obj, const char* str, int commaNeeded);
void print_VkExternalSemaphoreProperties(const VkExternalSemaphoreProperties* obj, const char* str, int commaNeeded);
void print_VkExportSemaphoreCreateInfo(const VkExportSemaphoreCreateInfo* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_external_semaphore_fd
void print_VkImportSemaphoreFdInfoKHR(const VkImportSemaphoreFdInfoKHR* obj, const char* str, int commaNeeded);
void print_VkSemaphoreGetFdInfoKHR(const VkSemaphoreGetFdInfoKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkPhysicalDeviceExternalFenceInfo(const VkPhysicalDeviceExternalFenceInfo* obj, const char* str, int commaNeeded);
void print_VkExternalFenceProperties(const VkExternalFenceProperties* obj, const char* str, int commaNeeded);
void print_VkExportFenceCreateInfo(const VkExportFenceCreateInfo* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_external_fence_fd
void print_VkImportFenceFdInfoKHR(const VkImportFenceFdInfoKHR* obj, const char* str, int commaNeeded);
void print_VkFenceGetFdInfoKHR(const VkFenceGetFdInfoKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkPhysicalDeviceMultiviewFeatures(const VkPhysicalDeviceMultiviewFeatures* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceMultiviewProperties(const VkPhysicalDeviceMultiviewProperties* obj, const char* str, int commaNeeded);
void print_VkRenderPassMultiviewCreateInfo(const VkRenderPassMultiviewCreateInfo* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_display_surface_counter
void print_VkSurfaceCapabilities2EXT(const VkSurfaceCapabilities2EXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_display_control
void print_VkDisplayPowerInfoEXT(const VkDisplayPowerInfoEXT* obj, const char* str, int commaNeeded);
void print_VkDeviceEventInfoEXT(const VkDeviceEventInfoEXT* obj, const char* str, int commaNeeded);
void print_VkDisplayEventInfoEXT(const VkDisplayEventInfoEXT* obj, const char* str, int commaNeeded);
void print_VkSwapchainCounterCreateInfoEXT(const VkSwapchainCounterCreateInfoEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkPhysicalDeviceGroupProperties(const VkPhysicalDeviceGroupProperties* obj, const char* str, int commaNeeded);
void print_VkMemoryAllocateFlagsInfo(const VkMemoryAllocateFlagsInfo* obj, const char* str, int commaNeeded);
void print_VkBindBufferMemoryInfo(const VkBindBufferMemoryInfo* obj, const char* str, int commaNeeded);
void print_VkBindBufferMemoryDeviceGroupInfo(const VkBindBufferMemoryDeviceGroupInfo* obj, const char* str, int commaNeeded);
void print_VkBindImageMemoryInfo(const VkBindImageMemoryInfo* obj, const char* str, int commaNeeded);
void print_VkBindImageMemoryDeviceGroupInfo(const VkBindImageMemoryDeviceGroupInfo* obj, const char* str, int commaNeeded);
void print_VkDeviceGroupRenderPassBeginInfo(const VkDeviceGroupRenderPassBeginInfo* obj, const char* str, int commaNeeded);
void print_VkDeviceGroupCommandBufferBeginInfo(const VkDeviceGroupCommandBufferBeginInfo* obj, const char* str, int commaNeeded);
void print_VkDeviceGroupSubmitInfo(const VkDeviceGroupSubmitInfo* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_swapchain
void print_VkDeviceGroupPresentCapabilitiesKHR(const VkDeviceGroupPresentCapabilitiesKHR* obj, const char* str, int commaNeeded);
void print_VkImageSwapchainCreateInfoKHR(const VkImageSwapchainCreateInfoKHR* obj, const char* str, int commaNeeded);
void print_VkBindImageMemorySwapchainInfoKHR(const VkBindImageMemorySwapchainInfoKHR* obj, const char* str, int commaNeeded);
void print_VkAcquireNextImageInfoKHR(const VkAcquireNextImageInfoKHR* obj, const char* str, int commaNeeded);
void print_VkDeviceGroupPresentInfoKHR(const VkDeviceGroupPresentInfoKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkDeviceGroupDeviceCreateInfo(const VkDeviceGroupDeviceCreateInfo* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_swapchain
void print_VkDeviceGroupSwapchainCreateInfoKHR(const VkDeviceGroupSwapchainCreateInfoKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_hdr_metadata
void print_VkXYColorEXT(const VkXYColorEXT* obj, const char* str, int commaNeeded);
void print_VkHdrMetadataEXT(const VkHdrMetadataEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_discard_rectangles
void print_VkPhysicalDeviceDiscardRectanglePropertiesEXT(const VkPhysicalDeviceDiscardRectanglePropertiesEXT* obj, const char* str, int commaNeeded);
void print_VkPipelineDiscardRectangleStateCreateInfoEXT(const VkPipelineDiscardRectangleStateCreateInfoEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkInputAttachmentAspectReference(const VkInputAttachmentAspectReference* obj, const char* str, int commaNeeded);
void print_VkRenderPassInputAttachmentAspectCreateInfo(const VkRenderPassInputAttachmentAspectCreateInfo* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_get_surface_capabilities2
void print_VkPhysicalDeviceSurfaceInfo2KHR(const VkPhysicalDeviceSurfaceInfo2KHR* obj, const char* str, int commaNeeded);
void print_VkSurfaceCapabilities2KHR(const VkSurfaceCapabilities2KHR* obj, const char* str, int commaNeeded);
void print_VkSurfaceFormat2KHR(const VkSurfaceFormat2KHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_get_display_properties2
void print_VkDisplayProperties2KHR(const VkDisplayProperties2KHR* obj, const char* str, int commaNeeded);
void print_VkDisplayPlaneProperties2KHR(const VkDisplayPlaneProperties2KHR* obj, const char* str, int commaNeeded);
void print_VkDisplayModeProperties2KHR(const VkDisplayModeProperties2KHR* obj, const char* str, int commaNeeded);
void print_VkDisplayPlaneInfo2KHR(const VkDisplayPlaneInfo2KHR* obj, const char* str, int commaNeeded);
void print_VkDisplayPlaneCapabilities2KHR(const VkDisplayPlaneCapabilities2KHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_shared_presentable_image
void print_VkSharedPresentSurfaceCapabilitiesKHR(const VkSharedPresentSurfaceCapabilitiesKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkPhysicalDevice16BitStorageFeatures(const VkPhysicalDevice16BitStorageFeatures* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceSubgroupProperties(const VkPhysicalDeviceSubgroupProperties* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures(const VkPhysicalDeviceShaderSubgroupExtendedTypesFeatures* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkBufferMemoryRequirementsInfo2(const VkBufferMemoryRequirementsInfo2* obj, const char* str, int commaNeeded);
void print_VkImageMemoryRequirementsInfo2(const VkImageMemoryRequirementsInfo2* obj, const char* str, int commaNeeded);
void print_VkMemoryRequirements2(const VkMemoryRequirements2* obj, const char* str, int commaNeeded);
void print_VkPhysicalDevicePointClippingProperties(const VkPhysicalDevicePointClippingProperties* obj, const char* str, int commaNeeded);
void print_VkMemoryDedicatedRequirements(const VkMemoryDedicatedRequirements* obj, const char* str, int commaNeeded);
void print_VkMemoryDedicatedAllocateInfo(const VkMemoryDedicatedAllocateInfo* obj, const char* str, int commaNeeded);
void print_VkImageViewUsageCreateInfo(const VkImageViewUsageCreateInfo* obj, const char* str, int commaNeeded);
void print_VkPipelineTessellationDomainOriginStateCreateInfo(const VkPipelineTessellationDomainOriginStateCreateInfo* obj, const char* str, int commaNeeded);
void print_VkSamplerYcbcrConversionInfo(const VkSamplerYcbcrConversionInfo* obj, const char* str, int commaNeeded);
void print_VkSamplerYcbcrConversionCreateInfo(const VkSamplerYcbcrConversionCreateInfo* obj, const char* str, int commaNeeded);
void print_VkBindImagePlaneMemoryInfo(const VkBindImagePlaneMemoryInfo* obj, const char* str, int commaNeeded);
void print_VkImagePlaneMemoryRequirementsInfo(const VkImagePlaneMemoryRequirementsInfo* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceSamplerYcbcrConversionFeatures(const VkPhysicalDeviceSamplerYcbcrConversionFeatures* obj, const char* str, int commaNeeded);
void print_VkSamplerYcbcrConversionImageFormatProperties(const VkSamplerYcbcrConversionImageFormatProperties* obj, const char* str, int commaNeeded);
void print_VkProtectedSubmitInfo(const VkProtectedSubmitInfo* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceProtectedMemoryFeatures(const VkPhysicalDeviceProtectedMemoryFeatures* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceProtectedMemoryProperties(const VkPhysicalDeviceProtectedMemoryProperties* obj, const char* str, int commaNeeded);
void print_VkDeviceQueueInfo2(const VkDeviceQueueInfo2* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkPhysicalDeviceSamplerFilterMinmaxProperties(const VkPhysicalDeviceSamplerFilterMinmaxProperties* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_sample_locations
void print_VkSampleLocationEXT(const VkSampleLocationEXT* obj, const char* str, int commaNeeded);
void print_VkSampleLocationsInfoEXT(const VkSampleLocationsInfoEXT* obj, const char* str, int commaNeeded);
void print_VkAttachmentSampleLocationsEXT(const VkAttachmentSampleLocationsEXT* obj, const char* str, int commaNeeded);
void print_VkSubpassSampleLocationsEXT(const VkSubpassSampleLocationsEXT* obj, const char* str, int commaNeeded);
void print_VkRenderPassSampleLocationsBeginInfoEXT(const VkRenderPassSampleLocationsBeginInfoEXT* obj, const char* str, int commaNeeded);
void print_VkPipelineSampleLocationsStateCreateInfoEXT(const VkPipelineSampleLocationsStateCreateInfoEXT* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceSampleLocationsPropertiesEXT(const VkPhysicalDeviceSampleLocationsPropertiesEXT* obj, const char* str, int commaNeeded);
void print_VkMultisamplePropertiesEXT(const VkMultisamplePropertiesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkSamplerReductionModeCreateInfo(const VkSamplerReductionModeCreateInfo* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_blend_operation_advanced
void print_VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT(const VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT(const VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT* obj, const char* str, int commaNeeded);
void print_VkPipelineColorBlendAdvancedStateCreateInfoEXT(const VkPipelineColorBlendAdvancedStateCreateInfoEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkImageFormatListCreateInfo(const VkImageFormatListCreateInfo* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_1
void print_VkPhysicalDeviceMaintenance3Properties(const VkPhysicalDeviceMaintenance3Properties* obj, const char* str, int commaNeeded);
void print_VkDescriptorSetLayoutSupport(const VkDescriptorSetLayoutSupport* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceShaderDrawParametersFeatures(const VkPhysicalDeviceShaderDrawParametersFeatures* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceShaderDrawParameterFeatures(const VkPhysicalDeviceShaderDrawParameterFeatures* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkPhysicalDeviceShaderFloat16Int8Features(const VkPhysicalDeviceShaderFloat16Int8Features* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceFloatControlsProperties(const VkPhysicalDeviceFloatControlsProperties* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceHostQueryResetFeatures(const VkPhysicalDeviceHostQueryResetFeatures* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_global_priority
void print_VkDeviceQueueGlobalPriorityCreateInfoEXT(const VkDeviceQueueGlobalPriorityCreateInfoEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_debug_utils
void print_VkDebugUtilsObjectNameInfoEXT(const VkDebugUtilsObjectNameInfoEXT* obj, const char* str, int commaNeeded);
void print_VkDebugUtilsObjectTagInfoEXT(const VkDebugUtilsObjectTagInfoEXT* obj, const char* str, int commaNeeded);
void print_VkDebugUtilsLabelEXT(const VkDebugUtilsLabelEXT* obj, const char* str, int commaNeeded);
void print_VkDebugUtilsMessengerCreateInfoEXT(const VkDebugUtilsMessengerCreateInfoEXT* obj, const char* str, int commaNeeded);
void print_VkDebugUtilsMessengerCallbackDataEXT(const VkDebugUtilsMessengerCallbackDataEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_external_memory_host
void print_VkImportMemoryHostPointerInfoEXT(const VkImportMemoryHostPointerInfoEXT* obj, const char* str, int commaNeeded);
void print_VkMemoryHostPointerPropertiesEXT(const VkMemoryHostPointerPropertiesEXT* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceExternalMemoryHostPropertiesEXT(const VkPhysicalDeviceExternalMemoryHostPropertiesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_conservative_rasterization
void print_VkPhysicalDeviceConservativeRasterizationPropertiesEXT(const VkPhysicalDeviceConservativeRasterizationPropertiesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_calibrated_timestamps
void print_VkCalibratedTimestampInfoEXT(const VkCalibratedTimestampInfoEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_conservative_rasterization
void print_VkPipelineRasterizationConservativeStateCreateInfoEXT(const VkPipelineRasterizationConservativeStateCreateInfoEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkPhysicalDeviceDescriptorIndexingFeatures(const VkPhysicalDeviceDescriptorIndexingFeatures* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceDescriptorIndexingProperties(const VkPhysicalDeviceDescriptorIndexingProperties* obj, const char* str, int commaNeeded);
void print_VkDescriptorSetLayoutBindingFlagsCreateInfo(const VkDescriptorSetLayoutBindingFlagsCreateInfo* obj, const char* str, int commaNeeded);
void print_VkDescriptorSetVariableDescriptorCountAllocateInfo(const VkDescriptorSetVariableDescriptorCountAllocateInfo* obj, const char* str, int commaNeeded);
void print_VkDescriptorSetVariableDescriptorCountLayoutSupport(const VkDescriptorSetVariableDescriptorCountLayoutSupport* obj, const char* str, int commaNeeded);
void print_VkAttachmentDescription2(const VkAttachmentDescription2* obj, const char* str, int commaNeeded);
void print_VkAttachmentReference2(const VkAttachmentReference2* obj, const char* str, int commaNeeded);
void print_VkSubpassDescription2(const VkSubpassDescription2* obj, const char* str, int commaNeeded);
void print_VkSubpassDependency2(const VkSubpassDependency2* obj, const char* str, int commaNeeded);
void print_VkRenderPassCreateInfo2(const VkRenderPassCreateInfo2* obj, const char* str, int commaNeeded);
void print_VkSubpassBeginInfo(const VkSubpassBeginInfo* obj, const char* str, int commaNeeded);
void print_VkSubpassEndInfo(const VkSubpassEndInfo* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceTimelineSemaphoreFeatures(const VkPhysicalDeviceTimelineSemaphoreFeatures* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceTimelineSemaphoreProperties(const VkPhysicalDeviceTimelineSemaphoreProperties* obj, const char* str, int commaNeeded);
void print_VkSemaphoreTypeCreateInfo(const VkSemaphoreTypeCreateInfo* obj, const char* str, int commaNeeded);
void print_VkTimelineSemaphoreSubmitInfo(const VkTimelineSemaphoreSubmitInfo* obj, const char* str, int commaNeeded);
void print_VkSemaphoreWaitInfo(const VkSemaphoreWaitInfo* obj, const char* str, int commaNeeded);
void print_VkSemaphoreSignalInfo(const VkSemaphoreSignalInfo* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_vertex_attribute_divisor
void print_VkVertexInputBindingDivisorDescriptionEXT(const VkVertexInputBindingDivisorDescriptionEXT* obj, const char* str, int commaNeeded);
void print_VkPipelineVertexInputDivisorStateCreateInfoEXT(const VkPipelineVertexInputDivisorStateCreateInfoEXT* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT(const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_pci_bus_info
void print_VkPhysicalDevicePCIBusInfoPropertiesEXT(const VkPhysicalDevicePCIBusInfoPropertiesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkPhysicalDevice8BitStorageFeatures(const VkPhysicalDevice8BitStorageFeatures* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceVulkanMemoryModelFeatures(const VkPhysicalDeviceVulkanMemoryModelFeatures* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceShaderAtomicInt64Features(const VkPhysicalDeviceShaderAtomicInt64Features* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_shader_atomic_float
void print_VkPhysicalDeviceShaderAtomicFloatFeaturesEXT(const VkPhysicalDeviceShaderAtomicFloatFeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_vertex_attribute_divisor
void print_VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT(const VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkPhysicalDeviceDepthStencilResolveProperties(const VkPhysicalDeviceDepthStencilResolveProperties* obj, const char* str, int commaNeeded);
void print_VkSubpassDescriptionDepthStencilResolve(const VkSubpassDescriptionDepthStencilResolve* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_astc_decode_mode
void print_VkImageViewASTCDecodeModeEXT(const VkImageViewASTCDecodeModeEXT* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceASTCDecodeFeaturesEXT(const VkPhysicalDeviceASTCDecodeFeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_image_drm_format_modifier
void print_VkDrmFormatModifierPropertiesListEXT(const VkDrmFormatModifierPropertiesListEXT* obj, const char* str, int commaNeeded);
void print_VkDrmFormatModifierPropertiesEXT(const VkDrmFormatModifierPropertiesEXT* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceImageDrmFormatModifierInfoEXT(const VkPhysicalDeviceImageDrmFormatModifierInfoEXT* obj, const char* str, int commaNeeded);
void print_VkImageDrmFormatModifierListCreateInfoEXT(const VkImageDrmFormatModifierListCreateInfoEXT* obj, const char* str, int commaNeeded);
void print_VkImageDrmFormatModifierExplicitCreateInfoEXT(const VkImageDrmFormatModifierExplicitCreateInfoEXT* obj, const char* str, int commaNeeded);
void print_VkImageDrmFormatModifierPropertiesEXT(const VkImageDrmFormatModifierPropertiesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkImageStencilUsageCreateInfo(const VkImageStencilUsageCreateInfo* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceScalarBlockLayoutFeatures(const VkPhysicalDeviceScalarBlockLayoutFeatures* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceUniformBufferStandardLayoutFeatures(const VkPhysicalDeviceUniformBufferStandardLayoutFeatures* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_depth_clip_enable
void print_VkPhysicalDeviceDepthClipEnableFeaturesEXT(const VkPhysicalDeviceDepthClipEnableFeaturesEXT* obj, const char* str, int commaNeeded);
void print_VkPipelineRasterizationDepthClipStateCreateInfoEXT(const VkPipelineRasterizationDepthClipStateCreateInfoEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_memory_budget
void print_VkPhysicalDeviceMemoryBudgetPropertiesEXT(const VkPhysicalDeviceMemoryBudgetPropertiesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkPhysicalDeviceBufferDeviceAddressFeatures(const VkPhysicalDeviceBufferDeviceAddressFeatures* obj, const char* str, int commaNeeded);
void print_VkBufferDeviceAddressInfo(const VkBufferDeviceAddressInfo* obj, const char* str, int commaNeeded);
void print_VkBufferOpaqueCaptureAddressCreateInfo(const VkBufferOpaqueCaptureAddressCreateInfo* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_filter_cubic
void print_VkPhysicalDeviceImageViewImageFormatInfoEXT(const VkPhysicalDeviceImageViewImageFormatInfoEXT* obj, const char* str, int commaNeeded);
void print_VkFilterCubicImageViewImageFormatPropertiesEXT(const VkFilterCubicImageViewImageFormatPropertiesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkPhysicalDeviceImagelessFramebufferFeatures(const VkPhysicalDeviceImagelessFramebufferFeatures* obj, const char* str, int commaNeeded);
void print_VkFramebufferAttachmentsCreateInfo(const VkFramebufferAttachmentsCreateInfo* obj, const char* str, int commaNeeded);
void print_VkFramebufferAttachmentImageInfo(const VkFramebufferAttachmentImageInfo* obj, const char* str, int commaNeeded);
void print_VkRenderPassAttachmentBeginInfo(const VkRenderPassAttachmentBeginInfo* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_texture_compression_astc_hdr
void print_VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT(const VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_ycbcr_image_arrays
void print_VkPhysicalDeviceYcbcrImageArraysFeaturesEXT(const VkPhysicalDeviceYcbcrImageArraysFeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_performance_query
void print_VkPhysicalDevicePerformanceQueryFeaturesKHR(const VkPhysicalDevicePerformanceQueryFeaturesKHR* obj, const char* str, int commaNeeded);
void print_VkPhysicalDevicePerformanceQueryPropertiesKHR(const VkPhysicalDevicePerformanceQueryPropertiesKHR* obj, const char* str, int commaNeeded);
void print_VkPerformanceCounterKHR(const VkPerformanceCounterKHR* obj, const char* str, int commaNeeded);
void print_VkPerformanceCounterDescriptionKHR(const VkPerformanceCounterDescriptionKHR* obj, const char* str, int commaNeeded);
void print_VkQueryPoolPerformanceCreateInfoKHR(const VkQueryPoolPerformanceCreateInfoKHR* obj, const char* str, int commaNeeded);
void print_VkAcquireProfilingLockInfoKHR(const VkAcquireProfilingLockInfoKHR* obj, const char* str, int commaNeeded);
void print_VkPerformanceQuerySubmitInfoKHR(const VkPerformanceQuerySubmitInfoKHR* obj, const char* str, int commaNeeded);
void print_VkPerformanceQueryReservationInfoKHR(const VkPerformanceQueryReservationInfoKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_headless_surface
void print_VkHeadlessSurfaceCreateInfoEXT(const VkHeadlessSurfaceCreateInfoEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_shader_clock
void print_VkPhysicalDeviceShaderClockFeaturesKHR(const VkPhysicalDeviceShaderClockFeaturesKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_index_type_uint8
void print_VkPhysicalDeviceIndexTypeUint8FeaturesEXT(const VkPhysicalDeviceIndexTypeUint8FeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_fragment_shader_interlock
void print_VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT(const VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures(const VkPhysicalDeviceSeparateDepthStencilLayoutsFeatures* obj, const char* str, int commaNeeded);
void print_VkAttachmentReferenceStencilLayout(const VkAttachmentReferenceStencilLayout* obj, const char* str, int commaNeeded);
void print_VkAttachmentDescriptionStencilLayout(const VkAttachmentDescriptionStencilLayout* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_shader_demote_to_helper_invocation
void print_VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT(const VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_texel_buffer_alignment
void print_VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT(const VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT(const VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_subgroup_size_control
void print_VkPhysicalDeviceSubgroupSizeControlFeaturesEXT(const VkPhysicalDeviceSubgroupSizeControlFeaturesEXT* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceSubgroupSizeControlPropertiesEXT(const VkPhysicalDeviceSubgroupSizeControlPropertiesEXT* obj, const char* str, int commaNeeded);
void print_VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT(const VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkMemoryOpaqueCaptureAddressAllocateInfo(const VkMemoryOpaqueCaptureAddressAllocateInfo* obj, const char* str, int commaNeeded);
void print_VkDeviceMemoryOpaqueCaptureAddressInfo(const VkDeviceMemoryOpaqueCaptureAddressInfo* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_line_rasterization
void print_VkPhysicalDeviceLineRasterizationFeaturesEXT(const VkPhysicalDeviceLineRasterizationFeaturesEXT* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceLineRasterizationPropertiesEXT(const VkPhysicalDeviceLineRasterizationPropertiesEXT* obj, const char* str, int commaNeeded);
void print_VkPipelineRasterizationLineStateCreateInfoEXT(const VkPipelineRasterizationLineStateCreateInfoEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_VERSION_1_2
void print_VkPhysicalDeviceVulkan11Features(const VkPhysicalDeviceVulkan11Features* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceVulkan11Properties(const VkPhysicalDeviceVulkan11Properties* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceVulkan12Features(const VkPhysicalDeviceVulkan12Features* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceVulkan12Properties(const VkPhysicalDeviceVulkan12Properties* obj, const char* str, int commaNeeded);
#endif
#ifdef VKSC_VERSION_1_0
void print_VkFaultData(const VkFaultData* obj, const char* str, int commaNeeded);
void print_VkFaultCallbackInfo(const VkFaultCallbackInfo* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_custom_border_color
void print_VkSamplerCustomBorderColorCreateInfoEXT(const VkSamplerCustomBorderColorCreateInfoEXT* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceCustomBorderColorPropertiesEXT(const VkPhysicalDeviceCustomBorderColorPropertiesEXT* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceCustomBorderColorFeaturesEXT(const VkPhysicalDeviceCustomBorderColorFeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_object_refresh
void print_VkRefreshObjectKHR(const VkRefreshObjectKHR* obj, const char* str, int commaNeeded);
void print_VkRefreshObjectListKHR(const VkRefreshObjectListKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_extended_dynamic_state
void print_VkPhysicalDeviceExtendedDynamicStateFeaturesEXT(const VkPhysicalDeviceExtendedDynamicStateFeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_extended_dynamic_state2
void print_VkPhysicalDeviceExtendedDynamicState2FeaturesEXT(const VkPhysicalDeviceExtendedDynamicState2FeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VKSC_VERSION_1_0
void print_VkPipelineOfflineCreateInfo(const VkPipelineOfflineCreateInfo* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_robustness2
void print_VkPhysicalDeviceRobustness2FeaturesEXT(const VkPhysicalDeviceRobustness2FeaturesEXT* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceRobustness2PropertiesEXT(const VkPhysicalDeviceRobustness2PropertiesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_image_robustness
void print_VkPhysicalDeviceImageRobustnessFeaturesEXT(const VkPhysicalDeviceImageRobustnessFeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_4444_formats
void print_VkPhysicalDevice4444FormatsFeaturesEXT(const VkPhysicalDevice4444FormatsFeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_copy_commands2
void print_VkBufferCopy2KHR(const VkBufferCopy2KHR* obj, const char* str, int commaNeeded);
void print_VkImageCopy2KHR(const VkImageCopy2KHR* obj, const char* str, int commaNeeded);
void print_VkImageBlit2KHR(const VkImageBlit2KHR* obj, const char* str, int commaNeeded);
void print_VkBufferImageCopy2KHR(const VkBufferImageCopy2KHR* obj, const char* str, int commaNeeded);
void print_VkImageResolve2KHR(const VkImageResolve2KHR* obj, const char* str, int commaNeeded);
void print_VkCopyBufferInfo2KHR(const VkCopyBufferInfo2KHR* obj, const char* str, int commaNeeded);
void print_VkCopyImageInfo2KHR(const VkCopyImageInfo2KHR* obj, const char* str, int commaNeeded);
void print_VkBlitImageInfo2KHR(const VkBlitImageInfo2KHR* obj, const char* str, int commaNeeded);
void print_VkCopyBufferToImageInfo2KHR(const VkCopyBufferToImageInfo2KHR* obj, const char* str, int commaNeeded);
void print_VkCopyImageToBufferInfo2KHR(const VkCopyImageToBufferInfo2KHR* obj, const char* str, int commaNeeded);
void print_VkResolveImageInfo2KHR(const VkResolveImageInfo2KHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_shader_image_atomic_int64
void print_VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT(const VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_fragment_shading_rate
void print_VkFragmentShadingRateAttachmentInfoKHR(const VkFragmentShadingRateAttachmentInfoKHR* obj, const char* str, int commaNeeded);
void print_VkPipelineFragmentShadingRateStateCreateInfoKHR(const VkPipelineFragmentShadingRateStateCreateInfoKHR* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceFragmentShadingRateFeaturesKHR(const VkPhysicalDeviceFragmentShadingRateFeaturesKHR* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceFragmentShadingRatePropertiesKHR(const VkPhysicalDeviceFragmentShadingRatePropertiesKHR* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceFragmentShadingRateKHR(const VkPhysicalDeviceFragmentShadingRateKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_shader_terminate_invocation
void print_VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR(const VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_vertex_input_dynamic_state
void print_VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT(const VkPhysicalDeviceVertexInputDynamicStateFeaturesEXT* obj, const char* str, int commaNeeded);
void print_VkVertexInputBindingDescription2EXT(const VkVertexInputBindingDescription2EXT* obj, const char* str, int commaNeeded);
void print_VkVertexInputAttributeDescription2EXT(const VkVertexInputAttributeDescription2EXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_color_write_enable
void print_VkPhysicalDeviceColorWriteEnableFeaturesEXT(const VkPhysicalDeviceColorWriteEnableFeaturesEXT* obj, const char* str, int commaNeeded);
void print_VkPipelineColorWriteCreateInfoEXT(const VkPipelineColorWriteCreateInfoEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_KHR_synchronization2
void print_VkMemoryBarrier2KHR(const VkMemoryBarrier2KHR* obj, const char* str, int commaNeeded);
void print_VkImageMemoryBarrier2KHR(const VkImageMemoryBarrier2KHR* obj, const char* str, int commaNeeded);
void print_VkBufferMemoryBarrier2KHR(const VkBufferMemoryBarrier2KHR* obj, const char* str, int commaNeeded);
void print_VkDependencyInfoKHR(const VkDependencyInfoKHR* obj, const char* str, int commaNeeded);
void print_VkSemaphoreSubmitInfoKHR(const VkSemaphoreSubmitInfoKHR* obj, const char* str, int commaNeeded);
void print_VkCommandBufferSubmitInfoKHR(const VkCommandBufferSubmitInfoKHR* obj, const char* str, int commaNeeded);
void print_VkSubmitInfo2KHR(const VkSubmitInfo2KHR* obj, const char* str, int commaNeeded);
void print_VkQueueFamilyCheckpointProperties2NV(const VkQueueFamilyCheckpointProperties2NV* obj, const char* str, int commaNeeded);
void print_VkCheckpointData2NV(const VkCheckpointData2NV* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceSynchronization2FeaturesKHR(const VkPhysicalDeviceSynchronization2FeaturesKHR* obj, const char* str, int commaNeeded);
#endif
#ifdef VKSC_VERSION_1_0
void print_VkPhysicalDeviceVulkanSC10Properties(const VkPhysicalDeviceVulkanSC10Properties* obj, const char* str, int commaNeeded);
void print_VkPipelinePoolSize(const VkPipelinePoolSize* obj, const char* str, int commaNeeded);
void print_VkDeviceObjectReservationCreateInfo(const VkDeviceObjectReservationCreateInfo* obj, const char* str, int commaNeeded);
void print_VkCommandPoolMemoryReservationCreateInfo(const VkCommandPoolMemoryReservationCreateInfo* obj, const char* str, int commaNeeded);
void print_VkCommandPoolMemoryConsumption(const VkCommandPoolMemoryConsumption* obj, const char* str, int commaNeeded);
void print_VkPhysicalDeviceVulkanSC10Features(const VkPhysicalDeviceVulkanSC10Features* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_ycbcr_2plane_444_formats
void print_VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT(const VkPhysicalDeviceYcbcr2Plane444FormatsFeaturesEXT* obj, const char* str, int commaNeeded);
#endif
#ifdef VK_EXT_image_drm_format_modifier
void print_VkDrmFormatModifierPropertiesList2EXT(const VkDrmFormatModifierPropertiesList2EXT* obj, const char* str, int commaNeeded);
void print_VkDrmFormatModifierProperties2EXT(const VkDrmFormatModifierProperties2EXT* obj, const char* str, int commaNeeded);
#endif
/*************************************** End prototypes ***********************************/
void dumpPNextChain(const void* pNext);

14346
json/vulkan_json_parser.hpp Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,11 @@
#!/usr/bin/python3 -i
#
# Copyright 2021 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
# Generic alias for working group-specific API conventions interface.
# This import should be changed at the repository / working group level to
# specify the correct API's conventions.
from vkconventions import VulkanConventions as APIConventions

420
registry/cgenerator.py Normal file
View file

@ -0,0 +1,420 @@
#!/usr/bin/python3 -i
#
# Copyright 2013-2021 The Khronos Group Inc.
#
# SPDX-License-Identifier: Apache-2.0
import os
import re
from generator import (GeneratorOptions, OutputGenerator, noneStr,
regSortFeatures, write)
class CGeneratorOptions(GeneratorOptions):
"""CGeneratorOptions - subclass of GeneratorOptions.
Adds options used by COutputGenerator objects during C language header
generation."""
def __init__(self,
prefixText="",
genFuncPointers=True,
protectFile=True,
protectFeature=True,
protectProto=None,
protectProtoStr=None,
apicall='',
apientry='',
apientryp='',
indentFuncProto=True,
indentFuncPointer=False,
alignFuncParam=0,
genEnumBeginEndRange=False,
genAliasMacro=False,
aliasMacro='',
misracstyle=False,
misracppstyle=False,
**kwargs
):
"""Constructor.
Additional parameters beyond parent class:
- prefixText - list of strings to prefix generated header with
(usually a copyright statement + calling convention macros).
- protectFile - True if multiple inclusion protection should be
generated (based on the filename) around the entire header.
- protectFeature - True if #ifndef..#endif protection should be
generated around a feature interface in the header file.
- genFuncPointers - True if function pointer typedefs should be
generated
- protectProto - If conditional protection should be generated
around prototype declarations, set to either '#ifdef'
to require opt-in (#ifdef protectProtoStr) or '#ifndef'
to require opt-out (#ifndef protectProtoStr). Otherwise
set to None.
- protectProtoStr - #ifdef/#ifndef symbol to use around prototype
declarations, if protectProto is set
- apicall - string to use for the function declaration prefix,
such as APICALL on Windows.
- apientry - string to use for the calling convention macro,
in typedefs, such as APIENTRY.
- apientryp - string to use for the calling convention macro
in function pointer typedefs, such as APIENTRYP.
- indentFuncProto - True if prototype declarations should put each
parameter on a separate line
- indentFuncPointer - True if typedefed function pointers should put each
parameter on a separate line
- alignFuncParam - if nonzero and parameters are being put on a
separate line, align parameter names at the specified column
- genEnumBeginEndRange - True if BEGIN_RANGE / END_RANGE macros should
be generated for enumerated types
- genAliasMacro - True if the OpenXR alias macro should be generated
for aliased types (unclear what other circumstances this is useful)
- aliasMacro - alias macro to inject when genAliasMacro is True
- misracstyle - generate MISRA C-friendly headers
- misracppstyle - generate MISRA C++-friendly headers"""
GeneratorOptions.__init__(self, **kwargs)
self.prefixText = prefixText
"""list of strings to prefix generated header with (usually a copyright statement + calling convention macros)."""
self.genFuncPointers = genFuncPointers
"""True if function pointer typedefs should be generated"""
self.protectFile = protectFile
"""True if multiple inclusion protection should be generated (based on the filename) around the entire header."""
self.protectFeature = protectFeature
"""True if #ifndef..#endif protection should be generated around a feature interface in the header file."""
self.protectProto = protectProto
"""If conditional protection should be generated around prototype declarations, set to either '#ifdef' to require opt-in (#ifdef protectProtoStr) or '#ifndef' to require opt-out (#ifndef protectProtoStr). Otherwise set to None."""
self.protectProtoStr = protectProtoStr
"""#ifdef/#ifndef symbol to use around prototype declarations, if protectProto is set"""
self.apicall = apicall
"""string to use for the function declaration prefix, such as APICALL on Windows."""
self.apientry = apientry
"""string to use for the calling convention macro, in typedefs, such as APIENTRY."""
self.apientryp = apientryp
"""string to use for the calling convention macro in function pointer typedefs, such as APIENTRYP."""
self.indentFuncProto = indentFuncProto
"""True if prototype declarations should put each parameter on a separate line"""
self.indentFuncPointer = indentFuncPointer
"""True if typedefed function pointers should put each parameter on a separate line"""
self.alignFuncParam = alignFuncParam
"""if nonzero and parameters are being put on a separate line, align parameter names at the specified column"""
self.genEnumBeginEndRange = genEnumBeginEndRange
"""True if BEGIN_RANGE / END_RANGE macros should be generated for enumerated types"""
self.genAliasMacro = genAliasMacro
"""True if the OpenXR alias macro should be generated for aliased types (unclear what other circumstances this is useful)"""
self.aliasMacro = aliasMacro
"""alias macro to inject when genAliasMacro is True"""
self.misracstyle = misracstyle
"""generate MISRA C-friendly headers"""
self.misracppstyle = misracppstyle
"""generate MISRA C++-friendly headers"""
self.codeGenerator = True
"""True if this generator makes compilable code"""
class COutputGenerator(OutputGenerator):
"""Generates C-language API interfaces."""
# This is an ordered list of sections in the header file.
TYPE_SECTIONS = ['include', 'define', 'basetype', 'handle', 'enum',
'group', 'bitmask', 'funcpointer', 'struct']
ALL_SECTIONS = TYPE_SECTIONS + ['commandPointer', 'command']
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Internal state - accumulators for different inner block text
self.sections = {section: [] for section in self.ALL_SECTIONS}
self.feature_not_empty = False
self.may_alias = None
def beginFile(self, genOpts):
OutputGenerator.beginFile(self, genOpts)
# C-specific
#
# Multiple inclusion protection & C++ wrappers.
if genOpts.protectFile and self.genOpts.filename:
headerSym = re.sub(r'\.h', '_h_',
os.path.basename(self.genOpts.filename)).upper()
write('#ifndef', headerSym, file=self.outFile)
write('#define', headerSym, '1', file=self.outFile)
self.newline()
# User-supplied prefix text, if any (list of strings)
if genOpts.prefixText:
for s in genOpts.prefixText:
write(s, file=self.outFile)
# C++ extern wrapper - after prefix lines so they can add includes.
self.newline()
write('#ifdef __cplusplus', file=self.outFile)
write('extern "C" {', file=self.outFile)
write('#endif', file=self.outFile)
self.newline()
def endFile(self):
# C-specific
# Finish C++ wrapper and multiple inclusion protection
self.newline()
write('#ifdef __cplusplus', file=self.outFile)
write('}', file=self.outFile)
write('#endif', file=self.outFile)
if self.genOpts.protectFile and self.genOpts.filename:
self.newline()
write('#endif', file=self.outFile)
# Finish processing in superclass
OutputGenerator.endFile(self)
def beginFeature(self, interface, emit):
# Start processing in superclass
OutputGenerator.beginFeature(self, interface, emit)
# C-specific
# Accumulate includes, defines, types, enums, function pointer typedefs,
# end function prototypes separately for this feature. They are only
# printed in endFeature().
self.sections = {section: [] for section in self.ALL_SECTIONS}
self.feature_not_empty = False
def endFeature(self):
"Actually write the interface to the output file."
# C-specific
if self.emit:
if self.feature_not_empty:
if self.genOpts.conventions.writeFeature(self.featureExtraProtect, self.genOpts.filename):
self.newline()
if self.genOpts.protectFeature:
write('#ifndef', self.featureName, file=self.outFile)
# If type declarations are needed by other features based on
# this one, it may be necessary to suppress the ExtraProtect,
# or move it below the 'for section...' loop.
if self.featureExtraProtect is not None:
write('#ifdef', self.featureExtraProtect, file=self.outFile)
self.newline()
write('#define', self.featureName, '1', file=self.outFile)
for section in self.TYPE_SECTIONS:
contents = self.sections[section]
if contents:
write('\n'.join(contents), file=self.outFile)
if self.genOpts.genFuncPointers and self.sections['commandPointer']:
write('\n'.join(self.sections['commandPointer']), file=self.outFile)
self.newline()
if self.sections['command']:
if self.genOpts.protectProto:
write(self.genOpts.protectProto,
self.genOpts.protectProtoStr, file=self.outFile)
write('\n'.join(self.sections['command']), end='', file=self.outFile)
if self.genOpts.protectProto:
write('#endif', file=self.outFile)
else:
self.newline()
if self.featureExtraProtect is not None:
write('#endif /*', self.featureExtraProtect, '*/', file=self.outFile)
if self.genOpts.protectFeature:
write('#endif /*', self.featureName, '*/', file=self.outFile)
# Finish processing in superclass
OutputGenerator.endFeature(self)
def appendSection(self, section, text):
"Append a definition to the specified section"
# self.sections[section].append('SECTION: ' + section + '\n')
self.sections[section].append(text)
self.feature_not_empty = True
def genType(self, typeinfo, name, alias):
"Generate type."
OutputGenerator.genType(self, typeinfo, name, alias)
typeElem = typeinfo.elem
# Vulkan:
# Determine the category of the type, and the type section to add
# its definition to.
# 'funcpointer' is added to the 'struct' section as a workaround for
# internal issue #877, since structures and function pointer types
# can have cross-dependencies.
category = typeElem.get('category')
if category == 'funcpointer':
section = 'struct'
else:
section = category
if category in ('struct', 'union'):
# If the type is a struct type, generate it using the
# special-purpose generator.
self.genStruct(typeinfo, name, alias)
else:
# OpenXR: this section was not under 'else:' previously, just fell through
if alias:
# If the type is an alias, just emit a typedef declaration
body = 'typedef ' + alias + ' ' + name + ';\n'
else:
# Replace <apientry /> tags with an APIENTRY-style string
# (from self.genOpts). Copy other text through unchanged.
# If the resulting text is an empty string, do not emit it.
body = noneStr(typeElem.text)
for elem in typeElem:
if elem.tag == 'apientry':
body += self.genOpts.apientry + noneStr(elem.tail)
else:
body += noneStr(elem.text) + noneStr(elem.tail)
if body:
# Add extra newline after multi-line entries.
if '\n' in body[0:-1]:
body += '\n'
self.appendSection(section, body)
def genProtectString(self, protect_str):
"""Generate protection string.
Protection strings are the strings defining the OS/Platform/Graphics
requirements for a given OpenXR command. When generating the
language header files, we need to make sure the items specific to a
graphics API or OS platform are properly wrapped in #ifs."""
protect_if_str = ''
protect_end_str = ''
if not protect_str:
return (protect_if_str, protect_end_str)
if ',' in protect_str:
protect_list = protect_str.split(",")
protect_defs = ('defined(%s)' % d for d in protect_list)
protect_def_str = ' && '.join(protect_defs)
protect_if_str = '#if %s\n' % protect_def_str
protect_end_str = '#endif // %s\n' % protect_def_str
else:
protect_if_str = '#ifdef %s\n' % protect_str
protect_end_str = '#endif // %s\n' % protect_str
return (protect_if_str, protect_end_str)
def typeMayAlias(self, typeName):
if not self.may_alias:
# First time we have asked if a type may alias.
# So, populate the set of all names of types that may.
# Everyone with an explicit mayalias="true"
self.may_alias = set(typeName
for typeName, data in self.registry.typedict.items()
if data.elem.get('mayalias') == 'true')
# Every type mentioned in some other type's parentstruct attribute.
parent_structs = (otherType.elem.get('parentstruct')
for otherType in self.registry.typedict.values())
self.may_alias.update(set(x for x in parent_structs
if x is not None))
return typeName in self.may_alias
def genStruct(self, typeinfo, typeName, alias):
"""Generate struct (e.g. C "struct" type).
This is a special case of the <type> tag where the contents are
interpreted as a set of <member> tags instead of freeform C
C type declarations. The <member> tags are just like <param>
tags - they are a declaration of a struct or union member.
Only simple member declarations are supported (no nested
structs etc.)
If alias is not None, then this struct aliases another; just
generate a typedef of that alias."""
OutputGenerator.genStruct(self, typeinfo, typeName, alias)
typeElem = typeinfo.elem
if alias:
body = 'typedef ' + alias + ' ' + typeName + ';\n'
else:
body = ''
(protect_begin, protect_end) = self.genProtectString(typeElem.get('protect'))
if protect_begin:
body += protect_begin
body += 'typedef ' + typeElem.get('category')
# This is an OpenXR-specific alternative where aliasing refers
# to an inheritance hierarchy of types rather than C-level type
# aliases.
if self.genOpts.genAliasMacro and self.typeMayAlias(typeName):
body += ' ' + self.genOpts.aliasMacro
body += ' ' + typeName + ' {\n'
targetLen = self.getMaxCParamTypeLength(typeinfo)
for member in typeElem.findall('.//member'):
body += self.makeCParamDecl(member, targetLen + 4)
body += ';\n'
body += '} ' + typeName + ';\n'
if protect_end:
body += protect_end
self.appendSection('struct', body)
def genGroup(self, groupinfo, groupName, alias=None):
"""Generate groups (e.g. C "enum" type).
These are concatenated together with other types.
If alias is not None, it is the name of another group type
which aliases this type; just generate that alias."""
OutputGenerator.genGroup(self, groupinfo, groupName, alias)
groupElem = groupinfo.elem
# After either enumerated type or alias paths, add the declaration
# to the appropriate section for the group being defined.
if groupElem.get('type') == 'bitmask':
section = 'bitmask'
else:
section = 'group'
if alias:
# If the group name is aliased, just emit a typedef declaration
# for the alias.
body = 'typedef ' + alias + ' ' + groupName + ';\n'
self.appendSection(section, body)
else:
(section, body) = self.buildEnumCDecl(self.genOpts.genEnumBeginEndRange, groupinfo, groupName)
self.appendSection(section, "\n" + body)
def genEnum(self, enuminfo, name, alias):
"""Generate the C declaration for a constant (a single <enum> value)."""
OutputGenerator.genEnum(self, enuminfo, name, alias)
body = self.buildConstantCDecl(enuminfo, name, alias)
self.appendSection('enum', body)
def genCmd(self, cmdinfo, name, alias):
"Command generation"
OutputGenerator.genCmd(self, cmdinfo, name, alias)
# if alias:
# prefix = '// ' + name + ' is an alias of command ' + alias + '\n'
# else:
# prefix = ''
prefix = ''
decls = self.makeCDecls(cmdinfo.elem)
self.appendSection('command', prefix + decls[0] + '\n')
if self.genOpts.genFuncPointers:
self.appendSection('commandPointer', decls[1])
def misracstyle(self):
return self.genOpts.misracstyle;
def misracppstyle(self):
return self.genOpts.misracppstyle;

358
registry/conventions.py Normal file
View file

@ -0,0 +1,358 @@
#!/usr/bin/python3 -i
#
# Copyright 2013-2021 The Khronos Group Inc.
#
# SPDX-License-Identifier: Apache-2.0
# Base class for working-group-specific style conventions,
# used in generation.
from enum import Enum
# Type categories that respond "False" to isStructAlwaysValid
# basetype is home to typedefs like ..Bool32
CATEGORIES_REQUIRING_VALIDATION = set(('handle',
'enum',
'bitmask',
'basetype',
None))
# These are basic C types pulled in via openxr_platform_defines.h
TYPES_KNOWN_ALWAYS_VALID = set(('char',
'float',
'int8_t', 'uint8_t',
'int32_t', 'uint32_t',
'int64_t', 'uint64_t',
'size_t',
'uintptr_t',
'int',
))
class ProseListFormats(Enum):
"""A connective, possibly with a quantifier."""
AND = 0
EACH_AND = 1
OR = 2
ANY_OR = 3
@classmethod
def from_string(cls, s):
if s == 'or':
return cls.OR
if s == 'and':
return cls.AND
return None
@property
def connective(self):
if self in (ProseListFormats.OR, ProseListFormats.ANY_OR):
return 'or'
return 'and'
def quantifier(self, n):
"""Return the desired quantifier for a list of a given length."""
if self == ProseListFormats.ANY_OR:
if n > 1:
return 'any of '
elif self == ProseListFormats.EACH_AND:
if n > 2:
return 'each of '
if n == 2:
return 'both of '
return ''
class ConventionsBase:
"""WG-specific conventions."""
def __init__(self):
self._command_prefix = None
self._type_prefix = None
def formatExtension(self, name):
"""Mark up an extension name as a link the spec."""
return '`apiext:{}`'.format(name)
@property
def null(self):
"""Preferred spelling of NULL."""
raise NotImplementedError
def makeProseList(self, elements, fmt=ProseListFormats.AND, with_verb=False, *args, **kwargs):
"""Make a (comma-separated) list for use in prose.
Adds a connective (by default, 'and')
before the last element if there are more than 1.
Adds the right one of "is" or "are" to the end if with_verb is true.
Optionally adds a quantifier (like 'any') before a list of 2 or more,
if specified by fmt.
Override with a different method or different call to
_implMakeProseList if you want to add a comma for two elements,
or not use a serial comma.
"""
return self._implMakeProseList(elements, fmt, with_verb, *args, **kwargs)
@property
def struct_macro(self):
"""Get the appropriate format macro for a structure.
May override.
"""
return 'slink:'
@property
def external_macro(self):
"""Get the appropriate format macro for an external type like uint32_t.
May override.
"""
return 'code:'
def makeStructName(self, name):
"""Prepend the appropriate format macro for a structure to a structure type name.
Uses struct_macro, so just override that if you want to change behavior.
"""
return self.struct_macro + name
def makeExternalTypeName(self, name):
"""Prepend the appropriate format macro for an external type like uint32_t to a type name.
Uses external_macro, so just override that if you want to change behavior.
"""
return self.external_macro + name
def _implMakeProseList(self, elements, fmt, with_verb, comma_for_two_elts=False, serial_comma=True):
"""Internal-use implementation to make a (comma-separated) list for use in prose.
Adds a connective (by default, 'and')
before the last element if there are more than 1,
and only includes commas if there are more than 2
(if comma_for_two_elts is False).
Adds the right one of "is" or "are" to the end if with_verb is true.
Optionally adds a quantifier (like 'any') before a list of 2 or more,
if specified by fmt.
Do not edit these defaults, override self.makeProseList().
"""
assert(serial_comma) # did not implement what we did not need
if isinstance(fmt, str):
fmt = ProseListFormats.from_string(fmt)
my_elts = list(elements)
if len(my_elts) > 1:
my_elts[-1] = '{} {}'.format(fmt.connective, my_elts[-1])
if not comma_for_two_elts and len(my_elts) <= 2:
prose = ' '.join(my_elts)
else:
prose = ', '.join(my_elts)
quantifier = fmt.quantifier(len(my_elts))
parts = [quantifier, prose]
if with_verb:
if len(my_elts) > 1:
parts.append(' are')
else:
parts.append(' is')
return ''.join(parts)
@property
def file_suffix(self):
"""Return suffix of generated Asciidoctor files"""
raise NotImplementedError
def api_name(self, spectype=None):
"""Return API or specification name for citations in ref pages.
spectype is the spec this refpage is for.
'api' (the default value) is the main API Specification.
If an unrecognized spectype is given, returns None.
Must implement."""
raise NotImplementedError
def should_insert_may_alias_macro(self, genOpts):
"""Return true if we should insert a "may alias" macro in this file.
Only used by OpenXR right now."""
return False
@property
def command_prefix(self):
"""Return the expected prefix of commands/functions.
Implemented in terms of api_prefix."""
if not self._command_prefix:
self._command_prefix = self.api_prefix[:].replace('_', '').lower()
return self._command_prefix
@property
def type_prefix(self):
"""Return the expected prefix of type names.
Implemented in terms of command_prefix (and in turn, api_prefix)."""
if not self._type_prefix:
self._type_prefix = ''.join(
(self.command_prefix[0:1].upper(), self.command_prefix[1:]))
return self._type_prefix
@property
def api_prefix(self):
"""Return API token prefix.
Typically two uppercase letters followed by an underscore.
Must implement."""
raise NotImplementedError
@property
def api_version_prefix(self):
"""Return API core version token prefix.
Implemented in terms of api_prefix.
May override."""
return self.api_prefix + 'VERSION_'
@property
def KHR_prefix(self):
"""Return extension name prefix for KHR extensions.
Implemented in terms of api_prefix.
May override."""
return self.api_prefix + 'KHR_'
@property
def EXT_prefix(self):
"""Return extension name prefix for EXT extensions.
Implemented in terms of api_prefix.
May override."""
return self.api_prefix + 'EXT_'
def writeFeature(self, featureExtraProtect, filename):
"""Return True if OutputGenerator.endFeature should write this feature.
Defaults to always True.
Used in COutputGenerator.
May override."""
return True
def requires_error_validation(self, return_type):
"""Return True if the return_type element is an API result code
requiring error validation.
Defaults to always False.
May override."""
return False
@property
def required_errors(self):
"""Return a list of required error codes for validation.
Defaults to an empty list.
May override."""
return []
def is_voidpointer_alias(self, tag, text, tail):
"""Return True if the declaration components (tag,text,tail) of an
element represents a void * type.
Defaults to a reasonable implementation.
May override."""
return tag == 'type' and text == 'void' and tail.startswith('*')
def make_voidpointer_alias(self, tail):
"""Reformat a void * declaration to include the API alias macro.
Defaults to a no-op.
Must override if you actually want to use this feature in your project."""
return tail
def category_requires_validation(self, category):
"""Return True if the given type 'category' always requires validation.
Defaults to a reasonable implementation.
May override."""
return category in CATEGORIES_REQUIRING_VALIDATION
def type_always_valid(self, typename):
"""Return True if the given type name is always valid (never requires validation).
This is for things like integers.
Defaults to a reasonable implementation.
May override."""
return typename in TYPES_KNOWN_ALWAYS_VALID
@property
def should_skip_checking_codes(self):
"""Return True if more than the basic validation of return codes should
be skipped for a command."""
return False
@property
def generate_index_terms(self):
"""Return True if asiidoctor index terms should be generated as part
of an API interface from the docgenerator."""
return False
@property
def generate_enum_table(self):
"""Return True if asciidoctor tables describing enumerants in a
group should be generated as part of group generation."""
return False
@property
def generate_max_enum_in_docs(self):
"""Return True if MAX_ENUM tokens should be generated in
documentation includes."""
return False
def extension_include_string(self, ext):
"""Return format string for include:: line for an extension appendix
file. ext is an object with the following members:
- name - extension string string
- vendor - vendor portion of name
- barename - remainder of name
Must implement."""
raise NotImplementedError
@property
def refpage_generated_include_path(self):
"""Return path relative to the generated reference pages, to the
generated API include files.
Must implement."""
raise NotImplementedError
def valid_flag_bit(self, bitpos):
"""Return True if bitpos is an allowed numeric bit position for
an API flag.
Behavior depends on the data type used for flags (which may be 32
or 64 bits), and may depend on assumptions about compiler
handling of sign bits in enumerated types, as well."""
return True

1222
registry/generator.py Normal file

File diff suppressed because it is too large Load diff

985
registry/genvk.py Executable file
View file

@ -0,0 +1,985 @@
#!/usr/bin/python3
#
# Copyright 2013-2021 The Khronos Group Inc.
#
# SPDX-License-Identifier: Apache-2.0
import argparse
import pdb
import re
import sys
import copy
import time
import xml.etree.ElementTree as etree
from json_parser import JSONParserGenerator, JSONParserOptions
from cgenerator import CGeneratorOptions, COutputGenerator
from schema_generator import SchemaGeneratorOptions, SchemaOutputGenerator
from json_generator import JSONGeneratorOptions, JSONOutputGenerator
from json_h_generator import JSONHeaderOutputGenerator, JSONHeaderGeneratorOptions
from json_c_generator import JSONCOutputGenerator, JSONCGeneratorOptions
from docgenerator import DocGeneratorOptions, DocOutputGenerator
from extensionmetadocgenerator import (ExtensionMetaDocGeneratorOptions,
ExtensionMetaDocOutputGenerator)
from interfacedocgenerator import InterfaceDocGenerator
from generator import write
from spirvcapgenerator import SpirvCapabilityOutputGenerator
from hostsyncgenerator import HostSynchronizationOutputGenerator
from formatsgenerator import FormatsOutputGenerator
from pygenerator import PyOutputGenerator
from rubygenerator import RubyOutputGenerator
from reflib import logDiag, logErr, logWarn, setLogFile
from reg import Registry
from validitygenerator import ValidityOutputGenerator
from apiconventions import APIConventions
# Simple timer functions
startTime = None
def startTimer(timeit):
global startTime
if timeit:
startTime = time.process_time()
def endTimer(timeit, msg):
global startTime
if timeit:
endTime = time.process_time()
logDiag(msg, endTime - startTime)
startTime = None
def makeREstring(strings, default=None, strings_are_regex=False):
"""Turn a list of strings into a regexp string matching exactly those strings."""
if strings or default is None:
if not strings_are_regex:
strings = (re.escape(s) for s in strings)
return '^(' + '|'.join(strings) + ')$'
return default
def makeGenOpts(args):
"""Returns a directory of [ generator function, generator options ] indexed
by specified short names. The generator options incorporate the following
parameters:
args is an parsed argument object; see below for the fields that are used."""
global genOpts
genOpts = {}
# Default class of extensions to include, or None
defaultExtensions = args.defaultExtensions
# Additional extensions to include (list of extensions)
extensions = args.extension
# Extensions to remove (list of extensions)
removeExtensions = args.removeExtensions
# Extensions to emit (list of extensions)
emitExtensions = args.emitExtensions
# SPIR-V capabilities / features to emit (list of extensions & capabilities)
emitSpirv = args.emitSpirv
# Vulkan Formats to emit
emitFormats = args.emitFormats
# Features to include (list of features)
features = args.feature
# Whether to disable inclusion protect in headers
protect = args.protect
# Output target directory
directory = args.directory
# Path to generated files, particularly api.py
genpath = args.genpath
# Generate MISRA C-friendly headers
misracstyle = args.misracstyle;
# Generate MISRA C++-friendly headers
misracppstyle = args.misracppstyle;
# Descriptive names for various regexp patterns used to select
# versions and extensions
allFormats = allSpirv = allFeatures = allExtensions = r'.*'
# Turn lists of names/patterns into matching regular expressions
addExtensionsPat = makeREstring(extensions, None)
removeExtensionsPat = makeREstring(removeExtensions, None)
emitExtensionsPat = makeREstring(emitExtensions, allExtensions)
emitSpirvPat = makeREstring(emitSpirv, allSpirv)
emitFormatsPat = makeREstring(emitFormats, allFormats)
featuresPat = makeREstring(features, allFeatures)
# Copyright text prefixing all headers (list of strings).
# The SPDX formatting below works around constraints of the 'reuse' tool
prefixStrings = [
'/*',
'** Copyright 2015-2021 The Khronos Group Inc.',
'**',
'** SPDX' + '-License-Identifier: Apache-2.0',
'*/',
''
]
# Text specific to Vulkan headers
vkPrefixStrings = [
'/*',
'** This header is generated from the Khronos Vulkan XML API Registry.',
'**',
'*/',
''
]
vulkanLayer = args.vulkanLayer
# Defaults for generating re-inclusion protection wrappers (or not)
protectFile = protect
# An API style conventions object
conventions = APIConventions()
# Change this depending on which repository/spec we are building
defaultAPIName = conventions.xml_api_name
isCTS = args.isCTS
# API include files for spec and ref pages
# Overwrites include subdirectories in spec source tree
# The generated include files do not include the calling convention
# macros (apientry etc.), unlike the header files.
# Because the 1.0 core branch includes ref pages for extensions,
# all the extension interfaces need to be generated, even though
# none are used by the core spec itself.
genOpts['apiinc'] = [
DocOutputGenerator,
DocGeneratorOptions(
conventions = conventions,
filename = 'timeMarker',
directory = directory,
genpath = genpath,
apiname = defaultAPIName,
profile = None,
versions = featuresPat,
emitversions = featuresPat,
defaultExtensions = None,
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
prefixText = prefixStrings + vkPrefixStrings,
apicall = '',
apientry = '',
apientryp = '*',
alignFuncParam = 48,
expandEnumerants = False)
]
# Python and Ruby representations of API information, used by scripts
# that do not need to load the full XML.
genOpts['api.py'] = [
PyOutputGenerator,
DocGeneratorOptions(
conventions = conventions,
filename = 'api.py',
directory = directory,
genpath = None,
apiname = defaultAPIName,
profile = None,
versions = featuresPat,
emitversions = featuresPat,
defaultExtensions = None,
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
reparentEnums = False)
]
genOpts['api.rb'] = [
RubyOutputGenerator,
DocGeneratorOptions(
conventions = conventions,
filename = 'api.rb',
directory = directory,
genpath = None,
apiname = defaultAPIName,
profile = None,
versions = featuresPat,
emitversions = featuresPat,
defaultExtensions = None,
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
reparentEnums = False)
]
# API validity files for spec
#
# requireCommandAliases is set to True because we need validity files
# for the command something is promoted to even when the promoted-to
# feature is not included. This avoids wordy includes of validity files.
genOpts['validinc'] = [
ValidityOutputGenerator,
DocGeneratorOptions(
conventions = conventions,
filename = 'timeMarker',
directory = directory,
genpath = None,
apiname = defaultAPIName,
profile = None,
versions = featuresPat,
emitversions = featuresPat,
defaultExtensions = None,
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
requireCommandAliases = True,
)
]
# API host sync table files for spec
genOpts['hostsyncinc'] = [
HostSynchronizationOutputGenerator,
DocGeneratorOptions(
conventions = conventions,
filename = 'timeMarker',
directory = directory,
genpath = None,
apiname = defaultAPIName,
profile = None,
versions = featuresPat,
emitversions = featuresPat,
defaultExtensions = None,
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
reparentEnums = False)
]
# Extension metainformation for spec extension appendices
# Includes all extensions by default, but only so that the generated
# 'promoted_extensions_*' files refer to all extensions that were
# promoted to a core version.
genOpts['extinc'] = [
ExtensionMetaDocOutputGenerator,
ExtensionMetaDocGeneratorOptions(
conventions = conventions,
filename = 'timeMarker',
directory = directory,
genpath = None,
apiname = defaultAPIName,
profile = None,
versions = featuresPat,
emitversions = None,
defaultExtensions = defaultExtensions,
addExtensions = addExtensionsPat,
removeExtensions = None,
emitExtensions = emitExtensionsPat)
]
# Version and extension interface docs for version/extension appendices
# Includes all extensions by default.
genOpts['interfaceinc'] = [
InterfaceDocGenerator,
DocGeneratorOptions(
conventions = conventions,
filename = 'timeMarker',
directory = directory,
genpath = None,
apiname = defaultAPIName,
profile = None,
versions = featuresPat,
emitversions = featuresPat,
defaultExtensions = None,
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
reparentEnums = False)
]
genOpts['spirvcapinc'] = [
SpirvCapabilityOutputGenerator,
DocGeneratorOptions(
conventions = conventions,
filename = 'timeMarker',
directory = directory,
genpath = None,
apiname = defaultAPIName,
profile = None,
versions = featuresPat,
emitversions = featuresPat,
defaultExtensions = None,
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
emitSpirv = emitSpirvPat,
reparentEnums = False)
]
# Used to generate various format chapter tables
genOpts['formatsinc'] = [
FormatsOutputGenerator,
DocGeneratorOptions(
conventions = conventions,
filename = 'timeMarker',
directory = directory,
genpath = None,
apiname = defaultAPIName,
profile = None,
versions = featuresPat,
emitversions = featuresPat,
defaultExtensions = None,
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
emitFormats = emitFormatsPat,
reparentEnums = False)
]
# Platform extensions, in their own header files
# Each element of the platforms[] array defines information for
# generating a single platform:
# [0] is the generated header file name
# [1] is the set of platform extensions to generate
# [2] is additional extensions whose interfaces should be considered,
# but suppressed in the output, to avoid duplicate definitions of
# dependent types like VkDisplayKHR and VkSurfaceKHR which come from
# non-platform extensions.
# Track all platform extensions, for exclusion from vulkan_core.h
allPlatformExtensions = []
# Extensions suppressed for all WSI platforms (WSI extensions required
# by all platforms)
commonSuppressExtensions = [ 'VK_KHR_display', 'VK_KHR_swapchain' ]
# Extensions required and suppressed for beta "platform". This can
# probably eventually be derived from the requires= attributes of
# the extension blocks.
betaRequireExtensions = [
'VK_KHR_portability_subset',
'VK_KHR_video_queue',
'VK_KHR_video_decode_queue',
'VK_KHR_video_encode_queue',
'VK_EXT_video_decode_h264',
'VK_EXT_video_decode_h265',
'VK_EXT_video_encode_h264',
'VK_EXT_video_encode_h265',
]
betaSuppressExtensions = []
platforms = [
[ 'vulkan_android.h', [ 'VK_KHR_android_surface',
'VK_ANDROID_external_memory_android_hardware_buffer'
], commonSuppressExtensions +
[ 'VK_KHR_format_feature_flags2',
] ],
[ 'vulkan_fuchsia.h', [ 'VK_FUCHSIA_imagepipe_surface',
'VK_FUCHSIA_external_memory',
'VK_FUCHSIA_external_semaphore',
'VK_FUCHSIA_buffer_collection' ], commonSuppressExtensions ],
[ 'vulkan_ggp.h', [ 'VK_GGP_stream_descriptor_surface',
'VK_GGP_frame_token' ], commonSuppressExtensions ],
[ 'vulkan_ios.h', [ 'VK_MVK_ios_surface' ], commonSuppressExtensions ],
[ 'vulkan_macos.h', [ 'VK_MVK_macos_surface' ], commonSuppressExtensions ],
[ 'vulkan_vi.h', [ 'VK_NN_vi_surface' ], commonSuppressExtensions ],
[ 'vulkan_wayland.h', [ 'VK_KHR_wayland_surface' ], commonSuppressExtensions ],
[ 'vulkan_win32.h', [ 'VK_.*_win32(|_.*)', 'VK_EXT_full_screen_exclusive' ],
commonSuppressExtensions +
[ 'VK_KHR_external_semaphore',
'VK_KHR_external_memory_capabilities',
'VK_KHR_external_fence',
'VK_KHR_external_fence_capabilities',
'VK_KHR_get_surface_capabilities2',
'VK_NV_external_memory_capabilities',
] ],
[ 'vulkan_xcb.h', [ 'VK_KHR_xcb_surface' ], commonSuppressExtensions ],
[ 'vulkan_xlib.h', [ 'VK_KHR_xlib_surface' ], commonSuppressExtensions ],
[ 'vulkan_directfb.h', [ 'VK_EXT_directfb_surface' ], commonSuppressExtensions ],
[ 'vulkan_xlib_xrandr.h', [ 'VK_EXT_acquire_xlib_display' ], commonSuppressExtensions ],
[ 'vulkan_metal.h', [ 'VK_EXT_metal_surface' ], commonSuppressExtensions ],
[ 'vulkan_screen.h', [ 'VK_QNX_screen_surface' ], commonSuppressExtensions ],
[ 'vulkan_beta.h', betaRequireExtensions, betaSuppressExtensions ],
]
for platform in platforms:
headername = platform[0]
allPlatformExtensions += platform[1]
addPlatformExtensionsRE = makeREstring(
platform[1] + platform[2], strings_are_regex=True)
emitPlatformExtensionsRE = makeREstring(
platform[1], strings_are_regex=True)
opts = CGeneratorOptions(
conventions = conventions,
filename = headername,
directory = directory,
genpath = None,
apiname = defaultAPIName,
profile = None,
versions = featuresPat,
emitversions = None,
defaultExtensions = None,
addExtensions = addPlatformExtensionsRE,
removeExtensions = None,
emitExtensions = emitPlatformExtensionsRE,
prefixText = prefixStrings + vkPrefixStrings,
genFuncPointers = True,
protectFile = protectFile,
protectFeature = False,
protectProto = '#ifndef',
protectProtoStr = 'VK_NO_PROTOTYPES',
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
alignFuncParam = 48,
misracstyle = misracstyle,
misracppstyle = misracppstyle)
genOpts[headername] = [ COutputGenerator, opts ]
# Header for core API + extensions.
# To generate just the core API,
# change to 'defaultExtensions = None' below.
#
# By default this adds all enabled, non-platform extensions.
# It removes all platform extensions (from the platform headers options
# constructed above) as well as any explicitly specified removals.
removeExtensionsPat = makeREstring(
allPlatformExtensions + removeExtensions, None, strings_are_regex=True)
genOpts['vulkan_core.h'] = [
COutputGenerator,
CGeneratorOptions(
conventions = conventions,
filename = 'vulkan_core.h',
directory = directory,
genpath = None,
apiname = defaultAPIName,
profile = None,
versions = featuresPat,
emitversions = featuresPat,
defaultExtensions = defaultExtensions,
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
prefixText = prefixStrings + vkPrefixStrings,
genFuncPointers = True,
protectFile = protectFile,
protectFeature = False,
protectProto = '#ifndef',
protectProtoStr = 'VK_NO_PROTOTYPES',
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
alignFuncParam = 48,
misracstyle = misracstyle,
misracppstyle = misracppstyle)
]
# Temporary, to compare interfaces with vulkan_sc_core.h
noExtensions = makeREstring(['None'])
newOpts = copy.deepcopy(genOpts['vulkan_core.h'])
newOpts[1].filename = 'vk11.h'
newOpts[1].defaultExtensions = None
newOpts[1].emitExtensions = emitExtensionsPat
genOpts['vk11.h'] = newOpts
# Vulkan versions to include for SC header - SC *removes* features from 1.0/1.1/1.2
scVersions = makeREstring(['VK_VERSION_1_0', 'VK_VERSION_1_1', 'VK_VERSION_1_2', 'VKSC_VERSION_1_0'])
genOpts['vulkan_sc_core.h'] = [
COutputGenerator,
CGeneratorOptions(
conventions = conventions,
filename = 'vulkan_sc_core.h',
directory = directory,
apiname = 'vulkansc',
profile = None,
versions = scVersions,
emitversions = scVersions,
defaultExtensions = 'vulkansc',
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
prefixText = prefixStrings + vkPrefixStrings,
genFuncPointers = True,
protectFile = protectFile,
protectFeature = False,
protectProto = '#ifndef',
protectProtoStr = 'VK_NO_PROTOTYPES',
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
alignFuncParam = 48,
misracstyle = misracstyle,
misracppstyle = misracppstyle)
]
genOpts['vulkan_sc_core.hpp'] = [
COutputGenerator,
CGeneratorOptions(
conventions = conventions,
filename = 'vulkan_sc_core.hpp',
directory = directory,
apiname = 'vulkansc',
profile = None,
versions = scVersions,
emitversions = scVersions,
defaultExtensions = 'vulkansc',
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
prefixText = prefixStrings + vkPrefixStrings,
genFuncPointers = True,
protectFile = protectFile,
protectFeature = False,
protectProto = '#ifndef',
protectProtoStr = 'VK_NO_PROTOTYPES',
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
alignFuncParam = 48,
misracstyle = misracstyle,
misracppstyle = misracppstyle)
]
genOpts['vk.json'] = [
SchemaOutputGenerator,
SchemaGeneratorOptions(
conventions = conventions,
filename = 'vk.json',
directory = directory,
apiname = 'vulkansc',
profile = None,
versions = scVersions,
emitversions = scVersions,
defaultExtensions = 'vulkansc',
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
prefixText = prefixStrings + vkPrefixStrings,
genFuncPointers = True,
protectFile = protectFile,
protectFeature = False,
protectProto = '#ifndef',
protectProtoStr = 'VK_NO_PROTOTYPES',
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
alignFuncParam = 48)
]
if vulkanLayer:
genOpts['vulkan_json_data.hpp'] = [
JSONOutputGenerator,
JSONGeneratorOptions(
conventions = conventions,
filename = 'vulkan_json_data.hpp',
directory = directory,
apiname = 'vulkan',
profile = None,
versions = featuresPat,
emitversions = featuresPat,
defaultExtensions = defaultExtensions,
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
vulkanLayer = vulkanLayer,
prefixText = prefixStrings + vkPrefixStrings,
genFuncPointers = True,
protectFile = protectFile,
protectFeature = False,
protectProto = '#ifndef',
protectProtoStr = 'VK_NO_PROTOTYPES',
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
alignFuncParam = 48)
]
else:
genOpts['vulkan_json_data.hpp'] = [
JSONOutputGenerator,
JSONGeneratorOptions(
conventions = conventions,
filename = 'vulkan_json_data.hpp',
directory = directory,
apiname = 'vulkansc',
profile = None,
versions = scVersions,
emitversions = scVersions,
defaultExtensions = 'vulkansc',
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
vulkanLayer = vulkanLayer,
prefixText = prefixStrings + vkPrefixStrings,
genFuncPointers = True,
protectFile = protectFile,
protectFeature = False,
protectProto = '#ifndef',
protectProtoStr = 'VK_NO_PROTOTYPES',
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
isCTS = isCTS,
alignFuncParam = 48)
]
# Raw C header file generator.
genOpts['vulkan_json_gen.h'] = [
JSONHeaderOutputGenerator,
JSONHeaderGeneratorOptions(
conventions = conventions,
filename = 'vulkan_json_gen.h',
directory = directory,
apiname = 'vulkansc',
profile = None,
versions = scVersions,
emitversions = scVersions,
defaultExtensions = 'vulkansc',
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
prefixText = prefixStrings + vkPrefixStrings,
genFuncPointers = True,
protectFile = protectFile,
protectFeature = False,
protectProto = '#ifndef',
protectProtoStr = 'VK_NO_PROTOTYPES',
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
alignFuncParam = 48)
]
# Raw C source file generator.
genOpts['vulkan_json_gen.c'] = [
JSONCOutputGenerator,
JSONCGeneratorOptions(
conventions = conventions,
filename = 'vulkan_json_gen.c',
directory = directory,
apiname = 'vulkansc',
profile = None,
versions = scVersions,
emitversions = scVersions,
defaultExtensions = 'vulkansc',
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
prefixText = prefixStrings + vkPrefixStrings,
genFuncPointers = True,
protectFile = protectFile,
protectFeature = False,
protectProto = '#ifndef',
protectProtoStr = 'VK_NO_PROTOTYPES',
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
alignFuncParam = 48)
]
genOpts['vulkan_json_parser.hpp'] = [
JSONParserGenerator,
JSONParserOptions(
conventions = conventions,
filename = 'vulkan_json_parser.hpp',
directory = directory,
apiname = 'vulkansc',
profile = None,
versions = scVersions,
emitversions = scVersions,
defaultExtensions = 'vulkansc',
addExtensions = addExtensionsPat,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
prefixText = prefixStrings + vkPrefixStrings,
genFuncPointers = True,
protectFile = protectFile,
protectFeature = False,
protectProto = '#ifndef',
protectProtoStr = 'VK_NO_PROTOTYPES',
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
isCTS = isCTS,
alignFuncParam = 48)
]
# Unused - vulkan10.h target.
# It is possible to generate a header with just the Vulkan 1.0 +
# extension interfaces defined, but since the promoted KHR extensions
# are now defined in terms of the 1.1 interfaces, such a header is very
# similar to vulkan_core.h.
genOpts['vulkan10.h'] = [
COutputGenerator,
CGeneratorOptions(
conventions = conventions,
filename = 'vulkan10.h',
directory = directory,
genpath = None,
apiname = defaultAPIName,
profile = None,
versions = 'VK_VERSION_1_0',
emitversions = 'VK_VERSION_1_0',
defaultExtensions = None,
addExtensions = None,
removeExtensions = None,
emitExtensions = None,
prefixText = prefixStrings + vkPrefixStrings,
genFuncPointers = True,
protectFile = protectFile,
protectFeature = False,
protectProto = '#ifndef',
protectProtoStr = 'VK_NO_PROTOTYPES',
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
alignFuncParam = 48,
misracstyle = misracstyle,
misracppstyle = misracppstyle)
]
# Unused - vulkan11.h target.
# It is possible to generate a header with just the Vulkan 1.0 +
# extension interfaces defined, but since the promoted KHR extensions
# are now defined in terms of the 1.1 interfaces, such a header is very
# similar to vulkan_core.h.
genOpts['vulkan11.h'] = [
COutputGenerator,
CGeneratorOptions(
conventions = conventions,
filename = 'vulkan11.h',
directory = directory,
genpath = None,
apiname = defaultAPIName,
profile = None,
versions = '^VK_VERSION_1_[01]$',
emitversions = '^VK_VERSION_1_[01]$',
defaultExtensions = None,
addExtensions = None,
removeExtensions = None,
emitExtensions = None,
prefixText = prefixStrings + vkPrefixStrings,
genFuncPointers = True,
protectFile = protectFile,
protectFeature = False,
protectProto = '#ifndef',
protectProtoStr = 'VK_NO_PROTOTYPES',
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
alignFuncParam = 48,
misracstyle = misracstyle,
misracppstyle = misracppstyle)
]
genOpts['alias.h'] = [
COutputGenerator,
CGeneratorOptions(
conventions = conventions,
filename = 'alias.h',
directory = directory,
genpath = None,
apiname = defaultAPIName,
profile = None,
versions = featuresPat,
emitversions = featuresPat,
defaultExtensions = defaultExtensions,
addExtensions = None,
removeExtensions = removeExtensionsPat,
emitExtensions = emitExtensionsPat,
prefixText = None,
genFuncPointers = False,
protectFile = False,
protectFeature = False,
protectProto = '',
protectProtoStr = '',
apicall = '',
apientry = '',
apientryp = '',
alignFuncParam = 36)
]
def genTarget(args):
"""Create an API generator and corresponding generator options based on
the requested target and command line options.
This is encapsulated in a function so it can be profiled and/or timed.
The args parameter is an parsed argument object containing the following
fields that are used:
- target - target to generate
- directory - directory to generate it in
- protect - True if re-inclusion wrappers should be created
- extensions - list of additional extensions to include in generated interfaces"""
# Create generator options with parameters specified on command line
makeGenOpts(args)
# pdb.set_trace()
# Select a generator matching the requested target
if args.target in genOpts:
createGenerator = genOpts[args.target][0]
options = genOpts[args.target][1]
logDiag('* Building', options.filename)
logDiag('* options.versions =', options.versions)
logDiag('* options.emitversions =', options.emitversions)
logDiag('* options.defaultExtensions =', options.defaultExtensions)
logDiag('* options.addExtensions =', options.addExtensions)
logDiag('* options.removeExtensions =', options.removeExtensions)
logDiag('* options.emitExtensions =', options.emitExtensions)
logDiag('* options.emitSpirv =', options.emitSpirv)
logDiag('* options.emitFormats =', options.emitFormats)
gen = createGenerator(errFile=errWarn,
warnFile=errWarn,
diagFile=diag)
return (gen, options)
else:
logErr('No generator options for unknown target:', args.target)
return None
# -feature name
# -extension name
# For both, "name" may be a single name, or a space-separated list
# of names, or a regular expression.
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('-defaultExtensions', action='store',
default=APIConventions().xml_api_name,
help='Specify a single class of extensions to add to targets')
parser.add_argument('-extension', action='append',
default=[],
help='Specify an extension or extensions to add to targets')
parser.add_argument('-removeExtensions', action='append',
default=[],
help='Specify an extension or extensions to remove from targets')
parser.add_argument('-emitExtensions', action='append',
default=[],
help='Specify an extension or extensions to emit in targets')
parser.add_argument('-emitSpirv', action='append',
default=[],
help='Specify a SPIR-V extension or capability to emit in targets')
parser.add_argument('-emitFormats', action='append',
default=[],
help='Specify Vulkan Formats to emit in targets')
parser.add_argument('-feature', action='append',
default=[],
help='Specify a core API feature name or names to add to targets')
parser.add_argument('-debug', action='store_true',
help='Enable debugging')
parser.add_argument('-dump', action='store_true',
help='Enable dump to stderr')
parser.add_argument('-diagfile', action='store',
default=None,
help='Write diagnostics to specified file')
parser.add_argument('-errfile', action='store',
default=None,
help='Write errors and warnings to specified file instead of stderr')
parser.add_argument('-noprotect', dest='protect', action='store_false',
help='Disable inclusion protection in output headers')
parser.add_argument('-profile', action='store_true',
help='Enable profiling')
parser.add_argument('-registry', action='store',
default='vk.xml',
help='Use specified registry file instead of vk.xml')
parser.add_argument('-time', action='store_true',
help='Enable timing')
parser.add_argument('-validate', action='store_true',
help='Validate the registry properties and exit')
parser.add_argument('-genpath', action='store', default='gen',
help='Path to generated files')
parser.add_argument('-o', action='store', dest='directory',
default='.',
help='Create target and related files in specified directory')
parser.add_argument('target', metavar='target', nargs='?',
help='Specify target')
parser.add_argument('-quiet', action='store_true', default=True,
help='Suppress script output during normal execution.')
parser.add_argument('-verbose', action='store_false', dest='quiet', default=True,
help='Enable script output during normal execution.')
parser.add_argument('--vulkanLayer', action='store_true', dest='vulkanLayer',
help='Enable scripts to generate VK specific vulkan_json_data.hpp for json_gen_layer.')
parser.add_argument('-misracstyle', dest='misracstyle', action='store_true',
help='generate MISRA C-friendly headers')
parser.add_argument('-misracppstyle', dest='misracppstyle', action='store_true',
help='generate MISRA C++-friendly headers')
parser.add_argument('--iscts', action='store_true', dest='isCTS',
help='Specify if this should generate CTS compatible code')
args = parser.parse_args()
# This splits arguments which are space-separated lists
args.feature = [name for arg in args.feature for name in arg.split()]
args.extension = [name for arg in args.extension for name in arg.split()]
# create error/warning & diagnostic files
if args.errfile:
errWarn = open(args.errfile, 'w', encoding='utf-8')
else:
errWarn = sys.stderr
if args.diagfile:
diag = open(args.diagfile, 'w', encoding='utf-8')
else:
diag = None
if args.time:
# Log diagnostics and warnings
setLogFile(setDiag = True, setWarn = True, filename = '-')
(gen, options) = (None, None)
if not args.validate:
# Create the API generator & generator options
(gen, options) = genTarget(args)
# Create the registry object with the specified generator and generator
# options. The options are set before XML loading as they may affect it.
reg = Registry(gen, options)
# Parse the specified registry XML into an ElementTree object
startTimer(args.time)
tree = etree.parse(args.registry)
endTimer(args.time, '* Time to make ElementTree =')
# Load the XML tree into the registry object
startTimer(args.time)
reg.loadElementTree(tree)
endTimer(args.time, '* Time to parse ElementTree =')
if args.validate:
success = reg.validateRegistry()
sys.exit(0 if success else 1)
if args.dump:
logDiag('* Dumping registry to regdump.txt')
reg.dumpReg(filehandle=open('regdump.txt', 'w', encoding='utf-8'))
# Finally, use the output generator to create the requested target
if args.debug:
pdb.run('reg.apiGen()')
else:
startTimer(args.time)
reg.apiGen()
endTimer(args.time, '* Time to generate ' + options.filename + ' =')
if not args.quiet:
logDiag('* Generated', options.filename)

1600
registry/reg.py Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,58 @@
"""Utility functions not closely tied to other spec_tools types."""
# Copyright 2018-2019 Collabora, Ltd.
# Copyright 2013-2021 The Khronos Group Inc.
#
# SPDX-License-Identifier: Apache-2.0
def getElemName(elem, default=None):
"""Get the name associated with an element, either a name child or name attribute."""
name_elem = elem.find('name')
if name_elem is not None:
return name_elem.text
# Fallback if there is no child.
return elem.get('name', default)
def getElemType(elem, default=None):
"""Get the type associated with an element, either a type child or type attribute."""
type_elem = elem.find('type')
if type_elem is not None:
return type_elem.text
# Fallback if there is no child.
return elem.get('type', default)
def findFirstWithPredicate(collection, pred):
"""Return the first element that satisfies the predicate, or None if none exist.
NOTE: Some places where this is used might be better served by changing to a dictionary.
"""
for elt in collection:
if pred(elt):
return elt
return None
def findNamedElem(elems, name):
"""Traverse a collection of elements with 'name' nodes or attributes, looking for and returning one with the right name.
NOTE: Many places where this is used might be better served by changing to a dictionary.
"""
return findFirstWithPredicate(elems, lambda elem: getElemName(elem) == name)
def findTypedElem(elems, typename):
"""Traverse a collection of elements with 'type' nodes or attributes, looking for and returning one with the right typename.
NOTE: Many places where this is used might be better served by changing to a dictionary.
"""
return findFirstWithPredicate(elems, lambda elem: getElemType(elem) == typename)
def findNamedObject(collection, name):
"""Traverse a collection of elements with 'name' attributes, looking for and returning one with the right name.
NOTE: Many places where this is used might be better served by changing to a dictionary.
"""
return findFirstWithPredicate(collection, lambda elt: elt.name == name)

41218
registry/validusage.json Normal file

File diff suppressed because one or more lines are too long

20057
registry/vk.xml Normal file

File diff suppressed because it is too large Load diff

280
registry/vkconventions.py Executable file
View file

@ -0,0 +1,280 @@
#!/usr/bin/python3 -i
#
# Copyright 2013-2021 The Khronos Group Inc.
#
# SPDX-License-Identifier: Apache-2.0
# Working-group-specific style conventions,
# used in generation.
import re
import os
from conventions import ConventionsBase
# Modified from default implementation - see category_requires_validation() below
CATEGORIES_REQUIRING_VALIDATION = set(('handle', 'enum', 'bitmask'))
# Tokenize into "words" for structure types, approximately per spec "Implicit Valid Usage" section 2.7.2
# This first set is for things we recognize explicitly as words,
# as exceptions to the general regex.
# Ideally these would be listed in the spec as exceptions, as OpenXR does.
SPECIAL_WORDS = set((
'16Bit', # VkPhysicalDevice16BitStorageFeatures
'8Bit', # VkPhysicalDevice8BitStorageFeaturesKHR
'AABB', # VkGeometryAABBNV
'ASTC', # VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT
'D3D12', # VkD3D12FenceSubmitInfoKHR
'Float16', # VkPhysicalDeviceShaderFloat16Int8FeaturesKHR
'ImagePipe', # VkImagePipeSurfaceCreateInfoFUCHSIA
'Int64', # VkPhysicalDeviceShaderAtomicInt64FeaturesKHR
'Int8', # VkPhysicalDeviceShaderFloat16Int8FeaturesKHR
'MacOS', # VkMacOSSurfaceCreateInfoMVK
'RGBA10X6', # VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT
'Uint8', # VkPhysicalDeviceIndexTypeUint8FeaturesEXT
'Win32', # VkWin32SurfaceCreateInfoKHR
))
# A regex to match any of the SPECIAL_WORDS
EXCEPTION_PATTERN = r'(?P<exception>{})'.format(
'|'.join('(%s)' % re.escape(w) for w in SPECIAL_WORDS))
MAIN_RE = re.compile(
# the negative lookahead is to prevent the all-caps pattern from being too greedy.
r'({}|([0-9]+)|([A-Z][a-z]+)|([A-Z][A-Z]*(?![a-z])))'.format(EXCEPTION_PATTERN))
class VulkanConventions(ConventionsBase):
@property
def null(self):
"""Preferred spelling of NULL."""
return '`NULL`'
@property
def struct_macro(self):
"""Get the appropriate format macro for a structure.
Primarily affects generated valid usage statements.
"""
return 'slink:'
@property
def constFlagBits(self):
"""Returns True if static const flag bits should be generated, False if an enumerated type should be generated."""
return False
@property
def structtype_member_name(self):
"""Return name of the structure type member"""
return 'sType'
@property
def nextpointer_member_name(self):
"""Return name of the structure pointer chain member"""
return 'pNext'
@property
def valid_pointer_prefix(self):
"""Return prefix to pointers which must themselves be valid"""
return 'valid'
def is_structure_type_member(self, paramtype, paramname):
"""Determine if member type and name match the structure type member."""
return paramtype == 'VkStructureType' and paramname == self.structtype_member_name
def is_nextpointer_member(self, paramtype, paramname):
"""Determine if member type and name match the next pointer chain member."""
return paramtype == 'void' and paramname == self.nextpointer_member_name
def generate_structure_type_from_name(self, structname):
"""Generate a structure type name, like VK_STRUCTURE_TYPE_CREATE_INSTANCE_INFO"""
structure_type_parts = []
# Tokenize into "words"
for elem in MAIN_RE.findall(structname):
word = elem[0]
if word == 'Vk':
structure_type_parts.append('VK_STRUCTURE_TYPE')
else:
structure_type_parts.append(word.upper())
name = '_'.join(structure_type_parts)
# The simple-minded rules need modification for some structure names
subpats = [
[ r'_H_(26[45])_', r'_H\1_' ],
[ r'_VULKAN_([0-9])([0-9])_', r'_VULKAN_\1_\2_' ],
[ r'_VULKAN_SC_([0-9])([0-9])_',r'_VULKAN_SC_\1_\2_' ],
[ r'_DIRECT_FB_', r'_DIRECTFB_' ],
]
for subpat in subpats:
name = re.sub(subpat[0], subpat[1], name)
return name
@property
def warning_comment(self):
"""Return warning comment to be placed in header of generated Asciidoctor files"""
return '// WARNING: DO NOT MODIFY! This file is automatically generated from the vk.xml registry'
@property
def file_suffix(self):
"""Return suffix of generated Asciidoctor files"""
return '.txt'
def api_name(self, spectype='api'):
"""Return API or specification name for citations in ref pages.ref
pages should link to for
spectype is the spec this refpage is for: 'api' is the Vulkan API
Specification. Defaults to 'api'. If an unrecognized spectype is
given, returns None.
"""
if spectype == 'api' or spectype is None:
return 'Vulkan'
else:
return None
@property
def api_prefix(self):
"""Return API token prefix"""
return 'VK_'
@property
def write_contacts(self):
"""Return whether contact list should be written to extension appendices"""
return True
@property
def write_refpage_include(self):
"""Return whether refpage include should be written to extension appendices"""
return True
@property
def member_used_for_unique_vuid(self):
"""Return the member name used in the VUID-...-...-unique ID."""
return self.structtype_member_name
def is_externsync_command(self, protoname):
"""Returns True if the protoname element is an API command requiring
external synchronization
"""
return protoname is not None and 'vkCmd' in protoname
def is_api_name(self, name):
"""Returns True if name is in the reserved API namespace.
For Vulkan, these are names with a case-insensitive 'vk' prefix, or
a 'PFN_vk' function pointer type prefix.
"""
return name[0:2].lower() == 'vk' or name[0:6] == 'PFN_vk'
def specURL(self, spectype='api'):
"""Return public registry URL which ref pages should link to for the
current all-extensions HTML specification, so xrefs in the
asciidoc source that are not to ref pages can link into it
instead. N.b. this may need to change on a per-refpage basis if
there are multiple documents involved.
"""
return 'https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html'
@property
def xml_api_name(self):
"""Return the name used in the default API XML registry for the default API"""
# Allow the API to be overridden by environment variable - default to 'vulkansc' if not set
VulkanAPI = os.getenv('VULKAN_API')
if VulkanAPI:
return VulkanAPI
return 'vulkansc'
@property
def registry_path(self):
"""Return relpath to the default API XML registry in this project."""
return 'xml/vk.xml'
@property
def specification_path(self):
"""Return relpath to the Asciidoctor specification sources in this project."""
return '{generated}/meta'
@property
def special_use_section_anchor(self):
"""Return asciidoctor anchor name in the API Specification of the
section describing extension special uses in detail."""
return 'extendingvulkan-compatibility-specialuse'
@property
def extra_refpage_headers(self):
"""Return any extra text to add to refpage headers."""
return 'include::{config}/attribs.txt[]'
@property
def extension_index_prefixes(self):
"""Return a list of extension prefixes used to group extension refpages."""
return ['VK_KHR', 'VK_EXT', 'VK']
@property
def unified_flag_refpages(self):
"""Return True if Flags/FlagBits refpages are unified, False if
they are separate.
"""
return False
@property
def spec_reflow_path(self):
"""Return the path to the spec source folder to reflow"""
return os.getcwd()
@property
def spec_no_reflow_dirs(self):
"""Return a set of directories not to automatically descend into
when reflowing spec text
"""
return ('scripts', 'style')
@property
def zero(self):
return '`0`'
def category_requires_validation(self, category):
"""Return True if the given type 'category' always requires validation.
Overridden because Vulkan does not require "valid" text for basetype
in the spec right now."""
return category in CATEGORIES_REQUIRING_VALIDATION
@property
def should_skip_checking_codes(self):
"""Return True if more than the basic validation of return codes should
be skipped for a command.
Vulkan mostly relies on the validation layers rather than API
builtin error checking, so these checks are not appropriate.
For example, passing in a VkFormat parameter will not potentially
generate a VK_ERROR_FORMAT_NOT_SUPPORTED code."""
return True
def extension_include_string(self, ext):
"""Return format string for include:: line for an extension appendix
file. ext is an object with the following members:
- name - extension string string
- vendor - vendor portion of name
- barename - remainder of name"""
return 'include::{{appendices}}/{name}{suffix}[]'.format(
name=ext.name, suffix=self.file_suffix)
@property
def refpage_generated_include_path(self):
"""Return path relative to the generated reference pages, to the
generated API include files."""
return "{generated}"
def valid_flag_bit(self, bitpos):
"""Return True if bitpos is an allowed numeric bit position for
an API flag bit.
Vulkan uses 32 bit Vk*Flags types, and assumes C compilers may
cause Vk*FlagBits values with bit 31 set to result in a 64 bit
enumerated type, so disallows such flags."""
return bitpos >= 0 and bitpos < 31