Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Vulkan10 Reference Guide

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Page 1 Vulkan 1.

0 Quick Reference
Vulkan is a graphics and compute API consisting of procedures and
functions to specify shader programs, compute kernels, objects,
and operations involved in producing high-quality graphical images,
specifically color images of three-dimensional objects. Vulkan is
also a pipeline with programmable and state-driven fixed-function Color coded names as follows: Function names and Structure names
stages that are invoked by a set of specific drawing operations. [n.n.n] Indicates sections and text in the Vulkan API 1.0 Specification.
Specification and additional resources at P.# Indicates a page in this reference guide for more information.
www.khronos.org/vulkan = 0 Indicates reserved for future use.

Return Codes [2.5.2] Command Function Pointers [3.1]


Return codes are reported via VkResult return values. PFN_vkVoidFunction vkGetInstanceProcAddr( PFN_vkVoidFunction vkGetDeviceProcAddr(
VkInstance instance, VkDevice device,
Success Codes [2.5.2.1] const char *pName);
Success codes are non-negative. const char *pName);
VK_SUCCESS
VK_NOT_READY
VK_TIMEOUT Instances [3.2] typedef struct VkApplicationInfo {
VkStructureType sType;
VK_EVENT_{SET, RESET}
VK_INCOMPLETE
VkResult vkCreateInstance( const void *pNext;
const VkInstanceCreateInfo* pCreateInfo, const char* pApplicationName;
VK_SUBOPTIMAL_KHR const VkAllocationCallbacks *pAllocator, P.10 uint32_t applicationVersion;
Error Codes [2.5.2.2] VkInstance *pInstance); const char* pEngineName;
Error codes are negative. typedef struct VkInstanceCreateInfo { uint32_t engineVersion;
VK_ERROR_OUT_OF_{HOST, DEVICE}_MEMORY VkStructureType sType; uint32_t apiVersion;
const void *pNext; } VkApplicationInfo;
VK_ERROR_{INITIALIZATION, MEMORY_MAP}_FAILED
VK_ERROR_DEVICE_LOST VkInstanceCreateFlags flags; = 0 void vkDestroyInstance(
VK_ERROR_{EXTENSION, FEATURE, LAYER}_NOT_PRESENT const VkApplicationInfo* pApplicationInfo; VkInstance instance,
VK_ERROR_INCOMPATIBLE_DRIVER uint32_t enabledLayerCount; const VkAllocationCallbacks *pAllocator); P.10
VK_ERROR_TOO_MANY_OBJECTS const char* const* ppEnabledLayerNames;
VK_ERROR_FORMAT_NOT_SUPPORTED
uint32_t enabledExtensionCount;
const char* const* ppEnabledExtensionNames;
VK_ERROR_SURFACE_LOST_KHR
VK_ERROR_OUT_OF_DATE_KHR
} VkInstanceCreateInfo; Command Buffers [5]
VK_ERROR_INCOMPATIBLE_DISPLAY_KHR Command Pools [5.1]
VK_ERROR_NATIVE_WINDOW_IN_USE_KHR VkResult vkCreateCommandPool(
VkDevice device,
VK_ERROR_VALIDATION_FAILED_EXT Devices const VkCommandPoolCreateInfo* pCreateInfo,
Device Creation [4.2.1] const VkAllocationCallbacks* pAllocator, P.10
VkResult vkCreateDevice( VkCommandPool* pCommandPool);
Physical Devices [4.1] VkPhysicalDevice physicalDevice, typedef struct VkCommandPoolCreateInfo {
VkResult vkEnumeratePhysicalDevices( const VkDeviceCreateInfo* pCreateInfo, VkStructureType sType;
VkInstance instance, const VkAllocationCallbacks* pAllocator, P.10 const void* pNext;
uint32_t* pPhysicalDeviceCount, VkDevice* pDevice);
VkCommandPoolCreateFlags flags;
VkPhysicalDevice* pPhysicalDevices); typedef struct VkDeviceCreateInfo { uint32_t queueFamilyIndex;
void vkGetPhysicalDeviceProperties( VkStructureType sType; } VkCommandPoolCreateInfo;
VkPhysicalDevice physicalDevice, const void* pNext; flags: VK_COMMAND_POOL_CREATE_X_BIT where X is
VkPhysicalDeviceProperties* pProperties); VkDeviceCreateFlags flags; = 0 RESET_COMMAND_BUFFER, TRANSIENT
uint32_t queueCreateInfoCount;
typedef struct VkPhysicalDeviceProperties { const VkDeviceQueueCreateInfo* pQueueCreateInfos; VkResult vkResetCommandPool(
uint32_t apiVersion; uint32_t enabledLayerCount; VkDevice device,
uint32_t driverVersion; const char* const* ppEnabledLayerNames; VkCommandPool commandPool,
uint32_t vendorID; uint32_t enabledExtensionCount; VkCommandPoolResetFlags flags);
uint32_t deviceID; const char* const* ppEnabledExtensionNames; flags:
VkPhysicalDeviceType deviceType; const VkPhysicalDeviceFeatures* pEnabledFeatures; P.11 VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT
char deviceName[ } VkDeviceCreateInfo;
VK_MAX_PHYSICAL_DEVICE_NAME_SIZE]; void vkDestroyCommandPool(
uint8_t pipelineCacheUUID[VK_UUID_SIZE]; typedef struct VkDeviceQueueCreateInfo { VkDevice device,
VkPhysicalDeviceLimits limits; P.12 VkStructureType sType; VkCommandPool commandPool,
VkPhysicalDeviceSparseProperties sparseProperties; const void* pNext; const VkAllocationCallbacks* pAllocator); P.10
} VkPhysicalDeviceProperties; VkDeviceQueueCreateFlags flags; = 0
uint32_t queueFamilyIndex; Command Buffer Lifetime [5.2]
deviceType: uint32_t queueCount; VkResult vkAllocateCommandBuffers(
VK_PHYSICAL_DEVICE_TYPE_X where X is const float* pQueuePriorities; VkDevice device,
OTHER, INTEGRATED_GPU, DISCRETE_GPU, } VkDeviceQueueCreateInfo; const VkCommandBufferAllocateInfo* pAllocateInfo,
VIRTUAL_GPU, CPU VkCommandBuffer* pCommandBuffers);
typedef struct VkPhysicalDeviceSparseProperties { Device Idle [4.2.3] typedef struct VkCommandBufferAllocateInfo{
VkBool32 residencyStandard2DBlockShape; VkResult vkDeviceWaitIdle( VkStructureType sType;
VkBool32 VkDevice device); const void* pNext;
residencyStandard2DMultisampleBlockShape; Device Destruction [4.2.5] VkCommandPool commandPool;
VkBool32 residencyStandard3DBlockShape; void vkDestroyDevice( VkCommandBufferLevel level;
VkBool32 residencyAlignedMipSize; VkDevice device, uint32_t commandBufferCount;
VkBool32 residencyNonResidentStrict; const VkAllocationCallbacks* pAllocator); P.10 } VkCommandBufferAllocateInfo;
} VkPhysicalDeviceSparseProperties; level:
void vkGetPhysicalDeviceQueueFamilyProperties( VK_COMMAND_BUFFER_LEVEL_{PRIMARY, SECONDARY}
VkPhysicalDevice physicalDevice, VkResult vkResetCommandBuffer(
uint32_t* pQueueFamilyPropertyCount, VkCommandBuffer commandBuffer,
VkQueueFamilyProperties*
pQueueFamilyProperties); Queues [4.3] VkCommandBufferResetFlags flags);
flags:
typedef struct VkQueueFamilyProperties {
Queue Creation [4.3.2] VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT
VkQueueFlags queueFlags; void vkGetDeviceQueue(
VkDevice device, void vkFreeCommandBuffers(
uint32_t queueCount; uint32_t queueFamilyIndex,
uint32_t timestampValidBits; VkDevice device,
uint32_t queueIndex, VkCommandPool commandPool,
VkExtent3D minImageTransferGranularity; P.10 VkQueue* pQueue);
} VkQueueFamilyProperties; uint32_t commandBufferCount,
const VkCommandBuffer* pCommandBuffers);
queueFlags: Queue Synchronization [4.3.5]
VK_QUEUE_X_BIT where X is VkResult vkQueueWaitIdle(
GRAPHICS, COMPUTE, TRANSFER, SPARSE_BINDING VkQueue queue);
Continued on next page >
2016 Khronos Group - Rev. 1216 www.khronos.org/vulkan
Page 2 Vulkan 1.0 Quick Reference
Command Buffers (continued) Secondary Command Buffer Execution [5.6] Update and modify the currently bound framebuffer
void vkCmdExecuteCommands( (Inside the render pass.)
Command Buffer Recording [5.3] VkCommandBuffer commandBuffer,
VkResult vkBeginCommandBuffer( uint32_t commandBufferCount, vkCmdClearAttachments
VkCommandBuffer commandBuffer, const VkCommandBuffer* pCommandBuffers);
const VkCommandBufferBeginInfo* pBeginInfo); Synchronization
Commands Allowed Inside Command Buffers ([O] outside only, or [B] both inside and outside the render pass.)
typedef struct VkCommandBufferBeginInfo{ The following table shows functions which record commands
VkStructureType sType; vkCmdSetEvent [O] vkCmdWaitEvents [B]
in command buffers. They are on the primary and secondary
const void* pNext; command buffer level, except for the Render pass and Execute vkCmdResetEvent [O] vkCmdPipelineBarrier [B]
VkCommandBufferUsageFlags flags; commands, which are only on the primary.
const VkCommandBufferInheritanceInfo* pInheritanceInfo; Queries
} VkCommandBufferBeginInfo; Set state in the command buffer ([O] outside only, or [B] both inside and outside the render pass.)
flags: VK_COMMAND_BUFFER_USAGE_X _BIT where X is (Both inside and outside the render pass.) vkCmdBeginQuery [B] vkCmdCopyQueryPoolResults [O]
ONE_TIME_SUBMIT, RENDER_PASS_CONTINUE, vkCmdBindPipeline vkCmdBindDescriptorSets vkCmdEndQuery [B] vkCmdWriteTimestamp [B]
SIMULTANEOUS_USE vkCmdBindVertexBuffers vkCmdBindIndexBuffer vkCmdResetQueryPool [O]
typedef struct VkCommandBufferInheritanceInfo {
VkStructureType sType; Dynamic state functions Push constants
const void* pNext; (Both inside and outside the render pass.) (Both inside and outside the render pass.)
VkRenderPass renderPass; vkCmdSetViewport vkCmdSetStencilCompareMask
uint32_t subpass; vkCmdPushConstants
VkFramebuffer framebuffer; vkCmdSetScissor vkCmdSetStencilWriteMask
VkBool32 occlusionQueryEnable; vkCmdSetDepthBounds vkCmdSetStencilReference Render passes (Primary command buffer level)
VkQueryControlFlags queryFlags; ([I] inside or [O] outside the render pass.)
vkCmdSetLineWidth vkCmdSetBlendConstants
VkQueryPipelineStatisticFlags pipelineStatistics; P.12 vkCmdBeginRenderPass [O] vkCmdEndRenderPass [I]
} VkCommandBufferInheritanceInfo; vkCmdSetDepthBias
vkCmdNextSubpass [I]
queryFlags: VK_QUERY_CONTROL_PRECISE_BIT Cause the device to perform processing
(Inside the render pass.) Execute commands (Primary command buffer level)
VkResult vkEndCommandBuffer( (Both inside and outside the render pass.)
VkCommandBuffer commandBuffer); vkCmdDraw vkCmdDrawIndirect
vkCmdExecuteCommands
Command Buffer Submission [5.4] vkCmdDrawIndexed vkCmdDrawIndexedIndirect
VkResult vkQueueSubmit(
VkQueue queue, Dispatch compute
uint32_t submitCount, (Outside the render pass.) void vkCmdWaitEvents(
const VkSubmitInfo* pSubmits, VkCommandBuffer commandBuffer,
vkCmdDispatch vkCmdDispatchIndirect uint32_t eventCount,
VkFence fence);
const VkEvent* pEvents,
typedef struct VkSubmitInfo{ Update and modify images and buffers
(Outside the render pass.)
VkPipelineStageFlags srcStageMask, P.12
VkStructureType sType; VkPipelineStageFlags dstStageMask, P.12
const void* pNext; vkCmdCopyBuffer vkCmdUpdateBuffer uint32_t memoryBarrierCount,
uint32_t waitSemaphoreCount; vkCmdCopyImage vkCmdFillBuffer const VkMemoryBarrier* pMemoryBarriers,
const VkSemaphore* pWaitSemaphores; uint32_t bufferMemoryBarrierCount,
const VkPipelineStageFlags* pWaitDstStageMask; P.12 vkCmdBlitImage vkCmdClearColorImage const VkBufferMemoryBarrier* pBufferMemoryBarriers,
uint32_t commandBufferCount; vkCmdCopyBufferToImage vkCmdClearDepthStencilImage uint32_t imageMemoryBarrierCount,
const VkCommandBuffer* pCommandBuffers; const VkImageMemoryBarrier* pImageMemoryBarriers);
uint32_t signalSemaphoreCount; vkCmdCopyImageToBuffer vkCmdResolveImage
**ppMemoryBarriers: See VkMemoryBarrier,
const VkSemaphore* pSignalSemaphores; VkBufferMemoryBarrier, or VkImageMemoryBarrier
} VkSubmitInfo; P.11

Pipeline Barriers [6.5]


