From 1b7b58075620764b88014d2414ea7f0484d19ca7 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Mon, 6 Jul 2015 16:11:05 -0700 Subject: [PATCH] vk: re-arrange enums to match the order in revision 130 --- include/vulkan/vulkan.h | 1479 +++++++++++++++++++-------------------- 1 file changed, 737 insertions(+), 742 deletions(-) diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index b51581356fe..a60b83e7d7a 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -118,87 +118,357 @@ VK_DEFINE_NONDISP_SUBCLASS_HANDLE(VkRenderPass, VkNonDispatchable) // ------------------------------------------------------------------------------------------------ // Enumerations -typedef enum VkImageLayout_ -{ - VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, // Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) - VK_IMAGE_LAYOUT_GENERAL = 0x00000001, // General layout when image can be used for any kind of access - VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, // Optimal layout when image is only used for color attachment read/write - VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, // Optimal layout when image is only used for depth/stencil attachment read/write - VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, // Optimal layout when image is used for read only depth/stencil attachment and shader access - VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 0x00000005, // Optimal layout when image is used for read only shader access - VK_IMAGE_LAYOUT_CLEAR_OPTIMAL = 0x00000006, // Optimal layout when image is used only for clear operations - VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL = 0x00000007, // Optimal layout when image is used only as source of transfer operations - VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL = 0x00000008, // Optimal layout when image is used only as destination of transfer operations - - VK_ENUM_RANGE(IMAGE_LAYOUT, UNDEFINED, TRANSFER_DESTINATION_OPTIMAL) -} VkImageLayout; - -typedef enum VkPipeEvent_ +typedef enum VkResult_ { - VK_PIPE_EVENT_TOP_OF_PIPE = 0x00000001, // Set event before the device starts processing subsequent command - VK_PIPE_EVENT_VERTEX_PROCESSING_COMPLETE = 0x00000002, // Set event when all pending vertex processing is complete - VK_PIPE_EVENT_LOCAL_FRAGMENT_PROCESSING_COMPLETE = 0x00000003, // Set event when all pending fragment shader executions are complete, within each fragment location - VK_PIPE_EVENT_FRAGMENT_PROCESSING_COMPLETE = 0x00000004, // Set event when all pending fragment shader executions are complete - VK_PIPE_EVENT_GRAPHICS_PIPELINE_COMPLETE = 0x00000005, // Set event when all pending graphics operations are complete - VK_PIPE_EVENT_COMPUTE_PIPELINE_COMPLETE = 0x00000006, // Set event when all pending compute operations are complete - VK_PIPE_EVENT_TRANSFER_COMPLETE = 0x00000007, // Set event when all pending transfer operations are complete - VK_PIPE_EVENT_COMMANDS_COMPLETE = 0x00000008, // Set event when all pending work is complete - - VK_ENUM_RANGE(PIPE_EVENT, TOP_OF_PIPE, COMMANDS_COMPLETE) -} VkPipeEvent; + // Return codes for successful operation execution (> = 0) + VK_SUCCESS = 0x0000000, + VK_UNSUPPORTED = 0x0000001, + VK_NOT_READY = 0x0000002, + VK_TIMEOUT = 0x0000003, + VK_EVENT_SET = 0x0000004, + VK_EVENT_RESET = 0x0000005, -typedef enum VkWaitEvent_ -{ - VK_WAIT_EVENT_TOP_OF_PIPE = 0x00000001, // Wait event before the device starts processing subsequent commands - VK_WAIT_EVENT_BEFORE_RASTERIZATION = 0x00000002, // Wait event before rasterizing subsequent primitives + // Error codes (negative values) + VK_ERROR_UNKNOWN = -(0x00000001), + VK_ERROR_UNAVAILABLE = -(0x00000002), + VK_ERROR_INITIALIZATION_FAILED = -(0x00000003), + VK_ERROR_OUT_OF_HOST_MEMORY = -(0x00000004), + VK_ERROR_OUT_OF_DEVICE_MEMORY = -(0x00000005), + VK_ERROR_DEVICE_ALREADY_CREATED = -(0x00000006), + VK_ERROR_DEVICE_LOST = -(0x00000007), + VK_ERROR_INVALID_POINTER = -(0x00000008), + VK_ERROR_INVALID_VALUE = -(0x00000009), + VK_ERROR_INVALID_HANDLE = -(0x0000000A), + VK_ERROR_INVALID_ORDINAL = -(0x0000000B), + VK_ERROR_INVALID_MEMORY_SIZE = -(0x0000000C), + VK_ERROR_INVALID_EXTENSION = -(0x0000000D), + VK_ERROR_INVALID_FLAGS = -(0x0000000E), + VK_ERROR_INVALID_ALIGNMENT = -(0x0000000F), + VK_ERROR_INVALID_FORMAT = -(0x00000010), + VK_ERROR_INVALID_IMAGE = -(0x00000011), + VK_ERROR_INVALID_DESCRIPTOR_SET_DATA = -(0x00000012), + VK_ERROR_INVALID_QUEUE_TYPE = -(0x00000013), + VK_ERROR_INVALID_OBJECT_TYPE = -(0x00000014), + VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION = -(0x00000015), + VK_ERROR_BAD_SHADER_CODE = -(0x00000016), + VK_ERROR_BAD_PIPELINE_DATA = -(0x00000017), + VK_ERROR_TOO_MANY_MEMORY_REFERENCES = -(0x00000018), + VK_ERROR_NOT_MAPPABLE = -(0x00000019), + VK_ERROR_MEMORY_MAP_FAILED = -(0x0000001A), + VK_ERROR_MEMORY_UNMAP_FAILED = -(0x0000001B), + VK_ERROR_INCOMPATIBLE_DEVICE = -(0x0000001C), + VK_ERROR_INCOMPATIBLE_DRIVER = -(0x0000001D), + VK_ERROR_INCOMPLETE_COMMAND_BUFFER = -(0x0000001E), + VK_ERROR_BUILDING_COMMAND_BUFFER = -(0x0000001F), + VK_ERROR_MEMORY_NOT_BOUND = -(0x00000020), + VK_ERROR_INCOMPATIBLE_QUEUE = -(0x00000021), + VK_ERROR_NOT_SHAREABLE = -(0x00000022), - VK_ENUM_RANGE(WAIT_EVENT, TOP_OF_PIPE, BEFORE_RASTERIZATION) -} VkWaitEvent; + VK_MAX_ENUM(RESULT) +} VkResult; -typedef enum VkAttachmentLoadOp_ +// Structure type enumerant +typedef enum VkStructureType_ { - VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000, - VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001, - VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002, + VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, + VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 1, + VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO = 2, + VK_STRUCTURE_TYPE_MEMORY_OPEN_INFO = 3, + VK_STRUCTURE_TYPE_PEER_MEMORY_OPEN_INFO = 4, + VK_STRUCTURE_TYPE_BUFFER_VIEW_ATTACH_INFO = 5, + VK_STRUCTURE_TYPE_IMAGE_VIEW_ATTACH_INFO = 6, + VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 7, + VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO = 8, + VK_STRUCTURE_TYPE_DEPTH_STENCIL_VIEW_CREATE_INFO = 9, + VK_STRUCTURE_TYPE_SHADER_CREATE_INFO = 10, + VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 11, + VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 12, + VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 13, + VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO = 14, + VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO = 15, + VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO = 16, + VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO = 17, + VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 18, + VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 19, + VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 20, + VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 21, + VK_STRUCTURE_TYPE_SEMAPHORE_OPEN_INFO = 22, + VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 23, + VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 24, + VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 25, + VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_CREATE_INFO = 26, + VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO = 27, + VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO = 28, + VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO = 29, + VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO = 30, + VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO = 31, + VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO = 32, + VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO = 33, + VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 34, + VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 35, + VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 36, + VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37, + VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 38, + VK_STRUCTURE_TYPE_CMD_BUFFER_GRAPHICS_BEGIN_INFO = 39, + VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 40, + VK_STRUCTURE_TYPE_LAYER_CREATE_INFO = 41, + VK_STRUCTURE_TYPE_MEMORY_BARRIER = 42, + VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 43, + VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 44, + VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 45, + VK_STRUCTURE_TYPE_UPDATE_SAMPLERS = 46, + VK_STRUCTURE_TYPE_UPDATE_SAMPLER_TEXTURES = 47, + VK_STRUCTURE_TYPE_UPDATE_IMAGES = 48, + VK_STRUCTURE_TYPE_UPDATE_BUFFERS = 49, + VK_STRUCTURE_TYPE_UPDATE_AS_COPY = 50, + VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 51, + VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 52, - VK_ENUM_RANGE(ATTACHMENT_LOAD_OP, LOAD, DONT_CARE) -} VkAttachmentLoadOp; + VK_ENUM_RANGE(STRUCTURE_TYPE, APPLICATION_INFO, PIPELINE_LAYOUT_CREATE_INFO) +} VkStructureType; -typedef enum VkAttachmentStoreOp_ +typedef enum VkSystemAllocType_ { - VK_ATTACHMENT_STORE_OP_STORE = 0x00000000, - VK_ATTACHMENT_STORE_OP_RESOLVE_MSAA = 0x00000001, - VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000002, + VK_SYSTEM_ALLOC_TYPE_API_OBJECT = 0x00000000, + VK_SYSTEM_ALLOC_TYPE_INTERNAL = 0x00000001, + VK_SYSTEM_ALLOC_TYPE_INTERNAL_TEMP = 0x00000002, + VK_SYSTEM_ALLOC_TYPE_INTERNAL_SHADER = 0x00000003, + VK_SYSTEM_ALLOC_TYPE_DEBUG = 0x00000004, - VK_ENUM_RANGE(ATTACHMENT_STORE_OP, STORE, DONT_CARE) -} VkAttachmentStoreOp; + VK_ENUM_RANGE(SYSTEM_ALLOC_TYPE, API_OBJECT, DEBUG) +} VkSystemAllocType; -typedef enum VkImageType_ +// Vulkan format definitions +typedef enum VkFormat_ { - VK_IMAGE_TYPE_1D = 0x00000000, - VK_IMAGE_TYPE_2D = 0x00000001, - VK_IMAGE_TYPE_3D = 0x00000002, + VK_FORMAT_UNDEFINED = 0x00000000, + VK_FORMAT_R4G4_UNORM = 0x00000001, + VK_FORMAT_R4G4_USCALED = 0x00000002, + VK_FORMAT_R4G4B4A4_UNORM = 0x00000003, + VK_FORMAT_R4G4B4A4_USCALED = 0x00000004, + VK_FORMAT_R5G6B5_UNORM = 0x00000005, + VK_FORMAT_R5G6B5_USCALED = 0x00000006, + VK_FORMAT_R5G5B5A1_UNORM = 0x00000007, + VK_FORMAT_R5G5B5A1_USCALED = 0x00000008, + VK_FORMAT_R8_UNORM = 0x00000009, + VK_FORMAT_R8_SNORM = 0x0000000A, + VK_FORMAT_R8_USCALED = 0x0000000B, + VK_FORMAT_R8_SSCALED = 0x0000000C, + VK_FORMAT_R8_UINT = 0x0000000D, + VK_FORMAT_R8_SINT = 0x0000000E, + VK_FORMAT_R8_SRGB = 0x0000000F, + VK_FORMAT_R8G8_UNORM = 0x00000010, + VK_FORMAT_R8G8_SNORM = 0x00000011, + VK_FORMAT_R8G8_USCALED = 0x00000012, + VK_FORMAT_R8G8_SSCALED = 0x00000013, + VK_FORMAT_R8G8_UINT = 0x00000014, + VK_FORMAT_R8G8_SINT = 0x00000015, + VK_FORMAT_R8G8_SRGB = 0x00000016, + VK_FORMAT_R8G8B8_UNORM = 0x00000017, + VK_FORMAT_R8G8B8_SNORM = 0x00000018, + VK_FORMAT_R8G8B8_USCALED = 0x00000019, + VK_FORMAT_R8G8B8_SSCALED = 0x0000001A, + VK_FORMAT_R8G8B8_UINT = 0x0000001B, + VK_FORMAT_R8G8B8_SINT = 0x0000001C, + VK_FORMAT_R8G8B8_SRGB = 0x0000001D, + VK_FORMAT_R8G8B8A8_UNORM = 0x0000001E, + VK_FORMAT_R8G8B8A8_SNORM = 0x0000001F, + VK_FORMAT_R8G8B8A8_USCALED = 0x00000020, + VK_FORMAT_R8G8B8A8_SSCALED = 0x00000021, + VK_FORMAT_R8G8B8A8_UINT = 0x00000022, + VK_FORMAT_R8G8B8A8_SINT = 0x00000023, + VK_FORMAT_R8G8B8A8_SRGB = 0x00000024, + VK_FORMAT_R10G10B10A2_UNORM = 0x00000025, + VK_FORMAT_R10G10B10A2_SNORM = 0x00000026, + VK_FORMAT_R10G10B10A2_USCALED = 0x00000027, + VK_FORMAT_R10G10B10A2_SSCALED = 0x00000028, + VK_FORMAT_R10G10B10A2_UINT = 0x00000029, + VK_FORMAT_R10G10B10A2_SINT = 0x0000002A, + VK_FORMAT_R16_UNORM = 0x0000002B, + VK_FORMAT_R16_SNORM = 0x0000002C, + VK_FORMAT_R16_USCALED = 0x0000002D, + VK_FORMAT_R16_SSCALED = 0x0000002E, + VK_FORMAT_R16_UINT = 0x0000002F, + VK_FORMAT_R16_SINT = 0x00000030, + VK_FORMAT_R16_SFLOAT = 0x00000031, + VK_FORMAT_R16G16_UNORM = 0x00000032, + VK_FORMAT_R16G16_SNORM = 0x00000033, + VK_FORMAT_R16G16_USCALED = 0x00000034, + VK_FORMAT_R16G16_SSCALED = 0x00000035, + VK_FORMAT_R16G16_UINT = 0x00000036, + VK_FORMAT_R16G16_SINT = 0x00000037, + VK_FORMAT_R16G16_SFLOAT = 0x00000038, + VK_FORMAT_R16G16B16_UNORM = 0x00000039, + VK_FORMAT_R16G16B16_SNORM = 0x0000003A, + VK_FORMAT_R16G16B16_USCALED = 0x0000003B, + VK_FORMAT_R16G16B16_SSCALED = 0x0000003C, + VK_FORMAT_R16G16B16_UINT = 0x0000003D, + VK_FORMAT_R16G16B16_SINT = 0x0000003E, + VK_FORMAT_R16G16B16_SFLOAT = 0x0000003F, + VK_FORMAT_R16G16B16A16_UNORM = 0x00000040, + VK_FORMAT_R16G16B16A16_SNORM = 0x00000041, + VK_FORMAT_R16G16B16A16_USCALED = 0x00000042, + VK_FORMAT_R16G16B16A16_SSCALED = 0x00000043, + VK_FORMAT_R16G16B16A16_UINT = 0x00000044, + VK_FORMAT_R16G16B16A16_SINT = 0x00000045, + VK_FORMAT_R16G16B16A16_SFLOAT = 0x00000046, + VK_FORMAT_R32_UINT = 0x00000047, + VK_FORMAT_R32_SINT = 0x00000048, + VK_FORMAT_R32_SFLOAT = 0x00000049, + VK_FORMAT_R32G32_UINT = 0x0000004A, + VK_FORMAT_R32G32_SINT = 0x0000004B, + VK_FORMAT_R32G32_SFLOAT = 0x0000004C, + VK_FORMAT_R32G32B32_UINT = 0x0000004D, + VK_FORMAT_R32G32B32_SINT = 0x0000004E, + VK_FORMAT_R32G32B32_SFLOAT = 0x0000004F, + VK_FORMAT_R32G32B32A32_UINT = 0x00000050, + VK_FORMAT_R32G32B32A32_SINT = 0x00000051, + VK_FORMAT_R32G32B32A32_SFLOAT = 0x00000052, + VK_FORMAT_R64_SFLOAT = 0x00000053, + VK_FORMAT_R64G64_SFLOAT = 0x00000054, + VK_FORMAT_R64G64B64_SFLOAT = 0x00000055, + VK_FORMAT_R64G64B64A64_SFLOAT = 0x00000056, + VK_FORMAT_R11G11B10_UFLOAT = 0x00000057, + VK_FORMAT_R9G9B9E5_UFLOAT = 0x00000058, + VK_FORMAT_D16_UNORM = 0x00000059, + VK_FORMAT_D24_UNORM = 0x0000005A, + VK_FORMAT_D32_SFLOAT = 0x0000005B, + VK_FORMAT_S8_UINT = 0x0000005C, + VK_FORMAT_D16_UNORM_S8_UINT = 0x0000005D, + VK_FORMAT_D24_UNORM_S8_UINT = 0x0000005E, + VK_FORMAT_D32_SFLOAT_S8_UINT = 0x0000005F, + VK_FORMAT_BC1_RGB_UNORM = 0x00000060, + VK_FORMAT_BC1_RGB_SRGB = 0x00000061, + VK_FORMAT_BC1_RGBA_UNORM = 0x00000062, + VK_FORMAT_BC1_RGBA_SRGB = 0x00000063, + VK_FORMAT_BC2_UNORM = 0x00000064, + VK_FORMAT_BC2_SRGB = 0x00000065, + VK_FORMAT_BC3_UNORM = 0x00000066, + VK_FORMAT_BC3_SRGB = 0x00000067, + VK_FORMAT_BC4_UNORM = 0x00000068, + VK_FORMAT_BC4_SNORM = 0x00000069, + VK_FORMAT_BC5_UNORM = 0x0000006A, + VK_FORMAT_BC5_SNORM = 0x0000006B, + VK_FORMAT_BC6H_UFLOAT = 0x0000006C, + VK_FORMAT_BC6H_SFLOAT = 0x0000006D, + VK_FORMAT_BC7_UNORM = 0x0000006E, + VK_FORMAT_BC7_SRGB = 0x0000006F, + VK_FORMAT_ETC2_R8G8B8_UNORM = 0x00000070, + VK_FORMAT_ETC2_R8G8B8_SRGB = 0x00000071, + VK_FORMAT_ETC2_R8G8B8A1_UNORM = 0x00000072, + VK_FORMAT_ETC2_R8G8B8A1_SRGB = 0x00000073, + VK_FORMAT_ETC2_R8G8B8A8_UNORM = 0x00000074, + VK_FORMAT_ETC2_R8G8B8A8_SRGB = 0x00000075, + VK_FORMAT_EAC_R11_UNORM = 0x00000076, + VK_FORMAT_EAC_R11_SNORM = 0x00000077, + VK_FORMAT_EAC_R11G11_UNORM = 0x00000078, + VK_FORMAT_EAC_R11G11_SNORM = 0x00000079, + VK_FORMAT_ASTC_4x4_UNORM = 0x0000007A, + VK_FORMAT_ASTC_4x4_SRGB = 0x0000007B, + VK_FORMAT_ASTC_5x4_UNORM = 0x0000007C, + VK_FORMAT_ASTC_5x4_SRGB = 0x0000007D, + VK_FORMAT_ASTC_5x5_UNORM = 0x0000007E, + VK_FORMAT_ASTC_5x5_SRGB = 0x0000007F, + VK_FORMAT_ASTC_6x5_UNORM = 0x00000080, + VK_FORMAT_ASTC_6x5_SRGB = 0x00000081, + VK_FORMAT_ASTC_6x6_UNORM = 0x00000082, + VK_FORMAT_ASTC_6x6_SRGB = 0x00000083, + VK_FORMAT_ASTC_8x5_UNORM = 0x00000084, + VK_FORMAT_ASTC_8x5_SRGB = 0x00000085, + VK_FORMAT_ASTC_8x6_UNORM = 0x00000086, + VK_FORMAT_ASTC_8x6_SRGB = 0x00000087, + VK_FORMAT_ASTC_8x8_UNORM = 0x00000088, + VK_FORMAT_ASTC_8x8_SRGB = 0x00000089, + VK_FORMAT_ASTC_10x5_UNORM = 0x0000008A, + VK_FORMAT_ASTC_10x5_SRGB = 0x0000008B, + VK_FORMAT_ASTC_10x6_UNORM = 0x0000008C, + VK_FORMAT_ASTC_10x6_SRGB = 0x0000008D, + VK_FORMAT_ASTC_10x8_UNORM = 0x0000008E, + VK_FORMAT_ASTC_10x8_SRGB = 0x0000008F, + VK_FORMAT_ASTC_10x10_UNORM = 0x00000090, + VK_FORMAT_ASTC_10x10_SRGB = 0x00000091, + VK_FORMAT_ASTC_12x10_UNORM = 0x00000092, + VK_FORMAT_ASTC_12x10_SRGB = 0x00000093, + VK_FORMAT_ASTC_12x12_UNORM = 0x00000094, + VK_FORMAT_ASTC_12x12_SRGB = 0x00000095, + VK_FORMAT_B4G4R4A4_UNORM = 0x00000096, + VK_FORMAT_B5G5R5A1_UNORM = 0x00000097, + VK_FORMAT_B5G6R5_UNORM = 0x00000098, + VK_FORMAT_B5G6R5_USCALED = 0x00000099, + VK_FORMAT_B8G8R8_UNORM = 0x0000009A, + VK_FORMAT_B8G8R8_SNORM = 0x0000009B, + VK_FORMAT_B8G8R8_USCALED = 0x0000009C, + VK_FORMAT_B8G8R8_SSCALED = 0x0000009D, + VK_FORMAT_B8G8R8_UINT = 0x0000009E, + VK_FORMAT_B8G8R8_SINT = 0x0000009F, + VK_FORMAT_B8G8R8_SRGB = 0x000000A0, + VK_FORMAT_B8G8R8A8_UNORM = 0x000000A1, + VK_FORMAT_B8G8R8A8_SNORM = 0x000000A2, + VK_FORMAT_B8G8R8A8_USCALED = 0x000000A3, + VK_FORMAT_B8G8R8A8_SSCALED = 0x000000A4, + VK_FORMAT_B8G8R8A8_UINT = 0x000000A5, + VK_FORMAT_B8G8R8A8_SINT = 0x000000A6, + VK_FORMAT_B8G8R8A8_SRGB = 0x000000A7, + VK_FORMAT_B10G10R10A2_UNORM = 0x000000A8, + VK_FORMAT_B10G10R10A2_SNORM = 0x000000A9, + VK_FORMAT_B10G10R10A2_USCALED = 0x000000AA, + VK_FORMAT_B10G10R10A2_SSCALED = 0x000000AB, + VK_FORMAT_B10G10R10A2_UINT = 0x000000AC, + VK_FORMAT_B10G10R10A2_SINT = 0x000000AD, - VK_ENUM_RANGE(IMAGE_TYPE, 1D, 3D) -} VkImageType; + VK_ENUM_RANGE(FORMAT, UNDEFINED, B10G10R10A2_SINT) +} VkFormat; -typedef enum VkImageTiling_ +typedef enum VkPhysicalDeviceType_ { - VK_IMAGE_TILING_LINEAR = 0x00000000, - VK_IMAGE_TILING_OPTIMAL = 0x00000001, + VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000, + VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001, + VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002, + VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003, + VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004, - VK_ENUM_RANGE(IMAGE_TILING, LINEAR, OPTIMAL) -} VkImageTiling; + VK_ENUM_RANGE(PHYSICAL_DEVICE_TYPE, OTHER, CPU) +} VkPhysicalDeviceType; -typedef enum VkImageViewType_ +// Object type enumerant +typedef enum VkObjectType_ { - VK_IMAGE_VIEW_TYPE_1D = 0x00000000, - VK_IMAGE_VIEW_TYPE_2D = 0x00000001, - VK_IMAGE_VIEW_TYPE_3D = 0x00000002, - VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003, + VK_OBJECT_TYPE_INSTANCE = 0, + VK_OBJECT_TYPE_PHYSICAL_DEVICE = 1, + VK_OBJECT_TYPE_DEVICE = 2, + VK_OBJECT_TYPE_QUEUE = 3, + VK_OBJECT_TYPE_COMMAND_BUFFER = 4, + VK_OBJECT_TYPE_DEVICE_MEMORY = 5, + VK_OBJECT_TYPE_BUFFER = 6, + VK_OBJECT_TYPE_BUFFER_VIEW = 7, + VK_OBJECT_TYPE_IMAGE = 8, + VK_OBJECT_TYPE_IMAGE_VIEW = 9, + VK_OBJECT_TYPE_COLOR_ATTACHMENT_VIEW = 10, + VK_OBJECT_TYPE_DEPTH_STENCIL_VIEW = 11, + VK_OBJECT_TYPE_SHADER = 12, + VK_OBJECT_TYPE_PIPELINE = 13, + VK_OBJECT_TYPE_PIPELINE_LAYOUT = 14, + VK_OBJECT_TYPE_SAMPLER = 15, + VK_OBJECT_TYPE_DESCRIPTOR_SET = 16, + VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 17, + VK_OBJECT_TYPE_DESCRIPTOR_POOL = 18, + VK_OBJECT_TYPE_DYNAMIC_VP_STATE = 19, + VK_OBJECT_TYPE_DYNAMIC_RS_STATE = 20, + VK_OBJECT_TYPE_DYNAMIC_CB_STATE = 21, + VK_OBJECT_TYPE_DYNAMIC_DS_STATE = 22, + VK_OBJECT_TYPE_FENCE = 23, + VK_OBJECT_TYPE_SEMAPHORE = 24, + VK_OBJECT_TYPE_EVENT = 25, + VK_OBJECT_TYPE_QUERY_POOL = 26, + VK_OBJECT_TYPE_FRAMEBUFFER = 27, + VK_OBJECT_TYPE_RENDER_PASS = 28, - VK_ENUM_RANGE(IMAGE_VIEW_TYPE, 1D, CUBE) -} VkImageViewType; + // Valid ranges for core Vulkan: + VK_OBJECT_TYPE_BEGIN_RANGE = VK_OBJECT_TYPE_INSTANCE, + VK_OBJECT_TYPE_END_RANGE = VK_OBJECT_TYPE_RENDER_PASS, + VK_NUM_OBJECT_TYPE = (VK_OBJECT_TYPE_END_RANGE - VK_OBJECT_TYPE_BEGIN_RANGE + 1), + VK_MAX_ENUM(VkObjectType) +} VkObjectType; typedef enum VkImageAspect_ { @@ -209,6 +479,14 @@ typedef enum VkImageAspect_ VK_ENUM_RANGE(IMAGE_ASPECT, COLOR, STENCIL) } VkImageAspect; +typedef enum VkQueryType_ +{ + VK_QUERY_TYPE_OCCLUSION = 0x00000000, + VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, // Optional + + VK_ENUM_RANGE(QUERY_TYPE, OCCLUSION, PIPELINE_STATISTICS) +} VkQueryType; + typedef enum VkBufferViewType_ { VK_BUFFER_VIEW_TYPE_RAW = 0x00000000, // Raw buffer without special structure (UBO, SSBO) @@ -217,100 +495,66 @@ typedef enum VkBufferViewType_ VK_ENUM_RANGE(BUFFER_VIEW_TYPE, RAW, FORMATTED) } VkBufferViewType; -typedef enum VkChannelSwizzle_ -{ - VK_CHANNEL_SWIZZLE_ZERO = 0x00000000, - VK_CHANNEL_SWIZZLE_ONE = 0x00000001, - VK_CHANNEL_SWIZZLE_R = 0x00000002, - VK_CHANNEL_SWIZZLE_G = 0x00000003, - VK_CHANNEL_SWIZZLE_B = 0x00000004, - VK_CHANNEL_SWIZZLE_A = 0x00000005, - - VK_ENUM_RANGE(CHANNEL_SWIZZLE, ZERO, A) -} VkChannelSwizzle; - -typedef enum VkDescriptorType_ -{ - VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000, - VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001, - VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002, - VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003, - VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004, - VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005, - VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006, - VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007, - VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008, - VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009, - - VK_ENUM_RANGE(DESCRIPTOR_TYPE, SAMPLER, STORAGE_BUFFER_DYNAMIC) -} VkDescriptorType; - -typedef enum VkDescriptorPoolUsage_ -{ - VK_DESCRIPTOR_POOL_USAGE_ONE_SHOT = 0x00000000, - VK_DESCRIPTOR_POOL_USAGE_DYNAMIC = 0x00000001, - - VK_ENUM_RANGE(DESCRIPTOR_POOL_USAGE, ONE_SHOT, DYNAMIC) -} VkDescriptorPoolUsage; - -typedef enum VkDescriptorUpdateMode_ -{ - VK_DESCRIPTOR_UPDATE_MODE_COPY = 0x00000000, - VK_DESCRIPTOR_UPDATE_MODE_FASTEST = 0x00000001, - - VK_ENUM_RANGE(DESCRIPTOR_UPDATE_MODE, COPY, FASTEST) -} VkDescriptorUpdateMode; - -typedef enum VkDescriptorSetUsage_ +typedef enum VkImageType_ { - VK_DESCRIPTOR_SET_USAGE_ONE_SHOT = 0x00000000, - VK_DESCRIPTOR_SET_USAGE_STATIC = 0x00000001, + VK_IMAGE_TYPE_1D = 0x00000000, + VK_IMAGE_TYPE_2D = 0x00000001, + VK_IMAGE_TYPE_3D = 0x00000002, - VK_ENUM_RANGE(DESCRIPTOR_SET_USAGE, ONE_SHOT, STATIC) -} VkDescriptorSetUsage; + VK_ENUM_RANGE(IMAGE_TYPE, 1D, 3D) +} VkImageType; -typedef enum VkQueryType_ +typedef enum VkImageTiling_ { - VK_QUERY_TYPE_OCCLUSION = 0x00000000, - VK_QUERY_TYPE_PIPELINE_STATISTICS = 0x00000001, // Optional + VK_IMAGE_TILING_LINEAR = 0x00000000, + VK_IMAGE_TILING_OPTIMAL = 0x00000001, - VK_ENUM_RANGE(QUERY_TYPE, OCCLUSION, PIPELINE_STATISTICS) -} VkQueryType; + VK_ENUM_RANGE(IMAGE_TILING, LINEAR, OPTIMAL) +} VkImageTiling; -typedef enum VkTimestampType_ +typedef enum VkImageViewType_ { - VK_TIMESTAMP_TYPE_TOP = 0x00000000, - VK_TIMESTAMP_TYPE_BOTTOM = 0x00000001, + VK_IMAGE_VIEW_TYPE_1D = 0x00000000, + VK_IMAGE_VIEW_TYPE_2D = 0x00000001, + VK_IMAGE_VIEW_TYPE_3D = 0x00000002, + VK_IMAGE_VIEW_TYPE_CUBE = 0x00000003, - VK_ENUM_RANGE(TIMESTAMP_TYPE, TOP, BOTTOM) -} VkTimestampType; + VK_ENUM_RANGE(IMAGE_VIEW_TYPE, 1D, CUBE) +} VkImageViewType; -typedef enum VkBorderColor_ +typedef enum VkChannelSwizzle_ { - VK_BORDER_COLOR_OPAQUE_WHITE = 0x00000000, - VK_BORDER_COLOR_TRANSPARENT_BLACK = 0x00000001, - VK_BORDER_COLOR_OPAQUE_BLACK = 0x00000002, + VK_CHANNEL_SWIZZLE_ZERO = 0x00000000, + VK_CHANNEL_SWIZZLE_ONE = 0x00000001, + VK_CHANNEL_SWIZZLE_R = 0x00000002, + VK_CHANNEL_SWIZZLE_G = 0x00000003, + VK_CHANNEL_SWIZZLE_B = 0x00000004, + VK_CHANNEL_SWIZZLE_A = 0x00000005, - VK_ENUM_RANGE(BORDER_COLOR, OPAQUE_WHITE, OPAQUE_BLACK) -} VkBorderColor; + VK_ENUM_RANGE(CHANNEL_SWIZZLE, ZERO, A) +} VkChannelSwizzle; -typedef enum VkPipelineBindPoint_ +// Shader stage enumerant +typedef enum VkShaderStage_ { - VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000000, - VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000001, + VK_SHADER_STAGE_VERTEX = 0, + VK_SHADER_STAGE_TESS_CONTROL = 1, + VK_SHADER_STAGE_TESS_EVALUATION = 2, + VK_SHADER_STAGE_GEOMETRY = 3, + VK_SHADER_STAGE_FRAGMENT = 4, + VK_SHADER_STAGE_COMPUTE = 5, - VK_ENUM_RANGE(PIPELINE_BIND_POINT, COMPUTE, GRAPHICS) -} VkPipelineBindPoint; + VK_ENUM_RANGE(SHADER_STAGE, VERTEX, COMPUTE) +} VkShaderStage; -typedef enum VkStateBindPoint_ +typedef enum VkVertexInputStepRate_ { - VK_STATE_BIND_POINT_VIEWPORT = 0x00000000, - VK_STATE_BIND_POINT_RASTER = 0x00000001, - VK_STATE_BIND_POINT_COLOR_BLEND = 0x00000002, - VK_STATE_BIND_POINT_DEPTH_STENCIL = 0x00000003, + VK_VERTEX_INPUT_STEP_RATE_VERTEX = 0x0, + VK_VERTEX_INPUT_STEP_RATE_INSTANCE = 0x1, + VK_VERTEX_INPUT_STEP_RATE_DRAW = 0x2, //Optional - VK_ENUM_RANGE(STATE_BIND_POINT, VIEWPORT, DEPTH_STENCIL) -} VkStateBindPoint; + VK_ENUM_RANGE(VERTEX_INPUT_STEP_RATE, VERTEX, DRAW) +} VkVertexInputStepRate; typedef enum VkPrimitiveTopology_ { @@ -329,57 +573,6 @@ typedef enum VkPrimitiveTopology_ VK_ENUM_RANGE(PRIMITIVE_TOPOLOGY, POINT_LIST, PATCH) } VkPrimitiveTopology; -typedef enum VkIndexType_ -{ - VK_INDEX_TYPE_UINT8 = 0x00000000, - VK_INDEX_TYPE_UINT16 = 0x00000001, - VK_INDEX_TYPE_UINT32 = 0x00000002, - - VK_ENUM_RANGE(INDEX_TYPE, UINT8, UINT32) -} VkIndexType; - -typedef enum VkTexFilter_ -{ - VK_TEX_FILTER_NEAREST = 0x00000000, - VK_TEX_FILTER_LINEAR = 0x00000001, - - VK_ENUM_RANGE(TEX_FILTER, NEAREST, LINEAR) -} VkTexFilter; - -typedef enum VkTexMipmapMode_ -{ - VK_TEX_MIPMAP_MODE_BASE = 0x00000000, // Always choose base level - VK_TEX_MIPMAP_MODE_NEAREST = 0x00000001, // Choose nearest mip level - VK_TEX_MIPMAP_MODE_LINEAR = 0x00000002, // Linear filter between mip levels - - VK_ENUM_RANGE(TEX_MIPMAP_MODE, BASE, LINEAR) -} VkTexMipmapMode; - -typedef enum VkTexAddress_ -{ - VK_TEX_ADDRESS_WRAP = 0x00000000, - VK_TEX_ADDRESS_MIRROR = 0x00000001, - VK_TEX_ADDRESS_CLAMP = 0x00000002, - VK_TEX_ADDRESS_MIRROR_ONCE = 0x00000003, - VK_TEX_ADDRESS_CLAMP_BORDER = 0x00000004, - - VK_ENUM_RANGE(TEX_ADDRESS, WRAP, CLAMP_BORDER) -} VkTexAddress; - -typedef enum VkCompareOp_ -{ - VK_COMPARE_OP_NEVER = 0x00000000, - VK_COMPARE_OP_LESS = 0x00000001, - VK_COMPARE_OP_EQUAL = 0x00000002, - VK_COMPARE_OP_LESS_EQUAL = 0x00000003, - VK_COMPARE_OP_GREATER = 0x00000004, - VK_COMPARE_OP_NOT_EQUAL = 0x00000005, - VK_COMPARE_OP_GREATER_EQUAL = 0x00000006, - VK_COMPARE_OP_ALWAYS = 0x00000007, - - VK_ENUM_RANGE(COMPARE_OP, NEVER, ALWAYS) -} VkCompareOp; - typedef enum VkFillMode_ { VK_FILL_MODE_POINTS = 0x00000000, @@ -407,29 +600,55 @@ typedef enum VkFrontFace_ VK_ENUM_RANGE(FRONT_FACE, CCW, CW) } VkFrontFace; -typedef enum VkProvokingVertex_ +typedef enum VkCompareOp_ { - VK_PROVOKING_VERTEX_FIRST = 0x00000000, - VK_PROVOKING_VERTEX_LAST = 0x00000001, + VK_COMPARE_OP_NEVER = 0x00000000, + VK_COMPARE_OP_LESS = 0x00000001, + VK_COMPARE_OP_EQUAL = 0x00000002, + VK_COMPARE_OP_LESS_EQUAL = 0x00000003, + VK_COMPARE_OP_GREATER = 0x00000004, + VK_COMPARE_OP_NOT_EQUAL = 0x00000005, + VK_COMPARE_OP_GREATER_EQUAL = 0x00000006, + VK_COMPARE_OP_ALWAYS = 0x00000007, - VK_ENUM_RANGE(PROVOKING_VERTEX, FIRST, LAST) -} VkProvokingVertex; + VK_ENUM_RANGE(COMPARE_OP, NEVER, ALWAYS) +} VkCompareOp; -typedef enum VkCoordinateOrigin_ +typedef enum VkStencilOp_ { - VK_COORDINATE_ORIGIN_UPPER_LEFT = 0x00000000, - VK_COORDINATE_ORIGIN_LOWER_LEFT = 0x00000001, + VK_STENCIL_OP_KEEP = 0x00000000, + VK_STENCIL_OP_ZERO = 0x00000001, + VK_STENCIL_OP_REPLACE = 0x00000002, + VK_STENCIL_OP_INC_CLAMP = 0x00000003, + VK_STENCIL_OP_DEC_CLAMP = 0x00000004, + VK_STENCIL_OP_INVERT = 0x00000005, + VK_STENCIL_OP_INC_WRAP = 0x00000006, + VK_STENCIL_OP_DEC_WRAP = 0x00000007, - VK_ENUM_RANGE(COORDINATE_ORIGIN, UPPER_LEFT, LOWER_LEFT) -} VkCoordinateOrigin; + VK_ENUM_RANGE(STENCIL_OP, KEEP, DEC_WRAP) +} VkStencilOp; -typedef enum VkDepthMode_ +typedef enum VkLogicOp_ { - VK_DEPTH_MODE_ZERO_TO_ONE = 0x00000000, - VK_DEPTH_MODE_NEGATIVE_ONE_TO_ONE = 0x00000001, + VK_LOGIC_OP_COPY = 0x00000000, + VK_LOGIC_OP_CLEAR = 0x00000001, + VK_LOGIC_OP_AND = 0x00000002, + VK_LOGIC_OP_AND_REVERSE = 0x00000003, + VK_LOGIC_OP_AND_INVERTED = 0x00000004, + VK_LOGIC_OP_NOOP = 0x00000005, + VK_LOGIC_OP_XOR = 0x00000006, + VK_LOGIC_OP_OR = 0x00000007, + VK_LOGIC_OP_NOR = 0x00000008, + VK_LOGIC_OP_EQUIV = 0x00000009, + VK_LOGIC_OP_INVERT = 0x0000000a, + VK_LOGIC_OP_OR_REVERSE = 0x0000000b, + VK_LOGIC_OP_COPY_INVERTED = 0x0000000c, + VK_LOGIC_OP_OR_INVERTED = 0x0000000d, + VK_LOGIC_OP_NAND = 0x0000000e, + VK_LOGIC_OP_SET = 0x0000000f, - VK_ENUM_RANGE(DEPTH_MODE, ZERO_TO_ONE, NEGATIVE_ONE_TO_ONE) -} VkDepthMode; + VK_ENUM_RANGE(LOGIC_OP, COPY, SET) +} VkLogicOp; typedef enum VkBlend_ { @@ -467,474 +686,189 @@ typedef enum VkBlendOp_ VK_ENUM_RANGE(BLEND_OP, ADD, MAX) } VkBlendOp; -typedef enum VkStencilOp_ +typedef enum VkTexFilter_ { - VK_STENCIL_OP_KEEP = 0x00000000, - VK_STENCIL_OP_ZERO = 0x00000001, - VK_STENCIL_OP_REPLACE = 0x00000002, - VK_STENCIL_OP_INC_CLAMP = 0x00000003, - VK_STENCIL_OP_DEC_CLAMP = 0x00000004, - VK_STENCIL_OP_INVERT = 0x00000005, - VK_STENCIL_OP_INC_WRAP = 0x00000006, - VK_STENCIL_OP_DEC_WRAP = 0x00000007, + VK_TEX_FILTER_NEAREST = 0x00000000, + VK_TEX_FILTER_LINEAR = 0x00000001, - VK_ENUM_RANGE(STENCIL_OP, KEEP, DEC_WRAP) -} VkStencilOp; + VK_ENUM_RANGE(TEX_FILTER, NEAREST, LINEAR) +} VkTexFilter; -typedef enum VkLogicOp_ +typedef enum VkTexMipmapMode_ { - VK_LOGIC_OP_COPY = 0x00000000, - VK_LOGIC_OP_CLEAR = 0x00000001, - VK_LOGIC_OP_AND = 0x00000002, - VK_LOGIC_OP_AND_REVERSE = 0x00000003, - VK_LOGIC_OP_AND_INVERTED = 0x00000004, - VK_LOGIC_OP_NOOP = 0x00000005, - VK_LOGIC_OP_XOR = 0x00000006, - VK_LOGIC_OP_OR = 0x00000007, - VK_LOGIC_OP_NOR = 0x00000008, - VK_LOGIC_OP_EQUIV = 0x00000009, - VK_LOGIC_OP_INVERT = 0x0000000a, - VK_LOGIC_OP_OR_REVERSE = 0x0000000b, - VK_LOGIC_OP_COPY_INVERTED = 0x0000000c, - VK_LOGIC_OP_OR_INVERTED = 0x0000000d, - VK_LOGIC_OP_NAND = 0x0000000e, - VK_LOGIC_OP_SET = 0x0000000f, + VK_TEX_MIPMAP_MODE_BASE = 0x00000000, // Always choose base level + VK_TEX_MIPMAP_MODE_NEAREST = 0x00000001, // Choose nearest mip level + VK_TEX_MIPMAP_MODE_LINEAR = 0x00000002, // Linear filter between mip levels - VK_ENUM_RANGE(LOGIC_OP, COPY, SET) -} VkLogicOp; + VK_ENUM_RANGE(TEX_MIPMAP_MODE, BASE, LINEAR) +} VkTexMipmapMode; -typedef enum VkSystemAllocType_ +typedef enum VkTexAddress_ { - VK_SYSTEM_ALLOC_TYPE_API_OBJECT = 0x00000000, - VK_SYSTEM_ALLOC_TYPE_INTERNAL = 0x00000001, - VK_SYSTEM_ALLOC_TYPE_INTERNAL_TEMP = 0x00000002, - VK_SYSTEM_ALLOC_TYPE_INTERNAL_SHADER = 0x00000003, - VK_SYSTEM_ALLOC_TYPE_DEBUG = 0x00000004, + VK_TEX_ADDRESS_WRAP = 0x00000000, + VK_TEX_ADDRESS_MIRROR = 0x00000001, + VK_TEX_ADDRESS_CLAMP = 0x00000002, + VK_TEX_ADDRESS_MIRROR_ONCE = 0x00000003, + VK_TEX_ADDRESS_CLAMP_BORDER = 0x00000004, - VK_ENUM_RANGE(SYSTEM_ALLOC_TYPE, API_OBJECT, DEBUG) -} VkSystemAllocType; + VK_ENUM_RANGE(TEX_ADDRESS, WRAP, CLAMP_BORDER) +} VkTexAddress; -typedef enum VkPhysicalDeviceType_ +typedef enum VkBorderColor_ { - VK_PHYSICAL_DEVICE_TYPE_OTHER = 0x00000000, - VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU = 0x00000001, - VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU = 0x00000002, - VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU = 0x00000003, - VK_PHYSICAL_DEVICE_TYPE_CPU = 0x00000004, + VK_BORDER_COLOR_OPAQUE_WHITE = 0x00000000, + VK_BORDER_COLOR_TRANSPARENT_BLACK = 0x00000001, + VK_BORDER_COLOR_OPAQUE_BLACK = 0x00000002, - VK_ENUM_RANGE(PHYSICAL_DEVICE_TYPE, OTHER, CPU) -} VkPhysicalDeviceType; + VK_ENUM_RANGE(BORDER_COLOR, OPAQUE_WHITE, OPAQUE_BLACK) +} VkBorderColor; -typedef enum VkPhysicalDeviceInfoType_ -{ - // Info type for vkGetPhysicalDeviceInfo() - VK_PHYSICAL_DEVICE_INFO_TYPE_PROPERTIES = 0x00000000, - VK_PHYSICAL_DEVICE_INFO_TYPE_PERFORMANCE = 0x00000001, - VK_PHYSICAL_DEVICE_INFO_TYPE_QUEUE_PROPERTIES = 0x00000002, - VK_PHYSICAL_DEVICE_INFO_TYPE_MEMORY_PROPERTIES = 0x00000003, +typedef enum VkDescriptorType_ +{ + VK_DESCRIPTOR_TYPE_SAMPLER = 0x00000000, + VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER = 0x00000001, + VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE = 0x00000002, + VK_DESCRIPTOR_TYPE_STORAGE_IMAGE = 0x00000003, + VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER = 0x00000004, + VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER = 0x00000005, + VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER = 0x00000006, + VK_DESCRIPTOR_TYPE_STORAGE_BUFFER = 0x00000007, + VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC = 0x00000008, + VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC = 0x00000009, - VK_ENUM_RANGE(PHYSICAL_DEVICE_INFO_TYPE, PROPERTIES, MEMORY_PROPERTIES) -} VkPhysicalDeviceInfoType; + VK_ENUM_RANGE(DESCRIPTOR_TYPE, SAMPLER, STORAGE_BUFFER_DYNAMIC) +} VkDescriptorType; -typedef enum VkExtensionInfoType_ +typedef enum VkDescriptorPoolUsage_ { - // Info type for vkGetGlobalExtensionInfo() and vkGetPhysicalDeviceExtensionInfo() - VK_EXTENSION_INFO_TYPE_COUNT = 0x00000000, - VK_EXTENSION_INFO_TYPE_PROPERTIES = 0x00000001, + VK_DESCRIPTOR_POOL_USAGE_ONE_SHOT = 0x00000000, + VK_DESCRIPTOR_POOL_USAGE_DYNAMIC = 0x00000001, - VK_ENUM_RANGE(EXTENSION_INFO_TYPE, COUNT, PROPERTIES) -} VkExtensionInfoType; + VK_ENUM_RANGE(DESCRIPTOR_POOL_USAGE, ONE_SHOT, DYNAMIC) +} VkDescriptorPoolUsage; -typedef enum VkFormatInfoType_ +typedef enum VkDescriptorUpdateMode_ { - // Info type for vkGetFormatInfo() - VK_FORMAT_INFO_TYPE_PROPERTIES = 0x00000000, + VK_DESCRIPTOR_UPDATE_MODE_COPY = 0x00000000, + VK_DESCRIPTOR_UPDATE_MODE_FASTEST = 0x00000001, - VK_ENUM_RANGE(FORMAT_INFO_TYPE, PROPERTIES, PROPERTIES) -} VkFormatInfoType; + VK_ENUM_RANGE(DESCRIPTOR_UPDATE_MODE, COPY, FASTEST) +} VkDescriptorUpdateMode; -typedef enum VkSubresourceInfoType_ +typedef enum VkDescriptorSetUsage_ { - // Info type for vkGetImageSubresourceInfo() - VK_SUBRESOURCE_INFO_TYPE_LAYOUT = 0x00000000, + VK_DESCRIPTOR_SET_USAGE_ONE_SHOT = 0x00000000, + VK_DESCRIPTOR_SET_USAGE_STATIC = 0x00000001, - VK_ENUM_RANGE(SUBRESOURCE_INFO_TYPE, LAYOUT, LAYOUT) -} VkSubresourceInfoType; + VK_ENUM_RANGE(DESCRIPTOR_SET_USAGE, ONE_SHOT, STATIC) +} VkDescriptorSetUsage; -typedef enum VkObjectInfoType_ +typedef enum VkImageLayout_ { - // Info type for vkGetObjectInfo() - VK_OBJECT_INFO_TYPE_MEMORY_ALLOCATION_COUNT = 0x00000000, - VK_OBJECT_INFO_TYPE_MEMORY_REQUIREMENTS = 0x00000001, + VK_IMAGE_LAYOUT_UNDEFINED = 0x00000000, // Implicit layout an image is when its contents are undefined due to various reasons (e.g. right after creation) + VK_IMAGE_LAYOUT_GENERAL = 0x00000001, // General layout when image can be used for any kind of access + VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL = 0x00000002, // Optimal layout when image is only used for color attachment read/write + VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL = 0x00000003, // Optimal layout when image is only used for depth/stencil attachment read/write + VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL = 0x00000004, // Optimal layout when image is used for read only depth/stencil attachment and shader access + VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL = 0x00000005, // Optimal layout when image is used for read only shader access + VK_IMAGE_LAYOUT_CLEAR_OPTIMAL = 0x00000006, // Optimal layout when image is used only for clear operations + VK_IMAGE_LAYOUT_TRANSFER_SOURCE_OPTIMAL = 0x00000007, // Optimal layout when image is used only as source of transfer operations + VK_IMAGE_LAYOUT_TRANSFER_DESTINATION_OPTIMAL = 0x00000008, // Optimal layout when image is used only as destination of transfer operations - VK_ENUM_RANGE(OBJECT_INFO_TYPE, MEMORY_ALLOCATION_COUNT, MEMORY_REQUIREMENTS) -} VkObjectInfoType; + VK_ENUM_RANGE(IMAGE_LAYOUT, UNDEFINED, TRANSFER_DESTINATION_OPTIMAL) +} VkImageLayout; -typedef enum VkVertexInputStepRate_ +typedef enum VkAttachmentLoadOp_ { - VK_VERTEX_INPUT_STEP_RATE_VERTEX = 0x0, - VK_VERTEX_INPUT_STEP_RATE_INSTANCE = 0x1, - VK_VERTEX_INPUT_STEP_RATE_DRAW = 0x2, //Optional + VK_ATTACHMENT_LOAD_OP_LOAD = 0x00000000, + VK_ATTACHMENT_LOAD_OP_CLEAR = 0x00000001, + VK_ATTACHMENT_LOAD_OP_DONT_CARE = 0x00000002, - VK_ENUM_RANGE(VERTEX_INPUT_STEP_RATE, VERTEX, DRAW) -} VkVertexInputStepRate; + VK_ENUM_RANGE(ATTACHMENT_LOAD_OP, LOAD, DONT_CARE) +} VkAttachmentLoadOp; -// Vulkan format definitions -typedef enum VkFormat_ +typedef enum VkAttachmentStoreOp_ { - VK_FORMAT_UNDEFINED = 0x00000000, - VK_FORMAT_R4G4_UNORM = 0x00000001, - VK_FORMAT_R4G4_USCALED = 0x00000002, - VK_FORMAT_R4G4B4A4_UNORM = 0x00000003, - VK_FORMAT_R4G4B4A4_USCALED = 0x00000004, - VK_FORMAT_R5G6B5_UNORM = 0x00000005, - VK_FORMAT_R5G6B5_USCALED = 0x00000006, - VK_FORMAT_R5G5B5A1_UNORM = 0x00000007, - VK_FORMAT_R5G5B5A1_USCALED = 0x00000008, - VK_FORMAT_R8_UNORM = 0x00000009, - VK_FORMAT_R8_SNORM = 0x0000000A, - VK_FORMAT_R8_USCALED = 0x0000000B, - VK_FORMAT_R8_SSCALED = 0x0000000C, - VK_FORMAT_R8_UINT = 0x0000000D, - VK_FORMAT_R8_SINT = 0x0000000E, - VK_FORMAT_R8_SRGB = 0x0000000F, - VK_FORMAT_R8G8_UNORM = 0x00000010, - VK_FORMAT_R8G8_SNORM = 0x00000011, - VK_FORMAT_R8G8_USCALED = 0x00000012, - VK_FORMAT_R8G8_SSCALED = 0x00000013, - VK_FORMAT_R8G8_UINT = 0x00000014, - VK_FORMAT_R8G8_SINT = 0x00000015, - VK_FORMAT_R8G8_SRGB = 0x00000016, - VK_FORMAT_R8G8B8_UNORM = 0x00000017, - VK_FORMAT_R8G8B8_SNORM = 0x00000018, - VK_FORMAT_R8G8B8_USCALED = 0x00000019, - VK_FORMAT_R8G8B8_SSCALED = 0x0000001A, - VK_FORMAT_R8G8B8_UINT = 0x0000001B, - VK_FORMAT_R8G8B8_SINT = 0x0000001C, - VK_FORMAT_R8G8B8_SRGB = 0x0000001D, - VK_FORMAT_R8G8B8A8_UNORM = 0x0000001E, - VK_FORMAT_R8G8B8A8_SNORM = 0x0000001F, - VK_FORMAT_R8G8B8A8_USCALED = 0x00000020, - VK_FORMAT_R8G8B8A8_SSCALED = 0x00000021, - VK_FORMAT_R8G8B8A8_UINT = 0x00000022, - VK_FORMAT_R8G8B8A8_SINT = 0x00000023, - VK_FORMAT_R8G8B8A8_SRGB = 0x00000024, - VK_FORMAT_R10G10B10A2_UNORM = 0x00000025, - VK_FORMAT_R10G10B10A2_SNORM = 0x00000026, - VK_FORMAT_R10G10B10A2_USCALED = 0x00000027, - VK_FORMAT_R10G10B10A2_SSCALED = 0x00000028, - VK_FORMAT_R10G10B10A2_UINT = 0x00000029, - VK_FORMAT_R10G10B10A2_SINT = 0x0000002A, - VK_FORMAT_R16_UNORM = 0x0000002B, - VK_FORMAT_R16_SNORM = 0x0000002C, - VK_FORMAT_R16_USCALED = 0x0000002D, - VK_FORMAT_R16_SSCALED = 0x0000002E, - VK_FORMAT_R16_UINT = 0x0000002F, - VK_FORMAT_R16_SINT = 0x00000030, - VK_FORMAT_R16_SFLOAT = 0x00000031, - VK_FORMAT_R16G16_UNORM = 0x00000032, - VK_FORMAT_R16G16_SNORM = 0x00000033, - VK_FORMAT_R16G16_USCALED = 0x00000034, - VK_FORMAT_R16G16_SSCALED = 0x00000035, - VK_FORMAT_R16G16_UINT = 0x00000036, - VK_FORMAT_R16G16_SINT = 0x00000037, - VK_FORMAT_R16G16_SFLOAT = 0x00000038, - VK_FORMAT_R16G16B16_UNORM = 0x00000039, - VK_FORMAT_R16G16B16_SNORM = 0x0000003A, - VK_FORMAT_R16G16B16_USCALED = 0x0000003B, - VK_FORMAT_R16G16B16_SSCALED = 0x0000003C, - VK_FORMAT_R16G16B16_UINT = 0x0000003D, - VK_FORMAT_R16G16B16_SINT = 0x0000003E, - VK_FORMAT_R16G16B16_SFLOAT = 0x0000003F, - VK_FORMAT_R16G16B16A16_UNORM = 0x00000040, - VK_FORMAT_R16G16B16A16_SNORM = 0x00000041, - VK_FORMAT_R16G16B16A16_USCALED = 0x00000042, - VK_FORMAT_R16G16B16A16_SSCALED = 0x00000043, - VK_FORMAT_R16G16B16A16_UINT = 0x00000044, - VK_FORMAT_R16G16B16A16_SINT = 0x00000045, - VK_FORMAT_R16G16B16A16_SFLOAT = 0x00000046, - VK_FORMAT_R32_UINT = 0x00000047, - VK_FORMAT_R32_SINT = 0x00000048, - VK_FORMAT_R32_SFLOAT = 0x00000049, - VK_FORMAT_R32G32_UINT = 0x0000004A, - VK_FORMAT_R32G32_SINT = 0x0000004B, - VK_FORMAT_R32G32_SFLOAT = 0x0000004C, - VK_FORMAT_R32G32B32_UINT = 0x0000004D, - VK_FORMAT_R32G32B32_SINT = 0x0000004E, - VK_FORMAT_R32G32B32_SFLOAT = 0x0000004F, - VK_FORMAT_R32G32B32A32_UINT = 0x00000050, - VK_FORMAT_R32G32B32A32_SINT = 0x00000051, - VK_FORMAT_R32G32B32A32_SFLOAT = 0x00000052, - VK_FORMAT_R64_SFLOAT = 0x00000053, - VK_FORMAT_R64G64_SFLOAT = 0x00000054, - VK_FORMAT_R64G64B64_SFLOAT = 0x00000055, - VK_FORMAT_R64G64B64A64_SFLOAT = 0x00000056, - VK_FORMAT_R11G11B10_UFLOAT = 0x00000057, - VK_FORMAT_R9G9B9E5_UFLOAT = 0x00000058, - VK_FORMAT_D16_UNORM = 0x00000059, - VK_FORMAT_D24_UNORM = 0x0000005A, - VK_FORMAT_D32_SFLOAT = 0x0000005B, - VK_FORMAT_S8_UINT = 0x0000005C, - VK_FORMAT_D16_UNORM_S8_UINT = 0x0000005D, - VK_FORMAT_D24_UNORM_S8_UINT = 0x0000005E, - VK_FORMAT_D32_SFLOAT_S8_UINT = 0x0000005F, - VK_FORMAT_BC1_RGB_UNORM = 0x00000060, - VK_FORMAT_BC1_RGB_SRGB = 0x00000061, - VK_FORMAT_BC1_RGBA_UNORM = 0x00000062, - VK_FORMAT_BC1_RGBA_SRGB = 0x00000063, - VK_FORMAT_BC2_UNORM = 0x00000064, - VK_FORMAT_BC2_SRGB = 0x00000065, - VK_FORMAT_BC3_UNORM = 0x00000066, - VK_FORMAT_BC3_SRGB = 0x00000067, - VK_FORMAT_BC4_UNORM = 0x00000068, - VK_FORMAT_BC4_SNORM = 0x00000069, - VK_FORMAT_BC5_UNORM = 0x0000006A, - VK_FORMAT_BC5_SNORM = 0x0000006B, - VK_FORMAT_BC6H_UFLOAT = 0x0000006C, - VK_FORMAT_BC6H_SFLOAT = 0x0000006D, - VK_FORMAT_BC7_UNORM = 0x0000006E, - VK_FORMAT_BC7_SRGB = 0x0000006F, - VK_FORMAT_ETC2_R8G8B8_UNORM = 0x00000070, - VK_FORMAT_ETC2_R8G8B8_SRGB = 0x00000071, - VK_FORMAT_ETC2_R8G8B8A1_UNORM = 0x00000072, - VK_FORMAT_ETC2_R8G8B8A1_SRGB = 0x00000073, - VK_FORMAT_ETC2_R8G8B8A8_UNORM = 0x00000074, - VK_FORMAT_ETC2_R8G8B8A8_SRGB = 0x00000075, - VK_FORMAT_EAC_R11_UNORM = 0x00000076, - VK_FORMAT_EAC_R11_SNORM = 0x00000077, - VK_FORMAT_EAC_R11G11_UNORM = 0x00000078, - VK_FORMAT_EAC_R11G11_SNORM = 0x00000079, - VK_FORMAT_ASTC_4x4_UNORM = 0x0000007A, - VK_FORMAT_ASTC_4x4_SRGB = 0x0000007B, - VK_FORMAT_ASTC_5x4_UNORM = 0x0000007C, - VK_FORMAT_ASTC_5x4_SRGB = 0x0000007D, - VK_FORMAT_ASTC_5x5_UNORM = 0x0000007E, - VK_FORMAT_ASTC_5x5_SRGB = 0x0000007F, - VK_FORMAT_ASTC_6x5_UNORM = 0x00000080, - VK_FORMAT_ASTC_6x5_SRGB = 0x00000081, - VK_FORMAT_ASTC_6x6_UNORM = 0x00000082, - VK_FORMAT_ASTC_6x6_SRGB = 0x00000083, - VK_FORMAT_ASTC_8x5_UNORM = 0x00000084, - VK_FORMAT_ASTC_8x5_SRGB = 0x00000085, - VK_FORMAT_ASTC_8x6_UNORM = 0x00000086, - VK_FORMAT_ASTC_8x6_SRGB = 0x00000087, - VK_FORMAT_ASTC_8x8_UNORM = 0x00000088, - VK_FORMAT_ASTC_8x8_SRGB = 0x00000089, - VK_FORMAT_ASTC_10x5_UNORM = 0x0000008A, - VK_FORMAT_ASTC_10x5_SRGB = 0x0000008B, - VK_FORMAT_ASTC_10x6_UNORM = 0x0000008C, - VK_FORMAT_ASTC_10x6_SRGB = 0x0000008D, - VK_FORMAT_ASTC_10x8_UNORM = 0x0000008E, - VK_FORMAT_ASTC_10x8_SRGB = 0x0000008F, - VK_FORMAT_ASTC_10x10_UNORM = 0x00000090, - VK_FORMAT_ASTC_10x10_SRGB = 0x00000091, - VK_FORMAT_ASTC_12x10_UNORM = 0x00000092, - VK_FORMAT_ASTC_12x10_SRGB = 0x00000093, - VK_FORMAT_ASTC_12x12_UNORM = 0x00000094, - VK_FORMAT_ASTC_12x12_SRGB = 0x00000095, - VK_FORMAT_B4G4R4A4_UNORM = 0x00000096, - VK_FORMAT_B5G5R5A1_UNORM = 0x00000097, - VK_FORMAT_B5G6R5_UNORM = 0x00000098, - VK_FORMAT_B5G6R5_USCALED = 0x00000099, - VK_FORMAT_B8G8R8_UNORM = 0x0000009A, - VK_FORMAT_B8G8R8_SNORM = 0x0000009B, - VK_FORMAT_B8G8R8_USCALED = 0x0000009C, - VK_FORMAT_B8G8R8_SSCALED = 0x0000009D, - VK_FORMAT_B8G8R8_UINT = 0x0000009E, - VK_FORMAT_B8G8R8_SINT = 0x0000009F, - VK_FORMAT_B8G8R8_SRGB = 0x000000A0, - VK_FORMAT_B8G8R8A8_UNORM = 0x000000A1, - VK_FORMAT_B8G8R8A8_SNORM = 0x000000A2, - VK_FORMAT_B8G8R8A8_USCALED = 0x000000A3, - VK_FORMAT_B8G8R8A8_SSCALED = 0x000000A4, - VK_FORMAT_B8G8R8A8_UINT = 0x000000A5, - VK_FORMAT_B8G8R8A8_SINT = 0x000000A6, - VK_FORMAT_B8G8R8A8_SRGB = 0x000000A7, - VK_FORMAT_B10G10R10A2_UNORM = 0x000000A8, - VK_FORMAT_B10G10R10A2_SNORM = 0x000000A9, - VK_FORMAT_B10G10R10A2_USCALED = 0x000000AA, - VK_FORMAT_B10G10R10A2_SSCALED = 0x000000AB, - VK_FORMAT_B10G10R10A2_UINT = 0x000000AC, - VK_FORMAT_B10G10R10A2_SINT = 0x000000AD, + VK_ATTACHMENT_STORE_OP_STORE = 0x00000000, + VK_ATTACHMENT_STORE_OP_RESOLVE_MSAA = 0x00000001, + VK_ATTACHMENT_STORE_OP_DONT_CARE = 0x00000002, - VK_ENUM_RANGE(FORMAT, UNDEFINED, B10G10R10A2_SINT) -} VkFormat; + VK_ENUM_RANGE(ATTACHMENT_STORE_OP, STORE, DONT_CARE) +} VkAttachmentStoreOp; -// Shader stage enumerant -typedef enum VkShaderStage_ +typedef enum VkPipelineBindPoint_ { - VK_SHADER_STAGE_VERTEX = 0, - VK_SHADER_STAGE_TESS_CONTROL = 1, - VK_SHADER_STAGE_TESS_EVALUATION = 2, - VK_SHADER_STAGE_GEOMETRY = 3, - VK_SHADER_STAGE_FRAGMENT = 4, - VK_SHADER_STAGE_COMPUTE = 5, + VK_PIPELINE_BIND_POINT_COMPUTE = 0x00000000, + VK_PIPELINE_BIND_POINT_GRAPHICS = 0x00000001, - VK_ENUM_RANGE(SHADER_STAGE, VERTEX, COMPUTE) -} VkShaderStage; + VK_ENUM_RANGE(PIPELINE_BIND_POINT, COMPUTE, GRAPHICS) +} VkPipelineBindPoint; -// Structure type enumerant -typedef enum VkStructureType_ +typedef enum VkStateBindPoint_ { - VK_STRUCTURE_TYPE_APPLICATION_INFO = 0, - VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO = 1, - VK_STRUCTURE_TYPE_MEMORY_ALLOC_INFO = 2, - VK_STRUCTURE_TYPE_MEMORY_OPEN_INFO = 3, - VK_STRUCTURE_TYPE_PEER_MEMORY_OPEN_INFO = 4, - VK_STRUCTURE_TYPE_BUFFER_VIEW_ATTACH_INFO = 5, - VK_STRUCTURE_TYPE_IMAGE_VIEW_ATTACH_INFO = 6, - VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO = 7, - VK_STRUCTURE_TYPE_COLOR_ATTACHMENT_VIEW_CREATE_INFO = 8, - VK_STRUCTURE_TYPE_DEPTH_STENCIL_VIEW_CREATE_INFO = 9, - VK_STRUCTURE_TYPE_SHADER_CREATE_INFO = 10, - VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO = 11, - VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO = 12, - VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO = 13, - VK_STRUCTURE_TYPE_DYNAMIC_VP_STATE_CREATE_INFO = 14, - VK_STRUCTURE_TYPE_DYNAMIC_RS_STATE_CREATE_INFO = 15, - VK_STRUCTURE_TYPE_DYNAMIC_CB_STATE_CREATE_INFO = 16, - VK_STRUCTURE_TYPE_DYNAMIC_DS_STATE_CREATE_INFO = 17, - VK_STRUCTURE_TYPE_CMD_BUFFER_CREATE_INFO = 18, - VK_STRUCTURE_TYPE_EVENT_CREATE_INFO = 19, - VK_STRUCTURE_TYPE_FENCE_CREATE_INFO = 20, - VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO = 21, - VK_STRUCTURE_TYPE_SEMAPHORE_OPEN_INFO = 22, - VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO = 23, - VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO = 24, - VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO = 25, - VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_CREATE_INFO = 26, - VK_STRUCTURE_TYPE_PIPELINE_IA_STATE_CREATE_INFO = 27, - VK_STRUCTURE_TYPE_PIPELINE_TESS_STATE_CREATE_INFO = 28, - VK_STRUCTURE_TYPE_PIPELINE_VP_STATE_CREATE_INFO = 29, - VK_STRUCTURE_TYPE_PIPELINE_RS_STATE_CREATE_INFO = 30, - VK_STRUCTURE_TYPE_PIPELINE_MS_STATE_CREATE_INFO = 31, - VK_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO = 32, - VK_STRUCTURE_TYPE_PIPELINE_DS_STATE_CREATE_INFO = 33, - VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO = 34, - VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO = 35, - VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO = 36, - VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO = 37, - VK_STRUCTURE_TYPE_CMD_BUFFER_BEGIN_INFO = 38, - VK_STRUCTURE_TYPE_CMD_BUFFER_GRAPHICS_BEGIN_INFO = 39, - VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO = 40, - VK_STRUCTURE_TYPE_LAYER_CREATE_INFO = 41, - VK_STRUCTURE_TYPE_MEMORY_BARRIER = 42, - VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER = 43, - VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER = 44, - VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO = 45, - VK_STRUCTURE_TYPE_UPDATE_SAMPLERS = 46, - VK_STRUCTURE_TYPE_UPDATE_SAMPLER_TEXTURES = 47, - VK_STRUCTURE_TYPE_UPDATE_IMAGES = 48, - VK_STRUCTURE_TYPE_UPDATE_BUFFERS = 49, - VK_STRUCTURE_TYPE_UPDATE_AS_COPY = 50, - VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO = 51, - VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO = 52, + VK_STATE_BIND_POINT_VIEWPORT = 0x00000000, + VK_STATE_BIND_POINT_RASTER = 0x00000001, + VK_STATE_BIND_POINT_COLOR_BLEND = 0x00000002, + VK_STATE_BIND_POINT_DEPTH_STENCIL = 0x00000003, - VK_ENUM_RANGE(STRUCTURE_TYPE, APPLICATION_INFO, PIPELINE_LAYOUT_CREATE_INFO) -} VkStructureType; + VK_ENUM_RANGE(STATE_BIND_POINT, VIEWPORT, DEPTH_STENCIL) +} VkStateBindPoint; -// Object type enumerant -typedef enum VkObjectType_ +typedef enum VkIndexType_ { - VK_OBJECT_TYPE_INSTANCE = 0, - VK_OBJECT_TYPE_PHYSICAL_DEVICE = 1, - VK_OBJECT_TYPE_DEVICE = 2, - VK_OBJECT_TYPE_QUEUE = 3, - VK_OBJECT_TYPE_COMMAND_BUFFER = 4, - VK_OBJECT_TYPE_DEVICE_MEMORY = 5, - VK_OBJECT_TYPE_BUFFER = 6, - VK_OBJECT_TYPE_BUFFER_VIEW = 7, - VK_OBJECT_TYPE_IMAGE = 8, - VK_OBJECT_TYPE_IMAGE_VIEW = 9, - VK_OBJECT_TYPE_COLOR_ATTACHMENT_VIEW = 10, - VK_OBJECT_TYPE_DEPTH_STENCIL_VIEW = 11, - VK_OBJECT_TYPE_SHADER = 12, - VK_OBJECT_TYPE_PIPELINE = 13, - VK_OBJECT_TYPE_PIPELINE_LAYOUT = 14, - VK_OBJECT_TYPE_SAMPLER = 15, - VK_OBJECT_TYPE_DESCRIPTOR_SET = 16, - VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT = 17, - VK_OBJECT_TYPE_DESCRIPTOR_POOL = 18, - VK_OBJECT_TYPE_DYNAMIC_VP_STATE = 19, - VK_OBJECT_TYPE_DYNAMIC_RS_STATE = 20, - VK_OBJECT_TYPE_DYNAMIC_CB_STATE = 21, - VK_OBJECT_TYPE_DYNAMIC_DS_STATE = 22, - VK_OBJECT_TYPE_FENCE = 23, - VK_OBJECT_TYPE_SEMAPHORE = 24, - VK_OBJECT_TYPE_EVENT = 25, - VK_OBJECT_TYPE_QUERY_POOL = 26, - VK_OBJECT_TYPE_FRAMEBUFFER = 27, - VK_OBJECT_TYPE_RENDER_PASS = 28, + VK_INDEX_TYPE_UINT8 = 0x00000000, + VK_INDEX_TYPE_UINT16 = 0x00000001, + VK_INDEX_TYPE_UINT32 = 0x00000002, - // Valid ranges for core Vulkan: - VK_OBJECT_TYPE_BEGIN_RANGE = VK_OBJECT_TYPE_INSTANCE, - VK_OBJECT_TYPE_END_RANGE = VK_OBJECT_TYPE_RENDER_PASS, - VK_NUM_OBJECT_TYPE = (VK_OBJECT_TYPE_END_RANGE - VK_OBJECT_TYPE_BEGIN_RANGE + 1), - VK_MAX_ENUM(VkObjectType) -} VkObjectType; + VK_ENUM_RANGE(INDEX_TYPE, UINT8, UINT32) +} VkIndexType; -// ------------------------------------------------------------------------------------------------ -// Error and return codes +typedef enum VkPipeEvent_ +{ + VK_PIPE_EVENT_TOP_OF_PIPE = 0x00000001, // Set event before the device starts processing subsequent command + VK_PIPE_EVENT_VERTEX_PROCESSING_COMPLETE = 0x00000002, // Set event when all pending vertex processing is complete + VK_PIPE_EVENT_LOCAL_FRAGMENT_PROCESSING_COMPLETE = 0x00000003, // Set event when all pending fragment shader executions are complete, within each fragment location + VK_PIPE_EVENT_FRAGMENT_PROCESSING_COMPLETE = 0x00000004, // Set event when all pending fragment shader executions are complete + VK_PIPE_EVENT_GRAPHICS_PIPELINE_COMPLETE = 0x00000005, // Set event when all pending graphics operations are complete + VK_PIPE_EVENT_COMPUTE_PIPELINE_COMPLETE = 0x00000006, // Set event when all pending compute operations are complete + VK_PIPE_EVENT_TRANSFER_COMPLETE = 0x00000007, // Set event when all pending transfer operations are complete + VK_PIPE_EVENT_COMMANDS_COMPLETE = 0x00000008, // Set event when all pending work is complete -typedef enum VkResult_ + VK_ENUM_RANGE(PIPE_EVENT, TOP_OF_PIPE, COMMANDS_COMPLETE) +} VkPipeEvent; + +typedef enum VkWaitEvent_ { - // Return codes for successful operation execution (> = 0) - VK_SUCCESS = 0x0000000, - VK_UNSUPPORTED = 0x0000001, - VK_NOT_READY = 0x0000002, - VK_TIMEOUT = 0x0000003, - VK_EVENT_SET = 0x0000004, - VK_EVENT_RESET = 0x0000005, + VK_WAIT_EVENT_TOP_OF_PIPE = 0x00000001, // Wait event before the device starts processing subsequent commands + VK_WAIT_EVENT_BEFORE_RASTERIZATION = 0x00000002, // Wait event before rasterizing subsequent primitives - // Error codes (negative values) - VK_ERROR_UNKNOWN = -(0x00000001), - VK_ERROR_UNAVAILABLE = -(0x00000002), - VK_ERROR_INITIALIZATION_FAILED = -(0x00000003), - VK_ERROR_OUT_OF_HOST_MEMORY = -(0x00000004), - VK_ERROR_OUT_OF_DEVICE_MEMORY = -(0x00000005), - VK_ERROR_DEVICE_ALREADY_CREATED = -(0x00000006), - VK_ERROR_DEVICE_LOST = -(0x00000007), - VK_ERROR_INVALID_POINTER = -(0x00000008), - VK_ERROR_INVALID_VALUE = -(0x00000009), - VK_ERROR_INVALID_HANDLE = -(0x0000000A), - VK_ERROR_INVALID_ORDINAL = -(0x0000000B), - VK_ERROR_INVALID_MEMORY_SIZE = -(0x0000000C), - VK_ERROR_INVALID_EXTENSION = -(0x0000000D), - VK_ERROR_INVALID_FLAGS = -(0x0000000E), - VK_ERROR_INVALID_ALIGNMENT = -(0x0000000F), - VK_ERROR_INVALID_FORMAT = -(0x00000010), - VK_ERROR_INVALID_IMAGE = -(0x00000011), - VK_ERROR_INVALID_DESCRIPTOR_SET_DATA = -(0x00000012), - VK_ERROR_INVALID_QUEUE_TYPE = -(0x00000013), - VK_ERROR_INVALID_OBJECT_TYPE = -(0x00000014), - VK_ERROR_UNSUPPORTED_SHADER_IL_VERSION = -(0x00000015), - VK_ERROR_BAD_SHADER_CODE = -(0x00000016), - VK_ERROR_BAD_PIPELINE_DATA = -(0x00000017), - VK_ERROR_TOO_MANY_MEMORY_REFERENCES = -(0x00000018), - VK_ERROR_NOT_MAPPABLE = -(0x00000019), - VK_ERROR_MEMORY_MAP_FAILED = -(0x0000001A), - VK_ERROR_MEMORY_UNMAP_FAILED = -(0x0000001B), - VK_ERROR_INCOMPATIBLE_DEVICE = -(0x0000001C), - VK_ERROR_INCOMPATIBLE_DRIVER = -(0x0000001D), - VK_ERROR_INCOMPLETE_COMMAND_BUFFER = -(0x0000001E), - VK_ERROR_BUILDING_COMMAND_BUFFER = -(0x0000001F), - VK_ERROR_MEMORY_NOT_BOUND = -(0x00000020), - VK_ERROR_INCOMPATIBLE_QUEUE = -(0x00000021), - VK_ERROR_NOT_SHAREABLE = -(0x00000022), + VK_ENUM_RANGE(WAIT_EVENT, TOP_OF_PIPE, BEFORE_RASTERIZATION) +} VkWaitEvent; - VK_MAX_ENUM(RESULT) -} VkResult; +typedef enum VkTimestampType_ +{ + VK_TIMESTAMP_TYPE_TOP = 0x00000000, + VK_TIMESTAMP_TYPE_BOTTOM = 0x00000001, -// ------------------------------------------------------------------------------------------------ -// Flags + VK_ENUM_RANGE(TIMESTAMP_TYPE, TOP, BOTTOM) +} VkTimestampType; -// Device creation flags -typedef VkFlags VkDeviceCreateFlags; -typedef enum VkDeviceCreateFlagBits_ +// Format capability flags +typedef VkFlags VkFormatFeatureFlags; +typedef enum VkFormatFeatureFlagBits_ { - VK_DEVICE_CREATE_VALIDATION_BIT = VK_BIT(0), - VK_DEVICE_CREATE_MULTI_DEVICE_IQ_MATCH_BIT = VK_BIT(1), -} VkDeviceCreateFlagBits; + VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = VK_BIT(0), // Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) + VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = VK_BIT(1), // Format can be used for storage images (STORAGE_IMAGE descriptor type) + VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = VK_BIT(2), // Format supports atomic operations in case it's used for storage images + VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = VK_BIT(3), // Format can be used for uniform texel buffers (TBOs) + VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = VK_BIT(4), // Format can be used for storage texel buffers (IBOs) + VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = VK_BIT(5), // Format supports atomic operations in case it's used for storage texel buffers + VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = VK_BIT(6), // Format can be used for vertex buffers (VBOs) + VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = VK_BIT(7), // Format can be used for color attachment images + VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = VK_BIT(8), // Format supports blending in case it's used for color attachment images + VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(9), // Format can be used for depth/stencil attachment images + VK_FORMAT_FEATURE_CONVERSION_BIT = VK_BIT(10), // Format can be used as the source or destination of format converting blits +} VkFormatFeatureFlagBits; // Queue capabilities typedef VkFlags VkQueueFlags; @@ -960,31 +894,61 @@ typedef enum VkMemoryPropertyFlagBits_ VK_MEMORY_PROPERTY_SHAREABLE_BIT = VK_BIT(5), } VkMemoryPropertyFlagBits; -// Memory output flags passed to resource transition commands -typedef VkFlags VkMemoryOutputFlags; -typedef enum VkMemoryOutputFlagBits_ +// Device creation flags +typedef VkFlags VkDeviceCreateFlags; +typedef enum VkDeviceCreateFlagBits_ { - VK_MEMORY_OUTPUT_CPU_WRITE_BIT = VK_BIT(0), // Controls output coherency of CPU writes - VK_MEMORY_OUTPUT_SHADER_WRITE_BIT = VK_BIT(1), // Controls output coherency of generic shader writes - VK_MEMORY_OUTPUT_COLOR_ATTACHMENT_BIT = VK_BIT(2), // Controls output coherency of color attachment writes - VK_MEMORY_OUTPUT_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(3), // Controls output coherency of depth/stencil attachment writes - VK_MEMORY_OUTPUT_TRANSFER_BIT = VK_BIT(4), // Controls output coherency of transfer operations -} VkMemoryOutputFlagBits; + VK_DEVICE_CREATE_VALIDATION_BIT = VK_BIT(0), + VK_DEVICE_CREATE_MULTI_DEVICE_IQ_MATCH_BIT = VK_BIT(1), +} VkDeviceCreateFlagBits; + +// Memory mapping flags +typedef VkFlags VkMemoryMapFlags; + +// Fence creation flags +typedef VkFlags VkFenceCreateFlags; +typedef enum VkFenceCreateFlagBits_ +{ + VK_FENCE_CREATE_SIGNALED_BIT = VK_BIT(0), +} VkFenceCreateFlagBits; + +// Semaphore creation flags +typedef VkFlags VkSemaphoreCreateFlags; +typedef enum VkSemaphoreCreateFlagBits_ +{ + VK_SEMAPHORE_CREATE_SHAREABLE_BIT = VK_BIT(0), +} VkSemaphoreCreateFlagBits; + +// Event creation flags +typedef VkFlags VkEventCreateFlags; + +// Pipeline statistics flags +typedef VkFlags VkQueryPipelineStatisticFlags; +typedef enum VkQueryPipelineStatisticFlagBits_ { + VK_QUERY_PIPELINE_STATISTIC_IA_VERTICES_BIT = VK_BIT(0), // Optional + VK_QUERY_PIPELINE_STATISTIC_IA_PRIMITIVES_BIT = VK_BIT(1), // Optional + VK_QUERY_PIPELINE_STATISTIC_VS_INVOCATIONS_BIT = VK_BIT(2), // Optional + VK_QUERY_PIPELINE_STATISTIC_GS_INVOCATIONS_BIT = VK_BIT(3), // Optional + VK_QUERY_PIPELINE_STATISTIC_GS_PRIMITIVES_BIT = VK_BIT(4), // Optional + VK_QUERY_PIPELINE_STATISTIC_C_INVOCATIONS_BIT = VK_BIT(5), // Optional + VK_QUERY_PIPELINE_STATISTIC_C_PRIMITIVES_BIT = VK_BIT(6), // Optional + VK_QUERY_PIPELINE_STATISTIC_FS_INVOCATIONS_BIT = VK_BIT(7), // Optional + VK_QUERY_PIPELINE_STATISTIC_TCS_PATCHES_BIT = VK_BIT(8), // Optional + VK_QUERY_PIPELINE_STATISTIC_TES_INVOCATIONS_BIT = VK_BIT(9), // Optional + VK_QUERY_PIPELINE_STATISTIC_CS_INVOCATIONS_BIT = VK_BIT(10), // Optional +} VkQueryPipelineStatisticFlagBits; -// Memory input flags passed to resource transition commands -typedef VkFlags VkMemoryInputFlags; -typedef enum VkMemoryInputFlagBits_ +// Query result flags +typedef VkFlags VkQueryResultFlags; +typedef enum VkQueryResultFlagBits_ { - VK_MEMORY_INPUT_CPU_READ_BIT = VK_BIT(0), // Controls input coherency of CPU reads - VK_MEMORY_INPUT_INDIRECT_COMMAND_BIT = VK_BIT(1), // Controls input coherency of indirect command reads - VK_MEMORY_INPUT_INDEX_FETCH_BIT = VK_BIT(2), // Controls input coherency of index fetches - VK_MEMORY_INPUT_VERTEX_ATTRIBUTE_FETCH_BIT = VK_BIT(3), // Controls input coherency of vertex attribute fetches - VK_MEMORY_INPUT_UNIFORM_READ_BIT = VK_BIT(4), // Controls input coherency of uniform buffer reads - VK_MEMORY_INPUT_SHADER_READ_BIT = VK_BIT(5), // Controls input coherency of generic shader reads - VK_MEMORY_INPUT_COLOR_ATTACHMENT_BIT = VK_BIT(6), // Controls input coherency of color attachment reads - VK_MEMORY_INPUT_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(7), // Controls input coherency of depth/stencil attachment reads - VK_MEMORY_INPUT_TRANSFER_BIT = VK_BIT(8), // Controls input coherency of transfer operations -} VkMemoryInputFlagBits; + VK_QUERY_RESULT_32_BIT = 0, // Results of the queries are written to the destination buffer as 32-bit values + VK_QUERY_RESULT_64_BIT = VK_BIT(0), // Results of the queries are written to the destination buffer as 64-bit values + VK_QUERY_RESULT_NO_WAIT_BIT = 0, // Results of the queries aren't waited on before proceeding with the result copy + VK_QUERY_RESULT_WAIT_BIT = VK_BIT(1), // Results of the queries are waited on before proceeding with the result copy + VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = VK_BIT(2), // Besides the results of the query, the availability of the results is also written + VK_QUERY_RESULT_PARTIAL_BIT = VK_BIT(3), // Copy the partial results of the query even if the final results aren't available +} VkQueryResultFlagBits; // Buffer usage flags typedef VkFlags VkBufferUsageFlags; @@ -1010,20 +974,6 @@ typedef enum VkBufferCreateFlagBits_ VK_BUFFER_CREATE_SPARSE_BIT = VK_BIT(1), // Buffer should support sparse backing } VkBufferCreateFlagBits; -// Shader stage flags -typedef VkFlags VkShaderStageFlags; -typedef enum VkShaderStageFlagBits_ -{ - VK_SHADER_STAGE_VERTEX_BIT = VK_BIT(0), - VK_SHADER_STAGE_TESS_CONTROL_BIT = VK_BIT(1), - VK_SHADER_STAGE_TESS_EVALUATION_BIT = VK_BIT(2), - VK_SHADER_STAGE_GEOMETRY_BIT = VK_BIT(3), - VK_SHADER_STAGE_FRAGMENT_BIT = VK_BIT(4), - VK_SHADER_STAGE_COMPUTE_BIT = VK_BIT(5), - - VK_SHADER_STAGE_ALL = 0x7FFFFFFF, -} VkShaderStageFlagBits; - // Image usage flags typedef VkFlags VkImageUsageFlags; typedef enum VkImageUsageFlagBits_ @@ -1058,13 +1008,8 @@ typedef enum VkDepthStencilViewCreateFlagBits_ VK_DEPTH_STENCIL_VIEW_CREATE_READ_ONLY_STENCIL_BIT = VK_BIT(1), } VkDepthStencilViewCreateFlagBits; -// Pipeline creation flags -typedef VkFlags VkPipelineCreateFlags; -typedef enum VkPipelineCreateFlagBits_ -{ - VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = VK_BIT(0), - VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = VK_BIT(1), -} VkPipelineCreateFlagBits; +// Shader creation flags +typedef VkFlags VkShaderCreateFlags; // Channel flags typedef VkFlags VkChannelFlags; @@ -1076,36 +1021,40 @@ typedef enum VkChannelFlagBits_ VK_CHANNEL_A_BIT = VK_BIT(3), } VkChannelFlagBits; -// Fence creation flags -typedef VkFlags VkFenceCreateFlags; -typedef enum VkFenceCreateFlagBits_ +// Pipeline creation flags +typedef VkFlags VkPipelineCreateFlags; +typedef enum VkPipelineCreateFlagBits_ { - VK_FENCE_CREATE_SIGNALED_BIT = VK_BIT(0), -} VkFenceCreateFlagBits; + VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT = VK_BIT(0), + VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT = VK_BIT(1), +} VkPipelineCreateFlagBits; -// Semaphore creation flags -typedef VkFlags VkSemaphoreCreateFlags; -typedef enum VkSemaphoreCreateFlagBits_ +// Shader stage flags +typedef VkFlags VkShaderStageFlags; +typedef enum VkShaderStageFlagBits_ { - VK_SEMAPHORE_CREATE_SHAREABLE_BIT = VK_BIT(0), -} VkSemaphoreCreateFlagBits; + VK_SHADER_STAGE_VERTEX_BIT = VK_BIT(0), + VK_SHADER_STAGE_TESS_CONTROL_BIT = VK_BIT(1), + VK_SHADER_STAGE_TESS_EVALUATION_BIT = VK_BIT(2), + VK_SHADER_STAGE_GEOMETRY_BIT = VK_BIT(3), + VK_SHADER_STAGE_FRAGMENT_BIT = VK_BIT(4), + VK_SHADER_STAGE_COMPUTE_BIT = VK_BIT(5), -// Format capability flags -typedef VkFlags VkFormatFeatureFlags; -typedef enum VkFormatFeatureFlagBits_ + VK_SHADER_STAGE_ALL = 0x7FFFFFFF, +} VkShaderStageFlagBits; + +// Command buffer creation flags +typedef VkFlags VkCmdBufferCreateFlags; + +// Command buffer optimization flags +typedef VkFlags VkCmdBufferOptimizeFlags; +typedef enum VkCmdBufferOptimizeFlagBits_ { - VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT = VK_BIT(0), // Format can be used for sampled images (SAMPLED_IMAGE and COMBINED_IMAGE_SAMPLER descriptor types) - VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT = VK_BIT(1), // Format can be used for storage images (STORAGE_IMAGE descriptor type) - VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT = VK_BIT(2), // Format supports atomic operations in case it's used for storage images - VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT = VK_BIT(3), // Format can be used for uniform texel buffers (TBOs) - VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT = VK_BIT(4), // Format can be used for storage texel buffers (IBOs) - VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = VK_BIT(5), // Format supports atomic operations in case it's used for storage texel buffers - VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT = VK_BIT(6), // Format can be used for vertex buffers (VBOs) - VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT = VK_BIT(7), // Format can be used for color attachment images - VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT = VK_BIT(8), // Format supports blending in case it's used for color attachment images - VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(9), // Format can be used for depth/stencil attachment images - VK_FORMAT_FEATURE_CONVERSION_BIT = VK_BIT(10), // Format can be used as the source or destination of format converting blits -} VkFormatFeatureFlagBits; + VK_CMD_BUFFER_OPTIMIZE_SMALL_BATCH_BIT = VK_BIT(0), + VK_CMD_BUFFER_OPTIMIZE_PIPELINE_SWITCH_BIT = VK_BIT(1), + VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT = VK_BIT(2), + VK_CMD_BUFFER_OPTIMIZE_DESCRIPTOR_SET_SWITCH_BIT = VK_BIT(3), +} VkCmdBufferOptimizeFlagBits; // Query control flags typedef VkFlags VkQueryControlFlags; @@ -1114,17 +1063,101 @@ typedef enum VkQueryControlFlagBits_ VK_QUERY_CONTROL_CONSERVATIVE_BIT = VK_BIT(0), // Allow conservative results to be collected by the query } VkQueryControlFlagBits; -// Query result flags -typedef VkFlags VkQueryResultFlags; -typedef enum VkQueryResultFlagBits_ +// Memory output flags passed to resource transition commands +typedef VkFlags VkMemoryOutputFlags; +typedef enum VkMemoryOutputFlagBits_ { - VK_QUERY_RESULT_32_BIT = 0, // Results of the queries are written to the destination buffer as 32-bit values - VK_QUERY_RESULT_64_BIT = VK_BIT(0), // Results of the queries are written to the destination buffer as 64-bit values - VK_QUERY_RESULT_NO_WAIT_BIT = 0, // Results of the queries aren't waited on before proceeding with the result copy - VK_QUERY_RESULT_WAIT_BIT = VK_BIT(1), // Results of the queries are waited on before proceeding with the result copy - VK_QUERY_RESULT_WITH_AVAILABILITY_BIT = VK_BIT(2), // Besides the results of the query, the availability of the results is also written - VK_QUERY_RESULT_PARTIAL_BIT = VK_BIT(3), // Copy the partial results of the query even if the final results aren't available -} VkQueryResultFlagBits; + VK_MEMORY_OUTPUT_CPU_WRITE_BIT = VK_BIT(0), // Controls output coherency of CPU writes + VK_MEMORY_OUTPUT_SHADER_WRITE_BIT = VK_BIT(1), // Controls output coherency of generic shader writes + VK_MEMORY_OUTPUT_COLOR_ATTACHMENT_BIT = VK_BIT(2), // Controls output coherency of color attachment writes + VK_MEMORY_OUTPUT_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(3), // Controls output coherency of depth/stencil attachment writes + VK_MEMORY_OUTPUT_TRANSFER_BIT = VK_BIT(4), // Controls output coherency of transfer operations +} VkMemoryOutputFlagBits; + +// Memory input flags passed to resource transition commands +typedef VkFlags VkMemoryInputFlags; +typedef enum VkMemoryInputFlagBits_ +{ + VK_MEMORY_INPUT_CPU_READ_BIT = VK_BIT(0), // Controls input coherency of CPU reads + VK_MEMORY_INPUT_INDIRECT_COMMAND_BIT = VK_BIT(1), // Controls input coherency of indirect command reads + VK_MEMORY_INPUT_INDEX_FETCH_BIT = VK_BIT(2), // Controls input coherency of index fetches + VK_MEMORY_INPUT_VERTEX_ATTRIBUTE_FETCH_BIT = VK_BIT(3), // Controls input coherency of vertex attribute fetches + VK_MEMORY_INPUT_UNIFORM_READ_BIT = VK_BIT(4), // Controls input coherency of uniform buffer reads + VK_MEMORY_INPUT_SHADER_READ_BIT = VK_BIT(5), // Controls input coherency of generic shader reads + VK_MEMORY_INPUT_COLOR_ATTACHMENT_BIT = VK_BIT(6), // Controls input coherency of color attachment reads + VK_MEMORY_INPUT_DEPTH_STENCIL_ATTACHMENT_BIT = VK_BIT(7), // Controls input coherency of depth/stencil attachment reads + VK_MEMORY_INPUT_TRANSFER_BIT = VK_BIT(8), // Controls input coherency of transfer operations +} VkMemoryInputFlagBits; + +typedef enum VkProvokingVertex_ +{ + VK_PROVOKING_VERTEX_FIRST = 0x00000000, + VK_PROVOKING_VERTEX_LAST = 0x00000001, + + VK_ENUM_RANGE(PROVOKING_VERTEX, FIRST, LAST) +} VkProvokingVertex; + +typedef enum VkCoordinateOrigin_ +{ + VK_COORDINATE_ORIGIN_UPPER_LEFT = 0x00000000, + VK_COORDINATE_ORIGIN_LOWER_LEFT = 0x00000001, + + VK_ENUM_RANGE(COORDINATE_ORIGIN, UPPER_LEFT, LOWER_LEFT) +} VkCoordinateOrigin; + +typedef enum VkDepthMode_ +{ + VK_DEPTH_MODE_ZERO_TO_ONE = 0x00000000, + VK_DEPTH_MODE_NEGATIVE_ONE_TO_ONE = 0x00000001, + + VK_ENUM_RANGE(DEPTH_MODE, ZERO_TO_ONE, NEGATIVE_ONE_TO_ONE) +} VkDepthMode; + +typedef enum VkPhysicalDeviceInfoType_ +{ + // Info type for vkGetPhysicalDeviceInfo() + VK_PHYSICAL_DEVICE_INFO_TYPE_PROPERTIES = 0x00000000, + VK_PHYSICAL_DEVICE_INFO_TYPE_PERFORMANCE = 0x00000001, + VK_PHYSICAL_DEVICE_INFO_TYPE_QUEUE_PROPERTIES = 0x00000002, + VK_PHYSICAL_DEVICE_INFO_TYPE_MEMORY_PROPERTIES = 0x00000003, + + VK_ENUM_RANGE(PHYSICAL_DEVICE_INFO_TYPE, PROPERTIES, MEMORY_PROPERTIES) +} VkPhysicalDeviceInfoType; + +typedef enum VkExtensionInfoType_ +{ + // Info type for vkGetGlobalExtensionInfo() and vkGetPhysicalDeviceExtensionInfo() + VK_EXTENSION_INFO_TYPE_COUNT = 0x00000000, + VK_EXTENSION_INFO_TYPE_PROPERTIES = 0x00000001, + + VK_ENUM_RANGE(EXTENSION_INFO_TYPE, COUNT, PROPERTIES) +} VkExtensionInfoType; + +typedef enum VkFormatInfoType_ +{ + // Info type for vkGetFormatInfo() + VK_FORMAT_INFO_TYPE_PROPERTIES = 0x00000000, + + VK_ENUM_RANGE(FORMAT_INFO_TYPE, PROPERTIES, PROPERTIES) +} VkFormatInfoType; + +typedef enum VkSubresourceInfoType_ +{ + // Info type for vkGetImageSubresourceInfo() + VK_SUBRESOURCE_INFO_TYPE_LAYOUT = 0x00000000, + + VK_ENUM_RANGE(SUBRESOURCE_INFO_TYPE, LAYOUT, LAYOUT) +} VkSubresourceInfoType; + +typedef enum VkObjectInfoType_ +{ + // Info type for vkGetObjectInfo() + VK_OBJECT_INFO_TYPE_MEMORY_ALLOCATION_COUNT = 0x00000000, + VK_OBJECT_INFO_TYPE_MEMORY_REQUIREMENTS = 0x00000001, + + VK_ENUM_RANGE(OBJECT_INFO_TYPE, MEMORY_ALLOCATION_COUNT, MEMORY_REQUIREMENTS) +} VkObjectInfoType; + // Physical device compatibility flags typedef VkFlags VkPhysicalDeviceCompatibilityFlags; @@ -1139,44 +1172,6 @@ typedef enum VkPhysicalDeviceCompatibilityFlagBits_ VK_PHYSICAL_DEVICE_COMPATIBILITY_SHARED_DEVICE1_DISPLAY_BIT = VK_BIT(6), } VkPhysicalDeviceCompatibilityFlagBits; -// Shader creation flags -typedef VkFlags VkShaderCreateFlags; - -// Event creation flags -typedef VkFlags VkEventCreateFlags; - -// Command buffer creation flags -typedef VkFlags VkCmdBufferCreateFlags; - -// Command buffer optimization flags -typedef VkFlags VkCmdBufferOptimizeFlags; -typedef enum VkCmdBufferOptimizeFlagBits_ -{ - VK_CMD_BUFFER_OPTIMIZE_SMALL_BATCH_BIT = VK_BIT(0), - VK_CMD_BUFFER_OPTIMIZE_PIPELINE_SWITCH_BIT = VK_BIT(1), - VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT = VK_BIT(2), - VK_CMD_BUFFER_OPTIMIZE_DESCRIPTOR_SET_SWITCH_BIT = VK_BIT(3), -} VkCmdBufferOptimizeFlagBits; - -// Pipeline statistics flags -typedef VkFlags VkQueryPipelineStatisticFlags; -typedef enum VkQueryPipelineStatisticFlagBits_ { - VK_QUERY_PIPELINE_STATISTIC_IA_VERTICES_BIT = VK_BIT(0), // Optional - VK_QUERY_PIPELINE_STATISTIC_IA_PRIMITIVES_BIT = VK_BIT(1), // Optional - VK_QUERY_PIPELINE_STATISTIC_VS_INVOCATIONS_BIT = VK_BIT(2), // Optional - VK_QUERY_PIPELINE_STATISTIC_GS_INVOCATIONS_BIT = VK_BIT(3), // Optional - VK_QUERY_PIPELINE_STATISTIC_GS_PRIMITIVES_BIT = VK_BIT(4), // Optional - VK_QUERY_PIPELINE_STATISTIC_C_INVOCATIONS_BIT = VK_BIT(5), // Optional - VK_QUERY_PIPELINE_STATISTIC_C_PRIMITIVES_BIT = VK_BIT(6), // Optional - VK_QUERY_PIPELINE_STATISTIC_FS_INVOCATIONS_BIT = VK_BIT(7), // Optional - VK_QUERY_PIPELINE_STATISTIC_TCS_PATCHES_BIT = VK_BIT(8), // Optional - VK_QUERY_PIPELINE_STATISTIC_TES_INVOCATIONS_BIT = VK_BIT(9), // Optional - VK_QUERY_PIPELINE_STATISTIC_CS_INVOCATIONS_BIT = VK_BIT(10), // Optional -} VkQueryPipelineStatisticFlagBits; - -// Memory mapping flags -typedef VkFlags VkMemoryMapFlags; - // ------------------------------------------------------------------------------------------------ // Vulkan structures -- 2.30.2