Vulkan11 Reference Guide

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 16

www.khronos.org/vulkan©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 1
Vulkan
®
is a graphics and compute API consisng of procedures and
funcons to specify shader programs, compute kernels, objects,
and operaons involved in producing high-quality graphical images,
specically color images of three-dimensional objects. Vulkan is
also a pipeline with programmable and state-driven xed-funcon
stages that are invoked by a set of specic drawing operaons.
Specicaon and addional resources at
www.khronos.org/vulkan
Color coded names as follows: funcon names and structure names
[n.n.n] Indicates secons and text in the Vulkan API 1.1 Specicaon.
P.#
Indicates a page in this reference guide for more informaon.
= 0
Indicates reserved for future use.
Command Funcon Pointers and Instances [3]
Devices and Queues [4]
Physical Devices [4.1]
VkResult vkEnumeratePhysicalDevices(
VkInstance instance,
uint32_t* pPhysicalDeviceCount,
VkPhysicalDevice* pPhysicalDevices);
void vkGetPhysicalDeviceProperes(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperes* pProperes);
P.14
void vkGetPhysicalDeviceProperes2(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperes2* pProperes);
typedef struct VkPhysicalDeviceProperes2 {
VkStructureType sType;
void* pNext;
VkPhysicalDeviceProperes properes;
P.14
} VkPhysicalDeviceProperes2;
pNext may point to structs:
VkPhysicalDeviceIDProperes P.14
VkPhysicalDeviceMaintenance3Properes P.14
VkPhysicalDeviceMulviewProperes P.14
VkPhysicalDevicePointClippingProperes P.14
VkPhysicalDeviceProtectedMemoryProperes P.15
VkPhysicalDeviceSubgroupProperes P.15
void vkGetPhysicalDeviceQueueFamilyProperes(
VkPhysicalDevice physicalDevice,
uint32_t* pQueueFamilyPropertyCount,
VkQueueFamilyProperes*
pQueueFamilyProperes);
void vkGetPhysicalDeviceQueueFamilyProperes2(
VkPhysicalDevice physicalDevice,
uint32_t* pQueueFamilyPropertyCount,
VkQueueFamilyProperes2*pQueueFamilyProperes);
typedef struct VkQueueFamilyProperes {
VkQueueFlags queueFlags;
uint32_t queueCount;
uint32_t mestampValidBits;
VkExtent3D minImageTransferGranularity;
P.12
} VkQueueFamilyProperes;
queueFlags:
VK_QUEUE_X_BIT where X is GRAPHICS, COMPUTE,
TRANSFER, PROTECTED, SPARSE_BINDING
typedef struct VkQueueFamilyProperes2 {
VkStructureType sType;
void* pNext; VkQueueFamilyProperes
queueFamilyProperes;
} VkQueueFamilyProperes2;
Devices [4.2]
VkResult vkEnumeratePhysicalDeviceGroups(
VkInstance instance,
uint32_t* pPhysicalDeviceGroupCount,
VkPhysicalDeviceGroupProperes*
pPhysicalDeviceGroupProperes);
typedef struct VkPhysicalDeviceGroupProperes {
VkStructureType sType;
void* pNext;
uint32_t physicalDeviceCount;
VkPhysicalDevice physicalDevices[
VK_MAX_DEVICE_GROUP_SIZE];
VkBool32 subsetAllocaon;
} VkPhysicalDeviceGroupProperes;
Device Creaon [4.2.1]
VkResult vkCreateDevice(
VkPhysicalDevice physicalDevice,
const VkDeviceCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkDevice* pDevice);
typedef struct VkDeviceCreateInfo {
VkStructureType sType;
const void* pNext;
VkDeviceCreateFlags ags;
= 0
uint32_t queueCreateInfoCount;
const VkDeviceQueueCreateInfo* pQueueCreateInfos;
uint32_t enabledLayerCount;
const char* const* ppEnabledLayerNames;
uint32_t enabledExtensionCount;
const char* const* ppEnabledExtensionNames;
const VkPhysicalDeviceFeatures* pEnabledFeatures;
P.14
} VkDeviceCreateInfo;
pNext may point to structs:
VkDeviceGroupDeviceCreateInfo
P.12
VkPhysicalDevice16BitStorageFeatures
P.14
VkPhysicalDeviceFeatures2
P.14
VkPhysicalDeviceMulviewFeatures
P.14
VkPhysicalDeviceProtectedMemoryFeatures
P.15
VkPhysicalDeviceSamplerYcbcrConversionFeatures
P.15
VkPhysicalDeviceVariablePointerFeatures
P.15
typedef struct VkDeviceGroupDeviceCreateInfo {
VkStructureType sType;
const void* pNext;
uint32_t physicalDeviceCount;
const VkPhysicalDevice* pPhysicalDevices;
} VkDeviceGroupDeviceCreateInfo;
Device Destrucon [4.2.4]
void vkDestroyDevice(
VkDevice device,
const VkAllocaonCallbacks* pAllocator);
P.12
Command Buers [5]
Also see Command Buer Lifecycle diagram.
P.11
Command Pools [5.2]
VkResult vkCreateCommandPool(
VkDevice device,
const VkCommandPoolCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkCommandPool* pCommandPool);
typedef struct VkCommandPoolCreateInfo {
VkStructureType sType;
const void* pNext;
VkCommandPoolCreateFlags ags;
uint32_t queueFamilyIndex;
} VkCommandPoolCreateInfo;
ags: VK_COMMAND_POOL_CREATE_X_BIT where X is
PROTECTED, RESET_COMMAND_BUFFER, TRANSIENT
void vkTrimCommandPool(VkDevice device,
VkCommandPool commandPool,
VkCommandPoolTrimFlags ags);
= 0
VkResult vkResetCommandPool(
VkDevice device, VkCommandPool commandPool,
VkCommandPoolResetFlags ags);
ags: VK_COMMAND_POOL_RESET_RELEASE_-
RESOURCES_BIT
void vkDestroyCommandPool(
VkDevice device, VkCommandPool commandPool,
const VkAllocaonCallbacks* pAllocator);
P.12
Connued on next page >
Command Funcon Pointers [3.1]
PFN_vkVoidFuncon vkGetInstanceProcAddr(
VkInstance instance, const char *pName);
PFN_vkVoidFuncon vkGetDeviceProcAddr(
VkDevice device, const char *pName);
PFN_vkVoidFuncon is:
typedef void(VKAPI_PTR *PFN_vkVoidFuncon)(void);
Instances [3.2]
VkResult vkEnumerateInstanceVersion(
uint32_t* pApiVersion);
VkResult vkCreateInstance(
const VkInstanceCreateInfo* pCreateInfo,
const VkAllocaonCallbacks *pAllocator,
P.12
VkInstance *pInstance);
typedef struct VkInstanceCreateInfo {
VkStructureType sType;
const void *pNext;
VkInstanceCreateFlags ags;
= 0
const VkApplicaonInfo* pApplicaonInfo;
uint32_t enabledLayerCount;
const char* const* ppEnabledLayerNames;
uint32_t enabledExtensionCount;
const char* const* ppEnabledExtensionNames;
} VkInstanceCreateInfo;
typedef struct VkApplicaonInfo {
VkStructureType sType;
const void *pNext;
const char* pApplicaonName;
uint32_t applicaonVersion;
const char* pEngineName;
uint32_t engineVersion;
uint32_t apiVersion;
} VkApplicaonInfo;
void vkDestroyInstance(
VkInstance instance,
const VkAllocaonCallbacks *pAllocator);
P.12
Return Codes [2.7.3]
Return codes are reported via VkResult return values.
Success Codes
Success codes are non-negave.
VK_SUCCESS VK_NOT_READY
VK_TIMEOUT VK_EVENT_{SET, RESET}
VK_INCOMPLETE VK_SUBOPTIMAL_KHR
Error Codes
Error codes are negave.
VK_ERROR_OUT_OF_{HOST, DEVICE}_MEMORY
VK_ERROR_{INITIALIZATION, MEMORY_MAP}_FAILED
VK_ERROR_DEVICE_LOST
VK_ERROR_{EXTENSION, FEATURE, LAYER}_NOT_PRESENT
VK_ERROR_INCOMPATIBLE_DRIVER
VK_ERROR_TOO_MANY_OBJECTS
VK_ERROR_FORMAT_NOT_SUPPORTED
VK_ERROR_FRAGMENTED_POOL
VK_ERROR_OUT_OF_POOL_MEMORY
VK_ERROR_INVALID_EXTERNAL_HANDLE
VK_ERROR_SURFACE_LOST_KHR
VK_ERROR_NATIVE_WINDOW_IN_USE_KHR
VK_ERROR_OUT_OF_DATE_KHR
VK_ERROR_INCOMPATIBLE_DISPLAY_KHR
Queues [4.3]
typedef struct VkDeviceQueueCreateInfo {
VkStructureType sType;
const void* pNext;
VkDeviceQueueCreateFlags ags;
uint32_t queueFamilyIndex;
uint32_t queueCount;
const oat* pQueuePriories;
} VkDeviceQueueCreateInfo;
ags: VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT
void vkGetDeviceQueue(VkDevice device,
uint32_t queueFamilyIndex, uint32_t queueIndex,
VkQueue* pQueue);
void vkGetDeviceQueue2(VkDevice device,
const VkDeviceQueueInfo2* pQueueInfo,
VkQueue* pQueue);
typedef struct VkDeviceQueueInfo2 {
VkStructureType sType; const void* pNext;
VkDeviceQueueCreateFlags ags;
uint32_t queueFamilyIndex; uint32_t queueIndex;
} VkDeviceQueueInfo2;
ags: VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT
www.khronos.org/vulkan
©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 2
Synchronizaon and Cache Control [6]
Fences [6.3]
Fence status is always either signaled or unsignaled.
VkResult vkCreateFence(
VkDevice device, const VkFenceCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkFence* pFence);
typedef struct VkFenceCreateInfo {
VkStructureType sType;
const void* pNext;
VkFenceCreateFlags ags;
} VkFenceCreateInfo;
ags: VK_FENCE_CREATE_SIGNALED_BIT
pNext may point to struct:
VkExportFenceCreateInfo
P.12
void vkDestroyFence(
VkDevice device, VkFence fence,
const VkAllocaonCallbacks* pAllocator);
P.12
VkResult vkGetFenceStatus(
VkDevice device, VkFence fence);
VkResult vkResetFences(VkDevice device,
uint32_t fenceCount, const VkFence* pFences);
VkResult vkWaitForFences(VkDevice device,
uint32_t fenceCount, const VkFence* pFences,
VkBool32 waitAll, uint64_t meout);
Semaphores [6.4]
Semaphore status is always either signaled or unsignaled.
VkResult vkCreateSemaphore(
VkDevice device,
const VkSemaphoreCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkSemaphore* pSemaphore);
typedef struct VkSemaphoreCreateInfo {
VkStructureType sType; const void* pNext;
VkSemaphoreCreateFlags ags;
= 0
} VkSemaphoreCreateInfo;
pNext may point to struct:
VkExportSemaphoreCreateInfo
P.12
void vkDestroySemaphore(
VkDevice device, VkSemaphore semaphore,
const VkAllocaonCallbacks* pAllocator);
P.12
Events [6.5]
Events represent a ne-grained synchronizaon primive
that can be used to gauge progress through a sequence of
commands executed on a queue.
VkResult vkCreateEvent(
VkDevice device, const VkEventCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkEvent* pEvent);
typedef struct VkEventCreateInfo {
VkStructureType sType;
const void* pNext;
VkEventCreateFlags ags;
= 0
} VkEventCreateInfo;
void vkDestroyEvent(VkDevice device, VkEvent event,
const VkAllocaonCallbacks* pAllocator);
P.12
VkResult vkGetEventStatus(
VkDevice device, VkEvent event);
VkResult vk[Set, Reset]Event(
VkDevice device, VkEvent event);
VkResult vkCmd[Set, Reset]Event(
VkCommandBuer commandBuer, VkEvent event,
VkPipelineStageFlags stageMask);
P.15
void vkCmdWaitEvents(
VkCommandBuer commandBuer,
uint32_t eventCount,
const VkEvent* pEvents,
VkPipelineStageFlags srcStageMask,
P.15
VkPipelineStageFlags dstStageMask,
P.15
uint32_t memoryBarrierCount,
const VkMemoryBarrier* pMemoryBarriers,
P.13
uint32_t buerMemoryBarrierCount,
const VkBuerMemoryBarrier*
pBuerMemoryBarriers,
P.12
uint32_t imageMemoryBarrierCount,
const VkImageMemoryBarrier*
pImageMemoryBarriers);
P.13
Command Buers (connued)
Command Buer Lifeme [5.3]
VkResult vkAllocateCommandBuers(
VkDevice device,
const VkCommandBuerAllocateInfo* pAllocateInfo,
VkCommandBuer* pCommandBuers);
typedef struct VkCommandBuerAllocateInfo{
VkStructureType sType;
const void* pNext;
VkCommandPool commandPool;
VkCommandBuerLevel level;
uint32_t commandBuerCount;
} VkCommandBuerAllocateInfo;
level:
VK_COMMAND_BUFFER_LEVEL_{PRIMARY, SECONDARY}
VkResult vkResetCommandBuer(
VkCommandBuer commandBuer,
VkCommandBuerResetFlags ags);
ags:
VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT
void vkFreeCommandBuers(
VkDevice device, VkCommandPool commandPool,
uint32_t commandBuerCount,
const VkCommandBuer* pCommandBuers);
Command Buer Recording [5.4]
VkResult vkBeginCommandBuer(
VkCommandBuer commandBuer,
const VkCommandBuerBeginInfo* pBeginInfo);
typedef struct VkCommandBuerBeginInfo{
VkStructureType sType;
const void* pNext;
VkCommandBuerUsageFlags ags;
const VkCommandBuerInheritanceInfo* pInheritanceInfo;
} VkCommandBuerBeginInfo;
ags: VK_COMMAND_BUFFER_USAGE_X _BIT where X is
ONE_TIME_SUBMIT, RENDER_PASS_CONTINUE,
SIMULTANEOUS_USE
pNext may point to struct:
VkDeviceGroupCommandBuerBeginInfo
P.12
typedef struct VkCommandBuerInheritanceInfo {
VkStructureType sType;
const void* pNext;
VkRenderPass renderPass;
uint32_t subpass;
VkFramebuer framebuer;
VkBool32 occlusionQueryEnable;
VkQueryControlFlags queryFlags;
VkQueryPipelineStascFlags pipelineStascs;
P.15
} VkCommandBuerInheritanceInfo;
queryFlags: VK_QUERY_CONTROL_PRECISE_BIT
VkResult vkEndCommandBuer(
VkCommandBuer commandBuer);
Command Buer Submission [5.5]
VkResult vkQueueSubmit(
VkQueue queue, uint32_t submitCount,
const VkSubmitInfo* pSubmits, VkFence fence);
typedef struct VkSubmitInfo{
VkStructureType sType;
const void* pNext;
uint32_t waitSemaphoreCount;
const VkSemaphore* pWaitSemaphores;
const VkPipelineStageFlags* pWaitDstStageMask;
P.15
uint32_t commandBuerCount;
const VkCommandBuer* pCommandBuers;
uint32_t signalSemaphoreCount;
const VkSemaphore* pSignalSemaphores;
} VkSubmitInfo;
pNext may point to structs:
VkDeviceGroupSubmitInfo
P.12
VkProtectedSubmitInfo
P.15
Secondary Command Buer Execuon [5.7]
void vkCmdExecuteCommands(
VkCommandBuer commandBuer,
uint32_t commandBuerCount,
const VkCommandBuer* pCommandBuers);
Command Buer Device Mask [5.8]
void vkCmdSetDeviceMask(
VkCommandBuer commandBuer,
uint32_t deviceMask);
Pipeline Barriers [6.6]
void vkCmdPipelineBarrier(
VkCommandBuer commandBuer,
VkPipelineStageFlags srcStageMask,
P.15
VkPipelineStageFlags dstStageMask,
P.15
VkDependencyFlags dependencyFlags,
P.1512
uint32_t memoryBarrierCount,
const VkMemoryBarrier* pMemoryBarriers,
P.13
uint32_t buerMemoryBarrierCount,
const VkBuerMemoryBarrier*
pBuerMemoryBarriers,
P.12
uint32_t imageMemoryBarrierCount,
const VkImageMemoryBarrier*
pImageMemoryBarriers);
P.13
Wait Idle Operaons [6.8]
VkResult vkQueueWaitIdle(VkQueue queue);
VkResult vkDeviceWaitIdle(VkDevice device);
Notes
www.khronos.org/vulkan©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 3
Pipelines [9]
Compute Pipelines [9.1]
Compute pipelines consist of a single stac compute shader
stage and the pipeline layout.
VkResult vkCreateComputePipelines(
VkDevice device, VkPipelineCache pipelineCache,
uint32_t createInfoCount,
const VkComputePipelineCreateInfo* pCreateInfos,
const VkAllocaonCallbacks* pAllocator,
P.12
VkPipeline* pPipelines);
typedef struct VkComputePipelineCreateInfo {
VkStructureType sType; const void* pNext;
VkPipelineCreateFlags ags;
P.15
VkPipelineShaderStageCreateInfo stage;
P.15
VkPipelineLayout layout;
VkPipeline basePipelineHandle;
int32_t basePipelineIndex;
} VkComputePipelineCreateInfo;
Graphics Pipelines [9.2]
VkResult vkCreateGraphicsPipelines(
VkDevice device,
VkPipelineCache pipelineCache,
uint32_t createInfoCount,
const VkGraphicsPipelineCreateInfo* pCreateInfos,
const VkAllocaonCallbacks* pAllocator,
P.12
VkPipeline* pPipelines);
In VkGraphicsPipelineCreateInfo below, replace X with
VkPipeline and replace Y with StateCreateInfo. For example,
XVertexInputY would be VxPipelineVertexInputStateCreateInfo.
typedef struct VkGraphicsPipelineCreateInfo {
VkStructureType sType;
const void* pNext;
VkPipelineCreateFlags ags;
P.15
uint32_t stageCount;
const VkPipelineShaderStageCreateInfo* pStages;
P.15
const XVertexInputY* pVertexInputState;
const XInputAssemblyY* pInputAssemblyState;
const XTessellaonY* pTessellaonState;
const XViewportY* pViewportState;
const XRasterizaonY* pRasterizaonState;
const XMulsampleY* pMulsampleState;
const XDepthStencilY* pDepthStencilState;
const XColorBlendY* pColorBlendState;
const XDynamicY* pDynamicState;
VkPipelineLayout layout;
VkRenderPass renderPass;
uint32_t subpass;
VkPipeline basePipelineHandle;
int32_t basePipelineIndex;
} VkGraphicsPipelineCreateInfo;
typedef struct VkPipelineVertexInputStateCreateInfo {
VkStructureType sType;
const void* pNext;
VkPipelineVertexInputStateCreateFlags ags;
= 0
uint32_t vertexBindingDescriponCount;
const VkVertexInputBindingDescripon*
pVertexBindingDescripons;
uint32_t vertexAributeDescriponCount;
const VkVertexInputAributeDescripon*
pVertexAributeDescripons;
} VkPipelineVertexInputStateCreateInfo;
typedef struct VkVertexInputBindingDescripon {
uint32_t binding;
uint32_t stride;
VkVertexInputRate inputRate;
} VkVertexInputBindingDescripon;
inputRate:
VK_VERTEX_INPUT_RATE_{VERTEX, INSTANCE}
Connued on next page >
Shaders [8]
Shader Modules [8.1]
VkResult vkCreateShaderModule(
VkDevice device,
const VkShaderModuleCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkShaderModule* pShaderModule);
typedef struct VkShaderModuleCreateInfo {
VkStructureType sType;
const void* pNext;
VkShaderModuleCreateFlags ags;
= 0
size_t codeSize;
const uint32_t* pCode;
} VkShaderModuleCreateInfo;
void vkDestroyShaderModule(
VkDevice device,
VkShaderModule shaderModule,
const VkAllocaonCallbacks* pAllocator);
P.12
Built-in Variables [14.6]
The built-in variables listed below are accessed in shaders by
declaring the variable using a BuiltIn decoraon.
Decoraon Type
BaseInstance Scalar 32-bit integer
BaseVertex Scalar 32-bit integer
ClipDistance Array of 32-bit oats
CullDistance Array of 32-bit oats
DeviceIndex Scalar 32-bit integer
DrawIndex Scalar 32-bit integer
FragCoord 4-component vector of 32-bit oats
FragDepth Scalar 32-bit oat
FrontFacing Scalar 32-bit integer
GlobalInvocaonID 3-component vector of 32-bit ints
HelperInvocaon Scalar 32-bit integer
InvocaonID Scalar 32-bit integer
InstanceIndex Scalar 32-bit integer
Layer Scalar 32-bit integer
LocalInvocaonID 3-component vector of 32-bit ints
NumSubgroups Scalar 32-bit integer
NumWorkGroups 3-component vector of 32-bit ints
PatchVerces Scalar 32-bit integer
PointCoord 2-component vector of 32-bit oats
PointSize Scalar 32-bit oat value
Posion 4-component vector of 32-bit oats
PrimiveID Scalar 32-bit integer
SampleID Scalar 32-bit integer
SampleMask Array of 32-bit integers
SamplePosion 2-component vector of oat values
SubgroupId Scalar 32-bit integer
Subgroup{Eq,Ge,Gt,Le,Lt}Mask 4-component vector of 32-bit ints
SubgroupLocalInvocaonId Scalar 32-bit integer
SubgroupSize Scalar 32-bit integer
TessCoord 3-component vector of 32-bit oats
TessLevelOuter Array of size 2 of 32-bit oats
TessLevelInner Array of size 4 of 32-bit oats
VertexIndex 32-bit integer
ViewIndex Scalar 32-bit integer
ViewportIndex 32-bit integer
WorkgroupSize 3-component vector of 32-bit ints
WorkgroupID 3-component vector of 32-bit ints
Render Pass [7]
A render pass represents a collecon of aachments,
subpasses, and dependencies between the subpasses, and
describes how the aachments are used over the course of
the subpasses.
Render Pass Creaon [7.1]
VkResult vkCreateRenderPass(VkDevice device,
const VkRenderPassCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkRenderPass* pRenderPass);
typedef struct VkRenderPassCreateInfo {
VkStructureType sType;
const void* pNext;
VkRenderPassCreateFlags ags;
= 0
uint32_t aachmentCount;
const VkAachmentDescripon* pAachments;
uint32_t subpassCount;
const VkSubpassDescripon* pSubpasses;
uint32_t dependencyCount;
const VkSubpassDependency* pDependencies;
} VkRenderPassCreateInfo;
pNext may point to structs:
VkRenderPassInputAachmentAspectCreateInfo
P.1315
VkRenderPassMulviewCreateInfo
P.1315
typedef struct VkAachmentDescripon {
VkAachmentDescriponFlags ags;
VkFormat format;
P.13
VkSampleCountFlagBits samples;
P.15
VkAachmentLoadOp loadOp;
VkAachmentStoreOp storeOp;
VkAachmentLoadOp stencilLoadOp;
VkAachmentStoreOp stencilStoreOp;
VkImageLayout inialLayout;
P.13
VkImageLayout nalLayout;
P.13
} VkAachmentDescripon;
ags: VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT
loadOp, stencilLoadOp: VK_ATTACHMENT_LOAD_OP_X
where X is LOAD, CLEAR, DONT_CARE
storeOp, stencilStoreOp: VK_ATTACHMENT_STORE_OP_X
where X is STORE, DONT_CARE
typedef struct VkSubpassDescripon {
VkSubpassDescriponFlags ags;
VkPipelineBindPoint pipelineBindPoint;
P.1315
uint32_t inputAachmentCount;
const VkAachmentReference* pInputAachments;
uint32_t colorAachmentCount;
const VkAachmentReference* pColorAachments;
const VkAachmentReference*
pResolveAachments;
const VkAachmentReference*
pDepthStencilAachment;
uint32_t preserveAachmentCount;
const uint32_t* pPreserveAachments;
} VkSubpassDescripon;
typedef struct VkAachmentReference {
uint32_t aachment;
VkImageLayout layout;
P.13
} VkAachmentReference;
typedef struct VkSubpassDependency {
uint32_t srcSubpass;
uint32_t dstSubpass;
VkPipelineStageFlags srcStageMask;
P.15
VkPipelineStageFlags dstStageMask;
P.12
VkAccessFlags srcAccessMask;
P.12
VkAccessFlags dstAccessMask;
P.12
VkDependencyFlags dependencyFlags;
P.1512
} VkSubpassDependency;
void vkDestroyRenderPass(VkDevice device,
VkRenderPass renderPass,
const VkAllocaonCallbacks* pAllocator);
P.12
Framebuers [7.3]
VkResult vkCreateFramebuer(VkDevice device,
const VkFramebuerCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkFramebuer* pFramebuer);
typedef struct VkFramebuerCreateInfo {
VkStructureType sType;
const void* pNext;
VkFramebuerCreateFlags ags;
= 0
VkRenderPass renderPass;
uint32_t aachmentCount;
const VkImageView* pAachments;
uint32_t width;
uint32_t height;
uint32_t layers;
} VkFramebuerCreateInfo;
void vkDestroyFramebuer(
VkDevice device, VkFramebuer framebuer,
const VkAllocaonCallbacks* pAllocator);
P.12
Render Pass Commands [7.4]
void vkCmdBeginRenderPass(
VkCommandBuer commandBuer,
const VkRenderPassBeginInfo* pRenderPassBegin,
VkSubpassContents contents);
contents: VK_SUBPASS_CONTENTS_X where X is INLINE,
SECONDARY_COMMAND_BUFFERS
typedef struct VkRenderPassBeginInfo {
VkStructureType sType;
const void* pNext;
VkRenderPass renderPass;
VkFramebuer framebuer;
VkRect2D renderArea;
P.15
uint32_t clearValueCount;
const VkClearValue* pClearValues;
P.12
} VkRenderPassBeginInfo;
pNext may point to struct:
VkDeviceGroupRenderPassBeginInfo
P.12
void vkGetRenderAreaGranularity(
VkDevice device, VkRenderPass renderPass,
VkExtent2D* pGranularity);
P.12
void vkCmdNextSubpass(
VkCommandBuer commandBuer,
VkSubpassContents contents);
contents: VK_SUBPASS_CONTENTS_X where X is
INLINE, SECONDARY_COMMAND_BUFFERS
void vkCmdEndRenderPass(
VkCommandBuer commandBuer);
www.khronos.org/vulkan
©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 4
Memory Allocaon [10]
Device Memory [10.2]
Device memory is memory that is visible to the device.
void vkGetPhysicalDeviceMemoryProperes(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceMemoryProperes*
pMemoryProperes);
P.14
void vkGetPhysicalDeviceMemoryProperes2(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceMemoryProperes2*
pMemoryProperes);
typedef struct VkPhysicalDeviceMemoryProperes2 {
VkStructureType sType; void* pNext;
VkPhysicalDeviceMemoryProperes
memoryProperes;
P.14
} VkPhysicalDeviceMemoryProperes2;
VkResult vkAllocateMemory(
VkDevice device,
const VkMemoryAllocateInfo* pAllocateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkDeviceMemory* pMemory);
typedef struct VkMemoryAllocateInfo {
VkStructureType sType; const void* pNext;
VkDeviceSize* allocaonSize;
uint32_t memoryTypeIndex;
} VkMemoryAllocateInfo;
pNext may point to structs:
VkExportMemoryAllocateInfo
P.12
VkMemoryAllocateFlagsInfo
P.13
VkMemoryDedicatedAllocateInfo
P.13
void vkFreeMemory(
VkDevice device,
VkDeviceMemory memory,
const VkAllocaonCallbacks* pAllocator);
P.12
Host Access to Device Memory Objects [10.2.1]
Memory objects created with vkAllocateMemory are not
directly host accessible. Memory objects created with memory
property VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT are
considered mappable. Memory objects must be mappable in
order to be successfully mapped on the host.
VkResult vkMapMemory(
VkDevice device,
VkDeviceMemory memory,
VkDeviceSize oset,
VkDeviceSize size,
VkMemoryMapFlags ags,
= 0
void** ppData);
VkResult vkFlushMappedMemoryRanges(
VkDevice device,
uint32_t memoryRangeCount,
const VkMappedMemoryRange* pMemoryRanges);
VkResult vkInvalidateMappedMemoryRanges(
VkDevice device,
uint32_t memoryRangeCount,
const VkMappedMemoryRange* pMemoryRanges);
typedef struct VkMappedMemoryRange {
VkStructureType sType; const void* pNext;
VkDeviceMemory memory;
VkDeviceSize oset;
VkDeviceSize size;
} VkMappedMemoryRange;
void vkUnmapMemory(
VkDevice device,
VkDeviceMemory memory);
Lazily Allocated Memory [10.2.2]
If the memory object is allocated from a heap with the
VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT bit set,
that object’s backing memory may be provided by the
implementaon lazily.
void vkGetDeviceMemoryCommitment(
VkDevice device,
VkDeviceMemory memory,
VkDeviceSize* pCommiedMemoryInBytes);
Peer Memory Features [10.2.4]
void vkGetDeviceGroupPeerMemoryFeatures(
VkDevice device, uint32_t heapIndex,
uint32_t localDeviceIndex, uint32_t remoteDeviceIndex,
VkPeerMemoryFeatureFlags* pPeerMemoryFeatures);
pPeerMemoryFeatures: VK_PEER_MEMORY_FEATURE_X
where X is COPY_SRC_BIT, COPY_DST_BIT,
GENERIC_SRC_BIT, GENERIC_DST_BIT
Pipelines (connued)
typedef struct VkVertexInputAributeDescripon {
uint32_t locaon;
uint32_t binding;
VkFormat format;
P.13
uint32_t oset;
} VkVertexInputAributeDescripon;
typedef struct VkPipelineInputAssemblyStateCreateInfo {
VkStructureType sType;
const void* pNext;
VkPipelineInputAssemblyStateCreateFlags ags;
= 0
VkPrimiveTopology topology;
VkBool32 primiveRestartEnable;
} VkPipelineInputAssemblyStateCreateInfo;
topology
: VK_PRIMITIVE_TOPOLOGY_X where X is
POINT_LIST, LINE_LIST, LINE_STRIP, TRIANGLE_LIST,
TRIANGLE_STRIP, TRIANGLE_FAN,
LINE_{LIST, STRIP}_WITH_ADJACENCY,
TRIANGLE_{LIST, STRIP}_WITH_ADJACENCY, PATCH_LIST
typedef struct VkPipelineTessellaonStateCreateInfo {
VkStructureType sType;
const void* pNext;
VkPipelineTessellaonStateCreateFlags ags;
= 0
uint32_t patchControlPoints;
} VkPipelineTessellaonStateCreateInfo;
pNext may point to structs:
VkPipelineTessellaonDomainOriginStateCreateInfo
P.15
typedef struct VkPipelineViewportStateCreateInfo {
VkStructureType sType;
const void* pNext;
VkPipelineViewportStateCreateFlags ags;
= 0
uint32_t viewportCount;
const VkViewport* pViewports;
P.15
uint32_t scissorCount;
const VkRect2D* pScissors;
P.15
} VkPipelineViewportStateCreateInfo;
typedef struct VkPipelineRasterizaonStateCreateInfo {
VkStructureType sType;
const void* pNext;
VkPipelineRasterizaonStateCreateFlags ags;
= 0
VkBool32 depthClampEnable;
VkBool32 rasterizerDiscardEnable;
VkPolygonMode polygonMode;
VkCullModeFlags cullMode;
VkFrontFace frontFace;
VkBool32 depthBiasEnable;
oat depthBiasConstantFactor;
oat depthBiasClamp;
oat depthBiasSlopeFactor;
oat lineWidth;
} VkPipelineRasterizaonStateCreateInfo;
polygonMode: VK_POLYGON_MODE_{FILL, LINE, POINT}
cullMode: VK_CULL_MODE_X where X is NONE, FRONT_BIT,
BACK_BIT, FRONT_AND_BACK
frontFace: VK_FRONT_FACE_[COUNTER_]CLOCKWISE
typedef struct VkPipelineMulsampleStateCreateInfo {
VkStructureType sType;
const void* pNext;
VkPipelineMulsampleStateCreateFlags ags;
= 0
VkSampleCountFlagBits rasterizaonSamples;
P.15
VkBool32 sampleShadingEnable;
oat minSampleShading;
const VkSampleMask* pSampleMask;
VkBool32 alphaToCoverageEnable;
VkBool32 alphaToOneEnable;
} VkPipelineMulsampleStateCreateInfo;
typedef struct VkPipelineDepthStencilStateCreateInfo {
VkStructureType sType;
const void* pNext;
VkPipelineDepthStencilStateCreateFlags ags;
= 0
VkBool32 depthTestEnable;
VkBool32 depthWriteEnable;
VkCompareOp depthCompareOp;
P.12
VkBool32 depthBoundsTestEnable;
VkBool32 stencilTestEnable;
VkStencilOpState front;
VkStencilOpState back;
oat minDepthBounds;
oat maxDepthBounds;
} VkPipelineDepthStencilStateCreateInfo;
typedef struct VkStencilOpState {
VkStencilOp failOp;
VkStencilOp passOp;
VkStencilOp depthFailOp;
VkCompareOp compareOp;
P.12
uint32_t compareMask;
uint32_t writeMask;
uint32_t reference;
} VkStencilOpState;
enum VkStencilOp: VK_STENCIL_OP_X where X is KEEP,
ZERO, REPLACE, INCREMENT_AND_{CLAMP, WRAP},
INVERT, DECREMENT_AND_{CLAMP, WRAP}
typedef struct VkPipelineColorBlendStateCreateInfo {
VkStructureType sType;
const void* pNext;
VkPipelineColorBlendStateCreateFlags ags;
= 0
VkBool32 logicOpEnable;
VkLogicOp logicOp;
uint32_t aachmentCount;
const VkPipelineColorBlendAachmentState*
pAachments;
oat blendConstants[4];
} VkPipelineColorBlendStateCreateInfo;
logicOp: VK_LOGIC_OP_X where X is CLEAR, AND,
AND_REVERSE, COPY, AND_INVERTED, NO_OP, XOR, OR,
NOR, EQUIVALENT, INVERT, OR_REVERSE,
COPY_INVERTED, OR_INVERTED, NAND, SET
blendOp: VK_BLEND_OP_X where X is ADD, SUBTRACT,
REVERSE_SUBTRACT, MIN, MAX
colorWriteMask
: VK_COLOR_COMPONENT_X where X is
R_BIT, G_BIT, B_BIT, A_BIT
typedef struct VkPipelineColorBlendAachmentState {
VkBool32 blendEnable;
VkBlendFactor srcColorBlendFactor;
VkBlendFactor dstColorBlendFactor;
VkBlendOp colorBlendOp;
P.12
VkBlendFactor srcAlphaBlendFactor;
VkBlendFactor dstAlphaBlendFactor;
VkBlendOp alphaBlendOp;
P.12
VkColorComponentFlags colorWriteMask;
} VkPipelineColorBlendAachmentState;
enum VkBlendFactor
: VK_BLEND_FACTOR_X where X is
ZERO, ONE, SRC_ALPHA_SATURATE,
[ONE_MINUS_]SRC_COLOR, [ONE_MINUS_]DST_COLOR,
[ONE_MINUS_]SRC_ALPHA, [ONE_MINUS_]DST_ALPHA,
[ONE_MINUS_]CONSTANT_COLOR,
[ONE_MINUS_]CONSTANT_ALPHA,
[ONE_MINUS_]SRC1_COLOR,
[ONE_MINUS_]SRC1_ALPHA
colorWriteMask:
VK_COLOR_COMPONENT_X_BIT where X is R, G, B, A
typedef struct VkPipelineDynamicStateCreateInfo {
VkStructureType sType;
const void* pNext;
VkPipelineDynamicStateCreateFlags ags;
= 0
uint32_t dynamicStateCount;
const VkDynamicState* pDynamicStates;
} VkPipelineDynamicStateCreateInfo;
pDynamicStates: Array of VK_DYNAMIC_STATE_X
where X is VIEWPORT, SCISSOR,
LINE_WIDTH, DEPTH_BIAS, BLEND_CONSTANTS,
DEPTH_BOUNDS, STENCIL_REFERENCE,
STENCIL_COMPARE_MASK, STENCIL_WRITE_MASK
Pipeline Destrucon [9.3]
void vkDestroyPipeline(
VkDevice device, VkPipeline pipeline,
const VkAllocaonCallbacks* pAllocator);
P.12
Pipeline Cache [9.6]
Pipeline cache objects allow the result of pipeline construcon
to be reused between pipelines and between runs of an
applicaon.
VkResult vkCreatePipelineCache(VkDevice device,
const VkPipelineCacheCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkPipelineCache* pPipelineCache);
typedef struct VkPipelineCacheCreateInfo {
VkStructureType sType;
const void* pNext;
VkPipelineCacheCreateFlags ags;
= 0
size_t inialDataSize;
const void* pInialData;
} VkPipelineCacheCreateInfo;
VkResult vkMergePipelineCaches(VkDevice device,
VkPipelineCache dstCache, uint32_t srcCacheCount,
const VkPipelineCache* pSrcCaches);
VkResult vkGetPipelineCacheData(VkDevice device,
VkPipelineCache pipelineCache,
size_t* pDataSize, void* pData);
void vkDestroyPipelineCache(VkDevice device,
VkPipelineCache pipelineCache,
const VkAllocaonCallbacks* pAllocator);
P.12
Pipeline Binding [9.8]
void vkCmdBindPipeline(
VkCommandBuer commandBuer,
VkPipelineBindPoint pipelineBindPoint,
P.1315
VkPipeline pipeline);
www.khronos.org/vulkan©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 5
Resource Creaon [11]
Buers [11.1]
Buers represent linear arrays of data which are used for various
purposes by binding them to a graphics or compute pipeline via
descriptor sets or via certain commands, or by directly specifying
them as parameters to certain commands.
VkResult vkCreateBuer(
VkDevice device,
const VkBuerCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkBuer* pBuer);
typedef struct VkBuerCreateInfo {
VkStructureType sType;
const void* pNext;
VkBuerCreateFlags ags;
VkDeviceSize size;
VkBuerUsageFlags usage;
P.12
VkSharingMode sharingMode;
P.15
uint32_t queueFamilyIndexCount;
const uint32_t* pQueueFamilyIndices;
} VkBuerCreateInfo;
ags:
VK_BUFFER_CREATE_SPARSE_X_BIT where X is
ALIASED, BINDING, PROTECTED, RESIDENCY
pNext may point to struct:
VkExternalMemoryBuerCreateInfo
P.12
void vkDestroyBuer(
VkDevice device,
VkBuer buer,
const VkAllocaonCallbacks* pAllocator);
P.12
Buer Views [11.2]
A buer view represents a conguous range of a buer and a
specic format to be used to interpret the data.
VkResult vkCreateBuerView(
VkDevice device,
const VkBuerViewCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkBuerView* pView);
typedef struct VkBuerViewCreateInfo {
VkStructureType sType;
const void* pNext;
VkBuerViewCreateFlags ags;
= 0
VkBuer buer;
VkFormat format;
P.13
VkDeviceSize oset;
VkDeviceSize range;
} VkBuerViewCreateInfo;
void vkDestroyBuerView(
VkDevice device,
VkBuerView buerView,
const VkAllocaonCallbacks* pAllocator);
P.12
Images [11.3]
Images represent muldimensional (up to 3) arrays of data which
can be used for various purposes by binding them to the graphics
or compute pipeline via descriptor sets, or by directly specifying
them as parameters to certain commands.
VkResult vkCreateImage(
VkDevice device,
const VkImageCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkImage* pImage);
typedef struct VkImageCreateInfo {
VkStructureType sType;
const void* pNext;
VkImageCreateFlags ags;
P.13
VkImageType imageType;
P.13
VkFormat format;
P.13
VkExtent3D extent;
PP.12
uint32_t mipLevels;
uint32_t arrayLayers;
VkSampleCountFlagBits samples;
P.15
VkImageTiling ling;
P.13
VkImageUsageFlags usage;
P.13
VkSharingMode sharingMode;
P.15
uint32_t queueFamilyIndexCount;
const uint32_t* pQueueFamilyIndices;
VkImageLayout inialLayout;
P.13
} VkImageCreateInfo;
pNext may point to struct:
VkExternalMemoryImageCreateInfo
P.P.13
typedef struct VkImageSwapchainCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkSwapchainKHR swapchain;
} VkImageSwapchainCreateInfoKHR;
void vkGetImageSubresourceLayout(
VkDevice device,
VkImage image,
const VkImageSubresource* pSubresource,
VkSubresourceLayout* pLayout);
typedef struct VkImageSubresource {
VkImageAspectFlags aspectMask;
P.13
uint32_t mipLevel;
uint32_t arrayLayer;
} VkImageSubresource;
Connued on next page >
Vulkan Pipeline Diagram [9]
Some Vulkan commands specify geometric
objects to be drawn or computaonal 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 buers. Commands are
eecvely sent through a processing pipeline,
either a graphics pipeline or a compute pipeline.
The heavy black arrows in this illustraon show
the Vulkan graphics and compute pipelines and
indicate data ow
Fixed funcon stage
Programmable stage
Buer
Image
Constants
www.khronos.org/vulkan
©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 6
Resource Descriptors
[13]
A descriptor is an opaque data structure represenng a
shader resource such as a buer view, image view, sampler, or
combined image sampler.
Descriptor Set Layout [13.2.1]
VkResult vkCreateDescriptorSetLayout(
VkDevice device,
const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
P.12
const VkAllocaonCallbacks* pAllocator,
P.12
VkDescriptorSetLayout* pSetLayout);
void vkGetDescriptorSetLayoutSupport(
VkDevice device,
const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
P.1512
VkDescriptorSetLayoutSupport* pSupport);
typedef struct VkDescriptorSetLayoutSupport {
VkStructureType sType; void* pNext;
VkBool32 supported;
} VkDescriptorSetLayoutSupport;
void vkDestroyDescriptorSetLayout(
VkDevice device,
VkDescriptorSetLayout descriptorSetLayout,,
const VkAllocaonCallbacks* pAllocator);
P.12
Pipeline Layouts [13.2.2]
VkResult vkCreatePipelineLayout(
VkDevice device,
const VkPipelineLayoutCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkPipelineLayout* pPipelineLayout);
typedef struct VkPipelineLayoutCreateInfo {
VkStructureType sType;
const void* pNext;
VkPipelineLayoutCreateFlags ags;
= 0
uint32_t setLayoutCount;
const VkDescriptorSetLayout* pSetLayouts;
uint32_t pushConstantRangeCount;
const VkPushConstantRange* pPushConstantRanges;
} VkPipelineLayoutCreateInfo;
typedef struct VkPushConstantRange {
VkShaderStageFlags stageFlags;
P.15
uint32_t oset;
uint32_t size;
} VkPushConstantRange;
void vkDestroyPipelineLayout(
VkDevice device,
VkPipelineLayout pipelineLayout,
const VkAllocaonCallbacks* pAllocator);
P.12
Allocaon of Descriptor Sets [13.2.3]
VkResult vkCreateDescriptorPool(
VkDevice device,
const VkDescriptorPoolCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkDescriptorPool* pDescriptorPool);
Connued on next page >
Samplers
[12]
VkSampler objects encapsulate the state of an image sampler
which is used by the implementaon to read image data and
apply ltering and other transformaons for the shader.
VkResult vkCreateSampler(
VkDevice device,
const VkSamplerCreateInfo* pCreateInfo,
const VkAllocaonCallbacks *pAllocator,
P.12
VkSampler *pSampler);
typedef struct VkSamplerCreateInfo {
VkStructureType sType; const void *pNext;
VkSamplerCreateFlags ags;
= 0
VkFilter magFilter; VkFilter minFilter;
VkSamplerMipmapMode mipmapMode;
VkSamplerAddressMode addressModeU;
VkSamplerAddressMode addressModeV;
VkSamplerAddressMode addressModeW;
oat mipLodBias;
VkBool32 anisotropyEnable;
oat maxAnisotropy;
VkBool32 compareEnable;
VkCompareOp compareOp;
P.12
oat minLod; oat maxLod;
VkBorderColor borderColor;
VkBool32 unnormalizedCoordinates;
} VkSamplerCreateInfo;
magFilter, minFilter: VK_FILTER_NEAREST,
VK_FILTER_LINEAR
mipmapMode:
VK_SAMPLER_MIPMAP_MODE_{NEAREST, LINEAR}
borderColor: VK_BORDER_COLOR_{FLOAT, INT}_X
where X is TRANSPARENT_BLACK, OPAQUE_BLACK,
OPAQUE_WHITE
addressMode{U, V, W}:
VK_SAMPLER_ADDRESS_MODE_X where X is REPEAT,
MIRRORED_REPEAT, MIRROR_CLAMP_TO_EDGE,
CLAMP_TO_EDGE, CLAMP_TO_BORDER
pNext may point to structs:
VkSamplerYcbcrConversionInfo
P.15
void vkDestroySampler(
VkDevice device,
VkSampler sampler,
const VkAllocaonCallbacks *pAllocator);
P.12
Sampler Y’CBCR Conversion [12.1]
VkResult vkCreateSamplerYcbcrConversion(
VkDevice device,
const VkSamplerYcbcrConversionCreateInfo*
pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkSamplerYcbcrConversion* pYcbcrConversion);
typedef struct VkSamplerYcbcrConversionCreateInfo {
VkStructureType sType;
const void* pNext;
VkFormat format;
P.13
VkSamplerYcbcrModelConversion ycbcrModel;
VkSamplerYcbcrRange ycbcrRange;
VkComponentMapping components;
VkChromaLocaon xChromaOset;
VkChromaLocaon yChromaOset;
VkFilter chromaFilter;
VkBool32 forceExplicitReconstrucon;
} VkSamplerYcbcrConversionCreateInfo;
VkSamplerYcbcrModelConversion:
VK_SAMPLER_YCBCR_MODEL_CONVERSION_X where X
is {RGB, YCBCR}_IDENTITY, YCBCR_{709, 601, 2020}
VkSamplerYcbcrRange:
VK_SAMPLER_YCBCR_RANGE_ITU_{FULL, NARROW}
VkChromaLocaon:
VK_CHROMA_LOCATION_{COSITED_EVEN, MIDPOINT}
VkFilter:
VK_FILTER_{NEAREST, LINEAR}
void vkDestroySamplerYcbcrConversion(VkDevice device,
VkSamplerYcbcrConversion ycbcrConversion,
const VkAllocaonCallbacks* pAllocator);
P.12
Resource Creaon (connued)
typedef struct VkSubresourceLayout {
VkDeviceSize oset;
VkDeviceSize size;
VkDeviceSize rowPitch;
VkDeviceSize arrayPitch;
VkDeviceSize depthPitch;
} VkSubresourceLayout;
void vkDestroyImage(
VkDevice device, VkImage image,
const VkAllocaonCallbacks* pAllocator);
P.12
Image Views [11.5]
Image objects are not directly accessed by pipeline shaders for
reading or wring image data. Instead, image views represenng
conguous ranges of the image subresources and containing
addional metadata are used for that purpose.
VkResult vkCreateImageView(
VkDevice device,
const VkImageViewCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkImageView* pView);
typedef struct VkImageViewCreateInfo {
VkStructureType sType; const void* pNext;
VkImageViewCreateFlags ags;
= 0
VkImage image;
VkImageViewType viewType;
VkFormat format;
P.13
VkComponentMapping components;
VkImageSubresourceRange subresourceRange;
P.13
} VkImageViewCreateInfo;
viewType: VK_IMAGE_VIEW_TYPE_X where X is
1D, 2D, 3D,
CUBE, 1D_ARRAY, 2D_ARRAY, CUBE_ARRAY
pNext may point to structs:
VkImageViewUsageCreateInfo
P.13
VkSamplerYcbcrConversionInfo
P.15
typedef struct VkComponentMapping {
VkComponentSwizzle r;
VkComponentSwizzle g;
VkComponentSwizzle b;
VkComponentSwizzle a;
} VkComponentMapping;
enum VkComponentSwizzle: VK_COMPONENT_SWIZZLE_X
where X is
IDENTITY, ZERO, ONE, R, G, B, A
void vkDestroyImageView(VkDevice device,
VkImageView imageView,
const VkAllocaonCallbacks* pAllocator);
P.12
Resource Memory Associaon [11.6]
Resources are inially created as virtual allocaons with no
backing memory. Device memory is allocated separately and
then associated with the resource.
void vkGetBuerMemoryRequirements(
VkDevice device,
VkBuer buer,
VkMemoryRequirements* pMemoryRequirements);
P.13
void vkGetBuerMemoryRequirements2(VkDevice device,
const VkBuerMemoryRequirementsInfo2* pInfo,
VkMemoryRequirements2* pMemoryRequirements);
P.13
typedef struct VkBuerMemoryRequirementsInfo2 {
VkStructureType sType;
const void* pNext;
VkBuer buer;
} VkBuerMemoryRequirementsInfo2;
void vkGetImageMemoryRequirements(
VkDevice device, VkImage image,
VkMemoryRequirements* pMemoryRequirements);
P.13
void vkGetImageMemoryRequirements2(VkDevice device,
const VkImageMemoryRequirementsInfo2* pInfo,
VkMemoryRequirements2* pMemoryRequirements);
P.13
typedef struct VkImageMemoryRequirementsInfo2 {
VkStructureType sType; const void* pNext;
VkImage image;
} VkImageMemoryRequirementsInfo2;
pNext may point to struct:
VkImagePlaneMemoryRequirementsInfo
P.13
VkResult vkBindBuerMemory(VkDevice device,
VkBuer buer, VkDeviceMemory memory,
VkDeviceSize memoryOset);
VkResult vkBindBuerMemory2(VkDevice device,
uint32_t bindInfoCount,
const VkBindBuerMemoryInfo* pBindInfos);
typedef struct VkBindBuerMemoryInfo {
VkStructureType sType;
const void* pNext;
VkBuer buer;
VkDeviceMemory memory;
VkDeviceSize memoryOset;
} VkBindBuerMemoryInfo;
pNext may point to struct:
VkBindBuerMemoryDeviceGroupInfo
P.12
VkResult vkBindImageMemory(VkDevice device,
VkImage image, VkDeviceMemory memory,
VkDeviceSize memoryOset);
VkResult vkBindImageMemory2(VkDevice device,
uint32_t bindInfoCount,
const VkBindImageMemoryInfo* pBindInfos);
typedef struct VkBindImageMemoryInfo {
VkStructureType sType;
const void* pNext;
VkImage image;
VkDeviceMemory memory;
VkDeviceSize memoryOset;
} VkBindImageMemoryInfo;
pNext may point to structs:
VkBindImageMemoryDeviceGroupInfo
P.12
VkBindImagePlaneMemoryInfo
P.12
www.khronos.org/vulkan©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 7
Queries [16]
Query Pools [16.1]
VkResult vkCreateQueryPool(
VkDevice device,
const VkQueryPoolCreateInfo* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkQueryPool* pQueryPool);
typedef struct VkQueryPoolCreateInfo {
VkStructureType sType;
const void* pNext;
VkQueryPoolCreateFlags ags;
= 0
VkQueryType queryType;
uint32_t queryCount;
VkQueryPipelineStascFlags pipelineStascs;
P.15
} VkQueryPoolCreateInfo;
queryType: VK_QUERY_TYPE_OCCLUSION,
VK_QUERY_TYPE_PIPELINE_STATISTICS,
VK_QUERY_TYPE_TIMESTAMP
void vkDestroyQueryPool(
VkDevice device,
VkQueryPool queryPool,
const VkAllocaonCallbacks* pAllocator);
P.12
Query Operaon [16.2]
void vkCmdResetQueryPool(
VkCommandBuer commandBuer,
VkQueryPool queryPool,
uint32_t rstQuery,
uint32_t queryCount);
void vkCmdBeginQuery(
VkCommandBuer commandBuer,
VkQueryPool queryPool,
uint32_t entry,
VkQueryControlFlags ags);
ags: VK_QUERY_CONTROL_PRECISE_BIT
void vkCmdEndQuery(
VkCommandBuer commandBuer,
VkQueryPool queryPool,
uint32_t query);
VkResult vkGetQueryPoolResults(
VkDevice device,
VkQueryPool queryPool,
uint32_t rstQuery,
uint32_t queryCount,
size_t dataSize,
void* pData,
VkDeviceSize stride,
VkQueryResultFlags ags);
ags: VK_QUERY_RESULT_X_BIT where X is
64, WAIT, WITH_AVAILABILITY, PARTIAL
void vkCmdCopyQueryPoolResults(
VkCommandBuer commandBuer,
VkQueryPool queryPool,
uint32_t rstQuery,
uint32_t queryCount,
VkBuer dstBuer,
VkDeviceSize dstOset,
VkDeviceSize stride,
VkQueryResultFlags ags);
ags: VK_QUERY_RESULT_X_BIT where X is
64, WAIT, WITH_AVAILABILITY, PARTIAL
Timestamp Queries [16.5]
void vkCmdWriteTimestamp(
VkCommandBuer commandBuer,
VkPipelineStageFlagBits pipelineStage,
P.15
VkQueryPool queryPool,
uint32_t query);
Resource Descriptors (connued)
typedef struct VkDescriptorPoolCreateInfo {
VkStructureType sType;
const void* pNext;
VkDescriptorPoolCreateFlags ags;
uint32_t maxSets;
uint32_t poolSizeCount;
const VkDescriptorPoolSize* pPoolSizes;
} VkDescriptorPoolCreateInfo;
ags: VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_-
SET_BIT
typedef struct VkDescriptorPoolSize {
VkDescriptorType type;
P.12
uint32_t descriptorCount;
} VkDescriptorPoolSize;
void vkDestroyDescriptorPool(
VkDevice device,
VkDescriptorPool descriptorPool,
const VkAllocaonCallbacks* pAllocator);
P.12
VkResult vkAllocateDescriptorSets(
VkDevice device,
const VkDescriptorSetAllocateInfo* pAllocateInfo,
VkDescriptorSet* pDescriptorSets);
typedef struct VkDescriptorSetAllocateInfo {
VkStructureType sType; const void* pNext;
VkDescriptorPool descriptorPool;
uint32_t descriptorSetCount;
const VkDescriptorSetLayout* pSetLayouts;
} VkDescriptorSetAllocateInfo;
VkResult vkFreeDescriptorSets(
VkDevice device,
VkDescriptorPool descriptorPool,
uint32_t descriptorSetCount,
const VkDescriptorSet* pDescriptorSets);
VkResult vkResetDescriptorPool(
VkDevice device,
VkDescriptorPool descriptorPool,
VkDescriptorPoolResetFlags ags);
Descriptor Set Updates [13.2.4]
void vkUpdateDescriptorSets(
VkDevice device,
uint32_t descriptorWriteCount,
const VkWriteDescriptorSet* pDescriptorWrites,
uint32_t descriptorCopyCount,
const VkCopyDescriptorSet* pDescriptorCopies);
typedef struct VkWriteDescriptorSet {
VkStructureType sType; const void* pNext;
VkDescriptorSet dstSet;
uint32_t dstBinding;
uint32_t dstArrayElement;
uint32_t descriptorCount;
VkDescriptorType descriptorType;
P.12
const VkDescriptorImageInfo* pImageInfo;
const VkDescriptorBuerInfo* pBuerInfo;
const VkBuerView* pTexelBuerView;
} VkWriteDescriptorSet;
typedef struct VkDescriptorImageInfo {
VkSampler sampler;
VkImageView imageView;
VkImageLayout imageLayout;
P.13
} VkDescriptorImageInfo;
typedef struct VkDescriptorBuerInfo {
VkBuer buer;
VkDeviceSize oset;
VkDeviceSize range;
} VkDescriptorBuerInfo;
typedef struct VkCopyDescriptorSet {
VkStructureType sType; const void* pNext;
VkDescriptorSet srcSet;
uint32_t srcBinding;
uint32_t srcArrayElement;
VkDescriptorSet dstSet;
uint32_t dstBinding;
uint32_t dstArrayElement;
uint32_t descriptorCount;
} VkCopyDescriptorSet;
Descriptor Set Updates with Templates [13.2.6]
VkResult vkCreateDescriptorUpdateTemplate(
VkDevice device,
const VkDescriptorUpdateTemplateCreateInfo*
pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkDescriptorUpdateTemplate*
pDescriptorUpdateTemplate);
typedef struct VkDescriptorUpdateTemplateCreateInfo {
VkStructureType sType;
void* pNext;
VkDescriptorUpdateTemplateCreateFlags ags;
= 0
uint32_t descriptorUpdateEntryCount;
const VkDescriptorUpdateTemplateEntry*
pDescriptorUpdateEntries;
VkDescriptorUpdateTemplateType templateType;
VkDescriptorSetLayout descriptorSetLayout;
VkPipelineBindPoint pipelineBindPoint;
P.1315
VkPipelineLayout pipelineLayout;
uint32_t set;
= 0
} VkDescriptorUpdateTemplateCreateInfo;
VKPipelineBindPoint: VK_PIPELINE_BIND_POINT_X
where X is GRAPHICS, COMPUTE
templateType: VK_DESCRIPTOR_UPDATE_TEMPLATE_-
TYPE_DESCRIPTOR_SET
typedef struct VkDescriptorUpdateTemplateEntry {
uint32_t dstBinding;
uint32_t dstArrayElement;
uint32_t descriptorCount;
VkDescriptorType descriptorType;
P.12
size_t oset;
size_t stride;
} VkDescriptorUpdateTemplateEntry;
void vkDestroyDescriptorUpdateTemplate(
VkDevice device,
VkDescriptorUpdateTemplate
descriptorUpdateTemplate,
const VkAllocaonCallbacks* pAllocator);
P.12
void vkUpdateDescriptorSetWithTemplate(
VkDevice device,
VkDescriptorSet descriptorSet,
VkDescriptorUpdateTemplate
descriptorUpdateTemplate,
const void* pData);
Descriptor Set Binding [13.2.7]
void vkCmdBindDescriptorSets(
VkCommandBuer commandBuer,
VkPipelineBindPoint pipelineBindPoint,
P.1315
VkPipelineLayout layout,
P.15
uint32_t rstSet,
uint32_t descriptorSetCount,
const VkDescriptorSet* pDescriptorSets,
uint32_t dynamicOsetCount,
const uint32_t* pDynamicOsets);
Push Constant Updates [13.2.8]
The pipeline layout denes shader push constants which
are updated via Vulkan commands rather than via writes to
memory or copy commands.
void vkCmdPushConstants(
VkCommandBuer commandBuer,
VkPipelineLayout layout,
P.15
VkShaderStageFlags stageFlags,
P.15
uint32_t oset,
uint32_t size,
const void* pValues);
Clear Commands [17]
Outside a Render Pass Instance [17.1]
void vkCmdClearColorImage(
VkCommandBuer commandBuer,
VkImage image,
VkImageLayout imageLayout,
P.P.13
const VkClearColorValue* pColor,
P.12
uint32_t rangeCount,
const VkImageSubresourceRange* pRanges);
P.13
imageLayout:
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
VK_IMAGE_LAYOUT_GENERAL.
VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR
void vkCmdClearDepthStencilImage(
VkCommandBuer commandBuer,
VkImage image,
VkImageLayout imageLayout,
P.P.13
const VkClearDepthStencilValue* pDepthStencil,
P.12
uint32_t rangeCount,
const VkImageSubresourceRange* pRanges);
P.13
imageLayout:
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
VK_IMAGE_LAYOUT_GENERAL
Inside a Render Pass Instance [17.2]
void vkCmdClearAachments(
VkCommandBuer commandBuer,
uint32_t aachmentCount,
const VkClearAachment* pAachments,
uint32_t rectCount,
const VkClearRect* pRects);
typedef struct VkClearRect {
VkRect2D rect;
P.15
uint32_t baseArrayLayer;
uint32_t layerCount;
} VkClearRect;
typedef struct VkClearAachment {
VkImageAspectFlags aspectMask;
P.13
uint32_t colorAachment;
VkClearValue clearValue;
P.12
} VkClearAachment;
Connued on next page >
www.khronos.org/vulkan
©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 8
Rasterizaon [24]
Basic Line Segment Rasterizaon [24.6]
void vkCmdSetLineWidth(
VkCommandBuer commandBuer,
oat lineWidth);
Depth Bias [24.7.3]
void vkCmdSetDepthBias(
VkCommandBuer commandBuer,
oat depthBiasConstantFactor,
oat depthBiasClamp,
oat depthBiasSlopeFactor);
Drawing Commands [19]
void vkCmdBindIndexBuer(
VkCommandBuer commandBuer,
VkBuer buer,
VkDeviceSize oset,
VkIndexType indexType);
indexType: VK_INDEX_TYPE_UINT{16, 32}
void vkCmdDraw(
VkCommandBuer commandBuer,
uint32_t vertexCount,
uint32_t instanceCount,
uint32_t rstVertex,
uint32_t rstInstance);
void vkCmdDrawIndexed(
VkCommandBuer commandBuer,
uint32_t indexCount,
uint32_t instanceCount,
uint32_t rstIndex,
int32_t vertexOset,
uint32_t rstInstance);
void vkCmdDrawIndirect(
VkCommandBuer commandBuer,
VkBuer buer,
VkDeviceSize oset,
uint32_t drawCount,
uint32_t stride);
typedef struct VkDrawIndirectCommand {
uint32_t vertexCount;
uint32_t instanceCount;
uint32_t rstVertex;
uint32_t rstInstance;
} VkDrawIndirectCommand;
void vkCmdDrawIndexedIndirect(
VkCommandBuer commandBuer,
VkBuer buer, VkDeviceSize oset,
uint32_t drawCount, uint32_t stride);
typedef struct VkDrawIndexedIndirectCommand {
uint32_t indexCount; uint32_t instanceCount;
uint32_t rstIndex;
int32_t vertexOset;
uint32_t rstInstance;
} VkDrawIndexedIndirectCommand;
Sparse Resources [28]
Sparse Image Format Properes [28.7.3]
void vkGetPhysicalDeviceSparseImageFormatProperes(
VkPhysicalDevice physicalDevice,
VkFormat format,
P.13
VkImageType type,
P.13
VkSampleCountFlagBits samples,
P.15
VkImageUsageFlags usage,
P.13
VkImageTiling ling,
P.13
uint32_t* pPropertyCount,
VkSparseImageFormatProperes* pProperes);
typedef struct VkSparseImageFormatProperes {
VkImageAspectFlags aspectMask;
P.13
VkExtent3D imageGranularity;
P12
VkSparseImageFormatFlags ags;
} VkSparseImageFormatProperes;
ags: VK_SPARSE_IMAGE_FORMAT_X where X is
SINGLE_MIPTAIL_BIT, ALIGNED_MIP_SIZE_BIT,
NONSTANDARD_BLOCK_SIZE_BIT
void vkGetPhysicalDeviceSparseImageFormatProperes2(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceSparseImageFormatInfo2*
pFormatInfo,
uint32_t* pPropertyCount,
VkSparseImageFormatProperes2* pProperes);
typedef struct VkSparseImageFormatProperes2 {
VkStructureType sType;
void* pNext;
VkSparseImageFormatProperes properes;
} VkSparseImageFormatProperes2;
Connued on next page >
Vertex Input Descripon [20.2]
void vkCmdBindVertexBuers(
VkCommandBuer commandBuer,
uint32_t rstBinding, uint32_t bindingCount,
const VkBuer* pBuers,
const VkDeviceSize* pOsets);
Fragment Operaons [25]
Scissor Test [25.2]
void vkCmdSetScissor(
VkCommandBuer commandBuer,
uint32_t rstScissor, uint32_t scissorCount,
const VkRect2D* pScissors);
P.15
Depth Bounds Test [25.8]
void vkCmdSetDepthBounds(
VkCommandBuer commandBuer,
oat minDepthBounds, oat maxDepthBounds);
Stencil Test [25.9]
void vkCmdSetStencilCompareMask(
VkCommandBuer commandBuer,
VkStencilFaceFlags faceMask, uint32_t compareMask);
void vkCmdSetStencilWriteMask(
VkCommandBuer commandBuer,
VkStencilFaceFlags faceMask,
uint32_t writeMask);
void vkCmdSetStencilReference(
VkCommandBuer commandBuer,
VkStencilFaceFlags faceMask,
uint32_t reference);
faceMask: VK_STENCIL_FACE_{FRONT, BACK}_BIT,
VK_STENCIL_FRONT_AND_BACK
Framebuer: Blend Factors [26.1.1]
void vkCmdSetBlendConstants(
VkCommandBuer commandBuer,
const oat blendConstants[4]);
Dispatching Commands [27]
void vkCmdDispatch(
VkCommandBuer commandBuer,
uint32_t groupCountX,
uint32_t groupCountY,
uint32_t groupCountZ);
void vkCmdDispatchIndirect(
VkCommandBuer commandBuer,
VkBuer buer,
VkDeviceSize oset);
typedef struct VkDispatchIndirectCommand {
uint32_t x;
uint32_t y;
uint32_t z;
} VkDispatchIndirectCommand;
void vkCmdDispatchBase(
VkCommandBuer commandBuer,
uint32_t baseGroupX, uint32_t baseGroupY,
uint32_t baseGroupZ, uint32_t groupCountX,
uint32_t groupCountY, uint32_t groupCountZ);
Fixed-Funcon Vertex Postprocessing [23]
Controlling the Viewport [23.5]
void vkCmdSetViewport(
VkCommandBuer commandBuer,
uint32_t rstViewport,
uint32_t viewportCount,
const VkViewport* pViewports);
P.15
Copy Commands [18]
Copying Data Between Buers [18.2]
void vkCmdCopyBuer(
VkCommandBuer commandBuer,
VkBuer srcBuer, VkBuer dstBuer,
uint32_t regionCount,
const VkBuerCopy* pRegions);
typedef struct VkBuerCopy {
VkDeviceSize srcOset; VkDeviceSize dstOset;
VkDeviceSize size;
} VkBuerCopy;
Copying Data Between Images [18.3]
void vkCmdCopyImage(
VkCommandBuer commandBuer,
VkImage srcImage,
VkImageLayout srcImageLayout,
P.13
VkImage dstImage,
VkImageLayout dstImageLayout,
P.13
uint32_t regionCount,
const VkImageCopy* pRegions);
typedef struct VkImageCopy {
VkImageSubresourceLayers srcSubresource;
P.13
VkOset3D srcOset;
P14
VkImageSubresourceLayers dstSubresource;
P.13
VkOset3D dstOset;
P.13
VkExtent3D extent;
P12
} VkImageCopy;
Copying Data Between Buers and Images [18.4]
void vkCmdCopyBuerToImage(
VkCommandBuer commandBuer,
VkBuer srcBuer, VkImage dstImage,
VkImageLayout dstImageLayout,
P.13
uint32_t regionCount,
const VkBuerImageCopy* pRegions);
void vkCmdCopyImageToBuer(
VkCommandBuer commandBuer,
VkImage srcImage,
VkImageLayout srcImageLayout,
P.13
VkBuer dstBuer,
uint32_t regionCount,
const VkBuerImageCopy* pRegions);
typedef struct VkBuerImageCopy {
VkDeviceSize buerOset;
uint32_t buerRowLength;
uint32_t buerImageHeight;
VkImageSubresourceLayers imageSubresource;
P.13
VkOset3D imageOset;
P14
VkExtent3D imageExtent;
P12
} VkBuerImageCopy;
Image Copies With Scaling [18.5]
void vkCmdBlitImage(
VkCommandBuer commandBuer,
VkImage srcImage,
VkImageLayout srcImageLayout,
P.13
VkImage dstImage,
VkImageLayout dstImageLayout,
P.13
uint32_t regionCount,
const VkImageBlit* pRegions,
VkFilter lter);
lter: VK_FILTER_NEAREST, VK_FILTER_LINEAR
typedef struct VkImageBlit {
VkImageSubresourceLayers srcSubresource;
P.13
VkOset3D srcOsets[2];
P14
VkImageSubresourceLayers dstSubresource;
P.13
VkOset3D dstOsets[2];
P.13
} VkImageBlit;
Resolving Mulsample Images [18.6]
void vkCmdResolveImage(
VkCommandBuer commandBuer,
VkImage srcImage,
VkImageLayout srcImageLayout,
P.13
VkImage dstImage,
VkImageLayout dstImageLayout,
P.13
uint32_t regionCount,
const VkImageResolve* pRegions);
typedef struct VkImageResolve {
VkImageSubresourceLayers srcSubresource;
P.13
VkOset3D srcOset;
P14
VkImageSubresourceLayers dstSubresource;
P.13
VkOset3D dstOset;
P14
VkExtent3D extent;
P12
} VkImageResolve;
Clear Commands (connued)
Filling Buers [17.4]
void vkCmdFillBuer(
VkCommandBuer commandBuer,
VkBuer dstBuer, VkDeviceSize dstOset,
VkDeviceSize size, uint32_t data);
Updang Buers [17.5]
void vkCmdUpdateBuer(
VkCommandBuer commandBuer,
VkBuer dstBuer, VkDeviceSize dstOset,
VkDeviceSize dataSize, const void* pData);
www.khronos.org/vulkan©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 9
Sparse Resources (connued)
typedef struct VkPhysicalDeviceSparseImageFormatInfo2 {
VkStructureType sType;
const void* pNext;
VkFormat format,
P.13
VkImageType type,
P.13
VkSampleCountFlagBits samples,
P.15
VkImageUsageFlags usage,
P.13
VkImageTiling ling,
P.13
} VkPhysicalDeviceSparseImageFormatInfo2;
Sparse Resource Memory Requirements [28.7.5]
void vkGetImageSparseMemoryRequirements(
VkDevice device,
VkImage image,
uint32_t* pSparseMemoryRequirementCount,
VkSparseImageMemoryRequirements*
pSparseMemoryRequirements);
typedef struct VkSparseImageMemoryRequirements {
VkSparseImageFormatProperes formatProperes;
uint32_t imageMipTailFirstLod;
VkDeviceSize imageMipTailSize;
VkDeviceSize imageMipTailOset;
VkDeviceSize imageMipTailStride;
} VkSparseImageMemoryRequirements;
void vkGetImageSparseMemoryRequirements2(
VkDevice device,
const VkImageSparseMemoryRequirementsInfo2* pInfo,
uint32_t* pSparseMemoryRequirementCount,
VkSparseImageMemoryRequirements2*
pSparseMemoryRequirements);
typedef struct VkImageSparseMemoryRequirementsInfo2 {
VkStructureType sType;
const void* pNext;
VkImage image;
} VkImageSparseMemoryRequirementsInfo2;
typedef struct VkSparseImageMemoryRequirements2 {
VkStructureType sType;
void* pNext;
VkSparseImageMemoryRequirements
memoryRequirements;
} VkSparseImageMemoryRequirements2;
Binding Resource Memory [28.7.6]
typedef struct VkBindSparseInfo {
VkStructureType sType;
const void* pNext;
uint32_t waitSemaphoreCount;
const VkSemaphore* pWaitSemaphores;
uint32_t buerBindCount;
const VkSparseBuerMemoryBindInfo* pBuerBinds;
uint32_t imageOpaqueBindCount;
const VkSparseImageOpaqueMemoryBindInfo*
pImageOpaqueBinds;
uint32_t imageBindCount;
const VkSparseImageMemoryBindInfo* pImageBinds;
uint32_t signalSemaphoreCount;
const VkSemaphore* pSignalSemaphores;
} VkBindSparseInfo;
pNext may point to structs:
VkDeviceGroupBindSparseInfo
P.12
typedef struct VkSparseBuerMemoryBindInfo {
VkBuer buer;
uint32_t bindCount;
const VkSparseMemoryBind* pBinds;
P.15
} VkSparseBuerMemoryBindInfo;
typedef struct VkSparseImageOpaqueMemoryBindInfo {
VkImage image;
uint32_t bindCount;
const VkSparseMemoryBind* pBinds;
P.15
} VkSparseImageOpaqueMemoryBindInfo;
typedef struct VkSparseImageMemoryBindInfo {
VkImage image;
uint32_t bindCount;
const VkSparseImageMemoryBind* pBinds;
} VkSparseImageMemoryBindInfo;
typedef struct VkSparseImageMemoryBind {
VkImageSubresource subresource;
VkOset3D oset;
P14
VkExtent3D extent;
P12
VkDeviceMemory memory;
VkDeviceSize memoryOset;
VkSparseMemoryBindFlags ags;
} VkSparseImageMemoryBind;
ags: VK_SPARSE_MEMORY_BIND_METADATA_BIT
VkResult vkQueueBindSparse(
VkQueue queue,
uint32_t bindInfoCount,
const VkBindSparseInfo* pBindInfo,
VkFence fence);
Window System Integraon (WSI)
[29]
Android Plaorm [29.2.1]
VkResult vkCreateAndroidSurfaceKHR(
VkInstance instance,
const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkSurfaceKHR* pSurface);
typedef struct VkAndroidSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkAndroidSurfaceCreateFlagsKHR ags;
= 0
struct ANaveWindow* window;
} VkAndroidSurfaceCreateInfoKHR;
Wayland Plaorm [29.2.2]
VkResult vkCreateWaylandSurfaceKHR(
VkInstance instance,
const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkSurfaceKHR* pSurface);
typedef struct VkWaylandSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkWaylandSurfaceCreateFlagsKHR ags;
= 0
struct wl_display* display;
struct wl_surface* surface;
} VkWaylandSurfaceCreateInfoKHR;
Win32 Plaorm [29.2.3]
VkResult vkCreateWin32SurfaceKHR(
VkInstance instance,
const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkSurfaceKHR* pSurface);
typedef struct VkWin32SurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkWin32SurfaceCreateFlagsKHR ags;
= 0
HINSTANCE hinstance;
HWND hwnd;
} VkWin32SurfaceCreateInfoKHR;
XCB Plaorm [29.2.4]
VkResult vkCreateXcbSurfaceKHR(
VkInstance instance,
const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkSurfaceKHR* pSurface);
typedef struct VkXcbSurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkXcbSurfaceCreateFlagsKHR ags;
xcb_connecon_t* connecon;
xcb_window_t window;
} VkXcbSurfaceCreateInfoKHR;
Xlib Plaorm [29.2.5]
VkResult vkCreateXlibSurfaceKHR(
VkInstance instance,
const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkSurfaceKHR* pSurface);
typedef struct VkXlibSurfaceCreateInfoKHR {
VkStructureType sType; const void* pNext;
VkXlibSurfaceCreateFlagsKHR ags;
Display* dpy;
Window window;
} VkXlibSurfaceCreateInfoKHR;
Plaorm-Independent Informaon [29.2.6]
void vkDestroySurfaceKHR(
VkInstance instance, VkSurfaceKHR surface,
const VkAllocaonCallbacks* pAllocator);
P.12
Display Enumeraon [29.3.1]
VkResult vkGetPhysicalDeviceDisplayProperesKHR(
VkPhysicalDevice physicalDevice,
uint32_t* pPropertyCount,
VkDisplayProperesKHR* pProperes);
typedef struct VkDisplayProperesKHR {
VkDisplayKHR display;
const char* displayName;
VkExtent2D physicalDimensions;
P12
VkExtent2D physicalResoluon;
P12
VkSurfaceTransformFlagsKHR supportedTransforms;
P.15
VkBool32 planeReorderPossible;
VkBool32 persistentContent;
} VkDisplayProperesKHR;
Display Planes
VkResult vkGetPhysicalDeviceDisplayPlaneProperesKHR(
VkPhysicalDevice physicalDevice,
uint32_t* pPropertyCount,
VkDisplayPlaneProperesKHR* pProperes);
typedef struct VkDisplayPlaneProperesKHR {
VkDisplayKHR currentDisplay;
uint32_t currentStackIndex;
} VkDisplayPlaneProperesKHR;
VkResult vkGetDisplayPlaneSupportedDisplaysKHR(
VkPhysicalDevice physicalDevice,
uint32_t planeIndex,
uint32_t* pDisplayCount,
VkDisplayKHR* pDisplays);
Display Modes
VkResult vkGetDisplayModeProperesKHR(
VkPhysicalDevice physicalDevice,
VkDisplayKHR display,
uint32_t* pPropertyCount,
VkDisplayModeProperesKHR* pProperes);
typedef struct VkDisplayModeProperesKHR {
VkDisplayModeKHR displayMode;
VkDisplayModeParametersKHR parameters;
} VkDisplayModeProperesKHR;
typedef struct VkDisplayModeParametersKHR {
VkExtent2D visibleRegion;
P12
uint32_t refreshRate;
} VkDisplayModeParametersKHR;
VkResult vkCreateDisplayModeKHR(
VkPhysicalDevice physicalDevice,
VkDisplayKHR display,
const VkDisplayModeCreateInfoKHR* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkDisplayModeKHR* pMode);
typedef struct VkDisplayModeCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkDisplayModeCreateFlagsKHR ags;
VkDisplayModeParametersKHR parameters;
} VkDisplayModeCreateInfoKHR;
VkResult vkGetDisplayPlaneCapabiliesKHR(
VkPhysicalDevice physicalDevice,
VkDisplayModeKHR mode,
uint32_t planeIndex,
VkDisplayPlaneCapabiliesKHR* pCapabilies);
typedef struct VkDisplayPlaneCapabiliesKHR {
VkDisplayPlaneAlphaFlagsKHR supportedAlpha;
VkOset2D minSrcPosion;
P14
VkOset2D maxSrcPosion;
P14
VkExtent2D minSrcExtent;
P12
VkExtent2D maxSrcExtent;
P12
VkOset2D minDstPosion;
P14
VkOset2D maxDstPosion;
P14
VkExtent2D minDstExtent;
P12
VkExtent2D maxDstExtent;
P12
} VkDisplayPlaneCapabiliesKHR;
Display Surfaces [29.3.2]
VkResult vkCreateDisplayPlaneSurfaceKHR(
VkInstance instance,
const VkDisplaySurfaceCreateInfoKHR* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkSurfaceKHR* pSurface);
typedef struct VkDisplaySurfaceCreateInfoKHR {
VkStructureType sType;
const void* pNext;
VkDisplaySurfaceCreateFlagsKHR ags;
VkDisplayModeKHR displayMode;
uint32_t planeIndex;
uint32_t planeStackIndex;
VkSurfaceTransformFlagBitsKHR transform;
P.15
oat globalAlpha;
VkDisplayPlaneAlphaFlagBitsKHR alphaMode;
VkExtent2D imageExtent;
P12
} VkDisplaySurfaceCreateInfoKHR;
alphaMode: VK_DISPLAY_PLANE_ALPHA_X_BIT_KHR
where X is OPAQUE, GLOBAL, PER_PIXEL,
PER_PIXEL_PREMULTIPLIED
Connued on next page >
www.khronos.org/vulkan
©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 10
Extended Funconality
Layers [30.1]
VkResult vkEnumerateInstanceLayerProperes(
uint32_t* pPropertyCount,
VkLayerProperes* pProperes);
VkResult vkEnumerateDeviceLayerProperes(
VkPhysicalDevice physicalDevice,
uint32_t* pPropertyCount,
VkLayerProperes* pProperes);
typedef struct VkLayerProperes {
char layerName [VK_MAX_EXTENSION_NAME_SIZE];
uint32_t specVersion;
uint32_t implementaonVersion;
char descripon [VK_MAX_DESCRIPTION_SIZE];
} VkLayerProperes;
Extensions [30.2]
VkResult vkEnumerateInstanceExtensionProperes(
const char* pLayerName,
uint32_t* pPropertyCount,
VkExtensionProperes* pProperes);
VkResult vkEnumerateDeviceExtensionProperes(
VkPhysicalDevice physicalDevice,
const char* pLayerName,
uint32_t* pPropertyCount,
VkExtensionProperes* pProperes);
Connued on next page >
WSI (connued)
Querying for WSI Support [29.4]
VkResult vkGetPhysicalDeviceSurfaceSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex, VkSurfaceKHR surface,
VkBool32* pSupported);
Wayland Plaorm Querying [29.4.2]
VkBool32
vkGetPhysicalDeviceWaylandPresentaonSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
struct wl_display* display);
Win32 Plaorm Querying [29.4.3]
VkBool32
vkGetPhysicalDeviceWin32PresentaonSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex);
XCB Plaorm Querying [29.4.4]
VkBool32
vkGetPhysicalDeviceXcbPresentaonSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
xcb_connecon_t* connecon,
xcb_visualid_t visual_id);
Xlib Plaorm Querying [29.4.5]
VkBool32
vkGetPhysicalDeviceXlibPresentaonSupportKHR(
VkPhysicalDevice physicalDevice,
uint32_t queueFamilyIndex,
Display* dpy, VisualID visualID);
Surface Queries [29.5]
VkResult vkGetPhysicalDeviceSurfaceCapabiliesKHR(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface,
VkSurfaceCapabiliesKHR* pSurfaceCapabilies);
P.15
VkResult vkGetPhysicalDeviceSurfaceCapabilies2KHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
P.15
VkSurfaceCapabilies2KHR* pSurfaceCapabilies);
typedef struct VkSurfaceCapabilies2KHR {
VkStructureType sType; void* pNext;
VkSurfaceCapabiliesKHR surfaceCapabilies;
P.15
} VkSurfaceCapabilies2KHR;
pNext may point to struct:
VkSharedPresentSurfaceCapabiliesKHR
typedef struct VkSharedPresentSurfaceCapabiliesKHR {
VkStructureType sType; void* pNext;
VkImageUsageFlags
sharedPresentSupportedUsageFlags;
P.13
} VkSharedPresentSurfaceCapabiliesKHR;
VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface,
uint32_t* pSurfaceFormatCount,
VkSurfaceFormatKHR* pSurfaceFormats);
P.15
VkResult vkGetPhysicalDeviceSurfaceFormats2KHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
P.15
uint32_t* pSurfaceFormatCount,
VkSurfaceFormat2KHR* pSurfaceFormats);
typedef struct VkSurfaceFormat2KHR {
VkStructureType sType; void* pNext;
VkSurfaceFormatKHR surfaceFormat;
P.15
} VkSurfaceFormat2KHR;
VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface,
uint32_t* pPresentModeCount,
VkPresentModeKHR* pPresentModes);
pPresentModes: VK_PRESENT_MODE_X_KHR
where X is IMMEDIATE, MAILBOX, FIFO, FIFO_RELAXED,
SHARED_DEMAND_REFRESH,
SHARED_CONTINUOUS_REFRESH
Device Group Queries [29.6]
VkResult vkGetDeviceGroupPresentCapabiliesKHR(
VkDevice device,
VkDeviceGroupPresentCapabiliesKHR*
pDeviceGroupPresentCapabilies);
typedef struct VkDeviceGroupPresentCapabiliesKHR {
VkStructureType sType; const void* pNext;
uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE];
VkDeviceGroupPresentModeFlagsKHR modes;
P.12
} VkDeviceGroupPresentCapabiliesKHR;
VkResult vkGetDeviceGroupSurfacePresentModesKHR(
VkDevice device, VkSurfaceKHR surface,
VkDeviceGroupPresentModeFlagsKHR* pModes);
P.12
VkResult vkGetPhysicalDevicePresentRectanglesKHR(
VkPhysicalDevice physicalDevice,
VkSurfaceKHR surface, uint32_t* pRectCount,
VkRect2D* pRects);
P.15
WSI Swapchain [29.7]
VkResult vkGetSwapchainStatusKHR(
VkDevice device,
VkSwapchainKHR swapchain);
VkResult vkCreateSwapchainKHR(
VkDevice device,
const VkSwapchainCreateInfoKHR* pCreateInfo,
const VkAllocaonCallbacks* pAllocator,
P.12
VkSwapchainKHR* pSwapchain);
typedef struct VkSwapchainCreateInfoKHR {
VkStructureType sType; const void* pNext;
VkSwapchainCreateFlagsKHR ags;
VkSurfaceKHR surface;
uint32_t minImageCount;
VkFormat imageFormat;
P.13
VkColorSpaceKHR imageColorSpace;
VkExtent2D imageExtent;
P12
uint32_t imageArrayLayers;
VkImageUsageFlags imageUsage;
P.13
VkSharingMode imageSharingMode;
P.15
uint32_t queueFamilyIndexCount;
const uint32_t* pQueueFamilyIndices;
VkSurfaceTransformFlagBitsKHR preTransform;
P.15
VkCompositeAlphaFlagBitsKHR compositeAlpha;
P.12
VkPresentModeKHR presentMode;
VkBool32 clipped;
VkSwapchainKHR oldSwapchain;
} VkSwapchainCreateInfoKHR;
pNext: may point to struct:
VkDeviceGroupSwapchainCreateInfoKHR
ags: VK_SWAPCHAIN_CREATE_X_KHR where X is
SPLIT_INSTANCE_BIND_REGIONS, PROTECTED
colorSpace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
presentMode: VK_PRESENT_MODE_X_KHR
where X is IMMEDIATE, MAILBOX, FIFO, FIFO_RELAXED,
DEMAND_REFRESH, CONTINUOUS_REFRESH
typedef struct VkDeviceGroupSwapchainCreateInfoKHR {
VkStructureType sType; const void* pNext;
VkDeviceGroupPresentModeFlagsKHR modes;
} VkDeviceGroupSwapchainCreateInfoKHR;
modes: VK_DEVICE_GROUP_PRESENT_MODE_X_BIT_KHR
where X is LOCAL, REMOTE, SUM, LOCAL_MULTI_DEVICE
void vkDestroySwapchainKHR(
VkDevice device,
VkSwapchainKHR swapchain,
const VkAllocaonCallbacks* pAllocator);
P.12
VkResult vkCreateSharedSwapchainsKHR(
VkDevice device,
uint32_t swapchainCount,
const VkSwapchainCreateInfoKHR* pCreateInfos,
const VkAllocaonCallbacks* pAllocator,
P.12
VkSwapchainKHR* pSwapchains);
VkResult vkGetSwapchainImagesKHR(
VkDevice device,
VkSwapchainKHR swapchain,
uint32_t* pSwapchainImageCount,
VkImage* pSwapchainImages);
VkResult vkAcquireNextImageKHR(
VkDevice device,
VkSwapchainKHR swapchain,
uint64_t meout,
VkSemaphore semaphore,
VkFence fence,
uint32_t* pImageIndex);
VkResult vkAcquireNextImage2KHR(
VkDevice device,
const VkAcquireNextImageInfoKHR* pAcquireInfo,
uint32_t* pImageIndex);
typedef struct VkAcquireNextImageInfoKHR {
VkStructureType sType; const void* pNext;
VkSwapchainKHR swapchain;
uint64_t meout;
VkSemaphore semaphore;
VkFence fence;
uint32_t deviceMask;
} VkAcquireNextImageInfoKHR;
VkResult vkQueuePresentKHR(
VkQueue queue,
const VkPresentInfoKHR* pPresentInfo);
typedef struct VkPresentInfoKHR {
VkStructureType sType; const void* pNext;
uint32_t waitSemaphoreCount;
const VkSemaphore* pWaitSemaphores;
uint32_t swapchainCount;
const VkSwapchainKHR* pSwapchains;
const uint32_t* pImageIndices;
VkResult* pResults;
} VkPresentInfoKHR;
pNext may point to structs:
VkDeviceGroupPresentInfoKHR,
VkDisplayPresentInfoKHR, or VkPresentRegionsKHR
typedef struct VkDeviceGroupPresentInfoKHR {
VkStructureType sType; const void* pNext;
uint32_t swapchainCount;
const uint32_t* pDeviceMasks;
VkDeviceGroupPresentModeFlagBitsKHR mode;
} VkDeviceGroupPresentInfoKHR;
mode: VK_DEVICE_GROUP_PRESENT_MODE_X_BIT_KHR
where X is REMOTE, SUM, LOCAL, LOCAL_MULTI_DEVICE
typedef struct VkDisplayPresentInfoKHR {
VkStructureType sType; const void* pNext;
VkRect2D srcRect;
P.15
VkRect2D dstRect;
P.15
VkBool32 persistent;
} VkDisplayPresentInfoKHR;
typedef struct VkPresentRegionsKHR {
VkStructureType sType; const void* pNext;
uint32_t swapchainCount;
const VkPresentRegionKHR* pRegions;
} VkPresentRegionsKHR;
typedef struct VkPresentRegionKHR {
uint32_t rectangleCount;
const VkRectLayerKHR* pRectangles;
} VkPresentRegionKHR;
typedef struct VkRectLayerKHR {
VkOset2D oset;
P.14
VkExtent2D extent;
P.12
uint32_t layer;
} VkRectLayerKHR;
typedef struct VkDisplayPresentInfoKHR {
VkStructureType sType; const void* pNext;
VkRect2D srcRect;
P.15
VkRect2D dstRect;
P.15
VkBool32 persistent;
} VkDisplayPresentInfoKHR;
www.khronos.org/vulkan©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 11
Features, Limits, and Formats [31]
Features [31.1]
void vkGetPhysicalDeviceFeatures(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceFeatures* pFeatures);
P14
void vkGetPhysicalDeviceFeatures2(
VkPhysicalDevice physicalDevice,
VkPhysicalDeviceFeatures2* pFeatures);
P.14
Format Properes [31.3.2]
void vkGetPhysicalDeviceFormatProperes(
VkPhysicalDevice physicalDevice,
VkFormat format,
P.13
VkFormatProperes* pFormatProperes);
typedef struct VkFormatProperes {
VkFormatFeatureFlags linearTilingFeatures;
VkFormatFeatureFlags opmalTilingFeatures;
VkFormatFeatureFlags buerFeatures;
} VkFormatProperes;
enum VkFormatFeatureFlagBits:
VK_FORMAT_FEATURE_X_BIT where X is
SAMPLED_IMAGE, STORAGE_IMAGE[_ATOMIC],
UNIFORM_TEXEL_BUFFER,
STORAGE_TEXEL_BUFFER[_ATOMIC],
VERTEX_BUFFER, COLOR_ATTACHMENT[_BLEND],
DEPTH_STENCIL_ATTACHMENT,
SAMPLED_IMAGE_FILTER_LINEAR, DISJOINT,
BLIT_{SRC, DST}, TRANSFER_{SRC, DST},
{MIDPOINT, COSITED}_CHROMA_SAMPLES,
and VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_-
CONVERSION_X where X is LINEAR_FILTER,
SEPARATE_RECONSTRUCTION_FILTER,
CHROMA_RECONSTRUCTION_EXPLICIT,
CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE
void vkGetPhysicalDeviceFormatProperes2(
VkPhysicalDevice physicalDevice,
VkFormat format,
P.13
VkFormatProperes2* pFormatProperes);
typedef struct VkFormatProperes2 {
VkStructureType sType;
void* pNext;
VkFormatProperes formatProperes;
} VkFormatProperes2;
Addional Image Capabilies [31.4]
VkResult vkGetPhysicalDeviceImageFormatProperes(
VkPhysicalDevice physicalDevice,
VkFormat format,
P.13
VkImageType type,
P.13
VkImageTiling ling,
P.13
VkImageUsageFlags usage,
P.13
VkImageCreateFlags ags,
P.13
VkImageFormatProperes* pImageFormatProperes);
typedef struct VkImageFormatProperes {
VkExtent3D maxExtent;
P12
uint32_t maxMipLevels;
uint32_t maxArrayLayers;
VkSampleCountFlags sampleCounts;
P.15
VkDeviceSize maxResourceSize;
} VkImageFormatProperes;
VkResult vkGetPhysicalDeviceImageFormatProperes2(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceImageFormatInfo2*
pImageFormatInfo,
VkImageFormatProperes2* pImageFormatProperes);
typedef struct VkImageFormatProperes2 {
VkStructureType sType;
void* pNext;
VkImageFormatProperes imageFormatProperes;
} VkImageFormatProperes2;
pNext may point to struct:
VkExternalImageFormatProperes
P.12
VkSamplerYcbcrConversionImageFormatProperes
P.15
typedef struct VkPhysicalDeviceImageFormatInfo2 {
VkStructureType sType;
const void* pNext;
VkFormat format,
P.13
VkImageType type,
P.13
VkImageTiling ling,
P.13
VkImageUsageFlags usage,
P.13
VkImageCreateFlags ags,
P.13
} VkPhysicalDeviceImageFormatInfo2;
pNext may point to struct:
VkPhysicalDeviceExternalImageFormatInfo
P.14
Command Buer Lifecycle [5.1]
A command buer is always in one of the ve states shown below:
Inial
A command buer in the inial state
can only be moved to the recording
state or freed.
Recording
In this state, vkCmd* commands
record to the command buer.
Executable
In this state, the command buer
may be submied, reset, or recorded
to another command buer.
Pending
Aempng to modify the command
buer in this state will cause a
transion to the invalid state.
Invalid
In this state, a command buer may
be reset, moved to recording state, or
freed.
Extended Funconality (connued)
typedef struct VkExtensionProperes {
char layerName [VK_MAX_EXTENSION_NAME_SIZE];
uint32_t specVersion;
} VkExtensionProperes;
Addional Buer Capabilies [31.5]
void vkGetPhysicalDeviceExternalBuerProperes(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceExternalBuerInfo*
pExternalBuerInfo,
VkExternalBuerProperes*
pExternalBuerProperes);
typedef struct VkPhysicalDeviceExternalBuerInfo {
VkStructureType sType;
const void* pNext;
VkBuerCreateFlags ags;
P.12
VkBuerUsageFlags usage;
P.12
VkExternalMemoryHandleTypeFlagBits handleType;
P.12
} VkPhysicalDeviceExternalBuerInfo;
typedef struct VkExternalBuerProperes {
VkStructureType sType;
void* pNext;
VkExternalMemoryProperes
externalMemoryProperes;
P.13
} VkExternalBuerProperes;
Oponal Semaphore Capabilies [31.6]
void vkGetPhysicalDeviceExternalSemaphoreProperes(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceExternalSemaphoreInfo*
pExternalSemaphoreInfo,
VkExternalSemaphoreProperes*
pExternalSemaphoreProperes);
typedef struct VkPhysicalDeviceExternalSemaphoreInfo {
VkStructureType sType;
const void* pNext;
VkExternalSemaphoreHandleTypeFlagBits
handleType;
P.13
} VkPhysicalDeviceExternalSemaphoreInfo;
enum VkExternalSemaphoreHandleTypeFlagBits:
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_X_BIT
where X is OPAQUE_FD,
OPAQUE_WIN32[_KMT],
D3D12_FENCE, SYNC_FD
typedef struct VkExternalSemaphoreProperes {
VkStructureType sType; void* pNext;
VkExternalSemaphoreHandleTypeFlags
exportFromImportedHandleTypes;
P.13
VkExternalSemaphoreHandleTypeFlags
compableHandleTypes;
VkExternalSemaphoreFeatureFlags
externalSemaphoreFeatures;
} VkExternalSemaphoreProperes;
VkExternalSemaphoreFeatureFlagBits:
VK_EXTERNAL_SEMAPHORE_FEATURE_X_BIT where X is
EXPORTABLE, IMPORTABLE
Oponal Fence Capabilies [31.7]
void vkGetPhysicalDeviceExternalFenceProperes(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceExternalFenceInfo*
pExternalFenceInfo,
VkExternalFenceProperes* pExternalFenceProperes);
typedef struct VkPhysicalDeviceExternalFenceInfo {
VkStructureType sType;
const void* pNext;
VkExternalFenceHandleTypeFlagBits handleType;
P.12
} VkPhysicalDeviceExternalFenceInfo;
typedef struct VkExternalFenceProperes {
VkStructureType sType;
void* pNext;
VkExternalFenceHandleTypeFlags
exportFromImportedHandleTypes;
P.12
VkExternalFenceHandleTypeFlags
compableHandleTypes;
P.12
VkExternalFenceFeatureFlags externalFenceFeatures;
} VkExternalFenceProperes;
enum VkExternalFenceFeatureFlagBits:
VK_EXTERNAL_FENCE_FEATURE_X_BIT where X is
EXPORTABLE, IMPORTABLE
www.khronos.org/vulkan
©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 12
Structures and Enumeraons
This secon contains an alphabec reference to types enums
and structs referenced in mulple places on preceding pages.
enum VkAccessFlagBits:
VK_ACCESS_X_BIT where X is
INDIRECT_COMMAND_READ,
INDEX_READ,
VERTEX_ATTRIBUTE_READ,
UNIFORM_READ,
INPUT_ATTACHMENT_READ,
SHADER_[READ, WRITE],
COLOR_ATTACHMENT_[READ, WRITE],
DEPTH_STENCIL_ATTACHMENT_[READ, WRITE],
TRANSFER_[READ, WRITE],
HOST_[READ, WRITE],
MEMORY_[READ, WRITE]
typedef struct VkAllocaonCallbacks {
void* pUserData;
PFN_vkAllocaonFuncon pfnAllocaon;
PFN_vkReallocaonFuncon pfnReallocaon;
PFN_vkFreeFuncon pfnFree;
PFN_vkInternalAllocaonNocaon
pfnInternalAllocaon;
PFN_vkInternalFreeNocaon pfnInternalFree;
} VkAllocaonCallbacks;
typedef void* (VKAPI_PTR* PFN_vkAllocaonFuncon)(
void* pUserData,
size_t size,
size_t alignment,
VkSystemAllocaonScope allocaonScope);
typedef void* (VKAPI_PTR* PFN_vkReallocaonFuncon)(
void* pUserData,
void* pOriginal,
size_t size,
size_t alignment,
VkSystemAllocaonScope allocaonScope);
typedef void (VKAPI_PTR* PFN_vkFreeFuncon)(
void* pUserData,
void* pMemory);
typedef void (
VKAPI_PTR* PFN_vkInternalAllocaonNocaon)(
void* pUserData,
size_t size,
VkInternalAllocaonType allocaonType,
VkSystemAllocaonScope allocaonScope);
typedef void (
VKAPI_PTR* PFN_vkInternalFreeNocaon)(
void* pUserData,
size_t size,
VkInternalAllocaonType allocaonType,
VkSystemAllocaonScope allocaonScope);
allocaonType:
VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE
allocaonScope: VK_SYSTEM_ALLOCATION_SCOPE_X where
X is COMMAND, OBJECT, CACHE, DEVICE, INSTANCE
typedef struct VkBindBuerMemoryDeviceGroupInfo {
VkStructureType sType; const void* pNext;
uint32_t deviceIndexCount;
const uint32_t* pDeviceIndices;
} VkBindBuerMemoryDeviceGroupInfo;
typedef struct VkBindImageMemoryDeviceGroupInfo {
VkStructureType sType; const void* pNext;
uint32_t deviceIndexCount;
const uint32_t* pDeviceIndices;
uint32_t splitInstanceBindRegionCount;
const VkRect2D* pSplitInstanceBindRegions;
P.15
} VkBindImageMemoryDeviceGroupInfo;
typedef struct VkBindImagePlaneMemoryInfo {
VkStructureType sType; const void* pNext;
VkImageAspectFlagBits planeAspect;
P.13
} VkBindImagePlaneMemoryInfo;
enum VkBlendOp:
VK_BLEND_OP_ADD,
VK_BLEND_OP_SUBTRACT,
VK_BLEND_OP_REVERSE_SUBTRACT,
VK_BLEND_OP_MIN,
VK_BLEND_OP_MAX
enum VkBuerCreateFlagBits:
VK_BUFFER_CREATE_SPARSE_BINDING_BIT,
VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT,
VK_BUFFER_CREATE_SPARSE_ALIASED_BIT,
VK_BUFFER_CREATE_PROTECTED_BIT
typedef struct VkBuerMemoryBarrier {
VkStructureType sType; const void* pNext;
VkAccessFlags srcAccessMask;
P.12
VkAccessFlags dstAccessMask;
P.12
uint32_t srcQueueFamilyIndex;
uint32_t dstQueueFamilyIndex;
VkBuer buer;
VkDeviceSize oset;
VkDeviceSize size;
} VkBuerMemoryBarrier;
enum VkBuerUsageFlagBits:
VK_BUFFER_USAGE_X_BIT where X is
TRANSFER_SRC, TRANSFER_DST,
UNIFORM_TEXEL_BUFFER, STORAGE_TEXEL_BUFFER,
UNIFORM_BUFFER, STORAGE_BUFFER, INDEX_BUFFER,
VERTEX_BUFFER, INDIRECT_BUFFER
typedef union VkClearColorValue {
oat oat32[4];
int32_t int32[4];
uint32_t uint32[4];
} VkClearColorValue;
typedef struct VkClearDepthStencilValue {
oat depth;
uint32_t stencil;
} VkClearDepthStencilValue;
typedef union VkClearValue {
VkClearColorValue color;
P.12
VkClearDepthStencilValue depthStencil;
P.12
} VkClearValue;
enum VkCompareOp:
VK_COMPARE_OP_X where X is
NEVER, LESS, EQUAL,
LESS_OR_EQUAL,
GREATER,
NOT_EQUAL,
GREATER_OR_EQUAL,
ALWAYS
enum VkCompositeAlphaFlagBitsKHR:
VK_COMPOSITE_ALPHA_X_BIT_KHR where X is
OPAQUE,
PRE_MULTIPLIED,
POST_MULTIPLIED,
INHERIT
enum VkDependencyFlagBits:
VK_DEPENDENCY_BY_REGION_BIT,
VK_DEPENDENCY_DEVICE_GROUP_BIT,
VK_DEPENDENCY_VIEW_LOCAL_BIT
enum VkDescriptorType:
VK_DESCRIPTOR_TYPE_X where X is
SAMPLER,
COMBINED_IMAGE_SAMPLER,
SAMPLED_IMAGE,
STORAGE_IMAGE,
UNIFORM_TEXEL_BUFFER,
STORAGE_TEXEL_BUFFER,
UNIFORM_BUFFER[_DYNAMIC],
STORAGE_BUFFER[_DYNAMIC],
INPUT_ATTACHMENT
typedef struct VkDescriptorSetLayoutBinding {
uint32_t binding;
VkDescriptorType descriptorType;
P.12
uint32_t descriptorCount;
VkShaderStageFlags stageFlags;
P.15
const VkSampler* pImmutableSamplers;
} VkDescriptorSetLayoutBinding;
typedef struct VkDescriptorSetLayoutCreateInfo {
VkStructureType sType; const void *pNext;
VkDescriptorSetLayoutCreateFlags ags;
uint32_t bindingCount;
const VkDescriptorSetLayoutBinding* pBindings;
} VkDescriptorSetLayoutCreateInfo;
typedef struct VkDeviceGroupBindSparseInfo {
VkStructureType sType; const void* pNext;
uint32_t resourceDeviceIndex;
uint32_t memoryDeviceIndex;
} VkDeviceGroupBindSparseInfo;
typedef struct VkDeviceGroupCommandBuerBeginInfo {
VkStructureType sType; const void* pNext;
uint32_t deviceMask;
} VkDeviceGroupCommandBuerBeginInfo;
typedef struct VkDeviceGroupDeviceCreateInfo {
VkStructureType sType; const void* pNext;
uint32_t physicalDeviceCount;
const VkPhysicalDevice* pPhysicalDevices;
} VkDeviceGroupDeviceCreateInfo;
enum VkDeviceGroupPresentModeFlagBitsKHR:
VK_DEVICE_GROUP_PRESENT_MODE_X_BIT_KHR where X is
LOCAL,
REMOTE,
SUM,
LOCAL_MULTI_DEVICE
typedef struct VkDeviceGroupRenderPassBeginInfo {
VkStructureType sType; const void* pNext;
uint32_t deviceMask;
uint32_t deviceRenderAreaCount;
const VkRect2D* pDeviceRenderAreas;
P.15
} VkDeviceGroupRenderPassBeginInfo;
typedef struct VkDeviceGroupSubmitInfo {
VkStructureType sType; const void* pNext;
uint32_t waitSemaphoreCount;
const uint32_t* pWaitSemaphoreDeviceIndices;
uint32_t commandBuerCount;
const uint32_t* pCommandBuerDeviceMasks;
uint32_t signalSemaphoreCount;
const uint32_t* pSignalSemaphoreDeviceIndices;
} VkDeviceGroupSubmitInfo;
typedef struct VkExportFenceCreateInfo {
VkStructureType sType;
const void* pNext;
VkExternalFenceHandleTypeFlags handleTypes;
P.12
} VkExportFenceCreateInfo;
typedef struct VkExportMemoryAllocateInfo {
VkStructureType sType; const void* pNext;
VkExternalMemoryHandleTypeFlags handleTypes;
P.12
} VkExportMemoryAllocateInfo;
typedef struct VkExportSemaphoreCreateInfo {
VkStructureType sType;
const void* pNext;
VkExternalSemaphoreHandleTypeFlags handleTypes;
P.13
} VkExportSemaphoreCreateInfo;
typedef struct VkExtent2D {
uint32_t width;
uint32_t height;
} VkExtent2D;
typedef struct VkExtent3D {
uint32_t width;
uint32_t height;
uint32_t depth;
} VkExtent3D;
enum VkExternalFenceHandleTypeFlagBits:
VK_EXTERNAL_FENCE_HANDLE_TYPE_X_BIT where X is
OPAQUE_FD,
OPAQUE_WIN32,
OPAQUE_WIN32_KMT,
SYNC_FD
typedef struct VkExternalImageFormatProperes {
VkStructureType sType; void* pNext;
VkExternalMemoryProperes
externalMemoryProperes;
P13
} VkExternalImageFormatProperes;
typedef struct VkExternalMemoryBuerCreateInfo {
VkStructureType sType; const void* pNext;
VkExternalMemoryHandleTypeFlags handleTypes;
P.12
} VkExternalMemoryBuerCreateInfo;
enum VkExternalMemoryFeatureFlagBits:
VK_EXTERNAL_MEMORY_FEATURE_X_BIT where X is
DEDICATED_ONLY,
EXPORTABLE,
IMPORTABLE
enum VkExternalMemoryHandleTypeFlagBits:
VK_EXTERNAL_MEMORY_HANDLE_TYPE_X_BIT where X is
OPAQUE_FD,
OPAQUE_WIN32,
OPAQUE_WIN32_KMT,
D3D11_TEXTURE,
D3D11_TEXTURE_KMT,
D3D12_HEAP,
D3D12_RESOURCE
Connued on next page >
www.khronos.org/vulkan©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 13
Structures and Enumeraons (connued)
typedef struct VkExternalMemoryImageCreateInfo {
VkStructureType sType; const void* pNext;
VkExternalMemoryHandleTypeFlags handleTypes;
P.12
} VkExternalMemoryImageCreateInfo;
typedef struct VkExternalMemoryProperes {
VkExternalMemoryFeatureFlags
externalMemoryFeatures;
P.12
VkExternalMemoryHandleTypeFlags
exportFromImportedHandleTypes;
P12
VkExternalMemoryHandleTypeFlags
compableHandleTypes;
P12
} VkExternalMemoryProperes;
enum VkExternalSemaphoreHandleTypeFlagBits:
VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_X_BIT where
X is OPAQUE_FD, OPAQUE_WIN32, OPAQUE_WIN32_KMT,
D3D12_FENCE, SYNC_FD
enum VkFormat:
VK_FORMAT_X where X is
UNDEFINED,
R4G4_UNORM_PACK8,
R4G4B4A4_UNORM_PACK16,
B4G4R4A4_UNORM_PACK16,
R5G6B5_UNORM_PACK16,
B5G6R5_UNORM_PACK16,
R5G5B5A1_UNORM_PACK16,
B5G5R5A1_UNORM_PACK16,
A1R5G5B5_UNORM_PACK16,
R8_[UNORM, SNORM, USCALED],
R8_[SSCALED, UINT, SINT, SRGB],
R8G8_[UNORM, SNORM, USCALED],
R8G8_[SSCALED, UINT, SINT, SRGB],
R8G8B8_[UNORM, SNORM, USCALED],
R8G8B8_[SSCALED, UINT, SINT, SRGB],
B8G8R8_[UNORM, SNORM, USCALED],
B8G8R8_[SSCALED, UINT, SINT, SRGB],
R8G8B8A8_[UNORM, SNORM, USCALED],
R8G8B8A8_[SSCALED, UINT, SINT, SRGB],
B8G8R8A8_[UNORM, SNORM, USCALED],
B8G8R8A8_[SSCALED, UINT, SINT, SRGB],
A8B8G8R8_[UNORM, SNORM, USCALED]_PACK32,
A8B8G8R8_[SSCALED, UINT, SINT, SRGB]_PACK32,
A2R10G10B10_[UNORM, SNORM, USCALED]_PACK32,
A2R10G10B10_[SSCALED, UINT, SINT]_PACK32,
A2B10G10R10_[UNORM, SNORM, USCALED]_PACK32,
A2B10G10R10_[SSCALED, UINT, SINT]_PACK32,
R16_[UNORM, SNORM, USCALED],
R16_[SSCALED, UINT, SINT, SFLOAT],
R16G16_[UNORM, SNORM, USCALED],
R16G16_[SSCALED, UINT, SINT, SFLOAT],
R16G16B16_[UNORM, SNORM, USCALED],
R16G16B16_[SSCALED, UINT, SINT, SFLOAT],
R16G16B16A16_[UNORM, SNORM, USCALED],
R16G16B16A16_[SSCALED, UINT, SINT, SFLOAT],
R32_[UINT, SINT, SFLOAT],
R32G32_[UINT, SINT, SFLOAT],
R32G32B32_[UINT, SINT, SFLOAT],
R32G32B32A32_[UINT, SINT, SFLOAT],
R64_[UINT, SINT, SFLOAT],
R64G64_[UINT, SINT, SFLOAT],
R64G64B64_[UINT, SINT, SFLOAT],
R64G64B64A64_[UINT, SINT, SFLOAT],
B10G11R11_UFLOAT_PACK32,
E5B9G9R9_UFLOAT_PACK32,
X8_D24_UNORM_PACK32,
D32_SFLOAT[_S8_UINT],
S8_UINT,
D[16, 24]_UNORM_S8_UINT,
BC1_[RGB, RGBA]_UNORM_BLOCK,
BC1_[RGB, RGBA]_SRGB_BLOCK,
BC2_[UNORM, SRGB]_BLOCK,
BC3_[UNORM, SRGB]_BLOCK,
BC4_[UNORM, SRGB]_BLOCK,
BC5_[UNORM, SRGB]_BLOCK,
BC6H_[UFLOAT, SFLOAT]_BLOCK,
BC7_[UNORM, SRGB]_BLOCK,
ETC2_R8G8B8_[UNORM, SRGB]_BLOCK,
ETC2_R8G8B8A1_[UNORM, SRGB]_BLOCK,
ETC2_R8G8B8A8_[UNORM, SRGB]_BLOCK,
EAC_R11_[UNORM, SRGB]_BLOCK,
EAC_R11G11_[UNORM, SRGB]_BLOCK,
ASTC_4x4_[UNORM, SRGB]_BLOCK,
ASTC_5x4_[UNORM, SRGB]_BLOCK,
ASTC_5x5_[UNORM, SRGB]_BLOCK,
ASTC_6x5_[UNORM, SRGB]_BLOCK,
ASTC_6x6_[UNORM, SRGB]_BLOCK,
ASTC_8x5_[UNORM, SRGB]_BLOCK,
ASTC_8x6_[UNORM, SRGB]_BLOCK,
ASTC_8x8_[UNORM, SRGB]_BLOCK,
ASTC_10x5_[UNORM, SRGB]_BLOCK,
ASTC_10x6_[UNORM, SRGB]_BLOCK,
ASTC_10x8_[UNORM, SRGB]_BLOCK,
ASTC_10x10_[UNORM, SRGB]_BLOCK,
ASTC_12x10_[UNORM, SRGB]_BLOCK,
ASTC_12x12_[UNORM, SRGB]_BLOCK,
G8B8G8R8_422_UNORM,
B8G8R8G8_422_UNORM,
G8_B8_R8_3PLANE_420_UNORM,
G8_B8R8_2PLANE_{420, 422}_UNORM,
G8_B8_R8_3PLANE_{422, 444}_UNORM,
R10X6_UNORM_PACK16,
R10X6G10X6_UNORM_2PACK16,
R10X6G10X6B10X6A10X6_UNORM_4PACK16,
G10X6B10X6G10X6R10X6_422_UNORM_4PACK16,
B10X6G10X6R10X6G10X6_422_UNORM_4PACK16,
G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16,
G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16,
G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16,
G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16,
G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16,
R12X4_UNORM_PACK16,
R12X4G12X4_UNORM_2PACK16,
R12X4G12X4B12X4A12X4_UNORM_4PACK16,
G12X4B12X4G12X4R12X4_422_UNORM_4PACK16,
B12X4G12X4R12X4G12X4_422_UNORM_4PACK16,
G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16,
G12X4_B12X4R12X4_2PLANE_{420, 422}_UNORM_3PACK16,
G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16,
G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16,
G16B16G16R16_422_UNORM,
B16G16R16G16_422_UNORM,
G16_B16_R16_3PLANE_{420, 422, 444}_UNORM,
G16_B16R16_2PLANE_{420, 422}_UNORM
enum VkImageAspectFlagBits:
VK_IMAGE_ASPECT_X_BIT where X is
COLOR,
DEPTH,
STENCIL,
METADATA,
PLANE_[0,1,2]
enum VkImageCreateFlagBits:
VK_IMAGE_CREATE_
X
_BIT where X is
SPARSE_{BINDING, RESIDENCY, ALIASED},
MUTABLE_FORMAT,
{CUBE, 2D_ARRAY, TEXEL_VIEW}_COMPATIBLE,
ALIAS, BIND_SFR,
EXTENDED_USAGE,
PROTECTED,
DISJOINT
enum VkImageLayout:
VK_IMAGE_LAYOUT_X where X is
UNDEFINED, GENERAL, PREINITIALIZED,
COLOR_ATTACHMENT_OPTIMAL,
DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,
DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,
DEPTH_STENCIL_ATTACHMENT_OPTIMAL,
DEPTH_STENCIL_READ_ONLY_OPTIMAL,
SHADER_READ_ONLY_OPTIMAL,
TRANSFER_{SRC, DST}_OPTIMAL,
DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,
DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,
VK_IMAGE_LAYOUT_PRESENT_SRC_KHR,
VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR
NOTE: For the funcons vkCmdCopyImage,
vkCmdCopyBuerToImage, vkCmdCopyImageToBuer,
vkCmdBlitImage, and vkCmdResolveImage, the enum
VkImageLayout for the following parameters may be:
srcImageLayout: VK_IMAGE_LAYOUT_GENERAL,
VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR
dstImageLayout: VK_IMAGE_LAYOUT_GENERAL,
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR
typedef struct VkImageMemoryBarrier {
VkStructureType sType; const void* pNext;
VkAccessFlags srcAccessMask;
P.12
VkAccessFlags dstAccessMask;
P.12
VkImageLayout oldLayout;
P.13
VkImageLayout newLayout;
P.13
uint32_t srcQueueFamilyIndex;
uint32_t dstQueueFamilyIndex;
VkImage image;
VkImageSubresourceRange subresourceRange;
P.1313
} VkImageMemoryBarrier;
typedef struct VkImagePlaneMemoryRequirementsInfo {
VkStructureType sType; const void* pNext;
VkImageAspectFlagBits planeAspect;
P.1313
} VkImagePlaneMemoryRequirementsInfo;
typedef struct VkImageSubresourceLayers {
VkImageAspectFlags aspectMask;
P.13
uint32_t mipLevel;
uint32_t baseArrayLayer;
uint32_t layerCount;
} VkImageSubresourceLayers;
typedef struct VkImageSubresourceRange {
VkImageAspectFlags aspectMask;
P.13
uint32_t baseMipLevel;
uint32_t levelCount;
uint32_t baseArrayLayer;
uint32_t layerCount;
} VkImageSubresourceRange;
enum VkImageTiling:
VK_IMAGE_TILING_{OPTIMAL, LINEAR}
enum VkImageType:
VK_IMAGE_TYPE_{1D, 2D, 3D}
enum VkImageUsageFlagBits:
VK_IMAGE_USAGE_X_BIT where X is
TRANSFER_SRC,
TRANSFER_DST,
SAMPLED,
STORAGE,
COLOR_ATTACHMENT,
DEPTH_STENCIL_ATTACHMENT,
TRANSIENT_ATTACHMENT,
INPUT_ATTACHMENT
typedef struct VkImageViewUsageCreateInfo {
VkStructureType sType; const void* pNext;
VkImageUsageFlags usage;
P.13
} VkImageViewUsageCreateInfo;
typedef struct VkInputAachmentAspectReference {
uint32_t subpass;
uint32_t inputAachmentIndex;
VkImageAspectFlags aspectMask;
P.13
} VkInputAachmentAspectReference;
typedef struct VkMemoryAllocateFlagsInfo {
VkStructureType sType; const void* pNext;
VkMemoryAllocateFlags ags;
uint32_t deviceMask;
} VkMemoryAllocateFlagsInfo;
ags: VK_MEMORY_ALLOCATE_DEVICE_MASK_BIT
typedef struct VkMemoryBarrier {
VkStructureType sType; const void* pNext;
VkAccessFlags srcAccessMask;
P.12
VkAccessFlags dstAccessMask;
P.12
} VkMemoryBarrier;
typedef struct VkMemoryDedicatedAllocateInfo {
VkStructureType sType; const void* pNext;
VkImage image;
VkBuer buer;
} VkMemoryDedicatedAllocateInfo;
typedef struct VkMemoryDedicatedRequirements {
VkStructureType sType; void* pNext;
VkBool32 prefersDedicatedAllocaon;
VkBool32 requiresDedicatedAllocaon;
} VkMemoryDedicatedRequirements;
typedef struct VkMemoryHeap {
VkDeviceSize size;
VkMemoryHeapFlags ags;
} VkMemoryHeap;
ags: VK_MEMORY_HEAP_X_BIT where X is
DEVICE_LOCAL, MULTI_INSTANCE
typedef struct VkMemoryRequirements {
VkDeviceSize size;
VkDeviceSize alignment;
uint32_t memoryTypeBits;
} VkMemoryRequirements;
typedef struct VkMemoryRequirements2 {
VkStructureType sType; void* pNext;
VkMemoryRequirements memoryRequirements;
P.13
} VkMemoryRequirements2;
pNext may point to structs:
VkMemoryDedicatedRequirements
P13
Connued on next page >
www.khronos.org/vulkan
©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 14
Structures and Enumeraons (connued)
typedef struct VkMemoryType {
VkMemoryPropertyFlags propertyFlags;
uint32_t heapIndex;
} VkMemoryType;
propertyFlags: VK_MEMORY_PROPERTY_X_BIT where X is
DEVICE_LOCAL, HOST_VISIBLE, HOST_COHERENT,
HOST_CACHED, LAZILY_ALLOCATED, PROTECTED
typedef struct VkOset2D {
int32_t x;
int32_t y;
} VkOset2D;
typedef struct VkOset3D {
int32_t x;
int32_t y;
int32_t z;
} VkOset3D;
typedef struct VkPhysicalDevice16BitStorageFeatures {
VkStructureType sType; void* pNext;
VkBool32 storageBuer16BitAccess;
VkBool32 uniformAndStorageBuer16BitAccess;
VkBool32 storagePushConstant16;
VkBool32 storageInputOutput16;
} VkPhysicalDevice16BitStorageFeatures;
typedef struct VkPhysicalDeviceExternalImageFormatInfo {
VkStructureType sType; const void* pNext;
VkExternalMemoryHandleTypeFlagBits handleType;
P.1512
} VkPhysicalDeviceExternalImageFormatInfo;
typedef struct VkPhysicalDeviceFeatures {
VkBool32 robustBuerAccess;
VkBool32 fullDrawIndexUint32;
VkBool32 imageCubeArray;
VkBool32 independentBlend;
VkBool32 geometryShader;
VkBool32 tessellaonShader;
VkBool32 sampleRateShading;
VkBool32 dualSrcBlend;
VkBool32 logicOp;
VkBool32 mulDrawIndirect;
VkBool32 drawIndirectFirstInstance;
VkBool32 depthClamp;
VkBool32 depthBiasClamp;
VkBool32 llModeNonSolid;
VkBool32 depthBounds;
VkBool32 wideLines;
VkBool32 largePoints;
VkBool32 alphaToOne;
VkBool32 mulViewport;
VkBool32 samplerAnisotropy;
VkBool32 textureCompressionETC2;
VkBool32 textureCompressionASTC_LDR;
VkBool32 textureCompressionBC;
VkBool32 occlusionQueryPrecise;
VkBool32 pipelineStascsQuery;
VkBool32 vertexPipelineStoresAndAtomics;
VkBool32 fragmentStoresAndAtomics;
VkBool32 shaderTessellaonAndGeometryPointSize;
VkBool32 shaderImageGatherExtended;
VkBool32 shaderStorageImageExtendedFormats;
VkBool32 shaderStorageImageMulsample;
VkBool32 shaderStorageImageReadWithoutFormat;
VkBool32 shaderStorageImageWriteWithoutFormat;
VkBool32 shaderUniformBuerArrayDynamicIndexing;
VkBool32 shaderSampledImageArrayDynamicIndexing;
VkBool32 shaderStorageBuerArrayDynamicIndexing;
VkBool32 shaderStorageImageArrayDynamicIndexing;
VkBool32 shaderClipDistance;
VkBool32 shaderCullDistance;
VkBool32 shaderFloat64;
VkBool32 shaderInt64;
VkBool32 shaderInt16;
VkBool32 shaderResourceResidency;
VkBool32 shaderResourceMinLod;
VkBool32 sparseBinding;
VkBool32 sparseResidencyBuer;
VkBool32 sparseResidencyImage2D;
VkBool32 sparseResidencyImage3D;
VkBool32 sparseResidency2Samples;
VkBool32 sparseResidency4Samples;
VkBool32 sparseResidency8Samples;
VkBool32 sparseResidency16Samples;
VkBool32 sparseResidencyAliased;
VkBool32 variableMulsampleRate;
VkBool32 inheritedQueries;
} VkPhysicalDeviceFeatures;
typedef struct VkPhysicalDeviceFeatures2 {
VkStructureType sType; void* pNext;
VkPhysicalDeviceFeatures features;
P.14
} VkPhysicalDeviceFeatures2;
pNext may point to these structs:
VkPhysicalDevice16BitStorageFeatures
P.14
VkPhysicalDeviceMulviewFeatures
P.14
VkPhysicalDeviceProtectedMemoryFeatures
P.15
VkPhysicalDeviceSamplerYcbcrConversionFeatures
P.15
VkPhysicalDeviceShaderDrawParameterFeatures
P.15
VkPhysicalDeviceVariablePointerFeatures
P.15
typedef struct VkPhysicalDeviceIDProperes {
VkStructureType sType; void* pNext;
uint8_t deviceUUID[VK_UUID_SIZE];
uint8_t driverUUID[VK_UUID_SIZE];
uint8_t deviceLUID[VK_LUID_SIZE];
uint32_t deviceNodeMask;
VkBool32 deviceLUIDValid;
} VkPhysicalDeviceIDProperes;
typedef struct VkPhysicalDeviceLimits {
uint32_t maxImageDimension1D;
uint32_t maxImageDimension2D;
uint32_t maxImageDimension3D;
uint32_t maxImageDimensionCube;
uint32_t maxImageArrayLayers;
uint32_t maxTexelBuerElements;
uint32_t maxUniformBuerRange;
uint32_t maxStorageBuerRange;
uint32_t maxPushConstantsSize;
uint32_t maxMemoryAllocaonCount;
uint32_t maxSamplerAllocaonCount;
VkDeviceSize buerImageGranularity;
VkDeviceSize sparseAddressSpaceSize;
uint32_t maxBoundDescriptorSets;
uint32_t maxPerStageDescriptorSamplers;
uint32_t maxPerStageDescriptorUniformBuers;
uint32_t maxPerStageDescriptorStorageBuers;
uint32_t maxPerStageDescriptorSampledImages;
uint32_t maxPerStageDescriptorStorageImages;
uint32_t maxPerStageDescriptorInputAachments;
uint32_t maxPerStageResources;
uint32_t maxDescriptorSetSamplers;
uint32_t maxDescriptorSetUniformBuers;
uint32_t maxDescriptorSetUniformBuersDynamic;
uint32_t maxDescriptorSetStorageBuers;
uint32_t maxDescriptorSetStorageBuersDynamic;
uint32_t maxDescriptorSetSampledImages;
uint32_t maxDescriptorSetStorageImages;
uint32_t maxDescriptorSetInputAachments;
uint32_t maxVertexInputAributes;
uint32_t maxVertexInputBindings;
uint32_t maxVertexInputAributeOset;
uint32_t maxVertexInputBindingStride;
uint32_t maxVertexOutputComponents;
uint32_t maxTessellaonGeneraonLevel;
uint32_t maxTessellaonPatchSize;
uint32_t
maxTessellaonControlPerVertexInputComponents;
uint32_t
maxTessellaonControlPerVertexOutputComponents;
uint32_t
maxTessellaonControlPerPatchOutputComponents;
uint32_t maxTessellaonControlTotalOutputComponents;
uint32_t maxTessellaonEvaluaonInputComponents;
uint32_t maxTessellaonEvaluaonOutputComponents;
uint32_t maxGeometryShaderInvocaons;
uint32_t maxGeometryInputComponents;
uint32_t maxGeometryOutputComponents;
uint32_t maxGeometryOutputVerces;
uint32_t maxGeometryTotalOutputComponents;
uint32_t maxFragmentInputComponents;
uint32_t maxFragmentOutputAachments;
uint32_t maxFragmentDualSrcAachments;
uint32_t maxFragmentCombinedOutputResources;
uint32_t maxComputeSharedMemorySize;
uint32_t maxComputeWorkGroupCount[3];
uint32_t maxComputeWorkGroupInvocaons;
uint32_t maxComputeWorkGroupSize[3];
uint32_t subPixelPrecisionBits;
uint32_t subTexelPrecisionBits;
uint32_t mipmapPrecisionBits;
uint32_t maxDrawIndexedIndexValue;
uint32_t maxDrawIndirectCount;
oat maxSamplerLodBias;
oat maxSamplerAnisotropy;
uint32_t maxViewports;
uint32_t maxViewportDimensions[2];
oat viewportBoundsRange[2];
uint32_t viewportSubPixelBits;
size_t minMemoryMapAlignment;
VkDeviceSize minTexelBuerOsetAlignment;
VkDeviceSize minUniformBuerOsetAlignment;
VkDeviceSize minStorageBuerOsetAlignment;
int32_t minTexelOset;
uint32_t maxTexelOset;
int32_t minTexelGatherOset;
uint32_t maxTexelGatherOset;
oat minInterpolaonOset;
oat maxInterpolaonOset;
uint32_t subPixelInterpolaonOsetBits;
uint32_t maxFramebuerWidth;
uint32_t maxFramebuerHeight;
uint32_t maxFramebuerLayers;
VkSampleCountFlags framebuerColorSampleCounts;
P.15
VkSampleCountFlags framebuerDepthSampleCounts;
P.15
VkSampleCountFlags framebuerStencilSampleCounts;
P.15
VkSampleCountFlags
framebuerNoAachmentsSampleCounts;
P.15
uint32_t maxColorAachments;
VkSampleCountFlags
sampledImageColorSampleCounts;
P.15
VkSampleCountFlags
sampledImageIntegerSampleCounts;
P.15
VkSampleCountFlags
sampledImageDepthSampleCounts;
P.15
VkSampleCountFlags
sampledImageStencilSampleCounts;
P.15
VkSampleCountFlags storageImageSampleCounts;
P.15
uint32_t maxSampleMaskWords;
VkBool32 mestampComputeAndGraphics;
oat mestampPeriod;
uint32_t maxClipDistances;
uint32_t maxCullDistances;
uint32_t maxCombinedClipAndCullDistances;
uint32_t discreteQueuePriories;
oat pointSizeRange[2];
oat lineWidthRange[2];
oat pointSizeGranularity;
oat lineWidthGranularity;
VkBool32 strictLines;
VkBool32 standardSampleLocaons;
VkDeviceSize opmalBuerCopyOsetAlignment;
VkDeviceSize opmalBuerCopyRowPitchAlignment;
VkDeviceSize nonCoherentAtomSize;
} VkPhysicalDeviceLimits;
typedef struct VkPhysicalDeviceMaintenance3Properes {
VkStructureType sType; void* pNext;
uint32_t maxPerSetDescriptors;
VkDeviceSize maxMemoryAllocaonSize;
} VkPhysicalDeviceMaintenance3Properes;
typedef struct VkPhysicalDeviceMemoryProperes {
uint32_t memoryTypeCount; VkMemoryType
memoryTypes[VK_MAX_MEMORY_TYPES];
P.14
uint32_t memoryHeapCount; VkMemoryHeap
memoryHeaps[VK_MAX_MEMORY_HEAPS];
P.13
} VkPhysicalDeviceMemoryProperes;
typedef struct VkPhysicalDeviceMulviewFeatures {
VkStructureType sType; void* pNext;
VkBool32 mulview;
VkBool32 mulviewGeometryShader;
VkBool32 mulviewTessellaonShader;
} VkPhysicalDeviceMulviewFeatures;
typedef struct VkPhysicalDeviceMulviewProperes {
VkStructureType sType; void* pNext;
uint32_t maxMulviewViewCount;
uint32_t maxMulviewInstanceIndex;
} VkPhysicalDeviceMulviewProperes;
typedef struct VkPhysicalDevicePointClippingProperes {
VkStructureType sType; void* pNext;
VkPointClippingBehavior pointClippingBehavior;
} VkPhysicalDevicePointClippingProperes;
pointClippingBehavior:
VK_POINT_CLIPPING_BEHAVIOR_X where X is
ALL_CLIP_PLANES, USER_CLIP_PLANES_ONLY
typedef struct VkPhysicalDeviceProperes {
uint32_t apiVersion;
uint32_t driverVersion;
uint32_t vendorID;
uint32_t deviceID;
VkPhysicalDeviceType deviceType;
char deviceName[
VK_MAX_PHYSICAL_DEVICE_NAME_SIZE];
uint8_t pipelineCacheUUID[VK_UUID_SIZE];
VkPhysicalDeviceLimits limits;
P.14
VkPhysicalDeviceSparseProperes sparseProperes;
P.15
} VkPhysicalDeviceProperes;
deviceType:
VK_PHYSICAL_DEVICE_TYPE_X where X is
OTHER, INTEGRATED_GPU, DISCRETE_GPU,
VIRTUAL_GPU, CPU
Connued on next page >
www.khronos.org/vulkan©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 15
Learn more about Vulkan
Vulkan is maintained by the Khronos Group, a worldwide
consorum of organizaons that work to create and maintain
key standards used across many industries. Visit Khronos
online for resources to help you use and master Vulkan:
Main Vulkan Resource Page:
khronos.org/vulkan/
Vulkan Registry:
khronos.org/registry/vulkan/
Forums:
forums.khronos.org
Reference Guides:
khronos.org/developers/reference-cards/
Courses:
khronos.org/developers/training/
Videos & Presentaons:
khronos.org/developers/library/
Events:
khronos.org/news/events/
Khronos Blog:
khronos.org/blog/
@thekhronosgroup khronos.org
Structures and Enumeraons (connued)
typedef struct
VkPhysicalDeviceProtectedMemoryFeatures {
VkStructureType sType; void* pNext;
VkBool32 protectedMemory;
} VkPhysicalDeviceProtectedMemoryFeatures;
typedef struct
VkPhysicalDeviceProtectedMemoryProperes {
VkStructureType sType; void* pNext;
VkBool32 protectedNoFault;
} VkPhysicalDeviceProtectedMemoryProperes;
typedef struct
VkPhysicalDeviceSamplerYcbcrConversionFeatures {
VkStructureType sType; void* pNext;
VkBool32 samplerYcbcrConversion;
} VkPhysicalDeviceSamplerYcbcrConversionFeatures;
typedef struct
VkPhysicalDeviceShaderDrawParameterFeatures {
VkStructureType sType; void* pNext;
VkBool32 shaderDrawParameters;
} VkPhysicalDeviceShaderDrawParameterFeatures;
typedef struct VkPhysicalDeviceSparseProperes {
VkBool32 residencyStandard2DBlockShape;
VkBool32 residencyStandard2DMulsampleBlockShape;
VkBool32 residencyStandard3DBlockShape;
VkBool32 residencyAlignedMipSize;
VkBool32 residencyNonResidentStrict;
} VkPhysicalDeviceSparseProperes;
typedef struct VkPhysicalDeviceSubgroupProperes {
VkStructureType sType; void* pNext;
uint32_t subgroupSize;
VkShaderStageFlags supportedStages;
P.15
VkSubgroupFeatureFlags supportedOperaons;
VkBool32 quadOperaonsInAllStages;
} VkPhysicalDeviceSubgroupProperes;
supportedOperaons:
VK_SUBGROUP_FEATURE_X_BIT where X is
ARITHMETIC, BALLOT, BASIC, CLUSTERED, QUAD, SHUFFLE,
SHUFFLE_RELATIVE, VOTE
typedef struct VkPhysicalDeviceSurfaceInfo2KHR {
VkStructureType sType; const void* pNext;
VkSurfaceKHR surface;
} VkPhysicalDeviceSurfaceInfo2KHR;
typedef struct VkPhysicalDeviceVariablePointerFeatures {
VkStructureType sType; void* pNext;
VkBool32 variablePointersStorageBuer;
VkBool32 variablePointers;
} VkPhysicalDeviceVariablePointerFeatures;
enum VkPipelineBindPoint:
VK_PIPELINE_BIND_POINT_COMPUTE,
VK_PIPELINE_BIND_POINT_GRAPHICS
enum VkPipelineCreateFlagBits:
VK_PIPELINE_CREATE_X where X is
DISABLE_OPTIMIZATION_BIT,
ALLOW_DERIVATIVES_BIT,
DERIVATIVE_BIT,
VIEW_INDEX_FROM_DEVICE_INDEX_BIT,
DISPATCH_BASE
typedef struct VkPipelineShaderStageCreateInfo {
VkStructureType sType; const void* pNext;
VkPipelineShaderStageCreateFlags ags;
= 0
VkShaderStageFlagBits stage;
P.15
VkShaderModule module;
const char* pName;
const VkSpecializaonInfo* pSpecializaonInfo;
P.15
} VkPipelineShaderStageCreateInfo;
typedef struct VkSpecializaonInfo {
uint32_t mapEntryCount;
const VkSpecializaonMapEntry* pMapEntries;
P.15
size_t dataSize; const void* pData;
} VkSpecializaonInfo;
typedef struct VkSpecializaonMapEntry {
uint32_t constantID;
uint32_t oset;
size_t size;
} VkSpecializaonMapEntry;
enum VkPipelineStageFlagBits:
VK_PIPELINE_STAGE_X_BIT where X is
TOP_OF_PIPE,
DRAW_INDIRECT,
VERTEX_[INPUT, SHADER],
TESSELLATION_[CONTROL,
EVALUATION]_SHADER,
[COMPUTE, GEOMETRY, FRAGMENT]_SHADER,
[EARLY, LATE]_FRAGMENT_TESTS,
COLOR_ATTACHMENT_OUTPUT,
TRANSFER, BOTTOM_OF_PIPE, HOST,
ALL_{GRAPHICS, COMMANDS}
typedef struct
VkPipelineTessellaonDomainOriginStateCreateInfo{
VkStructureType sType; const void* pNext;
VkTessellaonDomainOrigin domainOrigin;
} VkPipelineTessellaonDomainOriginStateCreateInfo;
domainOrigin:
VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT
VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT
typedef struct VkProtectedSubmitInfo {
VkStructureType sType;
const void* pNext;
VkBool32 protectedSubmit;
} VkProtectedSubmitInfo;
enum VkQueryPipelineStascFlagBits:
VK_QUERY_PIPELINE_STATISTIC_X_BIT where X is
INPUT_ASSEMBLY_{VERTICES, PRIMITIVES},
VERTEX_SHADER_INVOCATIONS,
GEOMETRY_SHADER_{INVOCATIONS, PRIMITIVES},
CLIPPING_{INVOCATIONS, PRIMITIVES},
FRAGMENT_SHADER_INVOCATIONS,
TESSELLATION_CONTROL_SHADER_PATCHES,
TESSELLATION_EVALUATION_SHADER_INVOCATIONS,
COMPUTE_SHADER_INVOCATIONS
typedef struct VkRect2D {
VkOset2D oset;
P14
VkExtent2D extent;
P.12
} VkRect2D;
typedef struct
VkRenderPassInputAachmentAspectCreateInfo {
VkStructureType sType; const void* pNext;
uint32_t aspectReferenceCount;
const VkInputAachmentAspectReference*
pAspectReferences;
P.13
} VkRenderPassInputAachmentAspectCreateInfo;
typedef struct VkRenderPassMulviewCreateInfo {
VkStructureType sType; const void* pNext;
uint32_t subpassCount;
const uint32_t* pViewMasks;
uint32_t dependencyCount;
const int32_t* pViewOsets;
uint32_t correlaonMaskCount;
const uint32_t* pCorrelaonMasks;
} VkRenderPassMulviewCreateInfo;
enum VkSampleCountFlagBits:
VK_SAMPLE_COUNT_X_BIT where X is
1, 2, 4, 8, 16, 32, 64
typedef struct
VkSamplerYcbcrConversionImageFormatProperes {
VkStructureType sType; void* pNext;
uint32_t combinedImageSamplerDescriptorCount;
} VkSamplerYcbcrConversionImageFormatProperes;
typedef struct VkSamplerYcbcrConversionInfo {
VkStructureType sType; const void* pNext;
VkSamplerYcbcrConversion conversion;
} VkSamplerYcbcrConversionInfo
enum VkShaderStageFlagBits:
VK_SHADER_STAGE_X where X is
{VERTEX, GEOMETRY, FRAGMENT, COMPUTE}_BIT,
TESSELLATION_CONTROL_BIT,
TESSELLATION_EVALUATION_BIT,
ALL_GRAPHICS, ALL
enum VkSharingMode:
VK_SHARING_MODE_EXCLUSIVE,
VK_SHARING_MODE_CONCURRENT
typedef struct VkSparseMemoryBind {
VkDeviceSize resourceOset;
VkDeviceSize size;
VkDeviceMemory memory;
VkDeviceSize memoryOset;
VkSparseMemoryBindFlags ags;
} VkSparseMemoryBind;
ags: VK_SPARSE_MEMORY_BIND_METADATA_BIT
typedef struct VkSurfaceCapabiliesKHR {
uint32_t minImageCount;
uint32_t maxImageCount;
VkExtent2D currentExtent;
P.12
VkExtent2D minImageExtent;
P.12
VkExtent2D maxImageExtent;
P.12
uint32_t maxImageArrayLayers;
VkSurfaceTransformFlagsKHR supportedTransforms;
P.15
VkSurfaceTransformFlagBitsKHR currentTransform;
P.15
VkCompositeAlphaFlagsKHR
supportedCompositeAlpha;
P.12
VkImageUsageFlags supportedUsageFlags;
P.13
} VkSurfaceCapabiliesKHR;
enum VkCompositeAlphaFlagBitsKHR:
VK_COMPOSITE_ALPHA_X_BIT_KHR where X is
OPAQUE, PRE_MULTIPLIED, POST_MULTIPLIED, INHERIT
typedef struct VkSurfaceFormatKHR {
VkFormat format;
P.13
VkColorSpaceKHR colorSpace;
} VkSurfaceFormatKHR;
colorSpace: VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
enum VkSurfaceTransformFlagBitsKHR {
VK_SURFACE_TRANSFORM_X_BIT_KHR
where X is
IDENTITY,
ROTATE_{90, 180, 270},
HORIZONTAL_MIRROR
HORIZONTAL_MIRROR_ROTATE_{90, 180, 270},
INHERIT
typedef struct VkViewport {
oat x; oat y;
oat width; oat height;
oat minDepth; oat maxDepth;
} VkViewport;
www.khronos.org/vulkan
©2018 Khronos Group - Rev. 0318
Vulkan 1.1 Quick Reference Page 16
Reference guide producon by Miller & Mattson www.millermattson.com
Vulkan is a registered trademark of the Khronos Group. The Khronos Group is an industry
consorum creang open standards for the authoring and acceleraon of parallel
compung, graphics and dynamic media on a wide variety of plaorms and devices.
See www.khronos.org to learn more about the Khronos Group.
See www.khronos.org/vulkan to learn more about Vulkan.
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 - G
Android Plaorm 9
Blending 8
Buers 5
Cache Control 2
Clear Commands 7-8
Command Buers 1-2
Command Funciton Pointers 1
Command Pools 1
Compute Pipelines 3
Copy Commands 8
Depth Bias 8
Depth Bounds 8
Descriptors, Resource 6-7
Devices 1
Dispatching Commands 8
Display Enumeraon 9
Drawing Commands 8
Enumeraons 12-15
Events 2
Extensions 10
Fences 2
Format Properes 11
Fragment Operaons 8
Framebuers 3
Graphics Pipelines 3
I - R
Image Capabilies 11
Image Views 6
Images 5
Instances 1
Layers 10
Line Width 8
Memory Allocaon 4
Pipeline Barriers 2
Pipeline Layouts 6
Pipelines 3-4
Queries 7
Queues 1
Rasterizaon 8
Render Pass 3
Resource Creaon 5-6
Resource Descriptors 6-7
Return Codes 1
S - V
Samplers 6
Scissor Test 8
Semaphores 2
Shaders 3
Sparse Resources 8-9
Stencil Test 8
Structures 12-15
Synchronizaon 2
Timestamp Queries 7
Variables, Built-in 3
Vertex Input Descripon 8
Viewport 8
vkA - vkCl
vkAcquireNextImage* 10
VkAcquireNextImageInfoKHR 10
vkAllocateCommandBuers 2
vkAllocateDescriptorSets 7
vkAllocateMemory 4
VkAndroidSurfaceCreateInfoKHR 9
VkApplicaonInfo 1
VkAachment* 3
vkBeginCommandBuer 2
vkBind{Buer, Image}Memory* 6
VkBindImageMemoryInfo 6
VkBindSparseInfo 9
VkBuer[Image]Copy 8
VkBuer[View]CreateInfo 5
VkBuerMemoryRequirementsInfo2 6
VkClear{Aachment, Rect} 7
vkCm
vkCmd{Set, Reset}Event 2
vkCmdBeginQuery 7
vkCmdBeginRenderPass 3
vkCmdBindDescriptorSets 7
vkCmdBindIndexBuer 8
vkCmdBindPipeline 4
vkCmdBindVertexBuers 8
vkCmdBlitImage 8
vkCmdClearAachments 7
vkCmdClearColorImage 7
vkCmdClearDepthStencilImage 7
vkCmdCopyBuer[ToImage] 8
vkCmdCopyImage[ToBuer] 8
vkCmdCopyQueryPoolResults 7
vkCmdDispatch* 8
vkCmdDraw[Indirect] 8
vkCmdDrawIndexed[Indirect] 8
vkCmdEndQuery 7
vkCmdEndRenderPass 3
vkCmdExecuteCommands 2
vkCmdFillBuer 8
vkCmdNextSubpass 3
vkCmdPipelineBarrier 2
vkCmdPushConstants 7
vkCmdResetQueryPool 7
vkCmdResolveImage 8
vkCmdSetBlendConstants 8
vkCmdSetDepthBias 8
vkCmdSetDepthBounds 8
vkCmdSetDeviceMask 2
vkCmdSetLineWidth 8
vkCmdSetScissor 8
vkCmdSetStencil{Compare, Write}Mask 8
vkCmdSetStencilReference 8
vkCmdSetViewport 8
vkCmdUpdateBuer 8
vkCmdWaitEvents 2
vkCmdWriteTimestamp 7
VkCo - vkCr
VkCommandBuer* 2
VkCommandPoolCreateInfo 1
VkComponentMapping 6
VkComputePipelineCreateInfo 3
VkCopyDescriptorSet 7
vkCreate{Event, Fence} 2
vkCreateAndroidSurfaceKHR 9
vkCreateBuer[View] 5
vkCreateCommandPool 1
vkCreateComputePipelines 3
vkCreateDescriptorPool 6
vkCreateDescriptorSetLayout 6
vkCreateDescriptorUpdateTemplate 7
vkCreateDevice 1
vkCreateDisplayModeKHR 9
vkCreateDisplayPlaneSurfaceKHR 9
vkCreateFramebuer 3
vkCreateGraphicsPipelines 3
vkCreateImage 5
vkCreateImageView 6
vkCreateInstance 1
vkCreatePipelineCache 4
vkCreatePipelineLayout 6
vkCreateQueryPool 7
vkCreateRenderPass 3
vkCreateSampler[YcbcrConversion] 6
vkCreateSemaphore 2
vkCreateShaderModule 3
vkCreateSharedSwapchainsKHR 10
vkCreateSwapchainKHR 10
vkCreateWaylandSurfaceKHR 9
vkCreateWin32SurfaceKHR 9
vkCreateXcbSurfaceKHR 9
vkCreateXlibSurfaceKHR 9
VkDesc - vkDest
VkDescriptor{Buer, Image}Info 7
VkDescriptorPool* 7
VkDescriptorSetAllocateInfo 7
VkDescriptorSetLayoutSupport 6
VkDescriptorUpdateTemplate* 7
vkDestroy{Event, Fence} 2
vkDestroyBuer[View] 5
vkDestroyCommandPool 1
vkDestroyDescriptorPool 7
vkDestroyDescriptorSetLayout 6
vkDestroyDescriptorUpdateTemplate 7
vkDestroyDevice 1
vkDestroyFramebuer 3
vkDestroyImage[View] 6
vkDestroyInstance 1
vkDestroyPipeline[Cache] 4
vkDestroyPipelineLayout 6
vkDestroyQueryPool 7
vkDestroyRenderPass 3
vkDestroySampler[YcbcrConversion] 6
vkDestroySemaphore 2
vkDestroyShaderModule 3
vkDestroySurfaceKHR 9
vkDestroySwapchainKHR 10
VkDev - vkF
VkDevice[GroupDevice]CreateInfo 1
VkDeviceGroupPresentCapabiliesKHR 10
VkDeviceGroupPresentInfoKHR 10
VkDeviceGroupSwapchainCreateInfoKHR 10
VkDeviceQueue[Create]Info* 1
vkDeviceWaitIdle 2
VkDispatchIndirectCommand 8
VkDisplayMode* 9
VkDisplayPlane* 9
VkDisplayPresentInfoKHR 10
VkDisplayProperesKHR 9
VkDisplaySurfaceCreateInfoKHR 9
VkDraw[Indexed]IndirectCommand 8
vkEndCommandBuer 2
vkEnumerateDevice* 10
vkEnumerateInstance* 10
vkEnumerateInstanceVersion 1
vkEnumeratePhysicalDevice* 1
Vk{Event, Fence}CreateInfo 2
VkExtensionProperes 11
VkExternalBuerProperes 11
VkExternalFenceProperes 11
VkExternalSemaphoreProperes 11
vkFlushMappedMemoryRanges 4
VkFormatProperes* 11
VkFramebuerCreateInfo 3
vkFreeCommandBuers 2
vkFreeDescriptorSets 7
vkFreeMemory 4
vkG
vkGet{Event, Fence}Status 2
vkGetBuerMemoryRequirements* 6
vkGetDescriptorSetLayoutSupport 6
vkGetDeviceGroupPeerMemoryFeatures 4
vkGetDeviceGroupPresentCapabiliesKHR 10
vkGetDeviceGroupSurfacePresentModesKHR 10
vkGetDeviceMemoryCommitment 4
vkGetDeviceProcAddr 1
vkGetDeviceQueue* 1
vkGetDisplayModeProperesKHR 9
vkGetDisplayPlaneCapabiliesKHR 9
vkGetDisplayPlaneSupportedDisplaysKHR 9
vkGetImageMemoryRequirements* 6
vkGetImageSparseMemoryRequirements* 9
vkGetImageSubresourceLayout 5
vkGetInstanceProcAddr 1
vkGetPhysicalDeviceDisplay[Plane]ProperesKHR 9
vkGetPhysicalDeviceExternalBuerProperes 11
vkGetPhysicalDeviceExternalFenceProperes 11
vkGetPhysicalDeviceExternalSemaphoreProperes 11
vkGetPhysicalDeviceFeatures* 11
vkGetPhysicalDeviceFormatProperes* 11
vkGetPhysicalDeviceImageFormatProperes* 11
vkGetPhysicalDeviceMemoryProperes* 4
vkGetPhysicalDevicePresentRectanglesKHR 10
vkGetPhysicalDeviceProperes* 1
vkGetPhysicalDeviceQueueFamilyProperes* 1
vkGetPhysicalDeviceSparseImageFormat* 8
vkGetPhysicalDeviceSurface* 10
vkGetPhysicalDeviceWaylandPresentaonSupport* 10
vkGetPhysicalDeviceWin32PresentaonSupport* 10
vkGetPhysicalDeviceXcbPresentaonSupportKHR 10
vkGetPhysicalDeviceXlibPresentaonSupportKHR 10
vkGetPipelineCacheData 4
vkGetQueryPoolResults 7
vkGetRenderAreaGranularity 3
vkGetSwapchain* 10
VkGr-VkP
VkGraphicsPipelineCreateInfo 3
VkImageBlit 8
VkImageCopy 8
VkImageCreateInfo 5
VkImageFormatProperes* 11
VkImageMemoryRequirementsInfo2 6
VkImageResolve 8
VkImageSparseMemoryRequirementsInfo2 9
VkImageSubresource 5
VkImageSwapchainCreateInfoKHR 5
VkImageViewCreateInfo 6
VkInstanceCreateInfo 1
vkInvalidateMappedMemoryRanges 4
VkLayerProperes 10
vkMapMemory 4
VkMappedMemoryRange 4
VkMemoryAllocateInfo 4
vkMergePipelineCaches 4
VkPhysicalDeviceExternalBuerInfo 11
VkPhysicalDeviceExternalFenceInfo 11
VkPhysicalDeviceExternalSemaphoreInfo 11
VkPhysicalDevice[Group]Properes* 1
VkPhysicalDeviceImageFormatInfo2 11
VkPhysicalDeviceMemoryProperes2 4
VkPhysicalDeviceSparseImageFormatInfo2 9
VkPipelineCacheCreateInfo 4
VkPipelineColorBlend* 4
VkPipelineDepthStencilStateCreateInfo 4
VkPipelineDynamicStateCreateInfo 4
VkPipelineInputAssemblyStateCreateInfo 4
VkPipelineLayoutCreateInfo 6
VkPipelineMulsampleStateCreateInfo 4
VkPipelineRasterizaonStateCreateInfo 4
VkPipelineTessellaonStateCreateInfo 4
VkPipelineVertexInputStateCreateInfo 3
VkPipelineViewportStateCreateInfo 4
VkPr-VkSt
VkPresentInfoKHR 10
VkPresentRegion[s]KHR 10
VkPushConstantRange 6
VkQueryPoolCreateInfo 7
vkQueueBindSparse 9
VkQueueFamilyProperes* 1
vkQueuePresentKHR 10
vkQueueSubmit 2
vkQueueWaitIdle 2
VkRectLayerKHR 10
VkRenderPass{Begin, Create}Info 3
vkResetCommandBuer 2
vkResetCommandPool 1
vkResetDescriptorPool 7
vkResetFences 2
VkSampler[YcbcrConversion]CreateInfo 6
VkSemaphoreCreateInfo 2
vk{Set, Reset}Event 2
VkShaderModuleCreateInfo 3
VkSharedPresentSurfaceCapabiliesKHR 10
VkSparseBuerMemoryBindInfo 9
VkSparseImageFormatProperes* 8
VkSparseImage[Opaque]Memory* 9
VkStencilOpState 4
VkSu - W
VkSubmitInfo 2
VkSubpass* 3
VkSubresourceLayout 6
VkSurface* 10
VkSwapchainCreateInfoKHR 10
vkTrimCommandPool 1
vkUnmapMemory 4
vkUpdateDescriptorSet* 7
VkVertexInputAributeDescripon 4
VkVertexInputBindingDescripon 3
vkWaitForFences 2
VkWaylandSurfaceCreateInfoKHR 9
VkWin32SurfaceCreateInfoKHR 9
VkWriteDescriptorSet 7
VkXcbSurfaceCreateInfoKHR 9
VkXlibSurfaceCreateInfoKHR 9
Wait Idle Operaons 2
WSI (Window System Integraon) 9-10

Navigation menu