Synchronizes an earlier set of commands against a later set of
Synchronization and Cache Control [6] typedef struct VkSemaphoreCreateInfo {
VkStructureType sType; commands.
Fences [6.1] const void* pNext; void vkCmdPipelineBarrier(
Fence status is always either signaled or unsignaled. VkSemaphoreCreateFlags flags; = 0 VkCommandBuffer commandBuffer,
} VkSemaphoreCreateInfo; VkPipelineStageFlags srcStageMask, P.12
VkResult vkCreateFence(
VkDevice device, void vkDestroySemaphore( VkPipelineStageFlags dstStageMask, P.12
const VkFenceCreateInfo* pCreateInfo, VkDevice device, VkDependencyFlags dependencyFlags,
const VkAllocationCallbacks* pAllocator, P.10 VkSemaphore semaphore, uint32_t memoryBarrierCount,
VkFence* pFence); const VkAllocationCallbacks* pAllocator); P.10 const VkMemoryBarrier* pMemoryBarriers,
uint32_t bufferMemoryBarrierCount,
typedef struct VkFenceCreateInfo { Events [6.3] const VkBufferMemoryBarrier* pBufferMemoryBarriers,
VkStructureType sType; Events represent a fine-grained synchronization primitive uint32_t imageMemoryBarrierCount,
const void* pNext; that can be used to gauge progress through a sequence of const VkImageMemoryBarrier* pImageMemoryBarriers);
VkFenceCreateFlags flags; commands executed on a queue. dependencyFlags: VK_DEPENDENCY_BY_REGION_BIT
} VkFenceCreateInfo; **ppMemoryBarriers: See VkMemoryBarrier,
VkResult vkCreateEvent(
flags: VK_FENCE_CREATE_SIGNALED_BIT VkDevice device, VkBufferMemoryBarrier, or VkImageMemoryBarrier P.11
void vkDestroyFence( const VkEventCreateInfo* pCreateInfo,
VkDevice device, const VkAllocationCallbacks* pAllocator, P.10
VkFence fence, VkEvent* pEvent); Render Pass [7]
const VkAllocationCallbacks* pAllocator); P.10 typedef struct VkEventCreateInfo { A render pass represents a collection of attachments,
VkStructureType sType; subpasses, and dependencies between the subpasses, and
VkResult vkGetFenceStatus( describes how the attachments are used over the course of
VkDevice device, const void* pNext;
VkEventCreateFlags flags; = 0 the subpasses.
VkFence fence);
} VkEventCreateInfo; Render Pass Creation [7.1]
VkResult vkResetFences(
VkDevice device, void vkDestroyEvent( VkResult vkCreateRenderPass(
uint32_t fenceCount, VkDevice device, VkDevice device,
VkEvent event, const VkRenderPassCreateInfo* pCreateInfo,
const VkFence* pFences); const VkAllocationCallbacks* pAllocator, P.10
const VkAllocationCallbacks* pAllocator); P.10
VkResult vkWaitForFences( VkRenderPass* pRenderPass);
VkDevice device, VkResult vkGetEventStatus(
VkDevice device, typedef struct VkRenderPassCreateInfo {
uint32_t fenceCount, VkStructureType sType;
const VkFence* pFences, VkEvent event);
const void* pNext;
VkBool32 waitAll, VkResult vk[Set, Reset]Event( VkRenderPassCreateFlags flags; = 0
uint64_t timeout); VkDevice device, uint32_t attachmentCount;
Semaphores [6.2] VkEvent event); const VkAttachmentDescription* pAttachments;
Semaphore status is always either signaled or unsignaled. VkResult vkCmd[Set, Reset]Event( uint32_t subpassCount;
VkCommandBuffer commandBuffer, const VkSubpassDescription* pSubpasses;
VkResult vkCreateSemaphore( VkEvent event, uint32_t dependencyCount;
VkDevice device, VkPipelineStageFlags stageMask); P.12 const VkSubpassDependency* pDependencies;
const VkSemaphoreCreateInfo* pCreateInfo, } VkRenderPassCreateInfo;
const VkAllocationCallbacks* pAllocator, P.10
VkSemaphore* pSemaphore); Continued on next page >
2016 Khronos Group - Rev. 1216 www.khronos.org/vulkan
Page 3 Vulkan 1.0 Quick Reference
Render Pass (continued) Framebuffers [7.3] Shaders [8]
VkResult vkCreateFramebuffer(
typedef struct VkAttachmentDescription { VkDevice device, Shader Modules [8.1]
VkAttachmentDescriptionFlags flags; const VkFramebufferCreateInfo* pCreateInfo, VkResult vkCreateShaderModule(
VkFormat format; P.11 const VkAllocationCallbacks* pAllocator, P.10 VkDevice device,
VkSampleCountFlagBits samples; P.12 VkFramebuffer* pFramebuffer); const VkShaderModuleCreateInfo* pCreateInfo,
VkAttachmentLoadOp loadOp; const VkAllocationCallbacks* pAllocator, P.10
VkAttachmentStoreOp storeOp; typedef struct VkFramebufferCreateInfo { VkShaderModule* pShaderModule);
VkAttachmentLoadOp stencilLoadOp; VkStructureType sType;
VkAttachmentStoreOp stencilStoreOp; const void* pNext; typedef struct VkShaderModuleCreateInfo {
VkImageLayout initialLayout; P.11 VkFramebufferCreateFlags flags; = 0 VkStructureType sType;
VkImageLayout finalLayout; P.11 VkRenderPass renderPass; const void* pNext;
} VkAttachmentDescription; uint32_t attachmentCount; VkShaderModuleCreateFlags flags; = 0
const VkImageView* pAttachments; size_t codeSize;
loadOp, stencilLoadOp: VK_ATTACHMENT_LOAD_OP_X uint32_t width; const uint32_t* pCode;
where X is LOAD, CLEAR, DONT_CARE uint32_t height; } VkShaderModuleCreateInfo;
storeOp, stencilStoreOp: VK_ATTACHMENT_STORE_OP_X uint32_t layers;
where X is STORE, DONT_CARE } VkFramebufferCreateInfo; void vkDestroyShaderModule(
VkDevice device,
flags: VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT void vkDestroyFramebuffer( VkShaderModule shaderModule,
typedef struct VkSubpassDescription { VkDevice device, const VkAllocationCallbacks* pAllocator); P.10
VkSubpassDescriptionFlags flags; = 0 VkFramebuffer framebuffer,
VkPipelineBindPoint pipelineBindPoint; const VkAllocationCallbacks* pAllocator); P.10 Built-in Variables [14.6]
uint32_t inputAttachmentCount; The built-in variables listed below are accessed in shaders by
Render Pass Commands [7.4] declaring the variable using a BuiltIn decoration.
const VkAttachmentReference* pInputAttachments; void vkCmdBeginRenderPass(
uint32_t colorAttachmentCount; Decoration Type
VkCommandBuffer commandBuffer,
const VkAttachmentReference* pColorAttachments; const VkRenderPassBeginInfo* pRenderPassBegin, ClipDistance Array of 32-bit float values
const VkAttachmentReference* VkSubpassContents contents); CullDistance Array of 32-bit float values
pResolveAttachments; contents: VK_SUBPASS_CONTENTS_X where X is INLINE,
const VkAttachmentReference* FragCoord Four-component vector of 32-bit float
SECONDARY_COMMAND_BUFFERS values
pDepthStencilAttachment;
uint32_t preserveAttachmentCount; typedef struct VkRenderPassBeginInfo { FragDepth Scalar 32-bit float value
const uint32_t* pPreserveAttachments; VkStructureType sType; FrontFacing Scalar 32-bit integer
} VkSubpassDescription; const void* pNext; GlobalInvocationID Three-component vector of 32-bit ints
pipelineBindPoint: VK_PIPELINE_BIND_POINT_GRAPHICS VkRenderPass renderPass;
VkFramebuffer framebuffer; HelperInvocation Scalar 32-bit integer
typedef struct VkAttachmentReference { VkRect2D renderArea; P.12 InvocationID Scalar 32-bit integer
uint32_t attachment; uint32_t clearValueCount; InstanceIndex Scalar 32-bit integer
VkImageLayout layout; P.11 const VkClearValue* pClearValues; P.10
} VkAttachmentReference; Layer Scalar 32-bit integer
} VkRenderPassBeginInfo;
LocalInvocationID Three-component vector of 32-bit ints
typedef struct VkSubpassDependency { void vkGetRenderAreaGranularity( NumWorkGroups Three-component vector of 32-bit ints
uint32_t srcSubpass; VkDevice device,
uint32_t dstSubpass; VkRenderPass renderPass, PatchVertices Scalar 32-bit integer
VkPipelineStageFlags srcStageMask; P.10 VkExtent2D* pGranularity); P.10 PointCoord Two-component vector of 32-bit float
VkPipelineStageFlags dstStageMask; P.10 values
VkAccessFlags srcAccessMask; P.10 void vkCmdNextSubpass( PointSize Scalar 32-bit float value
VkAccessFlags dstAccessMask; P.10 VkCommandBuffer commandBuffer,
VkSubpassContents contents); Position Four-component vector of 32-bit float
VkDependencyFlags dependencyFlags; values
} VkSubpassDependency; contents: VK_SUBPASS_CONTENTS_X where X is
INLINE, SECONDARY_COMMAND_BUFFERS PrimitiveID Scalar 32-bit integer
void vkDestroyRenderPass( SampleID Scalar 32-bit integer
VkDevice device, void vkCmdEndRenderPass(
VkRenderPass renderPass, VkCommandBuffer commandBuffer); SampleMask Array of 32-bit integers
const VkAllocationCallbacks* pAllocator); P.10 SamplePosition Two-component vector of float values
TessellationCoord Three-component vector of 32-bit float
values
TessellationLevelOuter Array of size two, containing 32-bit float
Pipelines [9] In VkGraphicsPipelineCreateInfo below, replace X with
VkPipeline and replace Y with StateCreateInfo. values
Processing pipelines are either compute or graphics pipelines. TessellationLevelInner Array of size four, containing 32-bit float
typedef struct VkGraphicsPipelineCreateInfo { values
Compute Pipelines [9.1] VkStructureType sType;
Compute pipelines consist of a single static compute shader const void* pNext; VertexIndex 32-bit integer
stage and the pipeline layout. VkPipelineCreateFlags flags; ViewportIndex 32-bit integer
VkResult vkCreateComputePipelines( uint32_t stageCount; WorkgroupID Three-component vector of 32-bit ints
VkDevice device, const VkPipelineShaderStageCreateInfo* pStages; P.12
VkPipelineCache pipelineCache, const XVertexInputY* pVertexInputState;
uint32_t createInfoCount, const XInputAssemblyY* pInputAssemblyState;
const XTessellationY* pTessellationState; typedef struct VkVertexInputBindingDescription {
const VkComputePipelineCreateInfo* pCreateInfos, uint32_t binding;
const VkAllocationCallbacks* pAllocator, P.10 const XViewportY* pViewportState;
const XRasterizationY* pRasterizationState; uint32_t stride;
VkPipeline* pPipelines); VkVertexInputRate inputRate;
const XMultisampleY* pMultisampleState;
typedef struct VkComputePipelineCreateInfo { const XDepthStencilY* pDepthStencilState; } VkVertexInputBindingDescription;
VkStructureType sType; const XColorBlendY* pColorBlendState; inputRate:
const void* pNext; const XDynamicY* pDynamicState; VK_VERTEX_INPUT_RATE_{VERTEX, INSTANCE}
VkPipelineCreateFlags flags; VkPipelineLayout layout;
VkPipelineShaderStageCreateInfo stage; P.12 VkRenderPass renderPass; typedef struct VkVertexInputAttributeDescription {
VkPipelineLayout layout; uint32_t subpass; uint32_t location;
VkPipeline basePipelineHandle; VkPipeline basePipelineHandle; uint32_t binding;
int32_t basePipelineIndex; int32_t basePipelineIndex; VkFormat format; P.11
} VkComputePipelineCreateInfo; } VkGraphicsPipelineCreateInfo; uint32_t offset;
flags: Combination of VK_PIPELINE_CREATE_X_BIT } VkVertexInputAttributeDescription;
flags: VK_PIPELINE_CREATE_Z_BIT where Z is
where X is DISABLE_OPTIMIZATION, DISABLE_OPTIMIZATION, ALLOW_DERIVATIVES, typedef struct VkPipelineInputAssemblyStateCreateInfo {
ALLOW_DERIVATIVES, DERIVATIVE DERIVATIVE VkStructureType sType;
Graphics Pipelines [9.2] const void* pNext;
typedef struct VkPipelineVertexInputStateCreateInfo { VkPipelineInputAssemblyStateCreateFlags flags; = 0
VkResult vkCreateGraphicsPipelines( VkStructureType sType; VkPrimitiveTopology topology;
VkDevice device, const void* pNext;
VkPipelineCache pipelineCache, VkBool32 primitiveRestartEnable;
VkPipelineVertexInputStateCreateFlags flags; = 0 } VkPipelineInputAssemblyStateCreateInfo;
uint32_t createInfoCount, uint32_t vertexBindingDescriptionCount;
const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkVertexInputBindingDescription* topology: VK_PRIMITIVE_TOPOLOGY_X where X is
const VkAllocationCallbacks* pAllocator, P.10 POINT_LIST, LINE_LIST, LINE_STRIP, TRIANGLE_LIST,
pVertexBindingDescriptions; TRIANGLE_STRIP, TRIANGLE_FAN,
VkPipeline* pPipelines); uint32_t vertexAttributeDescriptionCount; LINE_{LIST, STRIP}_WITH_ADJACENCY,
const VkVertexInputAttributeDescription* TRIANGLE_{LIST, STRIP}_WITH_ADJACENCY, PATCH_LIST
pVertexAttributeDescriptions;
} VkPipelineVertexInputStateCreateInfo;
Continued on next page >
2016 Khronos Group - Rev. 1216 www.khronos.org/vulkan
Page 4 Vulkan 1.0 Quick Reference
Pipelines (continued) blendOp: VK_BLEND_OP_X where X is ADD, SUBTRACT,
REVERSE_SUBTRACT, MIN, MAX
Memory Allocation [10]
typedef struct VkPipelineTessellationStateCreateInfo { colorWriteMask: VK_COLOR_COMPONENT_X where X is Device Memory [10.2]
VkStructureType sType; R_BIT, G_BIT, B_BIT, A_BIT Device memory is memory that is visible to the device.
const void* pNext;
VkPipelineTessellationStateCreateFlags flags; = 0 typedef struct VkPipelineColorBlendAttachmentState { void vkGetPhysicalDeviceMemoryProperties(
uint32_t patchControlPoints; VkBool32 blendEnable; VkPhysicalDevice physicalDevice,
} VkPipelineTessellationStateCreateInfo; VkBlendFactor srcColorBlendFactor; VkPhysicalDeviceMemoryProperties*
VkBlendFactor dstColorBlendFactor; pMemoryProperties);
typedef struct VkPipelineViewportStateCreateInfo { VkBlendOp colorBlendOp;
VkStructureType sType; typedef struct VkPhysicalDeviceMemoryProperties {
VkBlendFactor srcAlphaBlendFactor; uint32_t memoryTypeCount;
const void* pNext; VkBlendFactor dstAlphaBlendFactor;
VkPipelineViewportStateCreateFlags flags; = 0 VkMemoryType memoryTypes[
VkBlendOp alphaBlendOp; VK_MAX_MEMORY_TYPES];
uint32_t viewportCount; VkColorComponentFlags colorWriteMask;
const VkViewport* pViewports; P.11 uint32_t memoryHeapCount;
} VkPipelineColorBlendAttachmentState; VkMemoryHeap memoryHeaps[
uint32_t scissorCount;
const VkRect2D* pScissors; P.12 enum VkBlendFactor: VK_MAX_MEMORY_HEAPS];
} VkPipelineViewportStateCreateInfo; VK_BLEND_FACTOR_X where X is ZERO, ONE, } VkPhysicalDeviceMemoryProperties;
[ONE_MINUS_]SRC_COLOR, [ONE_MINUS_]DST_COLOR,
typedef struct VkPipelineRasterizationStateCreateInfo { [ONE_MINUS_]SRC_ALPHA, [ONE_MINUS_]DST_ALPHA, typedef struct VkMemoryType {
VkStructureType sType; [ONE_MINUS_]CONSTANT_COLOR, VkMemoryPropertyFlags propertyFlags;
const void* pNext; [ONE_MINUS_]CONSTANT_ALPHA, uint32_t heapIndex;
VkPipelineRasterizationStateCreateFlags flags; = 0 SRC_ALPHA_SATURATE, } VkMemoryType;
VkBool32 depthClampEnable; [ONE_MINUS_]SRC1_COLOR, propertyFlags: VK_MEMORY_PROPERTY_X_BIT where X
VkBool32 rasterizerDiscardEnable; [ONE_MINUS_]SRC1_ALPHA is DEVICE_LOCAL, HOST_VISIBLE, HOST_COHERENT,
VkPolygonMode polygonMode; colorWriteMask: HOST_CACHED, LAZILY_ALLOCATED
VkCullModeFlags cullMode; VK_COLOR_COMPONENT_X_BIT where X is R, G, B, A
VkFrontFace frontFace; typedef struct VkMemoryHeap {
VkBool32 depthBiasEnable; typedef struct VkPipelineDynamicStateCreateInfo { VkDeviceSize size;
float depthBiasConstantFactor; VkStructureType sType; VkMemoryHeapFlags flags;
float depthBiasClamp; const void* pNext; } VkMemoryHeap;
float depthBiasSlopeFactor; VkPipelineDynamicStateCreateFlags flags; = 0 flags: VK_MEMORY_HEAP_DEVICE_LOCAL_BIT
float lineWidth; uint32_t dynamicStateCount;
} VkPipelineRasterizationStateCreateInfo; const VkDynamicState* pDynamicStates; VkResult vkAllocateMemory(
} VkPipelineDynamicStateCreateInfo; VkDevice device,
polygonMode: VK_POLYGON_MODE_{FILL, LINE, POINT} const VkMemoryAllocateInfo* pAllocateInfo,
cullMode: VK_CULL_MODE_X where X is NONE, FRONT_BIT, pDynamicStates: Array of VK_DYNAMIC_STATE_X const VkAllocationCallbacks* pAllocator, P.10
BACK_BIT, FRONT_AND_BACK where X is VIEWPORT, SCISSOR, VkDeviceMemory* pMemory);
LINE_WIDTH, DEPTH_BIAS, BLEND_CONSTANTS,
frontFace: VK_FRONT_FACE_[COUNTER_]CLOCKWISE DEPTH_BOUNDS, STENCIL_REFERENCE, typedef struct VkMemoryAllocateInfo {
typedef struct VkPipelineMultisampleStateCreateInfo { STENCIL_COMPARE_MASK, STENCIL_WRITE_MASK VkStructureType sType;
VkStructureType sType; const void* pNext;
const void* pNext; Pipeline Destruction [9.3] VkDeviceSize* allocationSize;
VkPipelineMultisampleStateCreateFlags flags; = 0 void vkDestroyPipeline( uint32_t memoryTypeIndex;
VkSampleCountFlagBits rasterizationSamples; P.12 VkDevice device, } VkMemoryAllocateInfo;
VkPipeline pipeline,
VkBool32 sampleShadingEnable; const VkAllocationCallbacks* pAllocator); P.10 void vkFreeMemory(
float minSampleShading; VkDevice device,
const VkSampleMask* pSampleMask; Pipeline Cache [9.6] VkDeviceMemory memory,
VkBool32 alphaToCoverageEnable; Pipeline cache objects allow the result of pipeline construction const VkAllocationCallbacks* pAllocator); P.10
VkBool32 alphaToOneEnable; to be reused between pipelines and between runs of an
} VkPipelineMultisampleStateCreateInfo; application. Host Access to Device Memory Objects [10.2.1]
Memory objects created with vkAllocateMemory are not
typedef struct VkPipelineDepthStencilStateCreateInfo { VkResult vkCreatePipelineCache( directly host accessible. Memory objects created with memory
VkStructureType sType; VkDevice device, property VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT are
const void* pNext; const VkPipelineCacheCreateInfo* pCreateInfo, considered mappable. Memory objects must be mappable in
VkPipelineDepthStencilStateCreateFlags flags; = 0 const VkAllocationCallbacks* pAllocator, P.10 order to be successfully mapped on the host.
VkBool32 depthTestEnable; VkPipelineCache* pPipelineCache);
VkBool32 depthWriteEnable; VkResult vkMapMemory(
VkCompareOp depthCompareOp; P.11 typedef struct VkPipelineCacheCreateInfo { VkDevice device,
VkBool32 depthBoundsTestEnable; VkStructureType sType; VkDeviceMemory memory,
VkBool32 stencilTestEnable; const void* pNext; VkDeviceSize offset,
VkStencilOpState front; VkPipelineCacheCreateFlags flags; = 0 VkDeviceSize size,
VkStencilOpState back; size_t initialDataSize; VkMemoryMapFlags flags, = 0
float minDepthBounds; const void* pInitialData; void** ppData);
float maxDepthBounds; } VkPipelineCacheCreateInfo;
VkResult vkFlushMappedMemoryRanges(
} VkPipelineDepthStencilStateCreateInfo; VkResult vkMergePipelineCaches( VkDevice device,
typedef struct VkStencilOpState { VkDevice device, uint32_t memoryRangeCount,
VkStencilOp failOp; VkPipelineCache dstCache, const VkMappedMemoryRange* pMemoryRanges);
VkStencilOp passOp; uint32_t srcCacheCount,
const VkPipelineCache* pSrcCaches); VkResult vkInvalidateMappedMemoryRanges(
VkStencilOp depthFailOp; VkDevice device,
VkCompareOp compareOp; P.11 VkResult vkGetPipelineCacheData( uint32_t memoryRangeCount,
uint32_t compareMask; VkDevice device, const VkMappedMemoryRange* pMemoryRanges);
uint32_t writeMask; VkPipelineCache pipelineCache,
uint32_t reference; size_t* pDataSize, typedef struct VkMappedMemoryRange {
} VkStencilOpState; void* pData); VkStructureType sType;
enum VkStencilOp: VK_STENCIL_OP_X where X is KEEP, const void* pNext;
ZERO, REPLACE, INCREMENT_AND_{CLAMP, WRAP}, void vkDestroyPipelineCache( VkDeviceMemory memory;
INVERT, DECREMENT_AND_{CLAMP, WRAP} VkDevice device, VkDeviceSize offset;
VkPipelineCache pipelineCache, VkDeviceSize size;
typedef struct VkPipelineColorBlendStateCreateInfo { const VkAllocationCallbacks* pAllocator); P.10 } VkMappedMemoryRange;
VkStructureType sType;
const void* pNext; Pipeline Binding [9.8] void vkUnmapMemory(
VkPipelineColorBlendStateCreateFlags flags; = 0 void vkCmdBindPipeline( VkDevice device,
VkBool32 logicOpEnable; VkCommandBuffer commandBuffer, VkDeviceMemory memory);
VkLogicOp logicOp; VkPipelineBindPoint pipelineBindPoint,
VkPipeline pipeline); Lazily Allocated Memory [10.2.2]
uint32_t attachmentCount; If the memory object is allocated from a heap with the
const VkPipelineColorBlendAttachmentState* pipelineBindPoint: VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set,
pAttachments; VK_PIPELINE_BIND_POINT_[GRAPHICS, COMPUTE] that objects backing memory may be provided by the
float blendConstants[4]; implementation lazily.
} VkPipelineColorBlendStateCreateInfo;
logicOp: VK_LOGIC_OP_X where X is CLEAR, AND, void vkGetDeviceMemoryCommitment(
AND_REVERSE, COPY, AND_INVERTED, NO_OP, XOR, OR, VkDevice device,
NOR, EQUIVALENT, INVERT, OR_REVERSE, VkDeviceMemory memory,
COPY_INVERTED, OR_INVERTED, NAND, SET VkDeviceSize* pCommittedMemoryInBytes);

