summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJon Leech <[email protected]>2021-03-29 01:18:51 -0700
committerJon Leech <[email protected]>2021-03-29 01:19:41 -0700
commite1d8c4931d8e4b6c4a8e633c163ed3aa82d6ac1c (patch)
tree381b7c50090227d1625bc9e1373811c0c6e2025d
parenta8d6ab19d197400be34422813c5edc7e4cbde552 (diff)
downloadVulkan-Headers-1.2.174.tar.gz
Vulkan-Headers-1.2.174.zip
Update for Vulkan-Docs 1.2.174v1.2.174
-rw-r--r--include/vulkan/vulkan.hpp5
-rw-r--r--include/vulkan/vulkan_core.h206
-rw-r--r--registry/cgenerator.py37
-rw-r--r--registry/generator.py164
-rwxr-xr-xregistry/genvk.py26
-rw-r--r--registry/validusage.json12
-rw-r--r--registry/vk.xml99
7 files changed, 378 insertions, 171 deletions
diff --git a/include/vulkan/vulkan.hpp b/include/vulkan/vulkan.hpp
index 46eafe8..4dfe17d 100644
--- a/include/vulkan/vulkan.hpp
+++ b/include/vulkan/vulkan.hpp
@@ -94,11 +94,12 @@ extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE h
#endif
-static_assert( VK_HEADER_VERSION == 173 , "Wrong VK_HEADER_VERSION!" );
+static_assert( VK_HEADER_VERSION == 174 , "Wrong VK_HEADER_VERSION!" );
// 32-bit vulkan is not typesafe for handles, so don't allow copy constructors on this platform by default.
// To enable this feature on 32-bit platforms please define VULKAN_HPP_TYPESAFE_CONVERSION
-#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
+#if defined( VK_USE_64_BIT_PTR_DEFINES )
+
# if !defined( VULKAN_HPP_TYPESAFE_CONVERSION )
# define VULKAN_HPP_TYPESAFE_CONVERSION
# endif
diff --git a/include/vulkan/vulkan_core.h b/include/vulkan/vulkan_core.h
index 7be96ca..2d57e1e 100644
--- a/include/vulkan/vulkan_core.h
+++ b/include/vulkan/vulkan_core.h
@@ -25,12 +25,37 @@ extern "C" {
#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
-#if !defined(VK_DEFINE_NON_DISPATCHABLE_HANDLE)
-#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
+#ifndef VK_USE_64_BIT_PTR_DEFINES
+ #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
+ #define VK_USE_64_BIT_PTR_DEFINES 1
+ #else
+ #define VK_USE_64_BIT_PTR_DEFINES 0
+ #endif
+#endif
+
+
+#ifndef VK_DEFINE_NON_DISPATCHABLE_HANDLE
+ #if (VK_USE_64_BIT_PTR_DEFINES==1)
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
-#else
+ #else
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
+ #endif
+#endif
+
+
+#ifndef VK_DEFINE_NON_DISPATCHABLE_HANDLE
+ #if (VK_USE_64_BIT_PTR_DEFINES==1)
+ #if __cplusplus >= 201103L
+ #define VK_NULL_HANDLE nullptr
+ #else
+ #define VK_NULL_HANDLE ((void*)0)
+ #endif
+ #else
+ #define VK_NULL_HANDLE 0ULL
+ #endif
#endif
+#ifndef VK_NULL_HANDLE
+ #define VK_NULL_HANDLE 0
#endif
#define VK_MAKE_VERSION(major, minor, patch) \
@@ -43,17 +68,14 @@ extern "C" {
#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)// Patch version should always be set to 0
// Version of this file
-#define VK_HEADER_VERSION 173
+#define VK_HEADER_VERSION 174
// Complete version of this file
#define VK_HEADER_VERSION_COMPLETE VK_MAKE_VERSION(1, 2, VK_HEADER_VERSION)
#define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22)
-#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
-#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
-
-#define VK_NULL_HANDLE 0
-
+#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3FFU)
+#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xFFFU)
typedef uint32_t VkBool32;
typedef uint64_t VkDeviceAddress;
typedef uint64_t VkDeviceSize;
@@ -86,7 +108,7 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool)
#define VK_ATTACHMENT_UNUSED (~0U)
#define VK_FALSE 0
-#define VK_LOD_CLAMP_NONE 1000.0f
+#define VK_LOD_CLAMP_NONE 1000.0F
#define VK_QUEUE_FAMILY_IGNORED (~0U)
#define VK_REMAINING_ARRAY_LAYERS (~0U)
#define VK_REMAINING_MIP_LEVELS (~0U)
@@ -4095,7 +4117,7 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate)
#define VK_MAX_DEVICE_GROUP_SIZE 32
#define VK_LUID_SIZE 8
-#define VK_QUEUE_FAMILY_EXTERNAL (~0U-1)
+#define VK_QUEUE_FAMILY_EXTERNAL (~1U)
typedef enum VkPointClippingBehavior {
VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES = 0,
@@ -7558,90 +7580,88 @@ typedef uint64_t VkFlags64;
#define VK_KHR_SYNCHRONIZATION_2_EXTENSION_NAME "VK_KHR_synchronization2"
typedef VkFlags64 VkPipelineStageFlags2KHR;
-// Flag bits for VkPipelineStageFlags2KHR
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_NONE_KHR = 0;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR = 0x00000001;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR = 0x00000002;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR = 0x00000004;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR = 0x00000008;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR = 0x00000010;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR = 0x00000020;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR = 0x00000040;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR = 0x00000080;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR = 0x00000100;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR = 0x00000200;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR = 0x00000400;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR = 0x00000800;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR = 0x00001000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR = 0x00001000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR = 0x00002000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_HOST_BIT_KHR = 0x00004000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR = 0x00008000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR = 0x00010000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_COPY_BIT_KHR = 0x100000000ULL;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_RESOLVE_BIT_KHR = 0x200000000ULL;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_BLIT_BIT_KHR = 0x400000000ULL;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_CLEAR_BIT_KHR = 0x800000000ULL;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR = 0x1000000000ULL;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR = 0x2000000000ULL;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR = 0x4000000000ULL;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_RESERVED_26_BIT_KHR = 0x04000000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_RESERVED_27_BIT_KHR = 0x08000000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT = 0x01000000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV = 0x00020000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00400000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV = 0x00400000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 0x02000000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR = 0x00200000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV = 0x00200000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV = 0x02000000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT = 0x00800000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV = 0x00080000;
-static const VkPipelineStageFlags2KHR VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV = 0x00100000;
+// Flag bits for VkPipelineStageFlagBits2KHR
+typedef VkFlags64 VkPipelineStageFlagBits2KHR;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_NONE_KHR = 0ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR = 0x00000001ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR = 0x00000002ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR = 0x00000004ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR = 0x00000008ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR = 0x00000010ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR = 0x00000020ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR = 0x00000040ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR = 0x00000080ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR = 0x00000100ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR = 0x00000200ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR = 0x00000400ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR = 0x00000800ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR = 0x00001000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR = 0x00001000;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR = 0x00002000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_HOST_BIT_KHR = 0x00004000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR = 0x00008000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR = 0x00010000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_COPY_BIT_KHR = 0x100000000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_RESOLVE_BIT_KHR = 0x200000000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_BLIT_BIT_KHR = 0x400000000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_CLEAR_BIT_KHR = 0x800000000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR = 0x1000000000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR = 0x2000000000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR = 0x4000000000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT = 0x01000000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV = 0x00020000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00400000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_SHADING_RATE_IMAGE_BIT_NV = 0x00400000;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_KHR = 0x02000000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_KHR = 0x00200000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_RAY_TRACING_SHADER_BIT_NV = 0x00200000;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_ACCELERATION_STRUCTURE_BUILD_BIT_NV = 0x02000000;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_FRAGMENT_DENSITY_PROCESS_BIT_EXT = 0x00800000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_TASK_SHADER_BIT_NV = 0x00080000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_2_MESH_SHADER_BIT_NV = 0x00100000ULL;
+static const VkPipelineStageFlagBits2KHR VK_PIPELINE_STAGE_FLAG_BITS_2KHR_MAX_ENUM_KHR = 0x7FFFFFFFFFFFFFFFULL;
typedef VkFlags64 VkAccessFlags2KHR;
-// Flag bits for VkAccessFlags2KHR
-static const VkAccessFlags2KHR VK_ACCESS_2_NONE_KHR = 0;
-static const VkAccessFlags2KHR VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR = 0x00000001;
-static const VkAccessFlags2KHR VK_ACCESS_2_INDEX_READ_BIT_KHR = 0x00000002;
-static const VkAccessFlags2KHR VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR = 0x00000004;
-static const VkAccessFlags2KHR VK_ACCESS_2_UNIFORM_READ_BIT_KHR = 0x00000008;
-static const VkAccessFlags2KHR VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR = 0x00000010;
-static const VkAccessFlags2KHR VK_ACCESS_2_SHADER_READ_BIT_KHR = 0x00000020;
-static const VkAccessFlags2KHR VK_ACCESS_2_SHADER_WRITE_BIT_KHR = 0x00000040;
-static const VkAccessFlags2KHR VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR = 0x00000080;
-static const VkAccessFlags2KHR VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR = 0x00000100;
-static const VkAccessFlags2KHR VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR = 0x00000200;
-static const VkAccessFlags2KHR VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR = 0x00000400;
-static const VkAccessFlags2KHR VK_ACCESS_2_TRANSFER_READ_BIT_KHR = 0x00000800;
-static const VkAccessFlags2KHR VK_ACCESS_2_TRANSFER_WRITE_BIT_KHR = 0x00001000;
-static const VkAccessFlags2KHR VK_ACCESS_2_HOST_READ_BIT_KHR = 0x00002000;
-static const VkAccessFlags2KHR VK_ACCESS_2_HOST_WRITE_BIT_KHR = 0x00004000;
-static const VkAccessFlags2KHR VK_ACCESS_2_MEMORY_READ_BIT_KHR = 0x00008000;
-static const VkAccessFlags2KHR VK_ACCESS_2_MEMORY_WRITE_BIT_KHR = 0x00010000;
-static const VkAccessFlags2KHR VK_ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR = 0x100000000ULL;
-static const VkAccessFlags2KHR VK_ACCESS_2_SHADER_STORAGE_READ_BIT_KHR = 0x200000000ULL;
-static const VkAccessFlags2KHR VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR = 0x400000000ULL;
-static const VkAccessFlags2KHR VK_ACCESS_2_RESERVED_READ_35_BIT_KHR = 0x800000000ULL;
-static const VkAccessFlags2KHR VK_ACCESS_2_RESERVED_WRITE_36_BIT_KHR = 0x1000000000ULL;
-static const VkAccessFlags2KHR VK_ACCESS_2_RESERVED_READ_37_BIT_KHR = 0x2000000000ULL;
-static const VkAccessFlags2KHR VK_ACCESS_2_RESERVED_WRITE_38_BIT_KHR = 0x4000000000ULL;
-static const VkAccessFlags2KHR VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000;
-static const VkAccessFlags2KHR VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000;
-static const VkAccessFlags2KHR VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000;
-static const VkAccessFlags2KHR VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000;
-static const VkAccessFlags2KHR VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV = 0x00020000;
-static const VkAccessFlags2KHR VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV = 0x00040000;
-static const VkAccessFlags2KHR VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 0x00800000;
-static const VkAccessFlags2KHR VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV = 0x00800000;
-static const VkAccessFlags2KHR VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR = 0x00200000;
-static const VkAccessFlags2KHR VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 0x00400000;
-static const VkAccessFlags2KHR VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV = 0x00200000;
-static const VkAccessFlags2KHR VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV = 0x00400000;
-static const VkAccessFlags2KHR VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 0x01000000;
-static const VkAccessFlags2KHR VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000;
+// Flag bits for VkAccessFlagBits2KHR
+typedef VkFlags64 VkAccessFlagBits2KHR;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_NONE_KHR = 0ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR = 0x00000001ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_INDEX_READ_BIT_KHR = 0x00000002ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR = 0x00000004ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_UNIFORM_READ_BIT_KHR = 0x00000008ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR = 0x00000010ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_SHADER_READ_BIT_KHR = 0x00000020ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_SHADER_WRITE_BIT_KHR = 0x00000040ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR = 0x00000080ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR = 0x00000100ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR = 0x00000200ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR = 0x00000400ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_TRANSFER_READ_BIT_KHR = 0x00000800ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_TRANSFER_WRITE_BIT_KHR = 0x00001000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_HOST_READ_BIT_KHR = 0x00002000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_HOST_WRITE_BIT_KHR = 0x00004000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_MEMORY_READ_BIT_KHR = 0x00008000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_MEMORY_WRITE_BIT_KHR = 0x00010000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR = 0x100000000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_SHADER_STORAGE_READ_BIT_KHR = 0x200000000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR = 0x400000000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_CONDITIONAL_RENDERING_READ_BIT_EXT = 0x00100000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_COMMAND_PREPROCESS_READ_BIT_NV = 0x00020000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_COMMAND_PREPROCESS_WRITE_BIT_NV = 0x00040000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_FRAGMENT_SHADING_RATE_ATTACHMENT_READ_BIT_KHR = 0x00800000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_SHADING_RATE_IMAGE_READ_BIT_NV = 0x00800000;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_KHR = 0x00200000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_KHR = 0x00400000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_ACCELERATION_STRUCTURE_READ_BIT_NV = 0x00200000;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_ACCELERATION_STRUCTURE_WRITE_BIT_NV = 0x00400000;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_FRAGMENT_DENSITY_MAP_READ_BIT_EXT = 0x01000000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_2_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT = 0x00080000ULL;
+static const VkAccessFlagBits2KHR VK_ACCESS_FLAG_BITS_2KHR_MAX_ENUM_KHR = 0x7FFFFFFFFFFFFFFFULL;
typedef enum VkSubmitFlagBitsKHR {
@@ -8988,7 +9008,7 @@ VKAPI_ATTR void VKAPI_CALL vkSetHdrMetadataEXT(
#define VK_EXT_queue_family_foreign 1
#define VK_EXT_QUEUE_FAMILY_FOREIGN_SPEC_VERSION 1
#define VK_EXT_QUEUE_FAMILY_FOREIGN_EXTENSION_NAME "VK_EXT_queue_family_foreign"
-#define VK_QUEUE_FAMILY_FOREIGN_EXT (~0U-2)
+#define VK_QUEUE_FAMILY_FOREIGN_EXT (~2U)
#define VK_EXT_debug_utils 1
diff --git a/registry/cgenerator.py b/registry/cgenerator.py
index c156f22..0046b6d 100644
--- a/registry/cgenerator.py
+++ b/registry/cgenerator.py
@@ -32,6 +32,8 @@ class CGeneratorOptions(GeneratorOptions):
genEnumBeginEndRange=False,
genAliasMacro=False,
aliasMacro='',
+ misracstyle=False,
+ misracppstyle=False,
**kwargs
):
"""Constructor.
@@ -68,7 +70,10 @@ class CGeneratorOptions(GeneratorOptions):
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"""
+ - 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
@@ -116,6 +121,12 @@ class CGeneratorOptions(GeneratorOptions):
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"""
@@ -386,8 +397,22 @@ class COutputGenerator(OutputGenerator):
just integers."""
OutputGenerator.genEnum(self, enuminfo, name, alias)
(_, strVal) = self.enumToValue(enuminfo.elem, False)
- body = '#define ' + name.ljust(33) + ' ' + strVal
- self.appendSection('enum', body)
+
+ if self.misracppstyle() and enuminfo.elem.get('type') and not alias:
+ # Generate e.g.: static constexpr uint32_t x = ~static_cast<uint32_t>(1U);
+ # This appeases MISRA "underlying type" rules.
+ typeStr = enuminfo.elem.get('type');
+ invert = '~' in strVal
+ number = strVal.strip("()~UL")
+ if typeStr != "float":
+ number += 'U'
+ strVal = "~" if invert else ""
+ strVal += "static_cast<" + typeStr + ">(" + number + ")"
+ body = 'static constexpr ' + typeStr.ljust(9) + name.ljust(33) + ' {' + strVal + '};'
+ self.appendSection('enum', body)
+ else:
+ body = '#define ' + name.ljust(33) + ' ' + strVal
+ self.appendSection('enum', body)
def genCmd(self, cmdinfo, name, alias):
"Command generation"
@@ -403,3 +428,9 @@ class COutputGenerator(OutputGenerator):
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;
diff --git a/registry/generator.py b/registry/generator.py
index 8bf3c6d..039015e 100644
--- a/registry/generator.py
+++ b/registry/generator.py
@@ -306,7 +306,7 @@ class OutputGenerator:
raise UserWarning(
'*** FATAL ERROR in Generator.logMsg: unknown level:' + level)
- def enumToValue(self, elem, needsNum):
+ def enumToValue(self, elem, needsNum, bitwidth = 32, forceSuffix = False):
"""Parse and convert an `<enum>` tag into a value.
Returns a list:
@@ -342,6 +342,11 @@ class OutputGenerator:
# t = enuminfo.elem.get('type')
# if t is not None and t != '' and t != 'i' and t != 's':
# value += enuminfo.type
+ if forceSuffix:
+ if bitwidth == 64:
+ value = value + 'ULL'
+ else:
+ value = value + 'U'
self.logMsg('diag', 'Enum', name, '-> value [', numVal, ',', value, ']')
return [numVal, value]
if 'bitpos' in elem.keys():
@@ -349,8 +354,10 @@ class OutputGenerator:
bitpos = int(value, 0)
numVal = 1 << bitpos
value = '0x%08x' % numVal
- if bitpos >= 32:
- value = value + 'ULL'
+ if bitwidth == 64:
+ value = value + 'ULL'
+ elif forceSuffix:
+ value = value + 'U'
self.logMsg('diag', 'Enum', name, '-> bitpos [', numVal, ',', value, ']')
return [numVal, value]
if 'offset' in elem.keys():
@@ -433,6 +440,12 @@ class OutputGenerator:
# Return the list
return stripped
+ def misracstyle(self):
+ return False;
+
+ def misracppstyle(self):
+ return False;
+
def buildEnumCDecl(self, expand, groupinfo, groupName):
"""Generate the C declaration for an enum"""
groupElem = groupinfo.elem
@@ -453,47 +466,69 @@ class OutputGenerator:
self.logMsg('error', 'Invalid value for bitwidth attribute (', groupElem.get('bitwidth'), ') for ', groupName, ' - must be an integer value\n')
exit(1)
- # Bitmask types support 64-bit flags, so have different handling
+ usebitmask = False
+ usedefine = False
+
+ # Bitmask flags can be generated as either "static const uint{32,64}_t" values,
+ # or as 32-bit C enums. 64-bit types must use uint64_t values.
if groupElem.get('type') == 'bitmask':
+ if bitwidth > 32 or self.misracppstyle():
+ usebitmask = True
+ if self.misracstyle():
+ usedefine = True
+ if usedefine or usebitmask:
# Validate the bitwidth and generate values appropriately
- # Bitmask flags up to 64-bit are generated as static const uint64_t values
- # Bitmask flags up to 32-bit are generated as C enum values
if bitwidth > 64:
self.logMsg('error', 'Invalid value for bitwidth attribute (', groupElem.get('bitwidth'), ') for bitmask type ', groupName, ' - must be less than or equal to 64\n')
exit(1)
- elif bitwidth > 32:
- return self.buildEnumCDecl_Bitmask(groupinfo, groupName)
else:
- return self.buildEnumCDecl_Enum(expand, groupinfo, groupName)
+ return self.buildEnumCDecl_BitmaskOrDefine(groupinfo, groupName, bitwidth, usedefine)
else:
# Validate the bitwidth and generate values appropriately
- # Enum group types up to 32-bit are generated as C enum values
if bitwidth > 32:
self.logMsg('error', 'Invalid value for bitwidth attribute (', groupElem.get('bitwidth'), ') for enum type ', groupName, ' - must be less than or equal to 32\n')
exit(1)
else:
return self.buildEnumCDecl_Enum(expand, groupinfo, groupName)
- def buildEnumCDecl_Bitmask(self, groupinfo, groupName):
+ def buildEnumCDecl_BitmaskOrDefine(self, groupinfo, groupName, bitwidth, usedefine):
"""Generate the C declaration for an "enum" that is actually a
set of flag bits"""
groupElem = groupinfo.elem
- flagTypeName = groupinfo.flagType.elem.get('name')
+ flagTypeName = groupElem.get('name')
# Prefix
body = "// Flag bits for " + flagTypeName + "\n"
+ if bitwidth == 64:
+ body += "typedef VkFlags64 %s;\n" % flagTypeName;
+ else:
+ body += "typedef VkFlags %s;\n" % flagTypeName;
+
# Maximum allowable value for a flag (unsigned 64-bit integer)
maxValidValue = 2**(64) - 1
minValidValue = 0
+ # Get a list of nested 'enum' tags.
+ enums = groupElem.findall('enum')
+
+ # Check for and report duplicates, and return a list with them
+ # removed.
+ enums = self.checkDuplicateEnums(enums)
+
+ # Accumulate non-numeric enumerant values separately and append
+ # them following the numeric values, to allow for aliases.
+ # NOTE: this doesn't do a topological sort yet, so aliases of
+ # aliases can still get in the wrong order.
+ aliasText = ''
+
# Loop over the nested 'enum' tags.
- for elem in groupElem.findall('enum'):
+ for elem in enums:
# Convert the value to an integer and use that to track min/max.
# Values of form -(number) are accepted but nothing more complex.
# Should catch exceptions here for more complex constructs. Not yet.
- (numVal, strVal) = self.enumToValue(elem, True)
+ (numVal, strVal) = self.enumToValue(elem, True, bitwidth, True)
name = elem.get('name')
# Range check for the enum value
@@ -504,17 +539,63 @@ class OutputGenerator:
protect = elem.get('protect')
if protect is not None:
body += '#ifdef {}\n'.format(protect)
- body += self.genRequirements(name, mustBeFound = False)
- # Some C compilers only allow initializing a 'static const' variable with a literal value.
- # So initializing an alias from another 'static const' value would fail to compile.
- # Work around this by chasing the aliases to get the actual value.
- while numVal is None:
- alias = self.registry.tree.find("enums/enum[@name='" + strVal + "']")
- (numVal, strVal) = self.enumToValue(alias, True)
- body += "static const {} {} = {};\n".format(flagTypeName, name, strVal)
+
+ decl = self.genRequirements(name, mustBeFound = False)
+
+ if self.isEnumRequired(elem):
+ if usedefine:
+ decl += "#define {} {}\n".format(name, strVal)
+ elif self.misracppstyle():
+ decl += "static constexpr {} {} {{{}}};\n".format(flagTypeName, name, strVal)
+ else:
+ # Some C compilers only allow initializing a 'static const' variable with a literal value.
+ # So initializing an alias from another 'static const' value would fail to compile.
+ # Work around this by chasing the aliases to get the actual value.
+ while numVal is None:
+ alias = self.registry.tree.find("enums/enum[@name='" + strVal + "']")
+ (numVal, strVal) = self.enumToValue(alias, True)
+ decl += "static const {} {} = {};\n".format(flagTypeName, name, strVal)
+
+ if numVal is not None:
+ body += decl
+ else:
+ aliasText += decl
+
if protect is not None:
body += '#endif\n'
+ # Now append the non-numeric enumerant values
+ body += aliasText
+
+ # Generate a range-padding value to ensure the enum is 32 bits, but
+ # only in code generators, so it doesn't appear in documentation.
+ # This isn't needed for bitmasks or defines, but keep them around for
+ # compatibility.
+ if (self.genOpts.codeGenerator or
+ self.conventions.generate_max_enum_in_docs):
+
+ # Break the group name into prefix and suffix portions for range
+ # enum generation
+ expandName = re.sub(r'([0-9a-z_])([A-Z0-9])', r'\1_\2', groupName).upper()
+ expandPrefix = expandName
+ expandSuffix = ''
+ expandSuffixMatch = re.search(r'[A-Z][A-Z]+$', groupName)
+ if expandSuffixMatch:
+ expandSuffix = '_' + expandSuffixMatch.group()
+ # Strip off the suffix from the prefix
+ expandPrefix = expandName.rsplit(expandSuffix, 1)[0]
+
+ maxEnum = '0x7FFFFFFFU'
+ if bitwidth == 64:
+ maxEnum = '0x7FFFFFFFFFFFFFFFULL'
+
+ if usedefine:
+ body += "#define {}_MAX_ENUM{} {}\n".format(expandPrefix, expandSuffix, maxEnum)
+ elif self.misracppstyle():
+ body += "static constexpr {} {}_MAX_ENUM{} {{{}}};\n".format(flagTypeName, expandPrefix, expandSuffix, maxEnum)
+ else:
+ body += "static const {} {}_MAX_ENUM{} = {};\n".format(flagTypeName, expandPrefix, expandSuffix, maxEnum)
+
# Postfix
return ("bitmask", body)
@@ -815,7 +896,9 @@ class OutputGenerator:
- aligncol - if non-zero, attempt to align the nested `<name>` element
at this column"""
indent = ' '
- paramdecl = indent + noneStr(param.text)
+ paramdecl = indent
+ prefix = noneStr(param.text)
+
for elem in param:
text = noneStr(elem.text)
tail = noneStr(elem.tail)
@@ -834,7 +917,16 @@ class OutputGenerator:
paramdecl = paramdecl.ljust(aligncol - 1) + ' '
newLen = len(paramdecl)
self.logMsg('diag', 'Adjust length of parameter decl from', oldLen, 'to', newLen, ':', paramdecl)
- paramdecl += text + tail
+
+ if (self.misracppstyle() and prefix.find('const ') != -1):
+ # Change pointer type order from e.g. "const void *" to "void const *".
+ # If the string starts with 'const', reorder it to be after the first type.
+ paramdecl += prefix.replace('const ', '') + text + ' const' + tail
+ else:
+ paramdecl += prefix + text + tail
+
+ # Clear prefix for subsequent iterations
+ prefix = ''
if aligncol == 0:
# Squeeze out multiple spaces other than the indentation
paramdecl = indent + ' '.join(paramdecl.split())
@@ -1041,8 +1133,28 @@ class OutputGenerator:
# Non-indented parameters
paramdecl = '('
if n > 0:
- paramnames = (''.join(t for t in p.itertext())
- for p in params)
+ paramnames = []
+ if self.misracppstyle():
+ for p in params:
+ param = ''
+ firstIter = True;
+ for t in p.itertext():
+ if (firstIter):
+ prefix = t
+ firstIter = False
+ else:
+ # Change pointer type order from e.g. "const void *" to "void const *".
+ # If the string starts with 'const', reorder it to be after the first type.
+ if (prefix.find('const ') != -1):
+ param += prefix.replace('const ', '') + t + ' const '
+ else:
+ param += prefix + t
+ # Clear prefix for subsequent iterations
+ prefix = ''
+ paramnames.append(param);
+ else:
+ paramnames = (''.join(t for t in p.itertext())
+ for p in params)
paramdecl += ', '.join(paramnames)
else:
paramdecl += 'void'
diff --git a/registry/genvk.py b/registry/genvk.py
index 71ed5d3..9b1476b 100755
--- a/registry/genvk.py
+++ b/registry/genvk.py
@@ -89,6 +89,12 @@ def makeGenOpts(args):
# 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
allSpirv = allFeatures = allExtensions = r'.*'
@@ -359,7 +365,9 @@ def makeGenOpts(args):
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
- alignFuncParam = 48)
+ alignFuncParam = 48,
+ misracstyle = misracstyle,
+ misracppstyle = misracppstyle)
genOpts[headername] = [ COutputGenerator, opts ]
@@ -398,7 +406,9 @@ def makeGenOpts(args):
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
- alignFuncParam = 48)
+ alignFuncParam = 48,
+ misracstyle = misracstyle,
+ misracppstyle = misracppstyle)
]
# Unused - vulkan10.h target.
@@ -430,7 +440,9 @@ def makeGenOpts(args):
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
- alignFuncParam = 48)
+ alignFuncParam = 48,
+ misracstyle = misracstyle,
+ misracppstyle = misracppstyle)
]
# Unused - vulkan11.h target.
@@ -462,7 +474,9 @@ def makeGenOpts(args):
apicall = 'VKAPI_ATTR ',
apientry = 'VKAPI_CALL ',
apientryp = 'VKAPI_PTR *',
- alignFuncParam = 48)
+ alignFuncParam = 48,
+ misracstyle = misracstyle,
+ misracppstyle = misracppstyle)
]
genOpts['alias.h'] = [
@@ -590,6 +604,10 @@ if __name__ == '__main__':
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('-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')
args = parser.parse_args()
diff --git a/registry/validusage.json b/registry/validusage.json
index 55b258b..9090a35 100644
--- a/registry/validusage.json
+++ b/registry/validusage.json
@@ -1,9 +1,9 @@
{
"version info": {
"schema version": 2,
- "api version": "1.2.173",
- "comment": "from git branch: github-main commit: 0d5fb72f39c4282edf1754ce5eed0654f7960cb4",
- "date": "2021-03-21 13:46:07Z"
+ "api version": "1.2.174",
+ "comment": "from git branch: github-main commit: 3fefdc503242ce529330c51a869ed99a069a3010",
+ "date": "2021-03-29 07:16:58Z"
},
"validation": {
"vkGetInstanceProcAddr": {
@@ -39543,8 +39543,12 @@
"text": " All variables with a storage class of <strong>PushConstant</strong> declared as an array <strong class=\"purple\">must</strong> only be accessed by dynamically uniform indices"
},
{
- "vuid": "VUID-StandaloneSpirv-Result-04779",
+ "vuid": "VUID-StandaloneSpirv-Result-04780",
"text": " The <code>Result</code> <code>Type</code> operand of any <code>OpImageRead</code> or <code>OpImageSparseRead</code> instruction <strong class=\"purple\">must</strong> be a vector of four components"
+ },
+ {
+ "vuid": "VUID-StandaloneSpirv-Base-04781",
+ "text": " The <code>Base</code> operand of any <code>OpBitCount</code>, <code>OpBitReverse</code>, <code>OpBitFieldInsert</code>, <code>OpBitFieldSExtract</code>, or <code>OpBitFieldUExtract</code> instruction <strong class=\"purple\">must</strong> be a 32-bit integer scalar or a vector of 32-bit integers"
}
]
}
diff --git a/registry/vk.xml b/registry/vk.xml
index 05961a7..2610c23 100644
--- a/registry/vk.xml
+++ b/registry/vk.xml
@@ -130,8 +130,8 @@ branch of the member gitlab server.
<type category="define">#define <name>VK_MAKE_VERSION</name>(major, minor, patch) \
((((uint32_t)(major)) &lt;&lt; 22) | (((uint32_t)(minor)) &lt;&lt; 12) | ((uint32_t)(patch)))</type>
<type category="define">#define <name>VK_VERSION_MAJOR</name>(version) ((uint32_t)(version) &gt;&gt; 22)</type>
- <type category="define">#define <name>VK_VERSION_MINOR</name>(version) (((uint32_t)(version) &gt;&gt; 12) &amp; 0x3ff)</type>
- <type category="define">#define <name>VK_VERSION_PATCH</name>(version) ((uint32_t)(version) &amp; 0xfff)</type>
+ <type category="define">#define <name>VK_VERSION_MINOR</name>(version) (((uint32_t)(version) &gt;&gt; 12) &amp; 0x3FFU)</type>
+ <type category="define">#define <name>VK_VERSION_PATCH</name>(version) ((uint32_t)(version) &amp; 0xFFFU)</type>
<type category="define">// DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead.
//#define <name>VK_API_VERSION</name> <type>VK_MAKE_VERSION</type>(1, 0, 0) // Patch version should always be set to 0</type>
@@ -142,25 +142,45 @@ branch of the member gitlab server.
<type category="define">// Vulkan 1.2 version number
#define <name>VK_API_VERSION_1_2</name> <type>VK_MAKE_VERSION</type>(1, 2, 0)// Patch version should always be set to 0</type>
<type category="define">// Version of this file
-#define <name>VK_HEADER_VERSION</name> 173</type>
+#define <name>VK_HEADER_VERSION</name> 174</type>
<type category="define" requires="VK_HEADER_VERSION">// Complete version of this file
#define <name>VK_HEADER_VERSION_COMPLETE</name> <type>VK_MAKE_VERSION</type>(1, 2, VK_HEADER_VERSION)</type>
<type category="define">
#define <name>VK_DEFINE_HANDLE</name>(object) typedef struct object##_T* object;</type>
- <type category="define" name="VK_DEFINE_NON_DISPATCHABLE_HANDLE">
-#if !defined(VK_DEFINE_NON_DISPATCHABLE_HANDLE)
-#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) &amp;&amp; !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
+ <type category="define" name="VK_USE_64_BIT_PTR_DEFINES">
+#ifndef VK_USE_64_BIT_PTR_DEFINES
+ #if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) &amp;&amp; !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__)
+ #define VK_USE_64_BIT_PTR_DEFINES 1
+ #else
+ #define VK_USE_64_BIT_PTR_DEFINES 0
+ #endif
+#endif</type>
+ <type category="define" requires="VK_USE_64_BIT_PTR_DEFINES" name="VK_DEFINE_NON_DISPATCHABLE_HANDLE">
+#ifndef VK_DEFINE_NON_DISPATCHABLE_HANDLE
+ #if (VK_USE_64_BIT_PTR_DEFINES==1)
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
-#else
+ #else
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object;
+ #endif
+#endif</type>
+ <type category="define" requires="VK_DEFINE_NON_DISPATCHABLE_HANDLE" name="VK_NULL_HANDLE">
+#ifndef VK_DEFINE_NON_DISPATCHABLE_HANDLE
+ #if (VK_USE_64_BIT_PTR_DEFINES==1)
+ #if __cplusplus >= 201103L
+ #define VK_NULL_HANDLE nullptr
+ #else
+ #define VK_NULL_HANDLE ((void*)0)
+ #endif
+ #else
+ #define VK_NULL_HANDLE 0ULL
+ #endif
#endif
+#ifndef VK_NULL_HANDLE
+ #define VK_NULL_HANDLE 0
#endif</type>
- <type category="define">
-#define <name>VK_NULL_HANDLE</name> 0</type>
-
<type category="basetype">struct <name>ANativeWindow</name>;</type>
<type category="basetype">struct <name>AHardwareBuffer</name>;</type>
<type category="basetype">
@@ -5290,34 +5310,34 @@ typedef void <name>CAMetalLayer</name>;
<comment>Vulkan enumerant (token) definitions</comment>
<enums name="API Constants" comment="Vulkan hardcoded constants - not an enumerated type, part of the header boilerplate">
- <enum value="256" name="VK_MAX_PHYSICAL_DEVICE_NAME_SIZE"/>
- <enum value="16" name="VK_UUID_SIZE"/>
- <enum value="8" name="VK_LUID_SIZE"/>
- <enum name="VK_LUID_SIZE_KHR" alias="VK_LUID_SIZE"/>
- <enum value="256" name="VK_MAX_EXTENSION_NAME_SIZE"/>
- <enum value="256" name="VK_MAX_DESCRIPTION_SIZE"/>
- <enum value="32" name="VK_MAX_MEMORY_TYPES"/>
- <enum value="16" name="VK_MAX_MEMORY_HEAPS" comment="The maximum number of unique memory heaps, each of which supporting 1 or more memory types"/>
- <enum value="1000.0f" name="VK_LOD_CLAMP_NONE"/>
- <enum value="(~0U)" name="VK_REMAINING_MIP_LEVELS"/>
- <enum value="(~0U)" name="VK_REMAINING_ARRAY_LAYERS"/>
- <enum value="(~0ULL)" name="VK_WHOLE_SIZE"/>
- <enum value="(~0U)" name="VK_ATTACHMENT_UNUSED"/>
- <enum value="1" name="VK_TRUE"/>
- <enum value="0" name="VK_FALSE"/>
- <enum value="(~0U)" name="VK_QUEUE_FAMILY_IGNORED"/>
- <enum value="(~0U-1)" name="VK_QUEUE_FAMILY_EXTERNAL"/>
- <enum name="VK_QUEUE_FAMILY_EXTERNAL_KHR" alias="VK_QUEUE_FAMILY_EXTERNAL"/>
- <enum value="(~0U-2)" name="VK_QUEUE_FAMILY_FOREIGN_EXT"/>
- <enum value="(~0U)" name="VK_SUBPASS_EXTERNAL"/>
- <enum value="32" name="VK_MAX_DEVICE_GROUP_SIZE"/>
- <enum name="VK_MAX_DEVICE_GROUP_SIZE_KHR" alias="VK_MAX_DEVICE_GROUP_SIZE"/>
- <enum value="256" name="VK_MAX_DRIVER_NAME_SIZE"/>
- <enum name="VK_MAX_DRIVER_NAME_SIZE_KHR" alias="VK_MAX_DRIVER_NAME_SIZE"/>
- <enum value="256" name="VK_MAX_DRIVER_INFO_SIZE"/>
- <enum name="VK_MAX_DRIVER_INFO_SIZE_KHR" alias="VK_MAX_DRIVER_INFO_SIZE"/>
- <enum value="(~0U)" name="VK_SHADER_UNUSED_KHR"/>
- <enum name="VK_SHADER_UNUSED_NV" alias="VK_SHADER_UNUSED_KHR"/>
+ <enum type="uint32_t" value="256" name="VK_MAX_PHYSICAL_DEVICE_NAME_SIZE"/>
+ <enum type="uint32_t" value="16" name="VK_UUID_SIZE"/>
+ <enum type="uint32_t" value="8" name="VK_LUID_SIZE"/>
+ <enum name="VK_LUID_SIZE_KHR" alias="VK_LUID_SIZE"/>
+ <enum type="uint32_t" value="256" name="VK_MAX_EXTENSION_NAME_SIZE"/>
+ <enum type="uint32_t" value="256" name="VK_MAX_DESCRIPTION_SIZE"/>
+ <enum type="uint32_t" value="32" name="VK_MAX_MEMORY_TYPES"/>
+ <enum type="uint32_t" value="16" name="VK_MAX_MEMORY_HEAPS" comment="The maximum number of unique memory heaps, each of which supporting 1 or more memory types"/>
+ <enum type="float" value="1000.0F" name="VK_LOD_CLAMP_NONE"/>
+ <enum type="uint32_t" value="(~0U)" name="VK_REMAINING_MIP_LEVELS"/>
+ <enum type="uint32_t" value="(~0U)" name="VK_REMAINING_ARRAY_LAYERS"/>
+ <enum type="uint64_t" value="(~0ULL)" name="VK_WHOLE_SIZE"/>
+ <enum type="uint32_t" value="(~0U)" name="VK_ATTACHMENT_UNUSED"/>
+ <enum type="uint32_t" value="1" name="VK_TRUE"/>
+ <enum type="uint32_t" value="0" name="VK_FALSE"/>
+ <enum type="uint32_t" value="(~0U)" name="VK_QUEUE_FAMILY_IGNORED"/>
+ <enum type="uint32_t" value="(~1U)" name="VK_QUEUE_FAMILY_EXTERNAL"/>
+ <enum name="VK_QUEUE_FAMILY_EXTERNAL_KHR" alias="VK_QUEUE_FAMILY_EXTERNAL"/>
+ <enum type="uint32_t" value="(~2U)" name="VK_QUEUE_FAMILY_FOREIGN_EXT"/>
+ <enum type="uint32_t" value="(~0U)" name="VK_SUBPASS_EXTERNAL"/>
+ <enum type="uint32_t" value="32" name="VK_MAX_DEVICE_GROUP_SIZE"/>
+ <enum name="VK_MAX_DEVICE_GROUP_SIZE_KHR" alias="VK_MAX_DEVICE_GROUP_SIZE"/>
+ <enum type="uint32_t" value="256" name="VK_MAX_DRIVER_NAME_SIZE"/>
+ <enum name="VK_MAX_DRIVER_NAME_SIZE_KHR" alias="VK_MAX_DRIVER_NAME_SIZE"/>
+ <enum type="uint32_t" value="256" name="VK_MAX_DRIVER_INFO_SIZE"/>
+ <enum name="VK_MAX_DRIVER_INFO_SIZE_KHR" alias="VK_MAX_DRIVER_INFO_SIZE"/>
+ <enum type="uint32_t" value="(~0U)" name="VK_SHADER_UNUSED_KHR"/>
+ <enum name="VK_SHADER_UNUSED_NV" alias="VK_SHADER_UNUSED_KHR"/>
</enums>
<comment>
@@ -9596,7 +9616,9 @@ typedef void <name>CAMetalLayer</name>;
<require comment="Header boilerplate">
<type name="vk_platform"/>
<type name="VK_DEFINE_HANDLE"/>
+ <type name="VK_USE_64_BIT_PTR_DEFINES"/>
<type name="VK_DEFINE_NON_DISPATCHABLE_HANDLE"/>
+ <type name="VK_NULL_HANDLE"/>
</require>
<require comment="Fundamental types used by many commands and structures">
<type name="VkBool32"/>
@@ -9643,7 +9665,6 @@ typedef void <name>CAMetalLayer</name>;
<enum name="VK_SUBPASS_EXTERNAL"/>
<enum name="VK_TRUE"/>
<enum name="VK_WHOLE_SIZE"/>
- <type name="VK_NULL_HANDLE"/>
<type name="VkPipelineCacheHeaderVersion"/>
</require>
<require comment="Device initialization">