2016 Khronos Group - Rev. 1216 www.khronos.org/vulkan


Page 5 Vulkan 1.0 Quick Reference
Vulkan Pipeline Diagram [9]

Some Vulkan commands specify geometric


objects to be drawn or computational work to be
performed, while others specify state controlling
how objects are handled by the various pipeline
stages, or control data transfer between memory
organized as images and buffers. Commands are
effectively sent through a processing pipeline,
either a graphics pipeline or a compute pipeline.
The heavy black arrows in this illustration show
the Vulkan graphics and compute pipelines and
indicate data flow
Fixed function stage
Programmable stage
Buffer
Image
Constants

Resource Creation [11] Buffer Views [11.2] typedef struct VkImageCreateInfo {


VkStructureType sType;
A buffer view represents a contiguous range of a buffer and a
Buffers [11.1] specific format to be used to interpret the data. const void* pNext;
Buffers represent linear arrays of data which are used for various VkImageCreateFlags flags; P.11
purposes by binding them to the graphics pipeline via descriptor VkResult vkCreateBufferView( VkImageType imageType; P.11
sets or via certain commands, or by directly specifying them as VkDevice device, VkFormat format; P.11
parameters to certain commands. const VkBufferViewCreateInfo* pCreateInfo, VkExtent3D extent; P.10
const VkAllocationCallbacks* pAllocator, P.10 uint32_t mipLevels;
VkResult vkCreateBuffer( VkBufferView* pView); uint32_t arrayLayers;
VkDevice device, VkSampleCountFlagBits samples; P.12
const VkBufferCreateInfo* pCreateInfo, typedef struct VkBufferViewCreateInfo {
VkStructureType sType; VkImageTiling tiling; P.11
const VkAllocationCallbacks* pAllocator, P.10 VkImageUsageFlags usage; P.11
VkBuffer* pBuffer); const void* pNext;
VkBufferViewCreateFlags flags; = 0 VkSharingMode sharingMode; P.12
typedef struct VkBufferCreateInfo { VkBuffer buffer; uint32_t queueFamilyIndexCount;
VkStructureType sType; VkFormat format; P.11 const uint32_t* pQueueFamilyIndices;
const void* pNext; VkDeviceSize offset; VkImageLayout initialLayout;
VkBufferCreateFlags flags; VkDeviceSize range; } VkImageCreateInfo;
VkDeviceSize size; } VkBufferViewCreateInfo; initialLayout:
VkBufferUsageFlags usage; VK_IMAGE_LAYOUT_{PREINITIALIZED , UNDEFINED}
VkSharingMode sharingMode; P.12 void vkDestroyBufferView(
uint32_t queueFamilyIndexCount; VkDevice device, void vkGetImageSubresourceLayout(
const uint32_t* pQueueFamilyIndices; VkBufferView bufferView, VkDevice device,
} VkBufferCreateInfo; const VkAllocationCallbacks* pAllocator); P.10 VkImage image,
const VkImageSubresource* pSubresource,
flags: Images [11.3] VkSubresourceLayout* pLayout);
VK_BUFFER_CREATE_SPARSE_X_BIT where X is Images represent multidimensional (up to 3) arrays of data which
BINDING, RESIDENCY, ALIASED can be used for various purposes by binding them to the graphics typedef struct VkImageSubresource {
usage: pipeline via descriptor sets, or by directly specifying them as VkImageAspectFlags aspectMask; P.11
VK_BUFFER_USAGE_X_BIT where X is parameters to certain commands. uint32_t mipLevel;
TRANSFER_SRC, TRANSFER_DST, uint32_t arrayLayer;
VkResult vkCreateImage( } VkImageSubresource;
UNIFORM_TEXEL_BUFFER, STORAGE_TEXEL_BUFFER, VkDevice device,
UNIFORM_BUFFER, STORAGE_BUFFER, INDEX_BUFFER, const VkImageCreateInfo* pCreateInfo, typedef struct VkSubresourceLayout {
VERTEX_BUFFER, INDIRECT_BUFFER const VkAllocationCallbacks* pAllocator, P.10 VkDeviceSize offset;
void vkDestroyBuffer( VkImage* pImage); VkDeviceSize size;
VkDevice device, VkDeviceSize rowPitch;
VkBuffer buffer, VkDeviceSize arrayPitch;
const VkAllocationCallbacks* pAllocator); P.10 VkDeviceSize depthPitch;
} VkSubresourceLayout;
Continued on next page >
2016 Khronos Group - Rev. 1216 www.khronos.org/vulkan
Page 6 Vulkan 1.0 Quick Reference
Resource Creation (continued) void vkDestroyImageView(
VkDevice device,
Samplers [12]
VkSampler objects encapsulate the state of an image sampler
void vkDestroyImage( VkImageView imageView, which is used by the implementation to read image data and
VkDevice device, const VkAllocationCallbacks* pAllocator); P.10 apply filtering and other transformations for the shader.
VkImage image,
const VkAllocationCallbacks* pAllocator); P.10 Resource Memory Association [11.6] VkResult vkCreateSampler(
Resources are initially created as virtual allocations with no VkDevice device,
Image Views [11.5] backing memory. Device memory is allocated separately and const VkSamplerCreateInfo* pCreateInfo,
Image objects are not directly accessed by pipeline shaders for then associated with the resource. const VkAllocationCallbacks *pAllocator, P.10
reading or writing image data. Instead, image views representing VkSampler *pSampler);
contiguous ranges of the image subresources and containing void vkGetBufferMemoryRequirements(
additional metadata are used for that purpose. VkDevice device, typedef struct VkSamplerCreateInfo {
VkBuffer buffer, VkStructureType sType;
VkResult vkCreateImageView( VkMemoryRequirements* pMemoryRequirements); const void *pNext;
VkDevice device, VkSamplerCreateFlags flags; = 0
const VkImageViewCreateInfo* pCreateInfo, void vkGetImageMemoryRequirements(
VkDevice device, VkFilter magFilter;
const VkAllocationCallbacks* pAllocator, P.10 VkFilter minFilter;
VkImageView* pView); VkImage image,
VkMemoryRequirements* pMemoryRequirements); VkSamplerMipmapMode mipmapMode;
typedef struct VkImageViewCreateInfo { VkSamplerAddressMode addressModeU;
VkStructureType sType; typedef struct VkMemoryRequirements { VkSamplerAddressMode addressModeV;
const void* pNext; VkDeviceSize size; VkSamplerAddressMode addressModeW;
VkImageViewCreateFlags flags; = 0 VkDeviceSize alignment; float mipLodBias;
VkImage image; uint32_t memoryTypeBits; VkBool32 anisotropyEnable;
VkImageViewType viewType; } VkMemoryRequirements; float maxAnisotropy;
VkFormat format; P.11 VkBool32 compareEnable;
VkResult vkBindBufferMemory( VkCompareOp compareOp; P.11
VkComponentMapping components; VkDevice device,
VkImageSubresourceRange subresourceRange; P.11 float minLod;
VkBuffer buffer, float maxLod;
} VkImageViewCreateInfo; VkDeviceMemory memory, VkBorderColor borderColor;
viewType: VK_IMAGE_VIEW_TYPE_X where X is 1D, 2D, 3D, VkDeviceSize memoryOffset); VkBool32 unnormalizedCoordinates;
CUBE, 1D_ARRAY, 2D_ARRAY, CUBE_ARRAY } VkSamplerCreateInfo;
VkResult vkBindImageMemory(
typedef struct VkComponentMapping { VkDevice device, magFilter, minFilter: VK_FILTER_NEAREST,
VkComponentSwizzle r; VkImage image, VK_FILTER_LINEAR
VkComponentSwizzle g; VkDeviceMemory memory, mipmapMode:
VkComponentSwizzle b; VkDeviceSize memoryOffset); VK_SAMPLER_MIPMAP_MODE_{NEAREST, LINEAR}
VkComponentSwizzle a;
} VkComponentMapping; borderColor: VK_BORDER_COLOR_{FLOAT, INT}_X
where X is TRANSPARENT_BLACK, OPAQUE_BLACK,
enum VkComponentSwizzle: VK_COMPONENT_SWIZZLE_X OPAQUE_WHITE
where X is IDENTITY, ZERO, ONE, R, G, B, A
addressMode{U, V, W}:
VK_SAMPLER_ADDRESS_MODE_X where X is REPEAT,
MIRRORED_REPEAT,
Resource Descriptors [13] void vkDestroyPipelineLayout(
VkDevice device, CLAMP_TO_EDGE, CLAMP_TO_BORDER
A descriptor is an opaque data structure representing a
shader resource such as a buffer view, image view, sampler, or VkPipelineLayout pipelineLayout, void vkDestroySampler(
combined image sampler. const VkAllocationCallbacks* pAllocator); P.10 VkDevice device,
Allocation of Descriptor Sets [13.2.3] VkSampler sampler,
Descriptor Set Layout [13.2.1] const VkAllocationCallbacks *pAllocator); P.10
VkResult vkCreateDescriptorSetLayout( VkResult vkCreateDescriptorPool(
VkDevice device, VkDevice device,
const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkDescriptorPoolCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator, P.10 const VkAllocationCallbacks* pAllocator, P.10
VkDescriptorSetLayout* pSetLayout); VkDescriptorPool* pDescriptorPool);
Descriptor Set Updates [13.2.4]
typedef struct VkDescriptorSetLayoutCreateInfo { typedef struct VkDescriptorPoolCreateInfo { void vkUpdateDescriptorSets(
VkStructureType sType; VkStructureType sType; VkDevice device,
const void *pNext; const void* pNext; uint32_t descriptorWriteCount,
VkDescriptorSetLayoutCreateFlags flags; = 0 VkDescriptorPoolCreateFlags flags; const VkWriteDescriptorSet* pDescriptorWrites,
uint32_t bindingCount; uint32_t maxSets; uint32_t descriptorCopyCount,
const VkDescriptorSetLayoutBinding* pBinding; uint32_t poolSizeCount; const VkCopyDescriptorSet* pDescriptorCopies);
} VkDescriptorSetLayoutCreateInfo; const VkDescriptorPoolSize* pPoolSizes;
} VkDescriptorPoolCreateInfo; typedef struct VkWriteDescriptorSet {
typedef struct VkDescriptorSetLayoutBinding { VkStructureType sType;
flags: VK_DESCRIPTOR_POOL_CREATE_FREE_- const void* pNext;
uint32_t binding; DESCRIPTOR_SET_BIT
VkDescriptorType descriptorType; P.11 VkDescriptorSet dstSet;
uint32_t descriptorCount; typedef struct VkDescriptorPoolSize { uint32_t dstBinding;
VkShaderStageFlags stageFlags; P.12 VkDescriptorType type; P.11 uint32_t dstArrayElement;
const VkSampler* pImmutableSamplers; uint32_t descriptorCount; uint32_t descriptorCount;
} VkDescriptorSetLayoutBinding; } VkDescriptorPoolSize; VkDescriptorType descriptorType; P.11
const VkDescriptorImageInfo* pImageInfo;
void vkDestroyDescriptorSetLayout( void vkDestroyDescriptorPool( const VkDescriptorBufferInfo* pBufferInfo;
VkDevice device, VkDevice device, const VkBufferView* pTexelBufferView;
VkDescriptorSetLayout descriptorSetLayout,, VkDescriptorPool descriptorPool, } VkWriteDescriptorSet;
const VkAllocationCallbacks *pAllocator); P.10 const VkAllocationCallbacks* pAllocator); P.10
typedef struct VkDescriptorImageInfo {
Pipeline Layouts [13.2.2] VkResult vkAllocateDescriptorSets( VkSampler sampler;
VkResult vkCreatePipelineLayout( VkDevice device, VkImageView imageView;
VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkImageLayout imageLayout; P.11
const VkPipelineLayoutCreateInfo* pCreateInfo, VkDescriptorSet* pDescriptorSets); } VkDescriptorImageInfo;
const VkAllocationCallbacks* pAllocator, P.10 typedef struct VkDescriptorSetAllocateInfo {
VkPipelineLayout* pPipelineLayout); typedef struct VkDescriptorBufferInfo {
VkStructureType sType; VkBuffer buffer;
typedef struct VkPipelineLayoutCreateInfo { const void* pNext; VkDeviceSize offset;
VkStructureType sType; VkDescriptorPool descriptorPool; VkDeviceSize range;
const void* pNext; uint32_t descriptorSetCount; } VkDescriptorBufferInfo;
VkPipelineLayoutCreateFlags flags; = 0 const VkDescriptorSetLayout* pSetLayouts;
uint32_t setLayoutCount; } VkDescriptorSetAllocateInfo; typedef struct VkCopyDescriptorSet {
const VkDescriptorSetLayout* pSetLayouts; VkStructureType sType;
VkResult vkFreeDescriptorSets( const void* pNext;
uint32_t pushConstantRangeCount; VkDevice device,
const VkPushConstantRange* pPushConstantRanges; VkDescriptorSet srcSet;
VkDescriptorPool descriptorPool, uint32_t srcBinding;
} VkPipelineLayoutCreateInfo; uint32_t descriptorSetCount, uint32_t srcArrayElement;
typedef struct VkPushConstantRange { const VkDescriptorSet* pDescriptorSets); VkDescriptorSet dstSet;
VkShaderStageFlags stageFlags; P.12 VkResult vkResetDescriptorPool( uint32_t dstBinding;
uint32_t offset; VkDevice device, uint32_t dstArrayElement;
uint32_t size; VkDescriptorPool descriptorPool, uint32_t descriptorCount;
} VkPushConstantRange; VkDescriptorPoolResetFlags flags); } VkCopyDescriptorSet;

Continued on next page >


2016 Khronos Group - Rev. 1216 www.khronos.org/vulkan
Page 7 Vulkan 1.0 Quick Reference
Resource Descriptors (continued) Queries [16] void vkCmdBeginQuery(
VkCommandBuffer commandBuffer,
Descriptor Set Binding [13.2.5] Query Pools [16.1] VkQueryPool queryPool,
void vkCmdBindDescriptorSets( Each query pool is a collection of a specific number of queries uint32_t entry,
VkCommandBuffer commandBuffer, of a particular type. VkQueryControlFlags flags);
VkPipelineBindPoint pipelineBindPoint, flags: VK_QUERY_CONTROL_PRECISE_BIT
VkPipelineLayout layout, P.12 VkResult vkCreateQueryPool(
uint32_t firstSet, VkDevice device, void vkCmdEndQuery(
uint32_t descriptorSetCount, const VkQueryPoolCreateInfo* pCreateInfo, VkCommandBuffer commandBuffer,
const VkDescriptorSet* pDescriptorSets, const VkAllocationCallbacks* pAllocator, P.10 VkQueryPool queryPool,
uint32_t dynamicOffsetCount, VkQueryPool* pQueryPool); uint32_t query);
const uint32_t* pDynamicOffsets); typedef struct VkQueryPoolCreateInfo { VkResult vkGetQueryPoolResults(
pipelineBindPoint: VkStructureType sType; VkDevice device,
VK_PIPELINE_BIND_POINT_GRAPHICS, const void* pNext; VkQueryPool queryPool,
VK_PIPELINE_BIND_POINT_COMPUTE VkQueryPoolCreateFlags flags; = 0 uint32_t firstQuery,
VkQueryType queryType; uint32_t queryCount,
Push Constant Updates [13.2.6] uint32_t entryCount; size_t dataSize,
The pipeline layout defines shader push constants which VkQueryPipelineStatisticFlags pipelineStatistics; P.12 void* pData,
are updated via Vulkan commands rather than via writes to } VkQueryPoolCreateInfo; VkDeviceSize stride,
memory or copy commands. VkQueryResultFlags flags);
queryType:
void vkCmdPushConstants( VK_QUERY_TYPE_OCCLUSION, flags: VK_QUERY_RESULT_X_BIT where X is
VkCommandBuffer commandBuffer, VK_QUERY_TYPE_PIPELINE_STATISTICS, 64, WAIT, WITH_AVAILABILITY, PARTIAL
VkPipelineLayout layout, P.12 VK_QUERY_TYPE_TIMESTAMP
VkShaderStageFlags stageFlags, P.12 void vkCmdCopyQueryPoolResults(
uint32_t offset, void vkDestroyQueryPool( VkCommandBuffer commandBuffer,
uint32_t size, VkDevice device, VkQueryPool queryPool,
const void* pValues); VkQueryPool queryPool, uint32_t firstQuery,
const VkAllocationCallbacks* pAllocator); P.10 uint32_t queryCount,
VkBuffer dstBuffer,
Query Operation [16.2] VkDeviceSize dstOffset,
void vkCmdResetQueryPool( VkDeviceSize stride,
VkCommandBuffer commandBuffer, VkQueryResultFlags flags);
VkQueryPool queryPool, flags: VK_QUERY_RESULT_X_BIT where X is
uint32_t firstQuery, 64, WAIT, WITH_AVAILABILITY, PARTIAL
Clear Commands [17] uint32_t queryCount);
Timestamp Queries [16.5]
Outside a Render Pass Instance [17.1] void vkCmdWriteTimestamp(
void vkCmdClearColorImage( VkCommandBuffer commandBuffer,
VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, P.15
VkImage image, Copy Commands [18] VkQueryPool queryPool,
VkImageLayout imageLayout, uint32_t query);
const VkClearColorValue* pColor, P.10 Copying Data Between Buffers [18.2]
uint32_t rangeCount, void vkCmdCopyBuffer(
const VkImageSubresourceRange* pRanges); P.11 VkCommandBuffer commandBuffer,
imageLayout: VkBuffer srcBuffer,
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VkBuffer dstBuffer, typedef struct VkBufferImageCopy {
VK_IMAGE_LAYOUT_GENERAL uint32_t regionCount, VkDeviceSize bufferOffset;
const VkBufferCopy* pRegions); uint32_t bufferRowLength;
void vkCmdClearDepthStencilImage( uint32_t bufferImageHeight;
VkCommandBuffer commandBuffer, typedef struct VkBufferCopy { VkImageSubresourceLayers imageSubresource; P.11
VkImage image, VkDeviceSize srcOffset; VkOffset3D imageOffset; P.11
VkImageLayout imageLayout, VkDeviceSize dstOffset; VkExtent3D imageExtent; P.10
const VkClearDepthStencilValue* pDepthStencil, P.10 VkDeviceSize size; } VkBufferImageCopy;
uint32_t rangeCount, } VkBufferCopy; Image Copies With Scaling [18.5]
const VkImageSubresourceRange* pRanges); P.11
Copying Data Between Images [18.3] void vkCmdBlitImage(
imageLayout: VkCommandBuffer commandBuffer,
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, void vkCmdCopyImage(
VkCommandBuffer commandBuffer, VkImage srcImage,
VK_IMAGE_LAYOUT_GENERAL VkImageLayout srcImageLayout,
VkImage srcImage,
VkImageLayout srcImageLayout, VkImage dstImage,
Inside a Render Pass Instance [17.2] VkImageLayout dstImageLayout,
void vkCmdClearAttachments( VkImage dstImage,
VkImageLayout dstImageLayout, uint32_t regionCount,
VkCommandBuffer commandBuffer, const VkImageBlit* pRegions,
uint32_t attachmentCount, uint32_t regionCount,
const VkImageCopy* pRegions); VkFilter filter);
const VkClearAttachment* pAttachments,
uint32_t rectCount, enum VkImageLayout: VK_IMAGE_LAYOUT_GENERAL, enum VkImageLayout: VK_IMAGE_LAYOUT_GENERAL,
const VkClearRect* pRects); VK_IMAGE_LAYOUT_TRANSFER_{SRC, DST}_OPTIMAL VK_IMAGE_LAYOUT_TRANSFER_{SRC, DST}_OPTIMAL
filter: VK_FILTER_NEAREST, VK_FILTER_LINEAR
typedef struct VkClearRect { typedef struct VkImageCopy {
VkRect2D rect; P.12 VkImageSubresourceLayers srcSubresource; P.11 typedef struct VkImageBlit {
uint32_t baseArrayLayer; VkOffset3D srcOffset; P.11 VkImageSubresourceLayers srcSubresource; P.11
uint32_t layerCount; VkImageSubresourceLayers dstSubresource; P.11 VkOffset3D srcOffsets[2]; P.11
} VkClearRect; VkOffset3D dstOffset; P.11 VkImageSubresourceLayers dstSubresource; P.11
VkExtent3D extent; P.10 VkOffset3D dstOffsets[2]; P.11
typedef struct VkClearAttachment { } VkImageCopy; } VkImageBlit;
VkImageAspectFlags aspectMask; P.11
uint32_t colorAttachment; Copying Data Between Buffers and Images [18.4] Resolving Multisample Images [18.6]
VkClearValue clearValue; P.10 void vkCmdCopyBufferToImage( void vkCmdResolveImage(
} VkClearAttachment; VkCommandBuffer commandBuffer, VkCommandBuffer commandBuffer,
VkBuffer srcBuffer, VkImage srcImage,
VkImage dstImage, VkImageLayout srcImageLayout,
Filling Buffers [17.4] VkImageLayout dstImageLayout, VkImage dstImage,
void vkCmdFillBuffer( uint32_t regionCount, VkImageLayout dstImageLayout,
VkCommandBuffer commandBuffer, const VkBufferImageCopy* pRegions); uint32_t regionCount,
VkBuffer dstBuffer, const VkImageResolve* pRegions);
VkDeviceSize dstOffset, dstImageLayout: VK_IMAGE_LAYOUT_GENERAL,
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL enum VkImageLayout: VK_IMAGE_LAYOUT_GENERAL,
VkDeviceSize size, VK_IMAGE_LAYOUT_TRANSFER_{SRC, DST}_OPTIMAL
uint32_t data); void vkCmdCopyImageToBuffer(
VkCommandBuffer commandBuffer, typedef struct VkImageResolve {
Updating Buffers [17.5] VkImage srcImage, VkImageSubresourceLayers srcSubresource; P.11
void vkCmdUpdateBuffer( VkImageLayout srcImageLayout, VkOffset3D srcOffset; P.11
VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkImageSubresourceLayers dstSubresource; P.11
VkBuffer dstBuffer, uint32_t regionCount, VkOffset3D dstOffset; P.11
VkDeviceSize dstOffset, const VkBufferImageCopy* pRegions); VkExtent3D extent; P.10
VkDeviceSize dataSize, } VkImageResolve;
const uint32_t* pData); srcImageLayout: VK_IMAGE_LAYOUT_GENERAL,
VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL

2016 Khronos Group - Rev. 1216 www.khronos.org/vulkan


Page 8 Vulkan 1.0 Quick Reference
Drawing Commands [19] void vkCmdDrawIndirect(
VkCommandBuffer commandBuffer,
Vertex Input Description [20.2]
void vkCmdBindIndexBuffer( VkBuffer buffer, void vkCmdBindVertexBuffers(
VkCommandBuffer commandBuffer, VkDeviceSize offset, VkCommandBuffer commandBuffer,
VkBuffer buffer, uint32_t drawCount, uint32_t firstBinding,
VkDeviceSize offset, uint32_t stride); uint32_t bindingCount,
VkIndexType indexType); const VkBuffer* pBuffers,
typedef struct VkDrawIndirectCommand { const VkDeviceSize* pOffsets);
indexType: VK_INDEX_TYPE_UINT{16, 32} uint32_t vertexCount;
void vkCmdDraw( uint32_t instanceCount;
VkCommandBuffer commandBuffer, uint32_t firstVertex;
uint32_t vertexCount, uint32_t firstInstance;
uint32_t instanceCount, } VkDrawIndirectCommand;
uint32_t firstVertex, Fixed-Function Vertex Postprocessing [23]
void vkCmdDrawIndexedIndirect(
uint32_t firstInstance); VkCommandBuffer commandBuffer, Controlling the Viewport [23.5]
void vkCmdDrawIndexed( VkBuffer buffer, void vkCmdSetViewport(
VkCommandBuffer commandBuffer, VkDeviceSize offset, VkCommandBuffer commandBuffer,
uint32_t indexCount, uint32_t drawCount, uint32_t firstViewport,
uint32_t instanceCount, uint32_t stride); uint32_t viewportCount,
uint32_t firstIndex, const VkViewport* pViewports); P.11
typedef struct VkDrawIndexedIndirectCommand {
int32_t vertexOffset, uint32_t indexCount;
uint32_t firstInstance); uint32_t instanceCount;
uint32_t firstIndex;
int32_t vertexOffset;
uint32_t firstInstance; Rasterization [24]
} VkDrawIndexedIndirectCommand; Basic Line Segment Rasterization [24.5.1]
void vkCmdSetLineWidth(
VkCommandBuffer commandBuffer,
float lineWidth);
Fragment Operations [25] Stencil Test [25.9]
Depth Bias [24.6.3]
void vkCmdSetStencilCompareMask(
Scissor Test [25.2] VkCommandBuffer commandBuffer, void vkCmdSetDepthBias(
void vkCmdSetScissor( VkStencilFaceFlags faceMask, VkCommandBuffer commandBuffer,
VkCommandBuffer commandBuffer, uint32_t compareMask); float depthBiasConstantFactor,
uint32_t firstScissor, float depthBiasClamp,
uint32_t scissorCount, void vkCmdSetStencilWriteMask( float depthBiasSlopeFactor);
const VkRect2D* pScissors); P.12 VkCommandBuffer commandBuffer,
VkStencilFaceFlags faceMask,
Depth Bounds Test [25.8] uint32_t writeMask);
void vkCmdSetDepthBounds(
VkCommandBuffer commandBuffer, void vkCmdSetStencilReference(
float minDepthBounds, VkCommandBuffer commandBuffer,
float maxDepthBounds); VkStencilFaceFlags faceMask, Framebuffer: Blend Factors [26.1.1]
uint32_t reference); void vkCmdSetBlendConstants(
faceMask: VkCommandBuffer commandBuffer,
VK_STENCIL_FACE_{FRONT, BACK}_BIT, const float blendConstants[4]);
VK_STENCIL_FRONT_AND_BACK

Sparse Resources [28] typedef struct VkSparseImageMemoryRequirements {


VkSparseImageFormatProperties formatProperties;
typedef struct VkSparseImageOpaqueMemoryBindInfo {
VkImage image;
Sparse Image Format Properties [28.7.3] uint32_t imageMipTailFirstLod; uint32_t bindCount;
void vkGetPhysicalDeviceSparseImageFormatProperties( VkDeviceSize imageMipTailSize; const VkSparseMemoryBind* pBinds; P.12
VkPhysicalDevice physicalDevice, VkDeviceSize imageMipTailOffset; } VkSparseImageOpaqueMemoryBindInfo;
VkFormat format, P.11 VkDeviceSize imageMipTailStride;
VkImageType type, P.11 } VkSparseImageMemoryRequirements; typedef struct VkSparseImageMemoryBindInfo {
VkSampleCountFlagBits samples, P.12 VkImage image;
VkImageUsageFlags usage, P.11 Binding Resource Memory [28.7.6] uint32_t bindCount;
VkImageTiling tiling, P.11 typedef struct VkBindSparseInfo { const VkSparseImageMemoryBind* pBinds;
uint32_t* pPropertyCount, VkStructureType sType; } VkSparseImageMemoryBindInfo;
VkSparseImageFormatProperties* pProperties); const void* pNext; typedef struct VkSparseImageMemoryBind {
uint32_t waitSemaphoreCount; VkImageSubresource subresource;
typedef struct VkSparseImageFormatProperties { const VkSemaphore* pWaitSemaphores;
VkImageAspectFlags aspectMask; P.11 VkOffset3D offset; P.11
uint32_t bufferBindCount; VkExtent3D extent; P.11
VkExtent3D imageGranularity; P.11 const VkSparseBufferMemoryBindInfo* pBufferBinds;
VkSparseImageFormatFlags flags; VkDeviceMemory memory;
uint32_t imageOpaqueBindCount; VkDeviceSize memoryOffset;
} VkSparseImageFormatProperties; const VkSparseImageOpaqueMemoryBindInfo* VkSparseMemoryBindFlags flags;
flags: VK_SPARSE_IMAGE_FORMAT_X where X is pImageOpaqueBinds; } VkSparseImageMemoryBind;
SINGLE_MIPTAIL_BIT, ALIGNED_MIP_SIZE_BIT, uint32_t imageBindCount;
NONSTANDARD_BLOCK_SIZE_BIT const VkSparseImageMemoryBindInfo* pImageBinds; flags:
uint32_t signalSemaphoreCount; VK_SPARSE_MEMORY_BIND_METADATA_BIT
Sparse Resource Memory Requirements [28.7.5] const VkSemaphore* pSignalSemaphores;
void vkGetImageSparseMemoryRequirements( VkResult vkQueueBindSparse(
} VkBindSparseInfo; VkQueue queue,
VkDevice device,
VkImage image, typedef struct VkSparseBufferMemoryBindInfo { uint32_t bindInfoCount,
uint32_t* pSparseMemoryRequirementCount, VkBuffer buffer; const VkBindSparseInfo* pBindInfo,
VkSparseImageMemoryRequirements* uint32_t bindCount; VkFence fence);
pSparseMemoryRequirements); const VkSparseMemoryBind* pBinds; P.12
} VkSparseBufferMemoryBindInfo;

Dispatching Commands [27] void vkCmdDispatchIndirect(


VkCommandBuffer commandBuffer,
void vkCmdDispatch( VkBuffer buffer,
VkCommandBuffer commandBuffer, VkDeviceSize offset);
uint32_t x,
uint32_t y, typedef struct VkDispatchIndirectCommand {
uint32_t z); uint32_t x;
uint32_t y;
uint32_t z;
} VkDispatchIndirectCommand;

2016 Khronos Group - Rev. 1216 www.khronos.org/vulkan


Page 9 Vulkan 1.0 Quick Reference
Window System Integration (WSI) [29] Display Enumeration [29.3.1] typedef struct VkDisplaySurfaceCreateInfoKHR {
VkStructureType sType;
VkResult vkGetPhysicalDeviceDisplayPropertiesKHR(
Android Platform [29.2.1] VkPhysicalDevice physicalDevice, const void* pNext;
VkResult vkCreateAndroidSurfaceKHR( uint32_t* pPropertyCount, VkDisplaySurfaceCreateFlagsKHR flags;
VkInstance instance, VkDisplayPropertiesKHR* pProperties); VkDisplayModeKHR displayMode;
const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, uint32_t planeIndex;
const VkAllocationCallbacks* pAllocator, P.10 typedef struct VkDisplayPropertiesKHR { uint32_t planeStackIndex;
VkSurfaceKHR* pSurface); VkDisplayKHR display; VkSurfaceTransformFlagBitsKHR transform;
const char* displayName; float globalAlpha;
typedef struct VkAndroidSurfaceCreateInfoKHR { VkExtent2D physicalDimensions; P.11 VkDisplayPlaneAlphaFlagBitsKHR alphaMode;
VkStructureType sType; VkExtent2D physicalResolution; P.11 VkExtent2D imageExtent; P.11
const void* pNext; VkSurfaceTransformFlagsKHR supportedTransforms; } VkDisplaySurfaceCreateInfoKHR;
VkAndroidSurfaceCreateFlagsKHR flags; = 0 VkBool32 planeReorderPossible;
ANativeWindow* window; VkBool32 persistentContent; Querying for WSI Support [29.4]
} VkAndroidSurfaceCreateInfoKHR; } VkDisplayPropertiesKHR; VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
VkPhysicalDevice physicalDevice,
Mir Platform [29.2.2] Display Planes [29.3.1.1]
uint32_t queueFamilyIndex,
VkResult vkCreateMirSurfaceKHR( VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR( VkSurfaceKHR surface,
VkInstance instance, VkPhysicalDevice physicalDevice, VkBool32* pSupported);
const VkMirSurfaceCreateInfoKHR* pCreateInfo, uint32_t* pPropertyCount,
const VkAllocationCallbacks* pAllocator, P.10 VkDisplayPlanePropertiesKHR* pProperties); MIR Platform Querying [29.4.2]
VkSurfaceKHR* pSurface); VkBool32
typedef struct VkDisplayPlanePropertiesKHR {
typedef struct VkMirSurfaceCreateInfoKHR { VkDisplayKHR currentDisplay; vkGetPhysicalDeviceMirPresentationSupportKHR(
uint32_t currentStackIndex; VkPhysicalDevice physicalDevice,
VkStructureType sType; uint32_t queueFamilyIndex,
const void* pNext; } VkDisplayPlanePropertiesKHR; MirConnection* connection);
VkMirSurfaceCreateFlagsKHR flags; = 0
MirConnection* connection; VkResult vkGetDisplayPlaneSupportedDisplaysKHR( Wayland Platform Querying [29.4.3]
MirSurface* mirSurface; VkPhysicalDevice physicalDevice,
uint32_t planeIndex, VkBool32
} VkMirSurfaceCreateInfoKHR; vkGetPhysicalDeviceWaylandPresentationSupportKHR(
uint32_t* pDisplayCount, VkPhysicalDevice physicalDevice,
Wayland Platform [29.2.3] VkDisplayKHR* pDisplays); uint32_t queueFamilyIndex,
VkResult vkCreateWaylandSurfaceKHR( Display Modes [29.3.1.2] struct wl_display* display);
VkInstance instance, VkResult vkGetDisplayModePropertiesKHR(
const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, Win32 Platform Querying [29.4.4]
const VkAllocationCallbacks* pAllocator, P.10 VkPhysicalDevice physicalDevice, VkBool32
VkSurfaceKHR* pSurface); VkDisplayKHR display, vkGetPhysicalDeviceWin32PresentationSupportKHR(
uint32_t* pPropertyCount, VkPhysicalDevice physicalDevice,
typedef struct VkWaylandSurfaceCreateInfoKHR { VkDisplayModePropertiesKHR* pProperties); uint32_t queueFamilyIndex);
VkStructureType sType; typedef struct VkDisplayModePropertiesKHR {
const void* pNext; XCB Platform Querying [29.4.5]
VkDisplayModeKHR displayMode;
VkWaylandSurfaceCreateFlagsKHR flags; = 0 VkDisplayModeParametersKHR parameters; VkBool32
struct wl_display* display; } VkDisplayModePropertiesKHR; vkGetPhysicalDeviceXcbPresentationSupportKHR(
struct wl_surface* surface; VkPhysicalDevice physicalDevice,
} VkWaylandSurfaceCreateInfoKHR; typedef struct VkDisplayModeParametersKHR { uint32_t queueFamilyIndex,
VkExtent2D visibleRegion; P.11 xcb_connection_t* connection,
Win32 Platform [29.2.4] uint32_t refreshRate; xcb_visualid_t visual_id);
VkResult vkCreateWin32SurfaceKHR( } VkDisplayModeParametersKHR;
VkInstance instance, Xlib Platform Querying [29.4.6]
const VkWin32SurfaceCreateInfoKHR* pCreateInfo, VkResult vkCreateDisplayModeKHR( VkBool32
const VkAllocationCallbacks* pAllocator, P.10 VkPhysicalDevice physicalDevice, vkGetPhysicalDeviceXlibPresentationSupportKHR(
VkSurfaceKHR* pSurface); VkDisplayKHR display, VkPhysicalDevice physicalDevice,
const VkDisplayModeCreateInfoKHR* pCreateInfo, uint32_t queueFamilyIndex,
typedef struct VkWin32SurfaceCreateInfoKHR { const VkAllocationCallbacks* pAllocator, P.10 Display* dpy,
VkStructureType sType; VkDisplayModeKHR* pMode); VisualID visualID);
const void* pNext;
VkWin32SurfaceCreateFlagsKHR flags; = 0 typedef struct VkDisplayModeCreateInfoKHR { Surface Queries [29.5]
HINSTANCE hinstance; VkStructureType sType; VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(
HWND hwnd; const void* pNext; VkPhysicalDevice physicalDevice,
} VkWin32SurfaceCreateInfoKHR; VkDisplayModeCreateFlagsKHR flags; VkSurfaceKHR surface,
VkDisplayModeParametersKHR parameters; VkSurfaceCapabilitiesKHR* pSurfaceCapabilities);
XCB Platform [29.2.5] } VkDisplayModeCreateInfoKHR;
VkResult vkCreateXcbSurfaceKHR( typedef struct VkSurfaceCapabilitiesKHR {
VkInstance instance, VkResult vkGetDisplayPlaneCapabilitiesKHR( uint32_t minImageCount;
const VkXcbSurfaceCreateInfoKHR* pCreateInfo, VkPhysicalDevice physicalDevice, uint32_t maxImageCount;
const VkAllocationCallbacks* pAllocator, P.10 VkDisplayModeKHR mode, VkExtent2D currentExtent; P.11
VkSurfaceKHR* pSurface); uint32_t planeIndex, VkExtent2D minImageExtent; P.11
VkDisplayPlaneCapabilitiesKHR* pCapabilities); VkExtent2D maxImageExtent; P.11
typedef struct VkXcbSurfaceCreateInfoKHR { uint32_t maxImageArrayLayers;
VkStructureType sType; typedef struct VkDisplayPlaneCapabilitiesKHR { VkSurfaceTransformFlagsKHR supportedTransforms;
const void* pNext; VkDisplayPlaneAlphaFlagsKHR supportedAlpha; VkSurfaceTransformFlagBitsKHR currentTransform;
VkXcbSurfaceCreateFlagsKHR flags; VkOffset2D minSrcPosition; P.11 VkCompositeAlphaFlagsKHR supportedCompositeAlpha; P.11
xcb_connection_t* connection; VkOffset2D maxSrcPosition; P.11 VkImageUsageFlags supportedUsageFlags;
xcb_window_t window; VkExtent2D minSrcExtent; P.11 } VkSurfaceCapabilitiesKHR;
} VkXcbSurfaceCreateInfoKHR; VkExtent2D maxSrcExtent; P.11
VkOffset2D minDstPosition; P.11 VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
Xlib Platform [29.2.6] VkOffset2D maxDstPosition; P.11 VkPhysicalDevice physicalDevice,
VkResult vkCreateXlibSurfaceKHR( VkExtent2D minDstExtent; P.11 VkSurfaceKHR surface,
VkInstance instance, VkExtent2D maxDstExtent; P.11 uint32_t* pSurfaceFormatCount,
const VkXlibSurfaceCreateInfoKHR* pCreateInfo, } VkDisplayPlaneCapabilitiesKHR; VkSurfaceFormatKHR* pSurfaceFormats);
const VkAllocationCallbacks* pAllocator, P.10
VkSurfaceKHR* pSurface); Display Surfaces [29.3.2] typedef struct VkSurfaceFormatKHR {
VkResult vkCreateDisplayPlaneSurfaceKHR( VkFormat format;
typedef struct VkXlibSurfaceCreateInfoKHR { VkInstance instance, VkColorSpaceKHR colorSpace;
VkStructureType sType; const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, } VkSurfaceFormatKHR;
const void* pNext; const VkAllocationCallbacks* pAllocator, P.10 colorSpace: VK_COLORSPACE_SRGB_NONLINEAR_KHR
VkXlibSurfaceCreateFlagsKHR flags; VkSurfaceKHR* pSurface);
Display* dpy; VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
Window window; VkPhysicalDevice physicalDevice,
} VkXlibSurfaceCreateInfoKHR; VkSurfaceKHR surface,
uint32_t* pPresentModeCount,
Platform-Independent Information [29.2.7] VkPresentModeKHR* pPresentModes);
void vkDestroySurfaceKHR( pPresentModes: VK_PRESENT_MODE_X_KHR
VkInstance instance, where X is IMMEDIATE, MAILBOX, FIFO, FIFO_RELAXED
VkSurfaceKHR surface,
const VkAllocationCallbacks* pAllocator); P.10

Continued on next page >

2016 Khronos Group - Rev. 1216 www.khronos.org/vulkan


Page 10 Vulkan 1.0 Quick Reference
WSI (continued) colorSpace: VK_COLORSPACE_SRGB_NONLINEAR_KHR VkResult vkQueuePresentKHR(
VkQueue queue,
presentMode: VK_PRESENT_MODE_X_KHR
WSI Swapchain [29.6] where X is IMMEDIATE, MAILBOX, FIFO, FIFO_RELAXED const VkPresentInfoKHR* pPresentInfo);
VkResult vkCreateSwapchainKHR( typedef struct VkPresentInfoKHR {
VkDevice device, void vkDestroySwapchainKHR(
const VkSwapchainCreateInfoKHR* pCreateInfo, VkDevice device, VkStructureType sType;
const VkAllocationCallbacks* pAllocator, P.10 VkSwapchainKHR swapchain, const void* pNext;
VkSwapchainKHR* pSwapchain); const VkAllocationCallbacks* pAllocator); P.10 uint32_t waitSemaphoreCount;
const VkSemaphore* pWaitSemaphores;
typedef struct VkSwapchainCreateInfoKHR { VkResult vkCreateSharedSwapchainsKHR( uint32_t swapchainCount;
VkStructureType sType; VkDevice device, const VkSwapchainKHR* pSwapchains;
const void* pNext; uint32_t swapchainCount, const uint32_t* pImageIndices;
VkSwapchainCreateFlagsKHR flags; const VkSwapchainCreateInfoKHR* pCreateInfos, VkResult* pResults;
VkSurfaceKHR surface; const VkAllocationCallbacks* pAllocator, P.10 } VkPresentInfoKHR;
uint32_t minImageCount; VkSwapchainKHR* pSwapchains);
VkFormat imageFormat; typedef struct VkDisplayPresentInfoKHR {
VkResult vkGetSwapchainImagesKHR( VkStructureType sType;
VkColorSpaceKHR imageColorSpace; VkDevice device,
VkExtent2D imageExtent; P.11 const void* pNext;
VkSwapchainKHR swapchain, VkRect2D srcRect; P.12
uint32_t imageArrayLayers; uint32_t* pSwapchainImageCount,
VkImageUsageFlags imageUsage; VkRect2D dstRect; P.12
VkImage* pSwapchainImages); VkBool32 persistent;
VkSharingMode imageSharingMode; P.12
uint32_t queueFamilyIndexCount; VkResult vkAcquireNextImageKHR( } VkDisplayPresentInfoKHR;
const uint32_t* pQueueFamilyIndices; VkDevice device,
VkSurfaceTransformFlagBitsKHR preTransform; VkSwapchainKHR swapchain,
VkCompositeAlphaFlagBitsKHR compositeAlpha; P.11 uint64_t timeout,
VkPresentModeKHR presentMode; VkSemaphore semaphore,
VkBool32 clipped; VkFence fence,
VkSwapchainKHR oldSwapchain; uint32_t* pImageIndex);
} VkSwapchainCreateInfoKHR;

Extended Functionality [30] Features, Limits, and Formats [31] enum VkFormatFeatureFlagBits:
VK_FORMAT_FEATURE_X_BIT where X is
Layers [30.1] Features [31.1] SAMPLED_IMAGE,
VkResult vkEnumerateInstanceLayerProperties( void vkGetPhysicalDeviceFeatures( STORAGE_IMAGE[_ATOMIC],
uint32_t* pPropertyCount, VkPhysicalDevice physicalDevice, P.11
UNIFORM_TEXEL_BUFFER,
VkLayerProperties* pProperties); VkPhysicalDeviceFeatures* pFeatures); STORAGE_TEXEL_BUFFER[_ATOMIC],
Format Properties [31.3.2] VERTEX_BUFFER,
VkResult vkEnumerateDeviceLayerProperties( COLOR_ATTACHMENT[_BLEND],
VkPhysicalDevice physicalDevice, void vkGetPhysicalDeviceFormatProperties(
VkPhysicalDevice physicalDevice, DEPTH_STENCIL_ATTACHMENT,
uint32_t* pPropertyCount, BLIT_{SRC, DST},
VkLayerProperties* pProperties); VkFormat format, P.11
VkFormatProperties* pFormatProperties); SAMPLED_IMAGE_FILTER_LINEAR
typedef struct VkLayerProperties { Additional Image Capabilities [31.4]
char layerName [VK_MAX_EXTENSION_NAME_SIZE]; typedef struct VkFormatProperties {
uint32_t specVersion; VkFormatFeatureFlags linearTilingFeatures; VkResult vkGetPhysicalDeviceImageFormatProperties(
uint32_t implementationVersion; VkFormatFeatureFlags optimalTilingFeatures; VkPhysicalDevice physicalDevice,
char description [VK_MAX_DESCRIPTION_SIZE]; VkFormatFeatureFlags bufferFeatures; VkFormat format, P.11
} VkFormatProperties; VkImageType type, P.11
} VkLayerProperties; VkImageTiling tiling, P.11
Extensions [30.2] VkImageUsageFlags usage, P.11
VkResult vkEnumerateInstanceExtensionProperties( VkImageCreateFlags flags, P.11
const char* pLayerName, VkImageFormatProperties* pImageFormatProperties);
uint32_t* pPropertyCount, typedef struct VkExtensionProperties { typedef struct VkImageFormatProperties {
VkExtensionProperties* pProperties); char layerName [VK_MAX_EXTENSION_NAME_SIZE]; VkExtent3D maxExtent; P.10
uint32_t specVersion; uint32_t maxMipLevels;
VkResult vkEnumerateDeviceExtensionProperties( } VkExtensionProperties;
VkPhysicalDevice physicalDevice, uint32_t maxArrayLayers;
const char* pLayerName, VkSampleCountFlags sampleCounts; P.12
uint32_t* pPropertyCount, VkDeviceSize maxResourceSize;
VkExtensionProperties* pProperties); } VkImageFormatProperties;

Structures and Enumerations typedef void* (


VKAPI_PTR* PFN_vkReallocationFunction)(
struct VkBufferMemoryBarrier [6.5.5]
This section contains types that are referenced in multiple places typedef struct VkBufferMemoryBarrier {
on preceding pages, in alphabetical order. void* pUserData, VkStructureType sType;
void* pOriginal, const void* pNext;
enum VkAccessFlagBits [6.5.4] size_t size, VkAccessFlags srcAccessMask; P.10
VK_ACCESS_X_BIT where X is size_t alignment, VkAccessFlags dstAccessMask; P.10
INDIRECT_COMMAND_READ, VkSystemAllocationScope allocationScope); uint32_t srcQueueFamilyIndex;
INDEX_READ, typedef void (VKAPI_PTR* PFN_vkFreeFunction)( uint32_t dstQueueFamilyIndex;
VERTEX_ATTRIBUTE_READ, void* pUserData, VkBuffer buffer;
UNIFORM_READ, void* pMemory); VkDeviceSize offset;
INPUT_ATTACHMENT_READ, VkDeviceSize size;
SHADER_[READ, WRITE], typedef void ( } VkBufferMemoryBarrier;
COLOR_ATTACHMENT_[READ, WRITE], VKAPI_PTR* PFN_vkInternalAllocationNotification)(
DEPTH_STENCIL_ATTACHMENT_[READ, WRITE], void* pUserData, union VkClearColorValue [17.3]
TRANSFER_[READ, WRITE], size_t size, typedef union VkClearColorValue {
HOST_[READ, WRITE], VkInternalAllocationType allocationType, float float32[4];
MEMORY_[READ, WRITE] VkSystemAllocationScope allocationScope); int32_t int32[4];
uint32_t uint32[4];
struct VkAllocationCallbacks [10.1] typedef void ( } VkClearColorValue;
typedef struct VkAllocationCallbacks { VKAPI_PTR* PFN_vkInternalFreeNotification)(
void* pUserData; void* pUserData, struct VkClearDepthStencilValue [17.3]
PFN_vkAllocationFunction pfnAllocation; size_t size, typedef struct VkClearDepthStencilValue {
PFN_vkReallocationFunction pfnReallocation; VkInternalAllocationType allocationType, float depth;
PFN_vkFreeFunction pfnFree; VkSystemAllocationScope allocationScope); uint32_t stencil;
PFN_vkInternalAllocationNotification allocationType: } VkClearDepthStencilValue;
pfnInternalAllocation; VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE
PFN_vkInternalFreeNotification pfnInternalFree; union VkClearValue [17.3]
allocationScope: VK_SYSTEM_ALLOCATION_SCOPE_X where
} VkAllocationCallbacks; X is COMMAND, OBJECT, CACHE, DEVICE, INSTANCE typedef union VkClearValue {
VkClearColorValue color; P.10
typedef void* (VKAPI_PTR* PFN_vkAllocationFunction)( VkClearDepthStencilValue depthStencil; P.10
void* pUserData, } VkClearValue;
size_t size,
size_t alignment,
VkSystemAllocationScope allocationScope); Continued on next page >
2016 Khronos Group - Rev. 1216 www.khronos.org/vulkan
Page 11 Vulkan 1.0 Quick Reference
Structures and Enumerations (continued) D24_UNORM_S8_UINT,
BC1_[RGB, RGBA]_UNORM_BLOCK,
enum VkImageUsageFlagBits [11.3]
VK_IMAGE_USAGE_X_BIT where X is
enum VkCompareOp [25.8] BC1_[RGB, RGBA]_SRGB_BLOCK, TRANSFER_SRC,
VK_COMPARE_OP_X where X is BC2_[UNORM, SRGB]_BLOCK, TRANSFER_DST,
NEVER, LESS, BC3_[UNORM, SRGB]_BLOCK, SAMPLED,
EQUAL, BC4_[UNORM, SRGB]_BLOCK, STORAGE,
LESS_OR_EQUAL, BC5_[UNORM, SRGB]_BLOCK, COLOR_ATTACHMENT,
GREATER, BC6H_[UFLOAT, SFLOAT]_BLOCK, DEPTH_STENCIL_ATTACHMENT,
NOT_EQUAL, BC7_[UNORM, SRGB]_BLOCK, INPUT_ATTACHMENT,
GREATER_OR_EQUAL, ETC2_R8G8B8_[UNORM, SRGB]_BLOCK, TRANSIENT_ATTACHMENT
ALWAYS ETC2_R8G8B8A1_[UNORM, SRGB]_BLOCK,
ETC2_R8G8B8A8_[UNORM, SRGB]_BLOCK, struct VkMemoryBarrier [6.5.4]
enum VkCompositeAlphaFlagBitsKHR EAC_R11_[UNORM, SRGB]_BLOCK, typedef struct VkMemoryBarrier {
VK_COMPOSITE_ALPHA_X_BIT_KHR where X is EAC_R11G11_[UNORM, SRGB]_BLOCK, VkStructureType sType;
OPAQUE, ASTC_4x4_[UNORM, SRGB]_BLOCK, const void* pNext;
PRE_MULTIPLIED, ASTC_5x4_[UNORM, SRGB]_BLOCK, VkAccessFlags srcAccessMask; P.10
POST_MULTIPLIED, ASTC_5x5_[UNORM, SRGB]_BLOCK, VkAccessFlags dstAccessMask; P.10
INHERIT ASTC_6x5_[UNORM, SRGB]_BLOCK, } VkMemoryBarrier;
ASTC_6x6_[UNORM, SRGB]_BLOCK,
enum VkDescriptorType [13.2.4] ASTC_8x5_[UNORM, SRGB]_BLOCK, struct VkOffset2D, VkOffset3D [2.9.1]
VK_DESCRIPTOR_TYPE_X where X is ASTC_8x6_[UNORM, SRGB]_BLOCK, typedef struct VkOffset2D {
SAMPLER, ASTC_8x8_[UNORM, SRGB]_BLOCK, int32_t x;
COMBINED_IMAGE_SAMPLER, ASTC_10x5_[UNORM, SRGB]_BLOCK, int32_t y;
SAMPLED_IMAGE, ASTC_10x6_[UNORM, SRGB]_BLOCK, } VkOffset2D;
STORAGE_IMAGE, ASTC_10x8_[UNORM, SRGB]_BLOCK,
UNIFORM_TEXEL_BUFFER, ASTC_10x10_[UNORM, SRGB]_BLOCK, typedef struct VkOffset3D {
STORAGE_TEXEL_BUFFER, ASTC_12x10_[UNORM, SRGB]_BLOCK, int32_t x;
UNIFORM_BUFFER, ASTC_12x12_[UNORM, SRGB]_BLOCK int32_t y;
STORAGE_BUFFER, int32_t z;
UNIFORM_BUFFER_DYNAMIC, enum VkImageAspectFlagBits [11.5] } VkOffset3D;
STORAGE_BUFFER_DYNAMIC, VK_IMAGE_ASPECT_X_BIT where X is struct VkPhysicalDeviceFeatures [31.1]
INPUT_ATTACHMENT COLOR,
DEPTH, typedef struct VkPhysicalDeviceFeatures {
structs VkExtent2D, VkExtent3D [2.9.2] STENCIL, VkBool32 robustBufferAccess;
typedef struct VkExtent2D { METADATA VkBool32 fullDrawIndexUint32;
uint32_t width; VkBool32 imageCubeArray;
uint32_t height; enum VkImageCreateFlagBits [11.3] VkBool32 independentBlend;
} VkExtent2D; VK_IMAGE_CREATE_X_BIT where X is VkBool32 geometryShader;
SPARSE_{BINDING, RESIDENCY, ALIASED}, VkBool32 tessellationShader;
typedef struct VkExtent3D { MUTABLE_FORMAT, VkBool32 sampleRateShading;
uint32_t width; CUBE_COMPATIBLE VkBool32 dualSrcBlend;
uint32_t height; VkBool32 logicOp;
uint32_t depth; enum VkImageLayout [11.4] VkBool32 multiDrawIndirect;
} VkExtent3D; VK_IMAGE_LAYOUT_X where X is VkBool32 drawIndirectFirstInstance;
UNDEFINED, VkBool32 depthClamp;
enum VkFormat [31.3.1] GENERAL, VkBool32 depthBiasClamp;
VK_FORMAT_X where X is COLOR_ATTACHMENT_OPTIMAL, VkBool32 fillModeNonSolid;
UNDEFINED, DEPTH_STENCIL_ATTACHMENT_OPTIMAL, VkBool32 depthBounds;
R4G4_UNORM_PACK8, DEPTH_STENCIL_READ_ONLY_OPTIMAL, VkBool32 wideLines;
R4G4B4A4_UNORM_PACK16, SHADER_READ_ONLY_OPTIMAL, VkBool32 largePoints;
B4G4R4A4_UNORM_PACK16, TRANSFER_SRC_OPTIMAL, VkBool32 alphaToOne;
R5G6B5_UNORM_PACK16, TRANSFER_DST_OPTIMAL, VkBool32 multiViewport;
B5G6R5_UNORM_PACK16, PREINITIALIZED, VkBool32 samplerAnisotropy;
R5G5B5A1_UNORM_PACK16, PRESENT_SRC_KHR VkBool32 textureCompressionETC2;
B5G5R5A1_UNORM_PACK16, VkBool32 textureCompressionASTC_LDR;
A1R5G5B5_UNORM_PACK16, struct VkImageMemoryBarrier [6.5.6] VkBool32 textureCompressionBC;
R8_[UNORM, SNORM, USCALED], typedef struct VkImageMemoryBarrier { VkBool32 occlusionQueryPrecise;
R8_[SSCALED, UINT, SINT, SRGB], VkStructureType sType; VkBool32 pipelineStatisticsQuery;
R8G8_[UNORM, SNORM, USCALED], const void* pNext; VkBool32 vertexPipelineStoresAndAtomics;
R8G8_[SSCALED, UINT, SINT, SRGB], VkAccessFlags srcAccessMask; P.10 VkBool32 fragmentStoresAndAtomics;
R8G8B8_[UNORM, SNORM, USCALED], VkAccessFlags dstAccessMask; P.10 VkBool32 shaderTessellationAndGeometryPointSize;
R8G8B8_[SSCALED, UINT, SINT, SRGB], VkImageLayout oldLayout; P.11 VkBool32 shaderImageGatherExtended;
B8G8R8_[UNORM, SNORM, USCALED], VkImageLayout newLayout; P.11 VkBool32 shaderStorageImageExtendedFormats;
B8G8R8_[SSCALED, UINT, SINT, SRGB], uint32_t srcQueueFamilyIndex; VkBool32 shaderStorageImageMultisample;
R8G8B8A8_[UNORM, SNORM, USCALED], uint32_t dstQueueFamilyIndex; VkBool32 shaderStorageImageReadWithoutFormat;
R8G8B8A8_[SSCALED, UINT, SINT, SRGB], VkImage image; VkBool32 shaderStorageImageWriteWithoutFormat;
B8G8R8A8_[UNORM, SNORM, USCALED], VkImageSubresourceRange subresourceRange; VkBool32 shaderUniformBufferArrayDynamicIndexing;
B8G8R8A8_[SSCALED, UINT, SINT, SRGB], } VkImageMemoryBarrier; VkBool32 shaderSampledImageArrayDynamicIndexing;
A8B8G8R8_[UNORM, SNORM, USCALED]_PACK32, VkBool32 shaderStorageBufferArrayDynamicIndexing;
A8B8G8R8_[SSCALED, UINT, SINT, SRGB]_PACK32, struct VkImageSubresourceLayers [18.3] VkBool32 shaderStorageImageArrayDynamicIndexing;
A2R10G10B10_[UNORM, SNORM, USCALED]_PACK32, typedef struct VkImageSubresourceLayers { VkBool32 shaderClipDistance;
A2R10G10B10_[SSCALED, UINT, SINT]_PACK32, VkImageAspectFlags aspectMask; P.11 VkBool32 shaderCullDistance;
A2B10G10R10_[UNORM, SNORM, USCALED]_PACK32, uint32_t mipLevel; VkBool32 shaderFloat64;
A2B10G10R10_[SSCALED, UINT, SINT]_PACK32, uint32_t baseArrayLayer; VkBool32 shaderInt64;
R16_[UNORM, SNORM, USCALED], uint32_t layerCount; VkBool32 shaderInt16;
R16_[SSCALED, UINT, SINT, SFLOAT], } VkImageSubresourceLayers; VkBool32 shaderResourceResidency;
R16G16_[UNORM, SNORM, USCALED], VkBool32 shaderResourceMinLod;
R16G16_[SSCALED, UINT, SINT, SFLOAT], struct VkImageSubresourceRange [11.5] VkBool32 sparseBinding;
R16G16B16_[UNORM, SNORM, USCALED], typedef struct VkImageSubresourceRange { VkBool32 sparseResidencyBuffer;
R16G16B16_[SSCALED, UINT, SINT, SFLOAT], VkImageAspectFlags aspectMask; P.11 VkBool32 sparseResidencyImage2D;
R16G16B16A16_[UNORM, SNORM, USCALED], uint32_t baseMipLevel; VkBool32 sparseResidencyImage3D;
R16G16B16A16_[SSCALED, UINT, SINT, SFLOAT], uint32_t levelCount; VkBool32 sparseResidency2Samples;
R32_[UINT, SINT, SFLOAT], uint32_t baseArrayLayer; VkBool32 sparseResidency4Samples;
R32G32_[UINT, SINT, SFLOAT], uint32_t layerCount; VkBool32 sparseResidency8Samples;
R32G32B32_[UINT, SINT, SFLOAT], } VkImageSubresourceRange; VkBool32 sparseResidency16Samples;
R32G32B32A32_[UINT, SINT, SFLOAT], VkBool32 sparseResidencyAliased;
R64_[UINT, SINT, SFLOAT], enum VkImageTiling [11.3] VkBool32 variableMultisampleRate;
R64G64_[UINT, SINT, SFLOAT], VK_IMAGE_TILING_{OPTIMAL, LINEAR} VkBool32 inheritedQueries;
R64G64B64_[UINT, SINT, SFLOAT], } VkPhysicalDeviceFeatures;
R64G64B64A64_[UINT, SINT, SFLOAT], enum VkImageType [11.3]
B10G11R11_UFLOAT_PACK32, VK_IMAGE_TYPE_{1D, 2D, 3D}
E5B9G9R9_UFLOAT_PACK32,
D16_UNORM[_S8_UINT],
X8_D24_UNORM_PACK32,
D32_SFLOAT[_S8_UINT],
S8_UINT, Continued on next page >
2016 Khronos Group - Rev. 1216 www.khronos.org/vulkan
Page 12 Vulkan 1.0 Quick Reference
Structures and Enumerations (continued) size_t minMemoryMapAlignment;
VkDeviceSize minTexelBufferOffsetAlignment;
enum VkPipelineStageFlagBits [6.5.2]
VK_PIPELINE_STAGE_X_BIT where X is
struct VkPhysicalDeviceLimits [31.2] VkDeviceSize minUniformBufferOffsetAlignment; TOP_OF_PIPE,
typedef struct VkPhysicalDeviceLimits { VkDeviceSize minStorageBufferOffsetAlignment; DRAW_INDIRECT,
uint32_t maxImageDimension1D; int32_t minTexelOffset; VERTEX_[INPUT, SHADER],
uint32_t maxImageDimension2D; uint32_t maxTexelOffset; TESSELLATION_[CONTROL,
uint32_t maxImageDimension3D; int32_t minTexelGatherOffset; EVALUATION]_SHADER,
uint32_t maxImageDimensionCube; uint32_t maxTexelGatherOffset; [COMPUTE, GEOMETRY, FRAGMENT]_SHADER,
uint32_t maxImageArrayLayers; float minInterpolationOffset; [EARLY, LATE]_FRAGMENT_TESTS,
uint32_t maxTexelBufferElements; float maxInterpolationOffset; COLOR_ATTACHMENT_OUTPUT,
uint32_t maxUniformBufferRange; uint32_t subPixelInterpolationOffsetBits; TRANSFER, BOTTOM_OF_PIPE, HOST,
uint32_t maxStorageBufferRange; uint32_t maxFramebufferWidth; ALL_{GRAPHICS, COMMANDS}
uint32_t maxPushConstantsSize; uint32_t maxFramebufferHeight;
uint32_t maxMemoryAllocationCount; uint32_t maxFramebufferLayers; enum VkQueryPipelineStatisticFlagBits [16.4]
uint32_t maxSamplerAllocationCount; VkSampleCountFlags framebufferColorSampleCounts; P.12 VK_QUERY_PIPELINE_STATISTIC_X_BIT where X is
VkDeviceSize bufferImageGranularity; VkSampleCountFlags framebufferDepthSampleCounts; P.12 INPUT_ASSEMBLY_{VERTICES, PRIMITIVES},
VkDeviceSize sparseAddressSpaceSize; VkSampleCountFlags framebufferStencilSampleCounts; P.12 VERTEX_SHADER_INVOCATIONS,
uint32_t maxBoundDescriptorSets; VkSampleCountFlags GEOMETRY_SHADER_{INVOCATIONS, PRIMITIVES},
uint32_t maxPerStageDescriptorSamplers; framebufferNoAttachmentsSampleCounts; P.12 CLIPPING_{INVOCATIONS, PRIMITIVES},
uint32_t maxPerStageDescriptorUniformBuffers; uint32_t maxColorAttachments; FRAGMENT_SHADER_INVOCATIONS,
uint32_t maxPerStageDescriptorStorageBuffers; VkSampleCountFlags TESSELLATION_CONTROL_SHADER_PATCHES,
uint32_t maxPerStageDescriptorSampledImages; sampledImageColorSampleCounts; P.12 TESSELLATION_EVALUATION_SHADER_INVOCATIONS,
uint32_t maxPerStageDescriptorStorageImages; VkSampleCountFlags COMPUTE_SHADER_INVOCATIONS
uint32_t maxPerStageDescriptorInputAttachments; sampledImageIntegerSampleCounts; P.12
uint32_t maxPerStageResources; VkSampleCountFlags struct VkRect2D [2.9.3]
uint32_t maxDescriptorSetSamplers; sampledImageDepthSampleCounts; P.12 typedef struct VkRect2D {
uint32_t maxDescriptorSetUniformBuffers; VkSampleCountFlags VkOffset2D offset; P.10
uint32_t maxDescriptorSetUniformBuffersDynamic; sampledImageStencilSampleCounts; P.12 VkExtent2D extent; P.10
uint32_t maxDescriptorSetStorageBuffers; VkSampleCountFlags storageImageSampleCounts; } VkRect2D;
uint32_t maxDescriptorSetStorageBuffersDynamic; uint32_t maxSampleMaskWords;
uint32_t maxDescriptorSetSampledImages; VkBool32 timestampComputeAndGraphics; enum VkSampleCountFlagBits [31.2]
uint32_t maxDescriptorSetStorageImages; float timestampPeriod; VK_SAMPLE_COUNT_X_BIT where X is
uint32_t maxDescriptorSetInputAttachments; uint32_t maxClipDistances; 1, 2, 4, 8, 16, 32, 64
uint32_t maxVertexInputAttributes; uint32_t maxCullDistances;
uint32_t maxCombinedClipAndCullDistances; enum VkShaderStageFlagBits [9.1]
uint32_t maxVertexInputBindings;
uint32_t maxVertexInputAttributeOffset; uint32_t discreteQueuePriorities; VK_SHADER_STAGE_X where X is
uint32_t maxVertexInputBindingStride; float pointSizeRange[2]; {VERTEX, GEOMETRY, FRAGMENT, COMPUTE}_BIT,
uint32_t maxVertexOutputComponents; float lineWidthRange[2]; TESSELLATION_CONTROL_BIT,
uint32_t maxTessellationGenerationLevel; float pointSizeGranularity; TESSELLATION_EVALUATION_BIT,
uint32_t maxTessellationPatchSize; float lineWidthGranularity; ALL_GRAPHICS, ALL
uint32_t VkBool32 strictLines;
VkBool32 standardSampleLocations; enum VkSharingMode [11.7]
maxTessellationControlPerVertexInputComponents; VK_SHARING_MODE_EXCLUSIVE,
uint32_t VkDeviceSize optimalBufferCopyOffsetAlignment;
VkDeviceSize optimalBufferCopyRowPitchAlignment; VK_SHARING_MODE_CONCURRENT
maxTessellationControlPerVertexOutputComponents;
uint32_t VkDeviceSize nonCoherentAtomSize; struct VkSparseMemoryBind [28.7.6]
maxTessellationControlPerPatchOutputComponents; } VkPhysicalDeviceLimits;
typedef struct VkSparseMemoryBind {
uint32_t maxTessellationControlTotalOutputComponents; struct VkPipelineShaderStageCreateInfo [9.1] VkDeviceSize resourceOffset;
uint32_t maxTessellationEvaluationInputComponents; VkDeviceSize size;
uint32_t maxTessellationEvaluationOutputComponents; typedef struct VkPipelineShaderStageCreateInfo {
VkStructureType sType; VkDeviceMemory memory;
uint32_t maxGeometryShaderInvocations; VkDeviceSize memoryOffset;
uint32_t maxGeometryInputComponents; const void* pNext;
VkPipelineShaderStageCreateFlags flags; = 0 VkSparseMemoryBindFlags flags;
uint32_t maxGeometryOutputComponents; } VkSparseMemoryBind;
uint32_t maxGeometryOutputVertices; VkShaderStageFlagBits stage; P.12
uint32_t maxGeometryTotalOutputComponents; VkShaderModule module; flags: VK_SPARSE_MEMORY_BIND_METADATA_BIT
uint32_t maxFragmentInputComponents; const char* pName;
const VkSpecializationInfo* pSpecializationInfo; enum VkSurfaceTransformFlagBitsKHR
uint32_t maxFragmentOutputAttachments;
uint32_t maxFragmentDualSrcAttachments; } VkPipelineShaderStageCreateInfo; VK_SURFACE_TRANSFORM_X_BIT_KHR where X is
uint32_t maxFragmentCombinedOutputResources; IDENTITY,
typedef struct VkSpecializationInfo { ROTATE_{90, 180, 270},
uint32_t maxComputeSharedMemorySize; uint32_t mapEntryCount;
uint32_t maxComputeWorkGroupCount[3]; HORIZONTAL_MIRROR,
const VkSpecializationMapEntry* pMapEntries; HORIZONTAL_MIRROR_ROTATE_{90, 180, 270},
uint32_t maxComputeWorkGroupInvocations; size_t dataSize;
uint32_t maxComputeWorkGroupSize[3]; INHERIT
const void* pData;
uint32_t subPixelPrecisionBits; } VkSpecializationInfo; struct VkViewport [23.5]
uint32_t subTexelPrecisionBits; typedef struct VkViewport {
uint32_t mipmapPrecisionBits; typedef struct VkSpecializationMapEntry {
uint32_t constantID; float x;
uint32_t maxDrawIndexedIndexValue; float y;
uint32_t maxDrawIndirectCount; uint32_t offset;
size_t size; float width;
float maxSamplerLodBias; float height;
float maxSamplerAnisotropy; } VkSpecializationMapEntry;
float minDepth;
uint32_t maxViewports; float maxDepth;
uint32_t maxViewportDimensions[2]; } VkViewport;
float viewportBoundsRange[2];
uint32_t viewportSubPixelBits;

Notes

2016 Khronos Group - Rev. 1216 www.khronos.org/vulkan


Page 13 Vulkan 1.0 Quick Reference
Vulkan Reference Guide Index
The following index shows each item included on this card along with the page on which it is described. The color of the row in the table below is the color of the pane to which you should refer.
A-B Sparse Resources 8 vkCreateQueryPool 7 vkGetQueryPoolResults 7
Android Platform 9 Stencil Test 8 vkCreateRenderPass 2 vkGetRenderAreaGranularity 3
Binding Resource Memory 8 Surface Queries 9 vkCreateSampler 6 vkGetSwapchainImagesKHR 10
Blend Factors 8 Synchronization and Cache Control 2 vkCreateSemaphore 2 VkGraphicsPipelineCreateInfo 3
Buffers 5 T-U vkCreateShaderModule 3 VkI
Built-in Variables 3 Timestamp Queries 7 vkCreateSharedSwapchainsKHR 10 VkImageBlit 7
C Updating Buffers 7 vkCreateSwapchainKHR 10 VkImageCopy 7
ckCmdDraw* 8 vkCreateWaylandSurfaceKHR 9 VkImageCreateInfo 5
V-VkA
Clear Commands 7 vkCreateWin32SurfaceKHR 9 VkImageFormatProperties 10
Vertex Input Description 8
Command Buffer Lifetime 1 vkCreateXcbSurfaceKHR 9 VkImageResolve 7
vkAcquireNextImageKHR 10
Command Buffer Recording 2 vkCreateXlibSurfaceKHR 9 VkImageSubresource 5
vkAllocateCommandBuffers 1
Command Buffer Submission 2 vkAllocateDescriptorSets 6 VkD VkImageViewCreateInfo 6
Command Function Pointers 1 vkAllocateMemory 4 VkDescriptor* 6 VkInstanceCreateInfo 1
Command Pools 1 VkAndroidSurfaceCreateInfoKHR 9 vkDestroyBuffer* 5 vkInvalidateMappedMemoryRanges 4
Commands Allowed Inside Command Buffers 2 VkApplicationInfo 1 vkDestroyCommandPool 1 VkL-VkM
Compute Pipelines 3 VkAttachment* 3 vkDestroyDescriptor* 6 VkLayerProperties 10
Controlling the Viewport 8 vkDestroyDevice 1 vkMapMemory 4
VkB
Copy Commands 7 vkDestroyEvent 2 VkMappedMemoryRange 4
vkBeginCommandBuffer 2
D vkDestroyFence 2 VkMemory* 4
vkBindBufferMemory 6
Depth Bias 8 vkDestroyFramebuffer 3 VkMemoryRequirements 6
vkBindImageMemory 6
Depth Bounds Test 8 vkDestroyImage* 6 VkMemoryType 4
VkBindSparseInfo 8
Descriptor Set Binding 7 vkDestroyInstance 1 vkMergePipelineCaches 4
VkBufferCopy 7
Descriptor Set Layout 6 vkDestroyPipeline 4 VkMirSurfaceCreateInfoKHR 9
VkBufferCreateInfo 5
Descriptor Set Updates 6 vkDestroyPipelineCache 4
VkBufferImageCopy 7 VkP
Device Creation 1 vkDestroyPipelineLayout 6
VkBufferViewCreateInfo 5 VkPhysicalDevice[Sparse]Properties 1
Device Destruction 1 vkDestroyQueryPool 7
VkC VkPhysicalDeviceMemoryProperties 4
Device Memory 4 vkDestroyRenderPass 3
VkClear* 7 VkPipelineCacheCreateInfo 4
Devices 1 vkDestroySampler 6
vkCmd[Set, Reset]Event 2 VkPipelineColor* 4
Dispatching Commands 8 vkDestroySemaphore 2
vkCmdBeginQuery 7 VkPipelineDepthStencilStateCreateInfo 4
Display Enumeration 9 vkDestroyShaderModule 3
vkCmdBindDescriptorSets 7 VkPipelineDynamicStateCreateInfo 4
Display Modes 9 vkDestroySurfaceKHR 9
vkCmdBindIndexBuffer 8 VkPipelineInputAssemblyStateCreateInfo 3
Display Planes 9 vkDestroySwapchainKHR 10
vkCmdBindPipeline 4 VkPipelineLayoutCreateInfo 6
Display Surfaces 9 VkDeviceCreateInfo 1
vkCmdBindVertexBuffers 8 VkPipeline*StateCreateInfo 3-4
Drawing Commands 8 VkDeviceQueueCreateInfo 1
vkCmdBlitImage 7 VkPresentInfoKHR 10
vkDeviceWaitIdle 1
E-F vkCmdClear* 7 VkPushConstantRange 6
VkDispatchIndirectCommand 8
Events 2 vkCmdCopy* 7 VkQ-VkR
VkDisplayMode* 9
Extensions 10 vkCmdCopyQueryPoolResults 7 VkQueryPoolCreateInfo 7
VkDisplayPlane* 9
Features, Limits, and Formats 10 vkCmdDispatch* 8 vkQueueBindSparse 8
VkDisplayPresentInfoKHR 10
Fences 2 vkCmdEndQuery 7 VkQueueFamilyProperties 1
VkDisplayPropertiesKHR 9
Filling Buffers 7 vkCmdEndRenderPass 3 vkQueuePresentKHR 10
VkDisplaySurfaceCreateInfoKHR 9
Fixed-Function Vertex Postprocessing 8 vkCmdExecuteCommands 2 vkQueueSubmit 2
VkDrawIndexedIndirectCommand 8
Format Properties 10 vkCmdFillBuffer 7 vkQueueWaitIdle 1
VkDrawIndirectCommand 8
Fragment Operations 8 vkCmdNextSubpass 3 VkRenderPassBeginInfo 3
Framebuffers 3 VkE-VkF
vkCmdPipelineBarrier 2 VkRenderPassCreateInfo 2
vkEndCommandBuffer 2
G-H-I vkCmdPushConstants 7 vkResetCommand* 1
vkEnumerate*ExtensionProperties 10
Graphics Pipelines 3 vkCmdResetQueryPool 7 vkResetDescriptorPool 6
vkEnumeratePhysicalDevices 1
Host Access to Device Memory Objects 4 vkCmdResolveImage 7 vk[Reset, Set]Event 2
VkEventCreateInfo 2
Image Copies With Scaling 7 vkCmdSetBlendConstants 8 vkResetFences 2
VkExtensionProperties 10
Image Views 6 vkCmdSetDepthBias 8 VkS
VkFenceCreateInfo 2
Images 5 vkCmdSetDepthBounds 8 VkSamplerCreateInfo 6
vkFlushMappedMemoryRanges 4
L-M vkCmdSetLineWidth 8 VkSemaphoreCreateInfo 2
VkFormatProperties 10
Layers 10 vkCmdSetScissor 8 VkShaderModuleCreateInfo 3
VkFramebufferCreateInfo 3
Memory Allocation 4 vkCmdSetStencil* 8 VkSparse* 8
vkFreeCommandBuffers 1
Mir Platform 9 vkCmdSetViewport 8 VkStencilOpState 4
vkFreeDescriptorSets 6
vkCmdUpdateBuffer 7 VkSubmitInfo 2
P vkFreeMemory 4
vkCmdWaitEvents 2 VkSubpass* 3
Physical Devices 1 VkG
vkCmdWriteTimestamp 7 VkSubresourceLayout 5
Pipeline Barriers 2 vkGetBufferMemoryRequirements 6
VkCommandBuffer* 1-2 VkSurface* 9
Pipeline Diagram 5 vkGetDeviceMemoryCommitment 4
VkCommandPoolCreateInfo 1 VkSwapchainCreateInfoKHR 10
Pipeline Layouts 6 vkGetDeviceProcAddr 1
VkComponentMapping 6
Pipelines 3-4 vkGetDeviceQueue 1 VkU-VkV
VkComputePipelineCreateInfo 3
Push Constant Updates 7 vkGetDisplay* 9 vkUnmapMemory 4
VkCopyDescriptorSet 6
Q-R vkGetFenceStatus 2 vkUpdateDescriptorSets 6
vkCreateAndroidSurfaceKHR 9
Queries 7 vkGetImageMemoryRequirements 6 VkVertexInput* 3
vkCreateBuffer* 5
Querying for WSI Support 9 vkCreateCommandPool 1 vkGetImageSparseMemoryRequirements 8 VkW-VkX
Queues 1 vkCreateComputePipelines 3 vkGetImageSubresourceLayout 5 vkWaitForFences 2
Rasterization 8 vkCreateDescriptor 6 vkGetInstanceProcAddr 1 VkWaylandSurfaceCreateInfoKHR 9
Render Pass 2-3 vkCreateDevice 1 vkGetPhysicalDeviceDisplay* 9 VkWin32SurfaceCreateInfoKHR 9
Resolving Multisample Images 7 vkCreateDisplay 9 vkGetPhysicalDeviceFeatures 10 VkWriteDescriptorSet 6
Resource Creation 5-6 vkCreateEvent 2 vkGetPhysicalDeviceFormatProperties 10 VkXcbSurfaceCreateInfoKHR 9
Resource Descriptors 6-7 vkCreateFence 2 vkGetPhysicalDeviceImageFormatProperties 10 VkXlibSurfaceCreateInfoKHR 9
Resource Memory Association 6 vkCreateFramebuffer 3 vkGetPhysicalDeviceMemoryProperties 4 W-X
Return Codes 1 vkCreateGraphicsPipelines 3 vkGetPhysicalDeviceMirPresentationSupportKHR 9 Wayland Platform 9
S vkCreateImage 5 vkGetPhysicalDeviceProperties 1 Win32 Platform 9
Samplers 6 vkCreateImageView 6 vkGetPhysicalDeviceQueueFamilyProperties 1 Window System Integration WSI 9-10
Scissor Test 8 vkCreateInstance 1 vkGetPhysicalDeviceSparseImageFormatProperties 8 WSI Swapchain 10
Secondary Command Buffer Execution 2 vkCreateMirSurfaceKHR 9 vkGetPhysicalDeviceSurface* 9 XCB Platform 9
Semaphores 2 vkCreatePipelineCache 4 vkGetPhysicalDevice*PresentationSupportKHR 9 Xlib Platform 9
Shaders 3 vkCreatePipelineLayout 6 vvkGetPipelineCacheData 4

Vulkan is a registered trademark of the Khronos Group. The Khronos Group is an industry
consortium creating open standards for the authoring and acceleration of parallel
computing, graphics and dynamic media on a wide variety of platforms and devices.
See www.khronos.org to learn more about the Khronos Group.
See www.khronos.org/vulkan to learn more about Vulkan.

2016 Khronos Group - Rev. 1216 Reference guide production by Miller & Mattson www.millermattson.com www.khronos.org/vulkan

You might also like