Class VK10
- java.lang.Object
-
- org.lwjgl.vulkan.VK10
-
- Direct Known Subclasses:
VK11
public class VK10 extends java.lang.Object
The core Vulkan 1.0 functionality.
-
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
nvkAllocateCommandBuffers(VkDevice device, long pAllocateInfo, long pCommandBuffers)
Unsafe version of:AllocateCommandBuffers
static int
nvkAllocateDescriptorSets(VkDevice device, long pAllocateInfo, long pDescriptorSets)
Unsafe version of:AllocateDescriptorSets
static int
nvkAllocateMemory(VkDevice device, long pAllocateInfo, long pAllocator, long pMemory)
Unsafe version of:AllocateMemory
static int
nvkBeginCommandBuffer(VkCommandBuffer commandBuffer, long pBeginInfo)
Unsafe version of:BeginCommandBuffer
static void
nvkCmdBeginRenderPass(VkCommandBuffer commandBuffer, long pRenderPassBegin, int contents)
Unsafe version of:CmdBeginRenderPass
static void
nvkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, int pipelineBindPoint, long layout, int firstSet, int descriptorSetCount, long pDescriptorSets, int dynamicOffsetCount, long pDynamicOffsets)
Unsafe version of:CmdBindDescriptorSets
static void
nvkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, int firstBinding, int bindingCount, long pBuffers, long pOffsets)
Unsafe version of:CmdBindVertexBuffers
static void
nvkCmdBlitImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, int regionCount, long pRegions, int filter)
Unsafe version of:CmdBlitImage
static void
nvkCmdClearAttachments(VkCommandBuffer commandBuffer, int attachmentCount, long pAttachments, int rectCount, long pRects)
Unsafe version of:CmdClearAttachments
static void
nvkCmdClearColorImage(VkCommandBuffer commandBuffer, long image, int imageLayout, long pColor, int rangeCount, long pRanges)
Unsafe version of:CmdClearColorImage
static void
nvkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, long image, int imageLayout, long pDepthStencil, int rangeCount, long pRanges)
Unsafe version of:CmdClearDepthStencilImage
static void
nvkCmdCopyBuffer(VkCommandBuffer commandBuffer, long srcBuffer, long dstBuffer, int regionCount, long pRegions)
Unsafe version of:CmdCopyBuffer
static void
nvkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, long srcBuffer, long dstImage, int dstImageLayout, int regionCount, long pRegions)
Unsafe version of:CmdCopyBufferToImage
static void
nvkCmdCopyImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, int regionCount, long pRegions)
Unsafe version of:CmdCopyImage
static void
nvkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstBuffer, int regionCount, long pRegions)
Unsafe version of:CmdCopyImageToBuffer
static void
nvkCmdExecuteCommands(VkCommandBuffer commandBuffer, int commandBufferCount, long pCommandBuffers)
Unsafe version of:CmdExecuteCommands
static void
nvkCmdPipelineBarrier(VkCommandBuffer commandBuffer, int srcStageMask, int dstStageMask, int dependencyFlags, int memoryBarrierCount, long pMemoryBarriers, int bufferMemoryBarrierCount, long pBufferMemoryBarriers, int imageMemoryBarrierCount, long pImageMemoryBarriers)
Unsafe version of:CmdPipelineBarrier
static void
nvkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, int size, long pValues)
Unsafe version of:CmdPushConstants
static void
nvkCmdResolveImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, int regionCount, long pRegions)
Unsafe version of:CmdResolveImage
static void
nvkCmdSetBlendConstants(VkCommandBuffer commandBuffer, long blendConstants)
Unsafe version of:CmdSetBlendConstants
static void
nvkCmdSetScissor(VkCommandBuffer commandBuffer, int firstScissor, int scissorCount, long pScissors)
Unsafe version of:CmdSetScissor
static void
nvkCmdSetViewport(VkCommandBuffer commandBuffer, int firstViewport, int viewportCount, long pViewports)
Unsafe version of:CmdSetViewport
static void
nvkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, long dataSize, long pData)
Unsafe version of:CmdUpdateBuffer
static void
nvkCmdWaitEvents(VkCommandBuffer commandBuffer, int eventCount, long pEvents, int srcStageMask, int dstStageMask, int memoryBarrierCount, long pMemoryBarriers, int bufferMemoryBarrierCount, long pBufferMemoryBarriers, int imageMemoryBarrierCount, long pImageMemoryBarriers)
Unsafe version of:CmdWaitEvents
static int
nvkCreateBuffer(VkDevice device, long pCreateInfo, long pAllocator, long pBuffer)
Unsafe version of:CreateBuffer
static int
nvkCreateBufferView(VkDevice device, long pCreateInfo, long pAllocator, long pView)
Unsafe version of:CreateBufferView
static int
nvkCreateCommandPool(VkDevice device, long pCreateInfo, long pAllocator, long pCommandPool)
Unsafe version of:CreateCommandPool
static int
nvkCreateComputePipelines(VkDevice device, long pipelineCache, int createInfoCount, long pCreateInfos, long pAllocator, long pPipelines)
Unsafe version of:CreateComputePipelines
static int
nvkCreateDescriptorPool(VkDevice device, long pCreateInfo, long pAllocator, long pDescriptorPool)
Unsafe version of:CreateDescriptorPool
static int
nvkCreateDescriptorSetLayout(VkDevice device, long pCreateInfo, long pAllocator, long pSetLayout)
Unsafe version of:CreateDescriptorSetLayout
static int
nvkCreateDevice(VkPhysicalDevice physicalDevice, long pCreateInfo, long pAllocator, long pDevice)
Unsafe version of:CreateDevice
static int
nvkCreateEvent(VkDevice device, long pCreateInfo, long pAllocator, long pEvent)
Unsafe version of:CreateEvent
static int
nvkCreateFence(VkDevice device, long pCreateInfo, long pAllocator, long pFence)
Unsafe version of:CreateFence
static int
nvkCreateFramebuffer(VkDevice device, long pCreateInfo, long pAllocator, long pFramebuffer)
Unsafe version of:CreateFramebuffer
static int
nvkCreateGraphicsPipelines(VkDevice device, long pipelineCache, int createInfoCount, long pCreateInfos, long pAllocator, long pPipelines)
Unsafe version of:CreateGraphicsPipelines
static int
nvkCreateImage(VkDevice device, long pCreateInfo, long pAllocator, long pImage)
Unsafe version of:CreateImage
static int
nvkCreateImageView(VkDevice device, long pCreateInfo, long pAllocator, long pView)
Unsafe version of:CreateImageView
static int
nvkCreateInstance(long pCreateInfo, long pAllocator, long pInstance)
Unsafe version of:CreateInstance
static int
nvkCreatePipelineCache(VkDevice device, long pCreateInfo, long pAllocator, long pPipelineCache)
Unsafe version of:CreatePipelineCache
static int
nvkCreatePipelineLayout(VkDevice device, long pCreateInfo, long pAllocator, long pPipelineLayout)
Unsafe version of:CreatePipelineLayout
static int
nvkCreateQueryPool(VkDevice device, long pCreateInfo, long pAllocator, long pQueryPool)
Unsafe version of:CreateQueryPool
static int
nvkCreateRenderPass(VkDevice device, long pCreateInfo, long pAllocator, long pRenderPass)
Unsafe version of:CreateRenderPass
static int
nvkCreateSampler(VkDevice device, long pCreateInfo, long pAllocator, long pSampler)
Unsafe version of:CreateSampler
static int
nvkCreateSemaphore(VkDevice device, long pCreateInfo, long pAllocator, long pSemaphore)
Unsafe version of:CreateSemaphore
static int
nvkCreateShaderModule(VkDevice device, long pCreateInfo, long pAllocator, long pShaderModule)
Unsafe version of:CreateShaderModule
static void
nvkDestroyBuffer(VkDevice device, long buffer, long pAllocator)
Unsafe version of:DestroyBuffer
static void
nvkDestroyBufferView(VkDevice device, long bufferView, long pAllocator)
Unsafe version of:DestroyBufferView
static void
nvkDestroyCommandPool(VkDevice device, long commandPool, long pAllocator)
Unsafe version of:DestroyCommandPool
static void
nvkDestroyDescriptorPool(VkDevice device, long descriptorPool, long pAllocator)
Unsafe version of:DestroyDescriptorPool
static void
nvkDestroyDescriptorSetLayout(VkDevice device, long descriptorSetLayout, long pAllocator)
Unsafe version of:DestroyDescriptorSetLayout
static void
nvkDestroyDevice(VkDevice device, long pAllocator)
Unsafe version of:DestroyDevice
static void
nvkDestroyEvent(VkDevice device, long event, long pAllocator)
Unsafe version of:DestroyEvent
static void
nvkDestroyFence(VkDevice device, long fence, long pAllocator)
Unsafe version of:DestroyFence
static void
nvkDestroyFramebuffer(VkDevice device, long framebuffer, long pAllocator)
Unsafe version of:DestroyFramebuffer
static void
nvkDestroyImage(VkDevice device, long image, long pAllocator)
Unsafe version of:DestroyImage
static void
nvkDestroyImageView(VkDevice device, long imageView, long pAllocator)
Unsafe version of:DestroyImageView
static void
nvkDestroyInstance(VkInstance instance, long pAllocator)
Unsafe version of:DestroyInstance
static void
nvkDestroyPipeline(VkDevice device, long pipeline, long pAllocator)
Unsafe version of:DestroyPipeline
static void
nvkDestroyPipelineCache(VkDevice device, long pipelineCache, long pAllocator)
Unsafe version of:DestroyPipelineCache
static void
nvkDestroyPipelineLayout(VkDevice device, long pipelineLayout, long pAllocator)
Unsafe version of:DestroyPipelineLayout
static void
nvkDestroyQueryPool(VkDevice device, long queryPool, long pAllocator)
Unsafe version of:DestroyQueryPool
static void
nvkDestroyRenderPass(VkDevice device, long renderPass, long pAllocator)
Unsafe version of:DestroyRenderPass
static void
nvkDestroySampler(VkDevice device, long sampler, long pAllocator)
Unsafe version of:DestroySampler
static void
nvkDestroySemaphore(VkDevice device, long semaphore, long pAllocator)
Unsafe version of:DestroySemaphore
static void
nvkDestroyShaderModule(VkDevice device, long shaderModule, long pAllocator)
Unsafe version of:DestroyShaderModule
static int
nvkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, long pLayerName, long pPropertyCount, long pProperties)
Unsafe version of:EnumerateDeviceExtensionProperties
static int
nvkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, long pPropertyCount, long pProperties)
Unsafe version of:EnumerateDeviceLayerProperties
static int
nvkEnumerateInstanceExtensionProperties(long pLayerName, long pPropertyCount, long pProperties)
Unsafe version of:EnumerateInstanceExtensionProperties
static int
nvkEnumerateInstanceLayerProperties(long pPropertyCount, long pProperties)
Unsafe version of:EnumerateInstanceLayerProperties
static int
nvkEnumeratePhysicalDevices(VkInstance instance, long pPhysicalDeviceCount, long pPhysicalDevices)
Unsafe version of:EnumeratePhysicalDevices
static int
nvkFlushMappedMemoryRanges(VkDevice device, int memoryRangeCount, long pMemoryRanges)
Unsafe version of:FlushMappedMemoryRanges
static void
nvkFreeCommandBuffers(VkDevice device, long commandPool, int commandBufferCount, long pCommandBuffers)
Unsafe version of:FreeCommandBuffers
static int
nvkFreeDescriptorSets(VkDevice device, long descriptorPool, int descriptorSetCount, long pDescriptorSets)
Unsafe version of:FreeDescriptorSets
static void
nvkFreeMemory(VkDevice device, long memory, long pAllocator)
Unsafe version of:FreeMemory
static void
nvkGetBufferMemoryRequirements(VkDevice device, long buffer, long pMemoryRequirements)
Unsafe version of:GetBufferMemoryRequirements
static void
nvkGetDeviceMemoryCommitment(VkDevice device, long memory, long pCommittedMemoryInBytes)
Unsafe version of:GetDeviceMemoryCommitment
static long
nvkGetDeviceProcAddr(VkDevice device, long pName)
Unsafe version of:GetDeviceProcAddr
static void
nvkGetDeviceQueue(VkDevice device, int queueFamilyIndex, int queueIndex, long pQueue)
Unsafe version of:GetDeviceQueue
static void
nvkGetImageMemoryRequirements(VkDevice device, long image, long pMemoryRequirements)
Unsafe version of:GetImageMemoryRequirements
static void
nvkGetImageSparseMemoryRequirements(VkDevice device, long image, long pSparseMemoryRequirementCount, long pSparseMemoryRequirements)
Unsafe version of:GetImageSparseMemoryRequirements
static void
nvkGetImageSubresourceLayout(VkDevice device, long image, long pSubresource, long pLayout)
Unsafe version of:GetImageSubresourceLayout
static long
nvkGetInstanceProcAddr(VkInstance instance, long pName)
Unsafe version of:GetInstanceProcAddr
static void
nvkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, long pFeatures)
Unsafe version of:GetPhysicalDeviceFeatures
static void
nvkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, int format, long pFormatProperties)
Unsafe version of:GetPhysicalDeviceFormatProperties
static int
nvkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, int format, int type, int tiling, int usage, int flags, long pImageFormatProperties)
Unsafe version of:GetPhysicalDeviceImageFormatProperties
static void
nvkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, long pMemoryProperties)
Unsafe version of:GetPhysicalDeviceMemoryProperties
static void
nvkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, long pProperties)
Unsafe version of:GetPhysicalDeviceProperties
static void
nvkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, long pQueueFamilyPropertyCount, long pQueueFamilyProperties)
Unsafe version of:GetPhysicalDeviceQueueFamilyProperties
static void
nvkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, int format, int type, int samples, int usage, int tiling, long pPropertyCount, long pProperties)
Unsafe version of:GetPhysicalDeviceSparseImageFormatProperties
static int
nvkGetPipelineCacheData(VkDevice device, long pipelineCache, long pDataSize, long pData)
Unsafe version of:GetPipelineCacheData
static int
nvkGetQueryPoolResults(VkDevice device, long queryPool, int firstQuery, int queryCount, long dataSize, long pData, long stride, int flags)
Unsafe version of:GetQueryPoolResults
static void
nvkGetRenderAreaGranularity(VkDevice device, long renderPass, long pGranularity)
Unsafe version of:GetRenderAreaGranularity
static int
nvkInvalidateMappedMemoryRanges(VkDevice device, int memoryRangeCount, long pMemoryRanges)
Unsafe version of:InvalidateMappedMemoryRanges
static int
nvkMapMemory(VkDevice device, long memory, long offset, long size, int flags, long ppData)
Unsafe version of:MapMemory
static int
nvkMergePipelineCaches(VkDevice device, long dstCache, int srcCacheCount, long pSrcCaches)
Unsafe version of:MergePipelineCaches
static int
nvkQueueBindSparse(VkQueue queue, int bindInfoCount, long pBindInfo, long fence)
Unsafe version of:QueueBindSparse
static int
nvkQueueSubmit(VkQueue queue, int submitCount, long pSubmits, long fence)
Unsafe version of:QueueSubmit
static int
nvkResetFences(VkDevice device, int fenceCount, long pFences)
Unsafe version of:ResetFences
static void
nvkUpdateDescriptorSets(VkDevice device, int descriptorWriteCount, long pDescriptorWrites, int descriptorCopyCount, long pDescriptorCopies)
Unsafe version of:UpdateDescriptorSets
static int
nvkWaitForFences(VkDevice device, int fenceCount, long pFences, int waitAll, long timeout)
Unsafe version of:WaitForFences
static int
VK_MAKE_VERSION(int major, int minor, int patch)
Constructs an API version number.static int
VK_VERSION_MAJOR(int version)
Extracts the API major version number from a packed version number.static int
VK_VERSION_MINOR(int version)
Extracts the API minor version number from a packed version number.static int
VK_VERSION_PATCH(int version)
Extracts the API patch version number from a packed version number.static int
vkAllocateCommandBuffers(VkDevice device, VkCommandBufferAllocateInfo pAllocateInfo, org.lwjgl.PointerBuffer pCommandBuffers)
Allocate command buffers from an existing command pool.static int
vkAllocateDescriptorSets(VkDevice device, VkDescriptorSetAllocateInfo pAllocateInfo, long[] pDescriptorSets)
Array version of:AllocateDescriptorSets
static int
vkAllocateDescriptorSets(VkDevice device, VkDescriptorSetAllocateInfo pAllocateInfo, java.nio.LongBuffer pDescriptorSets)
Allocate one or more descriptor sets.static int
vkAllocateMemory(VkDevice device, VkMemoryAllocateInfo pAllocateInfo, VkAllocationCallbacks pAllocator, long[] pMemory)
Array version of:AllocateMemory
static int
vkAllocateMemory(VkDevice device, VkMemoryAllocateInfo pAllocateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pMemory)
Allocate device memory.static int
vkBeginCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferBeginInfo pBeginInfo)
Start recording a command buffer.static int
vkBindBufferMemory(VkDevice device, long buffer, long memory, long memoryOffset)
Bind device memory to a buffer object.static int
vkBindImageMemory(VkDevice device, long image, long memory, long memoryOffset)
Bind device memory to an image object.static void
vkCmdBeginQuery(VkCommandBuffer commandBuffer, long queryPool, int query, int flags)
Begin a query.static void
vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, VkRenderPassBeginInfo pRenderPassBegin, int contents)
Begin a new render pass.static void
vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, int pipelineBindPoint, long layout, int firstSet, long[] pDescriptorSets, int[] pDynamicOffsets)
Array version of:CmdBindDescriptorSets
static void
vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, int pipelineBindPoint, long layout, int firstSet, java.nio.LongBuffer pDescriptorSets, java.nio.IntBuffer pDynamicOffsets)
Binds descriptor sets to a command buffer.static void
vkCmdBindIndexBuffer(VkCommandBuffer commandBuffer, long buffer, long offset, int indexType)
Bind an index buffer to a command buffer.static void
vkCmdBindPipeline(VkCommandBuffer commandBuffer, int pipelineBindPoint, long pipeline)
Bind a pipeline object to a command buffer.static void
vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, int firstBinding, long[] pBuffers, long[] pOffsets)
Array version of:CmdBindVertexBuffers
static void
vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, int firstBinding, java.nio.LongBuffer pBuffers, java.nio.LongBuffer pOffsets)
Bind vertex buffers to a command buffer.static void
vkCmdBlitImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, VkImageBlit.Buffer pRegions, int filter)
Copy regions of an image, potentially performing format conversion,.static void
vkCmdClearAttachments(VkCommandBuffer commandBuffer, VkClearAttachment.Buffer pAttachments, VkClearRect.Buffer pRects)
Clear regions within bound framebuffer attachments.static void
vkCmdClearColorImage(VkCommandBuffer commandBuffer, long image, int imageLayout, VkClearColorValue pColor, VkImageSubresourceRange pRange)
Clear regions of a color image.static void
vkCmdClearColorImage(VkCommandBuffer commandBuffer, long image, int imageLayout, VkClearColorValue pColor, VkImageSubresourceRange.Buffer pRanges)
Clear regions of a color image.static void
vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, long image, int imageLayout, VkClearDepthStencilValue pDepthStencil, VkImageSubresourceRange pRange)
Fill regions of a combined depth/stencil image.static void
vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, long image, int imageLayout, VkClearDepthStencilValue pDepthStencil, VkImageSubresourceRange.Buffer pRanges)
Fill regions of a combined depth/stencil image.static void
vkCmdCopyBuffer(VkCommandBuffer commandBuffer, long srcBuffer, long dstBuffer, VkBufferCopy.Buffer pRegions)
Copy data between buffer regions.static void
vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, long srcBuffer, long dstImage, int dstImageLayout, VkBufferImageCopy.Buffer pRegions)
Copy data from a buffer into an image.static void
vkCmdCopyImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, VkImageCopy.Buffer pRegions)
Copy data between images.static void
vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstBuffer, VkBufferImageCopy.Buffer pRegions)
Copy image data into a buffer.static void
vkCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, long queryPool, int firstQuery, int queryCount, long dstBuffer, long dstOffset, long stride, int flags)
Copy the results of queries in a query pool to a buffer object.static void
vkCmdDispatch(VkCommandBuffer commandBuffer, int groupCountX, int groupCountY, int groupCountZ)
Dispatch compute work items.static void
vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, long buffer, long offset)
Dispatch compute work items using indirect parameters.static void
vkCmdDraw(VkCommandBuffer commandBuffer, int vertexCount, int instanceCount, int firstVertex, int firstInstance)
Draw primitives.static void
vkCmdDrawIndexed(VkCommandBuffer commandBuffer, int indexCount, int instanceCount, int firstIndex, int vertexOffset, int firstInstance)
Issue an indexed draw into a command buffer.static void
vkCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, long buffer, long offset, int drawCount, int stride)
Perform an indexed indirect draw.static void
vkCmdDrawIndirect(VkCommandBuffer commandBuffer, long buffer, long offset, int drawCount, int stride)
Issue an indirect draw into a command buffer.static void
vkCmdEndQuery(VkCommandBuffer commandBuffer, long queryPool, int query)
Ends a query.static void
vkCmdEndRenderPass(VkCommandBuffer commandBuffer)
End the current render pass.static void
vkCmdExecuteCommands(VkCommandBuffer commandBuffer, org.lwjgl.PointerBuffer pCommandBuffers)
Execute a secondary command buffer from a primary command buffer.static void
vkCmdExecuteCommands(VkCommandBuffer commandBuffer, VkCommandBuffer pCommandBuffer)
Execute a secondary command buffer from a primary command buffer.static void
vkCmdFillBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, long size, int data)
Fill a region of a buffer with a fixed value.static void
vkCmdNextSubpass(VkCommandBuffer commandBuffer, int contents)
Transition to the next subpass of a render pass.static void
vkCmdPipelineBarrier(VkCommandBuffer commandBuffer, int srcStageMask, int dstStageMask, int dependencyFlags, VkMemoryBarrier.Buffer pMemoryBarriers, VkBufferMemoryBarrier.Buffer pBufferMemoryBarriers, VkImageMemoryBarrier.Buffer pImageMemoryBarriers)
Insert a memory dependency.static void
vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, double[] pValues)
Array version of:CmdPushConstants
static void
vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, float[] pValues)
Array version of:CmdPushConstants
static void
vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, int[] pValues)
Array version of:CmdPushConstants
static void
vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, long[] pValues)
Array version of:CmdPushConstants
static void
vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, short[] pValues)
Array version of:CmdPushConstants
static void
vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, java.nio.ByteBuffer pValues)
Update the values of push constants.static void
vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, java.nio.DoubleBuffer pValues)
Update the values of push constants.static void
vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, java.nio.FloatBuffer pValues)
Update the values of push constants.static void
vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, java.nio.IntBuffer pValues)
Update the values of push constants.static void
vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, java.nio.LongBuffer pValues)
Update the values of push constants.static void
vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, java.nio.ShortBuffer pValues)
Update the values of push constants.static void
vkCmdResetEvent(VkCommandBuffer commandBuffer, long event, int stageMask)
Reset an event object to non-signaled state.static void
vkCmdResetQueryPool(VkCommandBuffer commandBuffer, long queryPool, int firstQuery, int queryCount)
Reset queries in a query pool.static void
vkCmdResolveImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, VkImageResolve pRegion)
Resolve regions of an image.static void
vkCmdResolveImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, VkImageResolve.Buffer pRegions)
Resolve regions of an image.static void
vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, float[] blendConstants)
Array version of:CmdSetBlendConstants
static void
vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, java.nio.FloatBuffer blendConstants)
Set the values of blend constants.static void
vkCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor)
Set the depth bias dynamic state.static void
vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds)
Set the depth bounds test values for a command buffer.static void
vkCmdSetEvent(VkCommandBuffer commandBuffer, long event, int stageMask)
Set an event object to signaled state.static void
vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth)
Set the dynamic line width state.static void
vkCmdSetScissor(VkCommandBuffer commandBuffer, int firstScissor, VkRect2D.Buffer pScissors)
Set the dynamic scissor rectangles on a command buffer.static void
vkCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, int faceMask, int compareMask)
Set the stencil compare mask dynamic state.static void
vkCmdSetStencilReference(VkCommandBuffer commandBuffer, int faceMask, int reference)
Set the stencil reference dynamic state.static void
vkCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, int faceMask, int writeMask)
Set the stencil write mask dynamic state.static void
vkCmdSetViewport(VkCommandBuffer commandBuffer, int firstViewport, VkViewport.Buffer pViewports)
Set the viewport on a command buffer.static void
vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, double[] pData)
Array version of:CmdUpdateBuffer
static void
vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, float[] pData)
Array version of:CmdUpdateBuffer
static void
vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, int[] pData)
Array version of:CmdUpdateBuffer
static void
vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, long[] pData)
Array version of:CmdUpdateBuffer
static void
vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, short[] pData)
Array version of:CmdUpdateBuffer
static void
vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, java.nio.ByteBuffer pData)
Update a buffer's contents from host memory.static void
vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, java.nio.DoubleBuffer pData)
Update a buffer's contents from host memory.static void
vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, java.nio.FloatBuffer pData)
Update a buffer's contents from host memory.static void
vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, java.nio.IntBuffer pData)
Update a buffer's contents from host memory.static void
vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, java.nio.LongBuffer pData)
Update a buffer's contents from host memory.static void
vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, java.nio.ShortBuffer pData)
Update a buffer's contents from host memory.static void
vkCmdWaitEvents(VkCommandBuffer commandBuffer, long[] pEvents, int srcStageMask, int dstStageMask, VkMemoryBarrier.Buffer pMemoryBarriers, VkBufferMemoryBarrier.Buffer pBufferMemoryBarriers, VkImageMemoryBarrier.Buffer pImageMemoryBarriers)
Array version of:CmdWaitEvents
static void
vkCmdWaitEvents(VkCommandBuffer commandBuffer, java.nio.LongBuffer pEvents, int srcStageMask, int dstStageMask, VkMemoryBarrier.Buffer pMemoryBarriers, VkBufferMemoryBarrier.Buffer pBufferMemoryBarriers, VkImageMemoryBarrier.Buffer pImageMemoryBarriers)
Wait for one or more events and insert a set of memory.static void
vkCmdWriteTimestamp(VkCommandBuffer commandBuffer, int pipelineStage, long queryPool, int query)
Write a device timestamp into a query object.static int
vkCreateBuffer(VkDevice device, VkBufferCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pBuffer)
Array version of:CreateBuffer
static int
vkCreateBuffer(VkDevice device, VkBufferCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pBuffer)
Create a new buffer object.static int
vkCreateBufferView(VkDevice device, VkBufferViewCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pView)
Array version of:CreateBufferView
static int
vkCreateBufferView(VkDevice device, VkBufferViewCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pView)
Create a new buffer view object.static int
vkCreateCommandPool(VkDevice device, VkCommandPoolCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pCommandPool)
Array version of:CreateCommandPool
static int
vkCreateCommandPool(VkDevice device, VkCommandPoolCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pCommandPool)
Create a new command pool object.static int
vkCreateComputePipelines(VkDevice device, long pipelineCache, VkComputePipelineCreateInfo.Buffer pCreateInfos, VkAllocationCallbacks pAllocator, long[] pPipelines)
Array version of:CreateComputePipelines
static int
vkCreateComputePipelines(VkDevice device, long pipelineCache, VkComputePipelineCreateInfo.Buffer pCreateInfos, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pPipelines)
Creates a new compute pipeline object.static int
vkCreateDescriptorPool(VkDevice device, VkDescriptorPoolCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pDescriptorPool)
Array version of:CreateDescriptorPool
static int
vkCreateDescriptorPool(VkDevice device, VkDescriptorPoolCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pDescriptorPool)
Creates a descriptor pool object.static int
vkCreateDescriptorSetLayout(VkDevice device, VkDescriptorSetLayoutCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pSetLayout)
Array version of:CreateDescriptorSetLayout
static int
vkCreateDescriptorSetLayout(VkDevice device, VkDescriptorSetLayoutCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pSetLayout)
Create a new descriptor set layout.static int
vkCreateDevice(VkPhysicalDevice physicalDevice, VkDeviceCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, org.lwjgl.PointerBuffer pDevice)
Create a new device instance.static int
vkCreateEvent(VkDevice device, VkEventCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pEvent)
Array version of:CreateEvent
static int
vkCreateEvent(VkDevice device, VkEventCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pEvent)
Create a new event object.static int
vkCreateFence(VkDevice device, VkFenceCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pFence)
Array version of:CreateFence
static int
vkCreateFence(VkDevice device, VkFenceCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pFence)
Create a new fence object.static int
vkCreateFramebuffer(VkDevice device, VkFramebufferCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pFramebuffer)
Array version of:CreateFramebuffer
static int
vkCreateFramebuffer(VkDevice device, VkFramebufferCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pFramebuffer)
Create a new framebuffer object.static int
vkCreateGraphicsPipelines(VkDevice device, long pipelineCache, VkGraphicsPipelineCreateInfo.Buffer pCreateInfos, VkAllocationCallbacks pAllocator, long[] pPipelines)
Array version of:CreateGraphicsPipelines
static int
vkCreateGraphicsPipelines(VkDevice device, long pipelineCache, VkGraphicsPipelineCreateInfo.Buffer pCreateInfos, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pPipelines)
Create graphics pipelines.static int
vkCreateImage(VkDevice device, VkImageCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pImage)
Array version of:CreateImage
static int
vkCreateImage(VkDevice device, VkImageCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pImage)
Create a new image object.static int
vkCreateImageView(VkDevice device, VkImageViewCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pView)
Array version of:CreateImageView
static int
vkCreateImageView(VkDevice device, VkImageViewCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pView)
Create an image view from an existing image.static int
vkCreateInstance(VkInstanceCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, org.lwjgl.PointerBuffer pInstance)
Create a new Vulkan instance.static int
vkCreatePipelineCache(VkDevice device, VkPipelineCacheCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pPipelineCache)
Array version of:CreatePipelineCache
static int
vkCreatePipelineCache(VkDevice device, VkPipelineCacheCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pPipelineCache)
Creates a new pipeline cache.static int
vkCreatePipelineLayout(VkDevice device, VkPipelineLayoutCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pPipelineLayout)
Array version of:CreatePipelineLayout
static int
vkCreatePipelineLayout(VkDevice device, VkPipelineLayoutCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pPipelineLayout)
Creates a new pipeline layout object.static int
vkCreateQueryPool(VkDevice device, VkQueryPoolCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pQueryPool)
Array version of:CreateQueryPool
static int
vkCreateQueryPool(VkDevice device, VkQueryPoolCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pQueryPool)
Create a new query pool object.static int
vkCreateRenderPass(VkDevice device, VkRenderPassCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pRenderPass)
Array version of:CreateRenderPass
static int
vkCreateRenderPass(VkDevice device, VkRenderPassCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pRenderPass)
Create a new render pass object.static int
vkCreateSampler(VkDevice device, VkSamplerCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pSampler)
Array version of:CreateSampler
static int
vkCreateSampler(VkDevice device, VkSamplerCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pSampler)
Create a new sampler object.static int
vkCreateSemaphore(VkDevice device, VkSemaphoreCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pSemaphore)
Array version of:CreateSemaphore
static int
vkCreateSemaphore(VkDevice device, VkSemaphoreCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pSemaphore)
Create a new queue semaphore object.static int
vkCreateShaderModule(VkDevice device, VkShaderModuleCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, long[] pShaderModule)
Array version of:CreateShaderModule
static int
vkCreateShaderModule(VkDevice device, VkShaderModuleCreateInfo pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pShaderModule)
Creates a new shader module object.static void
vkDestroyBuffer(VkDevice device, long buffer, VkAllocationCallbacks pAllocator)
Destroy a buffer object.static void
vkDestroyBufferView(VkDevice device, long bufferView, VkAllocationCallbacks pAllocator)
Destroy a buffer view object.static void
vkDestroyCommandPool(VkDevice device, long commandPool, VkAllocationCallbacks pAllocator)
Destroy a command pool object.static void
vkDestroyDescriptorPool(VkDevice device, long descriptorPool, VkAllocationCallbacks pAllocator)
Destroy a descriptor pool object.static void
vkDestroyDescriptorSetLayout(VkDevice device, long descriptorSetLayout, VkAllocationCallbacks pAllocator)
Destroy a descriptor set layout object.static void
vkDestroyDevice(VkDevice device, VkAllocationCallbacks pAllocator)
Destroy a logical device.static void
vkDestroyEvent(VkDevice device, long event, VkAllocationCallbacks pAllocator)
Destroy an event object.static void
vkDestroyFence(VkDevice device, long fence, VkAllocationCallbacks pAllocator)
Destroy a fence object.static void
vkDestroyFramebuffer(VkDevice device, long framebuffer, VkAllocationCallbacks pAllocator)
Destroy a framebuffer object.static void
vkDestroyImage(VkDevice device, long image, VkAllocationCallbacks pAllocator)
Destroy an image object.static void
vkDestroyImageView(VkDevice device, long imageView, VkAllocationCallbacks pAllocator)
Destroy an image view object.static void
vkDestroyInstance(VkInstance instance, VkAllocationCallbacks pAllocator)
Destroy an instance of Vulkan.static void
vkDestroyPipeline(VkDevice device, long pipeline, VkAllocationCallbacks pAllocator)
Destroy a pipeline object.static void
vkDestroyPipelineCache(VkDevice device, long pipelineCache, VkAllocationCallbacks pAllocator)
Destroy a pipeline cache object.static void
vkDestroyPipelineLayout(VkDevice device, long pipelineLayout, VkAllocationCallbacks pAllocator)
Destroy a pipeline layout object.static void
vkDestroyQueryPool(VkDevice device, long queryPool, VkAllocationCallbacks pAllocator)
Destroy a query pool object.static void
vkDestroyRenderPass(VkDevice device, long renderPass, VkAllocationCallbacks pAllocator)
Destroy a render pass object.static void
vkDestroySampler(VkDevice device, long sampler, VkAllocationCallbacks pAllocator)
Destroy a sampler object.static void
vkDestroySemaphore(VkDevice device, long semaphore, VkAllocationCallbacks pAllocator)
Destroy a semaphore object.static void
vkDestroyShaderModule(VkDevice device, long shaderModule, VkAllocationCallbacks pAllocator)
Destroy a shader module.static int
vkDeviceWaitIdle(VkDevice device)
Wait for a device to become idle.static int
vkEndCommandBuffer(VkCommandBuffer commandBuffer)
Finish recording a command buffer.static int
vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, java.lang.CharSequence pLayerName, int[] pPropertyCount, VkExtensionProperties.Buffer pProperties)
Array version of:EnumerateDeviceExtensionProperties
static int
vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, java.lang.CharSequence pLayerName, java.nio.IntBuffer pPropertyCount, VkExtensionProperties.Buffer pProperties)
Returns properties of available physical device extensions.static int
vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, java.nio.ByteBuffer pLayerName, int[] pPropertyCount, VkExtensionProperties.Buffer pProperties)
Array version of:EnumerateDeviceExtensionProperties
static int
vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, java.nio.ByteBuffer pLayerName, java.nio.IntBuffer pPropertyCount, VkExtensionProperties.Buffer pProperties)
Returns properties of available physical device extensions.static int
vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, int[] pPropertyCount, VkLayerProperties.Buffer pProperties)
Array version of:EnumerateDeviceLayerProperties
static int
vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, java.nio.IntBuffer pPropertyCount, VkLayerProperties.Buffer pProperties)
Returns properties of available physical device layers.static int
vkEnumerateInstanceExtensionProperties(java.lang.CharSequence pLayerName, int[] pPropertyCount, VkExtensionProperties.Buffer pProperties)
Array version of:EnumerateInstanceExtensionProperties
static int
vkEnumerateInstanceExtensionProperties(java.lang.CharSequence pLayerName, java.nio.IntBuffer pPropertyCount, VkExtensionProperties.Buffer pProperties)
Returns up to requested number of global extension properties.static int
vkEnumerateInstanceExtensionProperties(java.nio.ByteBuffer pLayerName, int[] pPropertyCount, VkExtensionProperties.Buffer pProperties)
Array version of:EnumerateInstanceExtensionProperties
static int
vkEnumerateInstanceExtensionProperties(java.nio.ByteBuffer pLayerName, java.nio.IntBuffer pPropertyCount, VkExtensionProperties.Buffer pProperties)
Returns up to requested number of global extension properties.static int
vkEnumerateInstanceLayerProperties(int[] pPropertyCount, VkLayerProperties.Buffer pProperties)
Array version of:EnumerateInstanceLayerProperties
static int
vkEnumerateInstanceLayerProperties(java.nio.IntBuffer pPropertyCount, VkLayerProperties.Buffer pProperties)
Returns up to requested number of global layer properties.static int
vkEnumeratePhysicalDevices(VkInstance instance, int[] pPhysicalDeviceCount, org.lwjgl.PointerBuffer pPhysicalDevices)
Array version of:EnumeratePhysicalDevices
static int
vkEnumeratePhysicalDevices(VkInstance instance, java.nio.IntBuffer pPhysicalDeviceCount, org.lwjgl.PointerBuffer pPhysicalDevices)
Enumerates the physical devices accessible to a Vulkan instance.static int
vkFlushMappedMemoryRanges(VkDevice device, VkMappedMemoryRange pMemoryRange)
Flush mapped memory ranges.static int
vkFlushMappedMemoryRanges(VkDevice device, VkMappedMemoryRange.Buffer pMemoryRanges)
Flush mapped memory ranges.static void
vkFreeCommandBuffers(VkDevice device, long commandPool, org.lwjgl.PointerBuffer pCommandBuffers)
Free command buffers.static void
vkFreeCommandBuffers(VkDevice device, long commandPool, VkCommandBuffer pCommandBuffer)
Free command buffers.static int
vkFreeDescriptorSets(VkDevice device, long descriptorPool, long pDescriptorSet)
Free one or more descriptor sets.static int
vkFreeDescriptorSets(VkDevice device, long descriptorPool, long[] pDescriptorSets)
Array version of:FreeDescriptorSets
static int
vkFreeDescriptorSets(VkDevice device, long descriptorPool, java.nio.LongBuffer pDescriptorSets)
Free one or more descriptor sets.static void
vkFreeMemory(VkDevice device, long memory, VkAllocationCallbacks pAllocator)
Free device memory.static void
vkGetBufferMemoryRequirements(VkDevice device, long buffer, VkMemoryRequirements pMemoryRequirements)
Returns the memory requirements for specified Vulkan object.static void
vkGetDeviceMemoryCommitment(VkDevice device, long memory, long[] pCommittedMemoryInBytes)
Array version of:GetDeviceMemoryCommitment
static void
vkGetDeviceMemoryCommitment(VkDevice device, long memory, java.nio.LongBuffer pCommittedMemoryInBytes)
Query the current commitment for a VkDeviceMemory.static long
vkGetDeviceProcAddr(VkDevice device, java.lang.CharSequence pName)
Return a function pointer for a command.static long
vkGetDeviceProcAddr(VkDevice device, java.nio.ByteBuffer pName)
Return a function pointer for a command.static void
vkGetDeviceQueue(VkDevice device, int queueFamilyIndex, int queueIndex, org.lwjgl.PointerBuffer pQueue)
Get a queue handle from a device.static int
vkGetEventStatus(VkDevice device, long event)
Retrieve the status of an event object.static int
vkGetFenceStatus(VkDevice device, long fence)
Return the status of a fence.static void
vkGetImageMemoryRequirements(VkDevice device, long image, VkMemoryRequirements pMemoryRequirements)
Returns the memory requirements for specified Vulkan object.static void
vkGetImageSparseMemoryRequirements(VkDevice device, long image, int[] pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements.Buffer pSparseMemoryRequirements)
Array version of:GetImageSparseMemoryRequirements
static void
vkGetImageSparseMemoryRequirements(VkDevice device, long image, java.nio.IntBuffer pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements.Buffer pSparseMemoryRequirements)
Query the memory requirements for a sparse image.static void
vkGetImageSubresourceLayout(VkDevice device, long image, VkImageSubresource pSubresource, VkSubresourceLayout pLayout)
Retrieve information about an image subresource.static long
vkGetInstanceProcAddr(VkInstance instance, java.lang.CharSequence pName)
Return a function pointer for a command.static long
vkGetInstanceProcAddr(VkInstance instance, java.nio.ByteBuffer pName)
Return a function pointer for a command.static void
vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures pFeatures)
Reports capabilities of a physical device.static void
vkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, int format, VkFormatProperties pFormatProperties)
Lists physical device's format capabilities.static int
vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, int format, int type, int tiling, int usage, int flags, VkImageFormatProperties pImageFormatProperties)
Lists physical device's image format capabilities.static void
vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties pMemoryProperties)
Reports memory information for the specified physical device.static void
vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties pProperties)
Returns properties of a physical device.static void
vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, int[] pQueueFamilyPropertyCount, VkQueueFamilyProperties.Buffer pQueueFamilyProperties)
Array version of:GetPhysicalDeviceQueueFamilyProperties
static void
vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, java.nio.IntBuffer pQueueFamilyPropertyCount, VkQueueFamilyProperties.Buffer pQueueFamilyProperties)
Reports properties of the queues of the specified physical device.static void
vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, int format, int type, int samples, int usage, int tiling, int[] pPropertyCount, VkSparseImageFormatProperties.Buffer pProperties)
Array version of:GetPhysicalDeviceSparseImageFormatProperties
static void
vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, int format, int type, int samples, int usage, int tiling, java.nio.IntBuffer pPropertyCount, VkSparseImageFormatProperties.Buffer pProperties)
Retrieve properties of an image format applied to sparse images.static int
vkGetPipelineCacheData(VkDevice device, long pipelineCache, org.lwjgl.PointerBuffer pDataSize, java.nio.ByteBuffer pData)
Get the data store from a pipeline cache.static int
vkGetQueryPoolResults(VkDevice device, long queryPool, int firstQuery, int queryCount, int[] pData, long stride, int flags)
Array version of:GetQueryPoolResults
static int
vkGetQueryPoolResults(VkDevice device, long queryPool, int firstQuery, int queryCount, long[] pData, long stride, int flags)
Array version of:GetQueryPoolResults
static int
vkGetQueryPoolResults(VkDevice device, long queryPool, int firstQuery, int queryCount, java.nio.ByteBuffer pData, long stride, int flags)
Copy results of queries in a query pool to a host memory region.static int
vkGetQueryPoolResults(VkDevice device, long queryPool, int firstQuery, int queryCount, java.nio.IntBuffer pData, long stride, int flags)
Copy results of queries in a query pool to a host memory region.static int
vkGetQueryPoolResults(VkDevice device, long queryPool, int firstQuery, int queryCount, java.nio.LongBuffer pData, long stride, int flags)
Copy results of queries in a query pool to a host memory region.static void
vkGetRenderAreaGranularity(VkDevice device, long renderPass, VkExtent2D pGranularity)
Returns the granularity for optimal render area.static int
vkInvalidateMappedMemoryRanges(VkDevice device, VkMappedMemoryRange pMemoryRange)
Invalidate ranges of mapped memory objects.static int
vkInvalidateMappedMemoryRanges(VkDevice device, VkMappedMemoryRange.Buffer pMemoryRanges)
Invalidate ranges of mapped memory objects.static int
vkMapMemory(VkDevice device, long memory, long offset, long size, int flags, org.lwjgl.PointerBuffer ppData)
Map a memory object into application address space.static int
vkMergePipelineCaches(VkDevice device, long dstCache, long[] pSrcCaches)
Array version of:MergePipelineCaches
static int
vkMergePipelineCaches(VkDevice device, long dstCache, java.nio.LongBuffer pSrcCaches)
Combine the data stores of pipeline caches.static int
vkQueueBindSparse(VkQueue queue, VkBindSparseInfo.Buffer pBindInfo, long fence)
Bind device memory to a sparse resource object.static int
vkQueueBindSparse(VkQueue queue, VkBindSparseInfo pBindInfo, long fence)
Bind device memory to a sparse resource object.static int
vkQueueSubmit(VkQueue queue, VkSubmitInfo.Buffer pSubmits, long fence)
Submits a sequence of semaphores or command buffers to a queue.static int
vkQueueSubmit(VkQueue queue, VkSubmitInfo pSubmit, long fence)
Submits a sequence of semaphores or command buffers to a queue.static int
vkQueueWaitIdle(VkQueue queue)
Wait for a queue to become idle.static int
vkResetCommandBuffer(VkCommandBuffer commandBuffer, int flags)
Reset a command buffer to the initial state.static int
vkResetCommandPool(VkDevice device, long commandPool, int flags)
Reset a command pool.static int
vkResetDescriptorPool(VkDevice device, long descriptorPool, int flags)
Resets a descriptor pool object.static int
vkResetEvent(VkDevice device, long event)
Reset an event to non-signaled state.static int
vkResetFences(VkDevice device, long pFence)
Resets one or more fence objects.static int
vkResetFences(VkDevice device, long[] pFences)
Array version of:ResetFences
static int
vkResetFences(VkDevice device, java.nio.LongBuffer pFences)
Resets one or more fence objects.static int
vkSetEvent(VkDevice device, long event)
Set an event to signaled state.static void
vkUnmapMemory(VkDevice device, long memory)
Unmap a previously mapped memory object.static void
vkUpdateDescriptorSets(VkDevice device, VkWriteDescriptorSet.Buffer pDescriptorWrites, VkCopyDescriptorSet.Buffer pDescriptorCopies)
Update the contents of a descriptor set object.static int
vkWaitForFences(VkDevice device, long[] pFences, boolean waitAll, long timeout)
Array version of:WaitForFences
static int
vkWaitForFences(VkDevice device, long pFence, boolean waitAll, long timeout)
Wait for one or more fences to become signaled.static int
vkWaitForFences(VkDevice device, java.nio.LongBuffer pFences, boolean waitAll, long timeout)
Wait for one or more fences to become signaled.
-
-
-
Field Detail
-
VK_PIPELINE_CACHE_HEADER_VERSION_ONE
VkPipelineCacheHeaderVersion - Encode pipeline cache versionDescription
PIPELINE_CACHE_HEADER_VERSION_ONE
specifies version one of the pipeline cache.
See Also
-
VK_SUCCESS, VK_NOT_READY, VK_TIMEOUT, VK_EVENT_SET, VK_EVENT_RESET, VK_INCOMPLETE, VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY, VK_ERROR_INITIALIZATION_FAILED, VK_ERROR_DEVICE_LOST, VK_ERROR_MEMORY_MAP_FAILED, VK_ERROR_LAYER_NOT_PRESENT, VK_ERROR_EXTENSION_NOT_PRESENT, VK_ERROR_FEATURE_NOT_PRESENT, VK_ERROR_INCOMPATIBLE_DRIVER, VK_ERROR_TOO_MANY_OBJECTS, VK_ERROR_FORMAT_NOT_SUPPORTED, VK_ERROR_FRAGMENTED_POOL
VkResult - Vulkan command return codesDescription
SUCCESS
Command successfully completedNOT_READY
A fence or query has not yet completedTIMEOUT
A wait operation has not completed in the specified timeEVENT_SET
An event is signaledEVENT_RESET
An event is unsignaledINCOMPLETE
A return array was too small for the resultSUBOPTIMAL_KHR
A swapchain no longer matches the surface properties exactly, but can still be used to present to the surface successfully.
ERROR_OUT_OF_HOST_MEMORY
A host memory allocation has failed.ERROR_OUT_OF_DEVICE_MEMORY
A device memory allocation has failed.ERROR_INITIALIZATION_FAILED
Initialization of an object could not be completed for implementation-specific reasons.ERROR_DEVICE_LOST
The logical or physical device has been lost. See Lost DeviceERROR_MEMORY_MAP_FAILED
Mapping of a memory object has failed.ERROR_LAYER_NOT_PRESENT
A requested layer is not present or could not be loaded.ERROR_EXTENSION_NOT_PRESENT
A requested extension is not supported.ERROR_FEATURE_NOT_PRESENT
A requested feature is not supported.ERROR_INCOMPATIBLE_DRIVER
The requested version of Vulkan is not supported by the driver or is otherwise incompatible for implementation-specific reasons.ERROR_TOO_MANY_OBJECTS
Too many objects of the type have already been created.ERROR_FORMAT_NOT_SUPPORTED
A requested format is not supported on this device.ERROR_FRAGMENTED_POOL
A pool allocation has failed due to fragmentation of the pool’s memory. This must only be returned if no attempt to allocate host or device memory was made to accommodate the new allocation. This should be returned in preference toERROR_OUT_OF_POOL_MEMORY
, but only if the implementation is certain that the pool allocation failure was due to fragmentation.ERROR_SURFACE_LOST_KHR
A surface is no longer available.ERROR_NATIVE_WINDOW_IN_USE_KHR
The requested window is already in use by Vulkan or another API in a manner which prevents it from being used again.ERROR_OUT_OF_DATE_KHR
A surface has changed in such a way that it is no longer compatible with the swapchain, and further presentation requests using the swapchain will fail. Applications must query the new surface properties and recreate their swapchain if they wish to continue presenting to the surface.ERROR_INCOMPATIBLE_DISPLAY_KHR
The display used by a swapchain does not use the same presentable image layout, or is incompatible in a way that prevents sharing an image.ERROR_INVALID_SHADER_NV
One or more shaders failed to compile or link. More details are reported back to the application viaVK_EXT_debug_report
if enabled.ERROR_OUT_OF_POOL_MEMORY
A pool memory allocation has failed. This must only be returned if no attempt to allocate host or device memory was made to accommodate the new allocation. If the failure was definitely due to fragmentation of the pool,ERROR_FRAGMENTED_POOL
should be returned instead.ERROR_INVALID_EXTERNAL_HANDLE
An external handle is not a valid handle of the specified type.ERROR_FRAGMENTATION_EXT
A descriptor pool creation has failed due to fragmentation.ERROR_INVALID_DEVICE_ADDRESS_EXT
A buffer creation failed because the requested address is not available.ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT
An operation on a swapchain created withFULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT
failed as it did not have exlusive full-screen access. This may occur due to implementation-dependent reasons, outside of the application’s control.
If a command returns a run time error, unless otherwise specified any output parameters will have undefined contents, except that if the output parameter is a structure with
sType
andpNext
fields, those fields will be unmodified. Any structures chained frompNext
will also have undefined contents, except thatsType
andpNext
will be unmodified.Out of memory errors do not damage any currently existing Vulkan objects. Objects that have already been successfully created can still be used by the application.
Performance-critical commands generally do not have return codes. If a run time error occurs in such commands, the implementation will defer reporting the error until a specified point. For commands that record into command buffers (
vkCmd*
) run time errors are reported byvkEndCommandBuffer
.See Also
-
VK_STRUCTURE_TYPE_APPLICATION_INFO, VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, VK_STRUCTURE_TYPE_SUBMIT_INFO, VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE, VK_STRUCTURE_TYPE_BIND_SPARSE_INFO, VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO, VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO, VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO, VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO, VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO, VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO, VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO, VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO, VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET, VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO, VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, VK_STRUCTURE_TYPE_MEMORY_BARRIER, VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO, VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO
VkStructureType - Vulkan structure types (stype
)Description
Each value corresponds to a particular structure with a
sType
member with a matching name. As a general rule, the name of eachVkStructureType
value is obtained by taking the name of the structure, stripping the leadingVk
, prefixing each capital letter with_
, converting the entire resulting string to upper case, and prefixing it withVK_STRUCTURE_TYPE_
. For example, structures of typeVkImageCreateInfo
correspond to aVkStructureType
ofSTRUCTURE_TYPE_IMAGE_CREATE_INFO
, and thus itssType
member must equal that when it is passed to the API.The values
STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO
andSTRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO
are reserved for internal use by the loader, and do not have corresponding Vulkan structures in this Specification.See Also
VkAccelerationStructureCreateInfoNV
,VkAccelerationStructureInfoNV
,VkAccelerationStructureMemoryRequirementsInfoNV
,VkAcquireNextImageInfoKHR
,VkApplicationInfo
,VkAttachmentDescription2KHR
,VkAttachmentReference2KHR
,VkBaseInStructure
,VkBaseOutStructure
,VkBindAccelerationStructureMemoryInfoNV
,VkBindBufferMemoryDeviceGroupInfo
,VkBindBufferMemoryInfo
,VkBindImageMemoryDeviceGroupInfo
,VkBindImageMemoryInfo
,VkBindImageMemorySwapchainInfoKHR
,VkBindImagePlaneMemoryInfo
,VkBindSparseInfo
,VkBufferCreateInfo
,VkBufferDeviceAddressCreateInfoEXT
,VkBufferDeviceAddressInfoEXT
,VkBufferMemoryBarrier
,VkBufferMemoryRequirementsInfo2
,VkBufferViewCreateInfo
,VkCalibratedTimestampInfoEXT
,VkCheckpointDataNV
,VkCmdProcessCommandsInfoNVX
,VkCmdReserveSpaceForCommandsInfoNVX
,VkCommandBufferAllocateInfo
,VkCommandBufferBeginInfo
,VkCommandBufferInheritanceConditionalRenderingInfoEXT
,VkCommandBufferInheritanceInfo
,VkCommandPoolCreateInfo
,VkComputePipelineCreateInfo
,VkConditionalRenderingBeginInfoEXT
,VkCooperativeMatrixPropertiesNV
,VkCopyDescriptorSet
,VkD3D12FenceSubmitInfoKHR
,VkDebugMarkerMarkerInfoEXT
,VkDebugMarkerObjectNameInfoEXT
,VkDebugMarkerObjectTagInfoEXT
,VkDebugReportCallbackCreateInfoEXT
,VkDebugUtilsLabelEXT
,VkDebugUtilsMessengerCallbackDataEXT
,VkDebugUtilsMessengerCreateInfoEXT
,VkDebugUtilsObjectNameInfoEXT
,VkDebugUtilsObjectTagInfoEXT
,VkDedicatedAllocationBufferCreateInfoNV
,VkDedicatedAllocationImageCreateInfoNV
,VkDedicatedAllocationMemoryAllocateInfoNV
,VkDescriptorPoolCreateInfo
,VkDescriptorPoolInlineUniformBlockCreateInfoEXT
,VkDescriptorSetAllocateInfo
,VkDescriptorSetLayoutBindingFlagsCreateInfoEXT
,VkDescriptorSetLayoutCreateInfo
,VkDescriptorSetLayoutSupport
,VkDescriptorSetVariableDescriptorCountAllocateInfoEXT
,VkDescriptorSetVariableDescriptorCountLayoutSupportEXT
,VkDescriptorUpdateTemplateCreateInfo
,VkDeviceCreateInfo
,VkDeviceEventInfoEXT
,VkDeviceGeneratedCommandsFeaturesNVX
,VkDeviceGeneratedCommandsLimitsNVX
,VkDeviceGroupBindSparseInfo
,VkDeviceGroupCommandBufferBeginInfo
,VkDeviceGroupDeviceCreateInfo
,VkDeviceGroupPresentCapabilitiesKHR
,VkDeviceGroupPresentInfoKHR
,VkDeviceGroupRenderPassBeginInfo
,VkDeviceGroupSubmitInfo
,VkDeviceGroupSwapchainCreateInfoKHR
,VkDeviceMemoryOverallocationCreateInfoAMD
,VkDeviceQueueCreateInfo
,VkDeviceQueueGlobalPriorityCreateInfoEXT
,VkDeviceQueueInfo2
,VkDisplayEventInfoEXT
,VkDisplayModeCreateInfoKHR
,VkDisplayModeProperties2KHR
,VkDisplayNativeHdrSurfaceCapabilitiesAMD
,VkDisplayPlaneCapabilities2KHR
,VkDisplayPlaneInfo2KHR
,VkDisplayPlaneProperties2KHR
,VkDisplayPowerInfoEXT
,VkDisplayPresentInfoKHR
,VkDisplayProperties2KHR
,VkDisplaySurfaceCreateInfoKHR
,VkDrmFormatModifierPropertiesListEXT
,VkEventCreateInfo
,VkExportFenceCreateInfo
,VkExportFenceWin32HandleInfoKHR
,VkExportMemoryAllocateInfo
,VkExportMemoryAllocateInfoNV
,VkExportMemoryWin32HandleInfoKHR
,VkExportMemoryWin32HandleInfoNV
,VkExportSemaphoreCreateInfo
,VkExportSemaphoreWin32HandleInfoKHR
,VkExternalBufferProperties
,VkExternalFenceProperties
,VkExternalImageFormatProperties
,VkExternalMemoryBufferCreateInfo
,VkExternalMemoryImageCreateInfo
,VkExternalMemoryImageCreateInfoNV
,VkExternalSemaphoreProperties
,VkFenceCreateInfo
,VkFenceGetFdInfoKHR
,VkFenceGetWin32HandleInfoKHR
,VkFilterCubicImageViewImageFormatPropertiesEXT
,VkFormatProperties2
,VkFramebufferAttachmentImageInfoKHR
,VkFramebufferAttachmentsCreateInfoKHR
,VkFramebufferCreateInfo
,VkFramebufferMixedSamplesCombinationNV
,VkGeometryAABBNV
,VkGeometryNV
,VkGeometryTrianglesNV
,VkGraphicsPipelineCreateInfo
,VkHdrMetadataEXT
,VkHeadlessSurfaceCreateInfoEXT
,VkImageCreateInfo
,VkImageDrmFormatModifierExplicitCreateInfoEXT
,VkImageDrmFormatModifierListCreateInfoEXT
,VkImageDrmFormatModifierPropertiesEXT
,VkImageFormatListCreateInfoKHR
,VkImageFormatProperties2
,VkImageMemoryBarrier
,VkImageMemoryRequirementsInfo2
,VkImagePlaneMemoryRequirementsInfo
,VkImageSparseMemoryRequirementsInfo2
,VkImageStencilUsageCreateInfoEXT
,VkImageSwapchainCreateInfoKHR
,VkImageViewASTCDecodeModeEXT
,VkImageViewCreateInfo
,VkImageViewHandleInfoNVX
,VkImageViewUsageCreateInfo
,VkImportFenceFdInfoKHR
,VkImportFenceWin32HandleInfoKHR
,VkImportMemoryFdInfoKHR
,VkImportMemoryHostPointerInfoEXT
,VkImportMemoryWin32HandleInfoKHR
,VkImportMemoryWin32HandleInfoNV
,VkImportSemaphoreFdInfoKHR
,VkImportSemaphoreWin32HandleInfoKHR
,VkIndirectCommandsLayoutCreateInfoNVX
,VkInitializePerformanceApiInfoINTEL
,VkInstanceCreateInfo
,VkMacOSSurfaceCreateInfoMVK
,VkMappedMemoryRange
,VkMemoryAllocateFlagsInfo
,VkMemoryAllocateInfo
,VkMemoryBarrier
,VkMemoryDedicatedAllocateInfo
,VkMemoryDedicatedRequirements
,VkMemoryFdPropertiesKHR
,VkMemoryGetFdInfoKHR
,VkMemoryGetWin32HandleInfoKHR
,VkMemoryHostPointerPropertiesEXT
,VkMemoryPriorityAllocateInfoEXT
,VkMemoryRequirements2
,VkMemoryWin32HandlePropertiesKHR
,VkMetalSurfaceCreateInfoEXT
,VkMultisamplePropertiesEXT
,VkObjectTableCreateInfoNVX
,VkPerformanceConfigurationAcquireInfoINTEL
,VkPerformanceMarkerInfoINTEL
,VkPerformanceOverrideInfoINTEL
,VkPerformanceStreamMarkerInfoINTEL
,VkPhysicalDevice16BitStorageFeatures
,VkPhysicalDevice8BitStorageFeaturesKHR
,VkPhysicalDeviceASTCDecodeFeaturesEXT
,VkPhysicalDeviceBlendOperationAdvancedFeaturesEXT
,VkPhysicalDeviceBlendOperationAdvancedPropertiesEXT
,VkPhysicalDeviceBufferDeviceAddressFeaturesEXT
,VkPhysicalDeviceCoherentMemoryFeaturesAMD
,VkPhysicalDeviceComputeShaderDerivativesFeaturesNV
,VkPhysicalDeviceConditionalRenderingFeaturesEXT
,VkPhysicalDeviceConservativeRasterizationPropertiesEXT
,VkPhysicalDeviceCooperativeMatrixFeaturesNV
,VkPhysicalDeviceCooperativeMatrixPropertiesNV
,VkPhysicalDeviceCornerSampledImageFeaturesNV
,VkPhysicalDeviceCoverageReductionModeFeaturesNV
,VkPhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV
,VkPhysicalDeviceDepthClipEnableFeaturesEXT
,VkPhysicalDeviceDepthStencilResolvePropertiesKHR
,VkPhysicalDeviceDescriptorIndexingFeaturesEXT
,VkPhysicalDeviceDescriptorIndexingPropertiesEXT
,VkPhysicalDeviceDiscardRectanglePropertiesEXT
,VkPhysicalDeviceDriverPropertiesKHR
,VkPhysicalDeviceExclusiveScissorFeaturesNV
,VkPhysicalDeviceExternalBufferInfo
,VkPhysicalDeviceExternalFenceInfo
,VkPhysicalDeviceExternalImageFormatInfo
,VkPhysicalDeviceExternalMemoryHostPropertiesEXT
,VkPhysicalDeviceExternalSemaphoreInfo
,VkPhysicalDeviceFeatures2
,VkPhysicalDeviceFloatControlsPropertiesKHR
,VkPhysicalDeviceFragmentDensityMapFeaturesEXT
,VkPhysicalDeviceFragmentDensityMapPropertiesEXT
,VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV
,VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT
,VkPhysicalDeviceGroupProperties
,VkPhysicalDeviceHostQueryResetFeaturesEXT
,VkPhysicalDeviceIDProperties
,VkPhysicalDeviceImageDrmFormatModifierInfoEXT
,VkPhysicalDeviceImageFormatInfo2
,VkPhysicalDeviceImageViewImageFormatInfoEXT
,VkPhysicalDeviceImagelessFramebufferFeaturesKHR
,VkPhysicalDeviceIndexTypeUint8FeaturesEXT
,VkPhysicalDeviceInlineUniformBlockFeaturesEXT
,VkPhysicalDeviceInlineUniformBlockPropertiesEXT
,VkPhysicalDeviceLineRasterizationFeaturesEXT
,VkPhysicalDeviceLineRasterizationPropertiesEXT
,VkPhysicalDeviceMaintenance3Properties
,VkPhysicalDeviceMemoryBudgetPropertiesEXT
,VkPhysicalDeviceMemoryPriorityFeaturesEXT
,VkPhysicalDeviceMemoryProperties2
,VkPhysicalDeviceMeshShaderFeaturesNV
,VkPhysicalDeviceMeshShaderPropertiesNV
,VkPhysicalDeviceMultiviewFeatures
,VkPhysicalDeviceMultiviewPerViewAttributesPropertiesNVX
,VkPhysicalDeviceMultiviewProperties
,VkPhysicalDevicePCIBusInfoPropertiesEXT
,VkPhysicalDevicePipelineExecutablePropertiesFeaturesKHR
,VkPhysicalDevicePointClippingProperties
,VkPhysicalDeviceProperties2
,VkPhysicalDeviceProtectedMemoryFeatures
,VkPhysicalDeviceProtectedMemoryProperties
,VkPhysicalDevicePushDescriptorPropertiesKHR
,VkPhysicalDeviceRayTracingPropertiesNV
,VkPhysicalDeviceRepresentativeFragmentTestFeaturesNV
,VkPhysicalDeviceSampleLocationsPropertiesEXT
,VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT
,VkPhysicalDeviceSamplerYcbcrConversionFeatures
,VkPhysicalDeviceScalarBlockLayoutFeaturesEXT
,VkPhysicalDeviceShaderAtomicInt64FeaturesKHR
,VkPhysicalDeviceShaderCoreProperties2AMD
,VkPhysicalDeviceShaderCorePropertiesAMD
,VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT
,VkPhysicalDeviceShaderDrawParametersFeatures
,VkPhysicalDeviceShaderFloat16Int8FeaturesKHR
,VkPhysicalDeviceShaderImageFootprintFeaturesNV
,VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL
,VkPhysicalDeviceShaderSMBuiltinsFeaturesNV
,VkPhysicalDeviceShaderSMBuiltinsPropertiesNV
,VkPhysicalDeviceShadingRateImageFeaturesNV
,VkPhysicalDeviceShadingRateImagePropertiesNV
,VkPhysicalDeviceSparseImageFormatInfo2
,VkPhysicalDeviceSubgroupProperties
,VkPhysicalDeviceSubgroupSizeControlFeaturesEXT
,VkPhysicalDeviceSubgroupSizeControlPropertiesEXT
,VkPhysicalDeviceSurfaceInfo2KHR
,VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT
,VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT
,VkPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT
,VkPhysicalDeviceTransformFeedbackFeaturesEXT
,VkPhysicalDeviceTransformFeedbackPropertiesEXT
,VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR
,VkPhysicalDeviceVariablePointersFeatures
,VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT
,VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT
,VkPhysicalDeviceVulkanMemoryModelFeaturesKHR
,VkPhysicalDeviceYcbcrImageArraysFeaturesEXT
,VkPipelineCacheCreateInfo
,VkPipelineColorBlendAdvancedStateCreateInfoEXT
,VkPipelineColorBlendStateCreateInfo
,VkPipelineCompilerControlCreateInfoAMD
,VkPipelineCoverageModulationStateCreateInfoNV
,VkPipelineCoverageReductionStateCreateInfoNV
,VkPipelineCoverageToColorStateCreateInfoNV
,VkPipelineCreationFeedbackCreateInfoEXT
,VkPipelineDepthStencilStateCreateInfo
,VkPipelineDiscardRectangleStateCreateInfoEXT
,VkPipelineDynamicStateCreateInfo
,VkPipelineExecutableInfoKHR
,VkPipelineExecutableInternalRepresentationKHR
,VkPipelineExecutablePropertiesKHR
,VkPipelineExecutableStatisticKHR
,VkPipelineInfoKHR
,VkPipelineInputAssemblyStateCreateInfo
,VkPipelineLayoutCreateInfo
,VkPipelineMultisampleStateCreateInfo
,VkPipelineRasterizationConservativeStateCreateInfoEXT
,VkPipelineRasterizationDepthClipStateCreateInfoEXT
,VkPipelineRasterizationLineStateCreateInfoEXT
,VkPipelineRasterizationStateCreateInfo
,VkPipelineRasterizationStateRasterizationOrderAMD
,VkPipelineRasterizationStateStreamCreateInfoEXT
,VkPipelineRepresentativeFragmentTestStateCreateInfoNV
,VkPipelineSampleLocationsStateCreateInfoEXT
,VkPipelineShaderStageCreateInfo
,VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT
,VkPipelineTessellationDomainOriginStateCreateInfo
,VkPipelineTessellationStateCreateInfo
,VkPipelineVertexInputDivisorStateCreateInfoEXT
,VkPipelineVertexInputStateCreateInfo
,VkPipelineViewportCoarseSampleOrderStateCreateInfoNV
,VkPipelineViewportExclusiveScissorStateCreateInfoNV
,VkPipelineViewportShadingRateImageStateCreateInfoNV
,VkPipelineViewportStateCreateInfo
,VkPipelineViewportSwizzleStateCreateInfoNV
,VkPipelineViewportWScalingStateCreateInfoNV
,VkPresentInfoKHR
,VkPresentRegionsKHR
,VkPresentTimesInfoGOOGLE
,VkProtectedSubmitInfo
,VkQueryPoolCreateInfo
,VkQueryPoolCreateInfoINTEL
,VkQueueFamilyCheckpointPropertiesNV
,VkQueueFamilyProperties2
,VkRayTracingPipelineCreateInfoNV
,VkRayTracingShaderGroupCreateInfoNV
,VkRenderPassAttachmentBeginInfoKHR
,VkRenderPassBeginInfo
,VkRenderPassCreateInfo
,VkRenderPassCreateInfo2KHR
,VkRenderPassFragmentDensityMapCreateInfoEXT
,VkRenderPassInputAttachmentAspectCreateInfo
,VkRenderPassMultiviewCreateInfo
,VkRenderPassSampleLocationsBeginInfoEXT
,VkSampleLocationsInfoEXT
,VkSamplerCreateInfo
,VkSamplerReductionModeCreateInfoEXT
,VkSamplerYcbcrConversionCreateInfo
,VkSamplerYcbcrConversionImageFormatProperties
,VkSamplerYcbcrConversionInfo
,VkSemaphoreCreateInfo
,VkSemaphoreGetFdInfoKHR
,VkSemaphoreGetWin32HandleInfoKHR
,VkShaderModuleCreateInfo
,VkShaderModuleValidationCacheCreateInfoEXT
,VkSharedPresentSurfaceCapabilitiesKHR
,VkSparseImageFormatProperties2
,VkSparseImageMemoryRequirements2
,VkSubmitInfo
,VkSubpassBeginInfoKHR
,VkSubpassDependency2KHR
,VkSubpassDescription2KHR
,VkSubpassDescriptionDepthStencilResolveKHR
,VkSubpassEndInfoKHR
,VkSurfaceCapabilities2EXT
,VkSurfaceCapabilities2KHR
,VkSurfaceCapabilitiesFullScreenExclusiveEXT
,VkSurfaceFormat2KHR
,VkSurfaceFullScreenExclusiveInfoEXT
,VkSurfaceFullScreenExclusiveWin32InfoEXT
,VkSurfaceProtectedCapabilitiesKHR
,VkSwapchainCounterCreateInfoEXT
,VkSwapchainCreateInfoKHR
,VkSwapchainDisplayNativeHdrCreateInfoAMD
,VkTextureLODGatherFormatPropertiesAMD
,VkValidationCacheCreateInfoEXT
,VkValidationFeaturesEXT
,VkValidationFlagsEXT
,VkWaylandSurfaceCreateInfoKHR
,VkWin32KeyedMutexAcquireReleaseInfoKHR
,VkWin32KeyedMutexAcquireReleaseInfoNV
,VkWin32SurfaceCreateInfoKHR
,VkWriteDescriptorSet
,VkWriteDescriptorSetAccelerationStructureNV
,VkWriteDescriptorSetInlineUniformBlockEXT
,VkXlibSurfaceCreateInfoKHR
Enum values:
STRUCTURE_TYPE_APPLICATION_INFO
STRUCTURE_TYPE_INSTANCE_CREATE_INFO
STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO
STRUCTURE_TYPE_DEVICE_CREATE_INFO
STRUCTURE_TYPE_SUBMIT_INFO
STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO
STRUCTURE_TYPE_MAPPED_MEMORY_RANGE
STRUCTURE_TYPE_BIND_SPARSE_INFO
STRUCTURE_TYPE_FENCE_CREATE_INFO
STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO
STRUCTURE_TYPE_EVENT_CREATE_INFO
STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
STRUCTURE_TYPE_BUFFER_CREATE_INFO
STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO
STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO
STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO
STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO
STRUCTURE_TYPE_SAMPLER_CREATE_INFO
STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
STRUCTURE_TYPE_COPY_DESCRIPTOR_SET
STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO
STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO
STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO
STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO
STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO
STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER
STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER
STRUCTURE_TYPE_MEMORY_BARRIER
-
VK_SYSTEM_ALLOCATION_SCOPE_COMMAND, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT, VK_SYSTEM_ALLOCATION_SCOPE_CACHE, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE
VkSystemAllocationScope - Allocation scopeDescription
SYSTEM_ALLOCATION_SCOPE_COMMAND
specifies that the allocation is scoped to the duration of the Vulkan command.SYSTEM_ALLOCATION_SCOPE_OBJECT
specifies that the allocation is scoped to the lifetime of the Vulkan object that is being created or used.SYSTEM_ALLOCATION_SCOPE_CACHE
specifies that the allocation is scoped to the lifetime of aVkPipelineCache
orVkValidationCacheEXT
object.SYSTEM_ALLOCATION_SCOPE_DEVICE
specifies that the allocation is scoped to the lifetime of the Vulkan device.SYSTEM_ALLOCATION_SCOPE_INSTANCE
specifies that the allocation is scoped to the lifetime of the Vulkan instance.
Most Vulkan commands operate on a single object, or there is a sole object that is being created or manipulated. When an allocation uses an allocation scope of
SYSTEM_ALLOCATION_SCOPE_OBJECT
orSYSTEM_ALLOCATION_SCOPE_CACHE
, the allocation is scoped to the object being created or manipulated.When an implementation requires host memory, it will make callbacks to the application using the most specific allocator and allocation scope available:
- If an allocation is scoped to the duration of a command, the allocator will use the
SYSTEM_ALLOCATION_SCOPE_COMMAND
allocation scope. The most specific allocator available is used: if the object being created or manipulated has an allocator, that object’s allocator will be used, else if the parentVkDevice
has an allocator it will be used, else if the parentVkInstance
has an allocator it will be used. Else, - If an allocation is associated with an object of type
VkValidationCacheEXT
orVkPipelineCache
, the allocator will use theSYSTEM_ALLOCATION_SCOPE_CACHE
allocation scope. The most specific allocator available is used (cache, else device, else instance). Else, - If an allocation is scoped to the lifetime of an object, that object is being created or manipulated by the command, and that object’s type is not
VkDevice
orVkInstance
, the allocator will use an allocation scope ofSYSTEM_ALLOCATION_SCOPE_OBJECT
. The most specific allocator available is used (object, else device, else instance). Else, - If an allocation is scoped to the lifetime of a device, the allocator will use an allocation scope of
SYSTEM_ALLOCATION_SCOPE_DEVICE
. The most specific allocator available is used (device, else instance). Else, - If the allocation is scoped to the lifetime of an instance and the instance has an allocator, its allocator will be used with an allocation scope of
SYSTEM_ALLOCATION_SCOPE_INSTANCE
. - Otherwise an implementation will allocate memory through an alternative mechanism that is unspecified.
See Also
-
VK_INTERNAL_ALLOCATION_TYPE_EXECUTABLE
VkInternalAllocationType - Allocation typeDescription
INTERNAL_ALLOCATION_TYPE_EXECUTABLE
specifies that the allocation is intended for execution by the host.
See Also
VkInternalAllocationNotification
,VkInternalFreeNotification
-
VK_FORMAT_UNDEFINED, VK_FORMAT_R4G4_UNORM_PACK8, VK_FORMAT_R4G4B4A4_UNORM_PACK16, VK_FORMAT_B4G4R4A4_UNORM_PACK16, VK_FORMAT_R5G6B5_UNORM_PACK16, VK_FORMAT_B5G6R5_UNORM_PACK16, VK_FORMAT_R5G5B5A1_UNORM_PACK16, VK_FORMAT_B5G5R5A1_UNORM_PACK16, VK_FORMAT_A1R5G5B5_UNORM_PACK16, VK_FORMAT_R8_UNORM, VK_FORMAT_R8_SNORM, VK_FORMAT_R8_USCALED, VK_FORMAT_R8_SSCALED, VK_FORMAT_R8_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R8_SRGB, VK_FORMAT_R8G8_UNORM, VK_FORMAT_R8G8_SNORM, VK_FORMAT_R8G8_USCALED, VK_FORMAT_R8G8_SSCALED, VK_FORMAT_R8G8_UINT, VK_FORMAT_R8G8_SINT, VK_FORMAT_R8G8_SRGB, VK_FORMAT_R8G8B8_UNORM, VK_FORMAT_R8G8B8_SNORM, VK_FORMAT_R8G8B8_USCALED, VK_FORMAT_R8G8B8_SSCALED, VK_FORMAT_R8G8B8_UINT, VK_FORMAT_R8G8B8_SINT, VK_FORMAT_R8G8B8_SRGB, VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_B8G8R8_SNORM, VK_FORMAT_B8G8R8_USCALED, VK_FORMAT_B8G8R8_SSCALED, VK_FORMAT_B8G8R8_UINT, VK_FORMAT_B8G8R8_SINT, VK_FORMAT_B8G8R8_SRGB, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_R8G8B8A8_SNORM, VK_FORMAT_R8G8B8A8_USCALED, VK_FORMAT_R8G8B8A8_SSCALED, VK_FORMAT_R8G8B8A8_UINT, VK_FORMAT_R8G8B8A8_SINT, VK_FORMAT_R8G8B8A8_SRGB, VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_B8G8R8A8_SNORM, VK_FORMAT_B8G8R8A8_USCALED, VK_FORMAT_B8G8R8A8_SSCALED, VK_FORMAT_B8G8R8A8_UINT, VK_FORMAT_B8G8R8A8_SINT, VK_FORMAT_B8G8R8A8_SRGB, VK_FORMAT_A8B8G8R8_UNORM_PACK32, VK_FORMAT_A8B8G8R8_SNORM_PACK32, VK_FORMAT_A8B8G8R8_USCALED_PACK32, VK_FORMAT_A8B8G8R8_SSCALED_PACK32, VK_FORMAT_A8B8G8R8_UINT_PACK32, VK_FORMAT_A8B8G8R8_SINT_PACK32, VK_FORMAT_A8B8G8R8_SRGB_PACK32, VK_FORMAT_A2R10G10B10_UNORM_PACK32, VK_FORMAT_A2R10G10B10_SNORM_PACK32, VK_FORMAT_A2R10G10B10_USCALED_PACK32, VK_FORMAT_A2R10G10B10_SSCALED_PACK32, VK_FORMAT_A2R10G10B10_UINT_PACK32, VK_FORMAT_A2R10G10B10_SINT_PACK32, VK_FORMAT_A2B10G10R10_UNORM_PACK32, VK_FORMAT_A2B10G10R10_SNORM_PACK32, VK_FORMAT_A2B10G10R10_USCALED_PACK32, VK_FORMAT_A2B10G10R10_SSCALED_PACK32, VK_FORMAT_A2B10G10R10_UINT_PACK32, VK_FORMAT_A2B10G10R10_SINT_PACK32, VK_FORMAT_R16_UNORM, VK_FORMAT_R16_SNORM, VK_FORMAT_R16_USCALED, VK_FORMAT_R16_SSCALED, VK_FORMAT_R16_UINT, VK_FORMAT_R16_SINT, VK_FORMAT_R16_SFLOAT, VK_FORMAT_R16G16_UNORM, VK_FORMAT_R16G16_SNORM, VK_FORMAT_R16G16_USCALED, VK_FORMAT_R16G16_SSCALED, VK_FORMAT_R16G16_UINT, VK_FORMAT_R16G16_SINT, VK_FORMAT_R16G16_SFLOAT, VK_FORMAT_R16G16B16_UNORM, VK_FORMAT_R16G16B16_SNORM, VK_FORMAT_R16G16B16_USCALED, VK_FORMAT_R16G16B16_SSCALED, VK_FORMAT_R16G16B16_UINT, VK_FORMAT_R16G16B16_SINT, VK_FORMAT_R16G16B16_SFLOAT, VK_FORMAT_R16G16B16A16_UNORM, VK_FORMAT_R16G16B16A16_SNORM, VK_FORMAT_R16G16B16A16_USCALED, VK_FORMAT_R16G16B16A16_SSCALED, VK_FORMAT_R16G16B16A16_UINT, VK_FORMAT_R16G16B16A16_SINT, VK_FORMAT_R16G16B16A16_SFLOAT, VK_FORMAT_R32_UINT, VK_FORMAT_R32_SINT, VK_FORMAT_R32_SFLOAT, VK_FORMAT_R32G32_UINT, VK_FORMAT_R32G32_SINT, VK_FORMAT_R32G32_SFLOAT, VK_FORMAT_R32G32B32_UINT, VK_FORMAT_R32G32B32_SINT, VK_FORMAT_R32G32B32_SFLOAT, VK_FORMAT_R32G32B32A32_UINT, VK_FORMAT_R32G32B32A32_SINT, VK_FORMAT_R32G32B32A32_SFLOAT, VK_FORMAT_R64_UINT, VK_FORMAT_R64_SINT, VK_FORMAT_R64_SFLOAT, VK_FORMAT_R64G64_UINT, VK_FORMAT_R64G64_SINT, VK_FORMAT_R64G64_SFLOAT, VK_FORMAT_R64G64B64_UINT, VK_FORMAT_R64G64B64_SINT, VK_FORMAT_R64G64B64_SFLOAT, VK_FORMAT_R64G64B64A64_UINT, VK_FORMAT_R64G64B64A64_SINT, VK_FORMAT_R64G64B64A64_SFLOAT, VK_FORMAT_B10G11R11_UFLOAT_PACK32, VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, VK_FORMAT_D16_UNORM, VK_FORMAT_X8_D24_UNORM_PACK32, VK_FORMAT_D32_SFLOAT, VK_FORMAT_S8_UINT, VK_FORMAT_D16_UNORM_S8_UINT, VK_FORMAT_D24_UNORM_S8_UINT, VK_FORMAT_D32_SFLOAT_S8_UINT, VK_FORMAT_BC1_RGB_UNORM_BLOCK, VK_FORMAT_BC1_RGB_SRGB_BLOCK, VK_FORMAT_BC1_RGBA_UNORM_BLOCK, VK_FORMAT_BC1_RGBA_SRGB_BLOCK, VK_FORMAT_BC2_UNORM_BLOCK, VK_FORMAT_BC2_SRGB_BLOCK, VK_FORMAT_BC3_UNORM_BLOCK, VK_FORMAT_BC3_SRGB_BLOCK, VK_FORMAT_BC4_UNORM_BLOCK, VK_FORMAT_BC4_SNORM_BLOCK, VK_FORMAT_BC5_UNORM_BLOCK, VK_FORMAT_BC5_SNORM_BLOCK, VK_FORMAT_BC6H_UFLOAT_BLOCK, VK_FORMAT_BC6H_SFLOAT_BLOCK, VK_FORMAT_BC7_UNORM_BLOCK, VK_FORMAT_BC7_SRGB_BLOCK, VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK, VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK, VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, VK_FORMAT_EAC_R11_UNORM_BLOCK, VK_FORMAT_EAC_R11_SNORM_BLOCK, VK_FORMAT_EAC_R11G11_UNORM_BLOCK, VK_FORMAT_EAC_R11G11_SNORM_BLOCK, VK_FORMAT_ASTC_4x4_UNORM_BLOCK, VK_FORMAT_ASTC_4x4_SRGB_BLOCK, VK_FORMAT_ASTC_5x4_UNORM_BLOCK, VK_FORMAT_ASTC_5x4_SRGB_BLOCK, VK_FORMAT_ASTC_5x5_UNORM_BLOCK, VK_FORMAT_ASTC_5x5_SRGB_BLOCK, VK_FORMAT_ASTC_6x5_UNORM_BLOCK, VK_FORMAT_ASTC_6x5_SRGB_BLOCK, VK_FORMAT_ASTC_6x6_UNORM_BLOCK, VK_FORMAT_ASTC_6x6_SRGB_BLOCK, VK_FORMAT_ASTC_8x5_UNORM_BLOCK, VK_FORMAT_ASTC_8x5_SRGB_BLOCK, VK_FORMAT_ASTC_8x6_UNORM_BLOCK, VK_FORMAT_ASTC_8x6_SRGB_BLOCK, VK_FORMAT_ASTC_8x8_UNORM_BLOCK, VK_FORMAT_ASTC_8x8_SRGB_BLOCK, VK_FORMAT_ASTC_10x5_UNORM_BLOCK, VK_FORMAT_ASTC_10x5_SRGB_BLOCK, VK_FORMAT_ASTC_10x6_UNORM_BLOCK, VK_FORMAT_ASTC_10x6_SRGB_BLOCK, VK_FORMAT_ASTC_10x8_UNORM_BLOCK, VK_FORMAT_ASTC_10x8_SRGB_BLOCK, VK_FORMAT_ASTC_10x10_UNORM_BLOCK, VK_FORMAT_ASTC_10x10_SRGB_BLOCK, VK_FORMAT_ASTC_12x10_UNORM_BLOCK, VK_FORMAT_ASTC_12x10_SRGB_BLOCK, VK_FORMAT_ASTC_12x12_UNORM_BLOCK, VK_FORMAT_ASTC_12x12_SRGB_BLOCK
VkFormat - Available image formatsDescription
FORMAT_UNDEFINED
specifies that the format is not specified.FORMAT_R4G4_UNORM_PACK8
specifies a two-component, 8-bit packed unsigned normalized format that has a 4-bit R component in bits 4..7, and a 4-bit G component in bits 0..3.FORMAT_R4G4B4A4_UNORM_PACK16
specifies a four-component, 16-bit packed unsigned normalized format that has a 4-bit R component in bits 12..15, a 4-bit G component in bits 8..11, a 4-bit B component in bits 4..7, and a 4-bit A component in bits 0..3.FORMAT_B4G4R4A4_UNORM_PACK16
specifies a four-component, 16-bit packed unsigned normalized format that has a 4-bit B component in bits 12..15, a 4-bit G component in bits 8..11, a 4-bit R component in bits 4..7, and a 4-bit A component in bits 0..3.FORMAT_R5G6B5_UNORM_PACK16
specifies a three-component, 16-bit packed unsigned normalized format that has a 5-bit R component in bits 11..15, a 6-bit G component in bits 5..10, and a 5-bit B component in bits 0..4.FORMAT_B5G6R5_UNORM_PACK16
specifies a three-component, 16-bit packed unsigned normalized format that has a 5-bit B component in bits 11..15, a 6-bit G component in bits 5..10, and a 5-bit R component in bits 0..4.FORMAT_R5G5B5A1_UNORM_PACK16
specifies a four-component, 16-bit packed unsigned normalized format that has a 5-bit R component in bits 11..15, a 5-bit G component in bits 6..10, a 5-bit B component in bits 1..5, and a 1-bit A component in bit 0.FORMAT_B5G5R5A1_UNORM_PACK16
specifies a four-component, 16-bit packed unsigned normalized format that has a 5-bit B component in bits 11..15, a 5-bit G component in bits 6..10, a 5-bit R component in bits 1..5, and a 1-bit A component in bit 0.FORMAT_A1R5G5B5_UNORM_PACK16
specifies a four-component, 16-bit packed unsigned normalized format that has a 1-bit A component in bit 15, a 5-bit R component in bits 10..14, a 5-bit G component in bits 5..9, and a 5-bit B component in bits 0..4.FORMAT_R8_UNORM
specifies a one-component, 8-bit unsigned normalized format that has a single 8-bit R component.FORMAT_R8_SNORM
specifies a one-component, 8-bit signed normalized format that has a single 8-bit R component.FORMAT_R8_USCALED
specifies a one-component, 8-bit unsigned scaled integer format that has a single 8-bit R component.FORMAT_R8_SSCALED
specifies a one-component, 8-bit signed scaled integer format that has a single 8-bit R component.FORMAT_R8_UINT
specifies a one-component, 8-bit unsigned integer format that has a single 8-bit R component.FORMAT_R8_SINT
specifies a one-component, 8-bit signed integer format that has a single 8-bit R component.FORMAT_R8_SRGB
specifies a one-component, 8-bit unsigned normalized format that has a single 8-bit R component stored with sRGB nonlinear encoding.FORMAT_R8G8_UNORM
specifies a two-component, 16-bit unsigned normalized format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1.FORMAT_R8G8_SNORM
specifies a two-component, 16-bit signed normalized format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1.FORMAT_R8G8_USCALED
specifies a two-component, 16-bit unsigned scaled integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1.FORMAT_R8G8_SSCALED
specifies a two-component, 16-bit signed scaled integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1.FORMAT_R8G8_UINT
specifies a two-component, 16-bit unsigned integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1.FORMAT_R8G8_SINT
specifies a two-component, 16-bit signed integer format that has an 8-bit R component in byte 0, and an 8-bit G component in byte 1.FORMAT_R8G8_SRGB
specifies a two-component, 16-bit unsigned normalized format that has an 8-bit R component stored with sRGB nonlinear encoding in byte 0, and an 8-bit G component stored with sRGB nonlinear encoding in byte 1.FORMAT_R8G8B8_UNORM
specifies a three-component, 24-bit unsigned normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.FORMAT_R8G8B8_SNORM
specifies a three-component, 24-bit signed normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.FORMAT_R8G8B8_USCALED
specifies a three-component, 24-bit unsigned scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.FORMAT_R8G8B8_SSCALED
specifies a three-component, 24-bit signed scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.FORMAT_R8G8B8_UINT
specifies a three-component, 24-bit unsigned integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.FORMAT_R8G8B8_SINT
specifies a three-component, 24-bit signed integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, and an 8-bit B component in byte 2.FORMAT_R8G8B8_SRGB
specifies a three-component, 24-bit unsigned normalized format that has an 8-bit R component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, and an 8-bit B component stored with sRGB nonlinear encoding in byte 2.FORMAT_B8G8R8_UNORM
specifies a three-component, 24-bit unsigned normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2.FORMAT_B8G8R8_SNORM
specifies a three-component, 24-bit signed normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2.FORMAT_B8G8R8_USCALED
specifies a three-component, 24-bit unsigned scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2.FORMAT_B8G8R8_SSCALED
specifies a three-component, 24-bit signed scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2.FORMAT_B8G8R8_UINT
specifies a three-component, 24-bit unsigned integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2.FORMAT_B8G8R8_SINT
specifies a three-component, 24-bit signed integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, and an 8-bit R component in byte 2.FORMAT_B8G8R8_SRGB
specifies a three-component, 24-bit unsigned normalized format that has an 8-bit B component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, and an 8-bit R component stored with sRGB nonlinear encoding in byte 2.FORMAT_R8G8B8A8_UNORM
specifies a four-component, 32-bit unsigned normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3.FORMAT_R8G8B8A8_SNORM
specifies a four-component, 32-bit signed normalized format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3.FORMAT_R8G8B8A8_USCALED
specifies a four-component, 32-bit unsigned scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3.FORMAT_R8G8B8A8_SSCALED
specifies a four-component, 32-bit signed scaled format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3.FORMAT_R8G8B8A8_UINT
specifies a four-component, 32-bit unsigned integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3.FORMAT_R8G8B8A8_SINT
specifies a four-component, 32-bit signed integer format that has an 8-bit R component in byte 0, an 8-bit G component in byte 1, an 8-bit B component in byte 2, and an 8-bit A component in byte 3.FORMAT_R8G8B8A8_SRGB
specifies a four-component, 32-bit unsigned normalized format that has an 8-bit R component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, an 8-bit B component stored with sRGB nonlinear encoding in byte 2, and an 8-bit A component in byte 3.FORMAT_B8G8R8A8_UNORM
specifies a four-component, 32-bit unsigned normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3.FORMAT_B8G8R8A8_SNORM
specifies a four-component, 32-bit signed normalized format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3.FORMAT_B8G8R8A8_USCALED
specifies a four-component, 32-bit unsigned scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3.FORMAT_B8G8R8A8_SSCALED
specifies a four-component, 32-bit signed scaled format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3.FORMAT_B8G8R8A8_UINT
specifies a four-component, 32-bit unsigned integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3.FORMAT_B8G8R8A8_SINT
specifies a four-component, 32-bit signed integer format that has an 8-bit B component in byte 0, an 8-bit G component in byte 1, an 8-bit R component in byte 2, and an 8-bit A component in byte 3.FORMAT_B8G8R8A8_SRGB
specifies a four-component, 32-bit unsigned normalized format that has an 8-bit B component stored with sRGB nonlinear encoding in byte 0, an 8-bit G component stored with sRGB nonlinear encoding in byte 1, an 8-bit R component stored with sRGB nonlinear encoding in byte 2, and an 8-bit A component in byte 3.FORMAT_A8B8G8R8_UNORM_PACK32
specifies a four-component, 32-bit packed unsigned normalized format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7.FORMAT_A8B8G8R8_SNORM_PACK32
specifies a four-component, 32-bit packed signed normalized format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7.FORMAT_A8B8G8R8_USCALED_PACK32
specifies a four-component, 32-bit packed unsigned scaled integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7.FORMAT_A8B8G8R8_SSCALED_PACK32
specifies a four-component, 32-bit packed signed scaled integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7.FORMAT_A8B8G8R8_UINT_PACK32
specifies a four-component, 32-bit packed unsigned integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7.FORMAT_A8B8G8R8_SINT_PACK32
specifies a four-component, 32-bit packed signed integer format that has an 8-bit A component in bits 24..31, an 8-bit B component in bits 16..23, an 8-bit G component in bits 8..15, and an 8-bit R component in bits 0..7.FORMAT_A8B8G8R8_SRGB_PACK32
specifies a four-component, 32-bit packed unsigned normalized format that has an 8-bit A component in bits 24..31, an 8-bit B component stored with sRGB nonlinear encoding in bits 16..23, an 8-bit G component stored with sRGB nonlinear encoding in bits 8..15, and an 8-bit R component stored with sRGB nonlinear encoding in bits 0..7.FORMAT_A2R10G10B10_UNORM_PACK32
specifies a four-component, 32-bit packed unsigned normalized format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9.FORMAT_A2R10G10B10_SNORM_PACK32
specifies a four-component, 32-bit packed signed normalized format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9.FORMAT_A2R10G10B10_USCALED_PACK32
specifies a four-component, 32-bit packed unsigned scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9.FORMAT_A2R10G10B10_SSCALED_PACK32
specifies a four-component, 32-bit packed signed scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9.FORMAT_A2R10G10B10_UINT_PACK32
specifies a four-component, 32-bit packed unsigned integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9.FORMAT_A2R10G10B10_SINT_PACK32
specifies a four-component, 32-bit packed signed integer format that has a 2-bit A component in bits 30..31, a 10-bit R component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit B component in bits 0..9.FORMAT_A2B10G10R10_UNORM_PACK32
specifies a four-component, 32-bit packed unsigned normalized format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9.FORMAT_A2B10G10R10_SNORM_PACK32
specifies a four-component, 32-bit packed signed normalized format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9.FORMAT_A2B10G10R10_USCALED_PACK32
specifies a four-component, 32-bit packed unsigned scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9.FORMAT_A2B10G10R10_SSCALED_PACK32
specifies a four-component, 32-bit packed signed scaled integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9.FORMAT_A2B10G10R10_UINT_PACK32
specifies a four-component, 32-bit packed unsigned integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9.FORMAT_A2B10G10R10_SINT_PACK32
specifies a four-component, 32-bit packed signed integer format that has a 2-bit A component in bits 30..31, a 10-bit B component in bits 20..29, a 10-bit G component in bits 10..19, and a 10-bit R component in bits 0..9.FORMAT_R16_UNORM
specifies a one-component, 16-bit unsigned normalized format that has a single 16-bit R component.FORMAT_R16_SNORM
specifies a one-component, 16-bit signed normalized format that has a single 16-bit R component.FORMAT_R16_USCALED
specifies a one-component, 16-bit unsigned scaled integer format that has a single 16-bit R component.FORMAT_R16_SSCALED
specifies a one-component, 16-bit signed scaled integer format that has a single 16-bit R component.FORMAT_R16_UINT
specifies a one-component, 16-bit unsigned integer format that has a single 16-bit R component.FORMAT_R16_SINT
specifies a one-component, 16-bit signed integer format that has a single 16-bit R component.FORMAT_R16_SFLOAT
specifies a one-component, 16-bit signed floating-point format that has a single 16-bit R component.FORMAT_R16G16_UNORM
specifies a two-component, 32-bit unsigned normalized format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3.FORMAT_R16G16_SNORM
specifies a two-component, 32-bit signed normalized format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3.FORMAT_R16G16_USCALED
specifies a two-component, 32-bit unsigned scaled integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3.FORMAT_R16G16_SSCALED
specifies a two-component, 32-bit signed scaled integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3.FORMAT_R16G16_UINT
specifies a two-component, 32-bit unsigned integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3.FORMAT_R16G16_SINT
specifies a two-component, 32-bit signed integer format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3.FORMAT_R16G16_SFLOAT
specifies a two-component, 32-bit signed floating-point format that has a 16-bit R component in bytes 0..1, and a 16-bit G component in bytes 2..3.FORMAT_R16G16B16_UNORM
specifies a three-component, 48-bit unsigned normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5.FORMAT_R16G16B16_SNORM
specifies a three-component, 48-bit signed normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5.FORMAT_R16G16B16_USCALED
specifies a three-component, 48-bit unsigned scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5.FORMAT_R16G16B16_SSCALED
specifies a three-component, 48-bit signed scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5.FORMAT_R16G16B16_UINT
specifies a three-component, 48-bit unsigned integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5.FORMAT_R16G16B16_SINT
specifies a three-component, 48-bit signed integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5.FORMAT_R16G16B16_SFLOAT
specifies a three-component, 48-bit signed floating-point format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, and a 16-bit B component in bytes 4..5.FORMAT_R16G16B16A16_UNORM
specifies a four-component, 64-bit unsigned normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7.FORMAT_R16G16B16A16_SNORM
specifies a four-component, 64-bit signed normalized format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7.FORMAT_R16G16B16A16_USCALED
specifies a four-component, 64-bit unsigned scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7.FORMAT_R16G16B16A16_SSCALED
specifies a four-component, 64-bit signed scaled integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7.FORMAT_R16G16B16A16_UINT
specifies a four-component, 64-bit unsigned integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7.FORMAT_R16G16B16A16_SINT
specifies a four-component, 64-bit signed integer format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7.FORMAT_R16G16B16A16_SFLOAT
specifies a four-component, 64-bit signed floating-point format that has a 16-bit R component in bytes 0..1, a 16-bit G component in bytes 2..3, a 16-bit B component in bytes 4..5, and a 16-bit A component in bytes 6..7.FORMAT_R32_UINT
specifies a one-component, 32-bit unsigned integer format that has a single 32-bit R component.FORMAT_R32_SINT
specifies a one-component, 32-bit signed integer format that has a single 32-bit R component.FORMAT_R32_SFLOAT
specifies a one-component, 32-bit signed floating-point format that has a single 32-bit R component.FORMAT_R32G32_UINT
specifies a two-component, 64-bit unsigned integer format that has a 32-bit R component in bytes 0..3, and a 32-bit G component in bytes 4..7.FORMAT_R32G32_SINT
specifies a two-component, 64-bit signed integer format that has a 32-bit R component in bytes 0..3, and a 32-bit G component in bytes 4..7.FORMAT_R32G32_SFLOAT
specifies a two-component, 64-bit signed floating-point format that has a 32-bit R component in bytes 0..3, and a 32-bit G component in bytes 4..7.FORMAT_R32G32B32_UINT
specifies a three-component, 96-bit unsigned integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit B component in bytes 8..11.FORMAT_R32G32B32_SINT
specifies a three-component, 96-bit signed integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit B component in bytes 8..11.FORMAT_R32G32B32_SFLOAT
specifies a three-component, 96-bit signed floating-point format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, and a 32-bit B component in bytes 8..11.FORMAT_R32G32B32A32_UINT
specifies a four-component, 128-bit unsigned integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, and a 32-bit A component in bytes 12..15.FORMAT_R32G32B32A32_SINT
specifies a four-component, 128-bit signed integer format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, and a 32-bit A component in bytes 12..15.FORMAT_R32G32B32A32_SFLOAT
specifies a four-component, 128-bit signed floating-point format that has a 32-bit R component in bytes 0..3, a 32-bit G component in bytes 4..7, a 32-bit B component in bytes 8..11, and a 32-bit A component in bytes 12..15.FORMAT_R64_UINT
specifies a one-component, 64-bit unsigned integer format that has a single 64-bit R component.FORMAT_R64_SINT
specifies a one-component, 64-bit signed integer format that has a single 64-bit R component.FORMAT_R64_SFLOAT
specifies a one-component, 64-bit signed floating-point format that has a single 64-bit R component.FORMAT_R64G64_UINT
specifies a two-component, 128-bit unsigned integer format that has a 64-bit R component in bytes 0..7, and a 64-bit G component in bytes 8..15.FORMAT_R64G64_SINT
specifies a two-component, 128-bit signed integer format that has a 64-bit R component in bytes 0..7, and a 64-bit G component in bytes 8..15.FORMAT_R64G64_SFLOAT
specifies a two-component, 128-bit signed floating-point format that has a 64-bit R component in bytes 0..7, and a 64-bit G component in bytes 8..15.FORMAT_R64G64B64_UINT
specifies a three-component, 192-bit unsigned integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, and a 64-bit B component in bytes 16..23.FORMAT_R64G64B64_SINT
specifies a three-component, 192-bit signed integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, and a 64-bit B component in bytes 16..23.FORMAT_R64G64B64_SFLOAT
specifies a three-component, 192-bit signed floating-point format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, and a 64-bit B component in bytes 16..23.FORMAT_R64G64B64A64_UINT
specifies a four-component, 256-bit unsigned integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, a 64-bit B component in bytes 16..23, and a 64-bit A component in bytes 24..31.FORMAT_R64G64B64A64_SINT
specifies a four-component, 256-bit signed integer format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, a 64-bit B component in bytes 16..23, and a 64-bit A component in bytes 24..31.FORMAT_R64G64B64A64_SFLOAT
specifies a four-component, 256-bit signed floating-point format that has a 64-bit R component in bytes 0..7, a 64-bit G component in bytes 8..15, a 64-bit B component in bytes 16..23, and a 64-bit A component in bytes 24..31.FORMAT_B10G11R11_UFLOAT_PACK32
specifies a three-component, 32-bit packed unsigned floating-point format that has a 10-bit B component in bits 22..31, an 11-bit G component in bits 11..21, an 11-bit R component in bits 0..10. See Unsigned 10-Bit Floating-Point Numbers and Unsigned 11-Bit Floating-Point Numbers.FORMAT_E5B9G9R9_UFLOAT_PACK32
specifies a three-component, 32-bit packed unsigned floating-point format that has a 5-bit shared exponent in bits 27..31, a 9-bit B component mantissa in bits 18..26, a 9-bit G component mantissa in bits 9..17, and a 9-bit R component mantissa in bits 0..8.FORMAT_D16_UNORM
specifies a one-component, 16-bit unsigned normalized format that has a single 16-bit depth component.FORMAT_X8_D24_UNORM_PACK32
specifies a two-component, 32-bit format that has 24 unsigned normalized bits in the depth component and, optionally:, 8 bits that are unused.FORMAT_D32_SFLOAT
specifies a one-component, 32-bit signed floating-point format that has 32-bits in the depth component.FORMAT_S8_UINT
specifies a one-component, 8-bit unsigned integer format that has 8-bits in the stencil component.FORMAT_D16_UNORM_S8_UINT
specifies a two-component, 24-bit format that has 16 unsigned normalized bits in the depth component and 8 unsigned integer bits in the stencil component.FORMAT_D24_UNORM_S8_UINT
specifies a two-component, 32-bit packed format that has 8 unsigned integer bits in the stencil component, and 24 unsigned normalized bits in the depth component.FORMAT_D32_SFLOAT_S8_UINT
specifies a two-component format that has 32 signed float bits in the depth component and 8 unsigned integer bits in the stencil component. There are optionally: 24-bits that are unused.FORMAT_BC1_RGB_UNORM_BLOCK
specifies a three-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data. This format has no alpha and is considered opaque.FORMAT_BC1_RGB_SRGB_BLOCK
specifies a three-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding. This format has no alpha and is considered opaque.FORMAT_BC1_RGBA_UNORM_BLOCK
specifies a four-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data, and provides 1 bit of alpha.FORMAT_BC1_RGBA_SRGB_BLOCK
specifies a four-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding, and provides 1 bit of alpha.FORMAT_BC2_UNORM_BLOCK
specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values.FORMAT_BC2_SRGB_BLOCK
specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values with sRGB nonlinear encoding.FORMAT_BC3_UNORM_BLOCK
specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values.FORMAT_BC3_SRGB_BLOCK
specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values with sRGB nonlinear encoding.FORMAT_BC4_UNORM_BLOCK
specifies a one-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized red texel data.FORMAT_BC4_SNORM_BLOCK
specifies a one-component, block-compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of signed normalized red texel data.FORMAT_BC5_UNORM_BLOCK
specifies a two-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values.FORMAT_BC5_SNORM_BLOCK
specifies a two-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of signed normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values.FORMAT_BC6H_UFLOAT_BLOCK
specifies a three-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned floating-point RGB texel data.FORMAT_BC6H_SFLOAT_BLOCK
specifies a three-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of signed floating-point RGB texel data.FORMAT_BC7_UNORM_BLOCK
specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data.FORMAT_BC7_SRGB_BLOCK
specifies a four-component, block-compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.FORMAT_ETC2_R8G8B8_UNORM_BLOCK
specifies a three-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data. This format has no alpha and is considered opaque.FORMAT_ETC2_R8G8B8_SRGB_BLOCK
specifies a three-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding. This format has no alpha and is considered opaque.FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK
specifies a four-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data, and provides 1 bit of alpha.FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK
specifies a four-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGB texel data with sRGB nonlinear encoding, and provides 1 bit of alpha.FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK
specifies a four-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values.FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK
specifies a four-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with the first 64 bits encoding alpha values followed by 64 bits encoding RGB values with sRGB nonlinear encoding applied.FORMAT_EAC_R11_UNORM_BLOCK
specifies a one-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized red texel data.FORMAT_EAC_R11_SNORM_BLOCK
specifies a one-component, ETC2 compressed format where each 64-bit compressed texel block encodes a 4×4 rectangle of signed normalized red texel data.FORMAT_EAC_R11G11_UNORM_BLOCK
specifies a two-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values.FORMAT_EAC_R11G11_SNORM_BLOCK
specifies a two-component, ETC2 compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of signed normalized RG texel data with the first 64 bits encoding red values followed by 64 bits encoding green values.FORMAT_ASTC_4x4_UNORM_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data.FORMAT_ASTC_4x4_SRGB_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 4×4 rectangle of signed floating-point RGBA texel data.FORMAT_ASTC_5x4_UNORM_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5×4 rectangle of unsigned normalized RGBA texel data.FORMAT_ASTC_5x4_SRGB_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5×4 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5×4 rectangle of signed floating-point RGBA texel data.FORMAT_ASTC_5x5_UNORM_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5×5 rectangle of unsigned normalized RGBA texel data.FORMAT_ASTC_5x5_SRGB_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5×5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 5×5 rectangle of signed floating-point RGBA texel data.FORMAT_ASTC_6x5_UNORM_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6×5 rectangle of unsigned normalized RGBA texel data.FORMAT_ASTC_6x5_SRGB_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6×5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6×5 rectangle of signed floating-point RGBA texel data.FORMAT_ASTC_6x6_UNORM_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6×6 rectangle of unsigned normalized RGBA texel data.FORMAT_ASTC_6x6_SRGB_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6×6 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 6×6 rectangle of signed floating-point RGBA texel data.FORMAT_ASTC_8x5_UNORM_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8×5 rectangle of unsigned normalized RGBA texel data.FORMAT_ASTC_8x5_SRGB_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8×5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 8×5 rectangle of signed floating-point RGBA texel data.FORMAT_ASTC_8x6_UNORM_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8×6 rectangle of unsigned normalized RGBA texel data.FORMAT_ASTC_8x6_SRGB_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8×6 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 8×6 rectangle of signed floating-point RGBA texel data.FORMAT_ASTC_8x8_UNORM_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8×8 rectangle of unsigned normalized RGBA texel data.FORMAT_ASTC_8x8_SRGB_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes an 8×8 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 8×8 rectangle of signed floating-point RGBA texel data.FORMAT_ASTC_10x5_UNORM_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×5 rectangle of unsigned normalized RGBA texel data.FORMAT_ASTC_10x5_SRGB_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×5 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×5 rectangle of signed floating-point RGBA texel data.FORMAT_ASTC_10x6_UNORM_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×6 rectangle of unsigned normalized RGBA texel data.FORMAT_ASTC_10x6_SRGB_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×6 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×6 rectangle of signed floating-point RGBA texel data.FORMAT_ASTC_10x8_UNORM_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×8 rectangle of unsigned normalized RGBA texel data.FORMAT_ASTC_10x8_SRGB_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×8 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×8 rectangle of signed floating-point RGBA texel data.FORMAT_ASTC_10x10_UNORM_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×10 rectangle of unsigned normalized RGBA texel data.FORMAT_ASTC_10x10_SRGB_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×10 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 10×10 rectangle of signed floating-point RGBA texel data.FORMAT_ASTC_12x10_UNORM_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12×10 rectangle of unsigned normalized RGBA texel data.FORMAT_ASTC_12x10_SRGB_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12×10 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12×10 rectangle of signed floating-point RGBA texel data.FORMAT_ASTC_12x12_UNORM_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12×12 rectangle of unsigned normalized RGBA texel data.FORMAT_ASTC_12x12_SRGB_BLOCK
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12×12 rectangle of unsigned normalized RGBA texel data with sRGB nonlinear encoding applied to the RGB components.FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT
specifies a four-component, ASTC compressed format where each 128-bit compressed texel block encodes a 12×12 rectangle of signed floating-point RGBA texel data.FORMAT_G8B8G8R8_422_UNORM
specifies a four-component, 32-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has an 8-bit G component for the even i coordinate in byte 0, an 8-bit B component in byte 1, an 8-bit G component for the odd i coordinate in byte 2, and an 8-bit R component in byte 3. Images in this format must be defined with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.FORMAT_B8G8R8G8_422_UNORM
specifies a four-component, 32-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has an 8-bit B component in byte 0, an 8-bit G component for the even i coordinate in byte 1, an 8-bit R component in byte 2, and an 8-bit G component for the odd i coordinate in byte 3. Images in this format must be defined with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.FORMAT_G8_B8_R8_3PLANE_420_UNORM
specifies an unsigned normalized multi-planar format that has an 8-bit G component in plane 0, an 8-bit B component in plane 1, and an 8-bit R component in plane 2. The horizontal and vertical dimensions of the R and B planes are halved relative to the image dimensions, and each R and B component is shared with the G components for whichfloor(iG × 0.5) = iB = iR
andfloor(jG × 0.5) = jB = jR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane,IMAGE_ASPECT_PLANE_1_BIT
for the B plane, andIMAGE_ASPECT_PLANE_2_BIT
for the R plane. Images in this format must be defined with a width and height that is a multiple of two.FORMAT_G8_B8R8_2PLANE_420_UNORM
specifies an unsigned normalized multi-planar format that has an 8-bit G component in plane 0, and a two-component, 16-bit BR plane 1 consisting of an 8-bit B component in byte 0 and an 8-bit R component in byte 1. The horizontal and vertical dimensions of the BR plane is halved relative to the image dimensions, and each R and B value is shared with the G components for whichfloor(iG × 0.5) = iB = iR
andfloor(jG × 0.5) = jB = jR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane, andIMAGE_ASPECT_PLANE_1_BIT
for the BR plane. Images in this format must be defined with a width and height that is a multiple of two.FORMAT_G8_B8_R8_3PLANE_422_UNORM
specifies an unsigned normalized multi-planar format that has an 8-bit G component in plane 0, an 8-bit B component in plane 1, and an 8-bit R component in plane 2. The horizontal dimension of the R and B plane is halved relative to the image dimensions, and each R and B value is shared with the G components for whichfloor(iG × 0.5) = iB = iR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane,IMAGE_ASPECT_PLANE_1_BIT
for the B plane, andIMAGE_ASPECT_PLANE_2_BIT
for the R plane. Images in this format must be defined with a width that is a multiple of two.FORMAT_G8_B8R8_2PLANE_422_UNORM
specifies an unsigned normalized multi-planar format that has an 8-bit G component in plane 0, and a two-component, 16-bit BR plane 1 consisting of an 8-bit B component in byte 0 and an 8-bit R component in byte 1. The horizontal dimensions of the BR plane is halved relative to the image dimensions, and each R and B value is shared with the G components for whichfloor(iG × 0.5) = iB = iR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane, andIMAGE_ASPECT_PLANE_1_BIT
for the BR plane. Images in this format must be defined with a width that is a multiple of two.FORMAT_G8_B8_R8_3PLANE_444_UNORM
specifies an unsigned normalized multi-planar format that has an 8-bit G component in plane 0, an 8-bit B component in plane 1, and an 8-bit R component in plane 2. Each plane has the same dimensions and each R, G and B component contributes to a single texel. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane,IMAGE_ASPECT_PLANE_1_BIT
for the B plane, andIMAGE_ASPECT_PLANE_2_BIT
for the R plane.FORMAT_R10X6_UNORM_PACK16
specifies a one-component, 16-bit unsigned normalized format that has a single 10-bit R component in the top 10 bits of a 16-bit word, with the bottom 6 bits set to 0.FORMAT_R10X6G10X6_UNORM_2PACK16
specifies a two-component, 32-bit unsigned normalized format that has a 10-bit R component in the top 10 bits of the word in bytes 0..1, and a 10-bit G component in the top 10 bits of the word in bytes 2..3, with the bottom 6 bits of each word set to 0.FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16
specifies a four-component, 64-bit unsigned normalized format that has a 10-bit R component in the top 10 bits of the word in bytes 0..1, a 10-bit G component in the top 10 bits of the word in bytes 2..3, a 10-bit B component in the top 10 bits of the word in bytes 4..5, and a 10-bit A component in the top 10 bits of the word in bytes 6..7, with the bottom 6 bits of each word set to 0.FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16
specifies a four-component, 64-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has a 10-bit G component for the even i coordinate in the top 10 bits of the word in bytes 0..1, a 10-bit B component in the top 10 bits of the word in bytes 2..3, a 10-bit G component for the odd i coordinate in the top 10 bits of the word in bytes 4..5, and a 10-bit R component in the top 10 bits of the word in bytes 6..7, with the bottom 6 bits of each word set to 0. Images in this format must be defined with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16
specifies a four-component, 64-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has a 10-bit B component in the top 10 bits of the word in bytes 0..1, a 10-bit G component for the even i coordinate in the top 10 bits of the word in bytes 2..3, a 10-bit R component in the top 10 bits of the word in bytes 4..5, and a 10-bit G component for the odd i coordinate in the top 10 bits of the word in bytes 6..7, with the bottom 6 bits of each word set to 0. Images in this format must be defined with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16
specifies an unsigned normalized multi-planar format that has a 10-bit G component in the top 10 bits of each 16-bit word of plane 0, a 10-bit B component in the top 10 bits of each 16-bit word of plane 1, and a 10-bit R component in the top 10 bits of each 16-bit word of plane 2, with the bottom 6 bits of each word set to 0. The horizontal and vertical dimensions of the R and B planes are halved relative to the image dimensions, and each R and B component is shared with the G components for whichfloor(iG × 0.5) = iB = iR
andfloor(jG × 0.5) = jB = jR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane,IMAGE_ASPECT_PLANE_1_BIT
for the B plane, andIMAGE_ASPECT_PLANE_2_BIT
for the R plane. Images in this format must be defined with a width and height that is a multiple of two.FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16
specifies an unsigned normalized multi-planar format that has a 10-bit G component in the top 10 bits of each 16-bit word of plane 0, and a two-component, 32-bit BR plane 1 consisting of a 10-bit B component in the top 10 bits of the word in bytes 0..1, and a 10-bit R component in the top 10 bits of the word in bytes 2..3, the bottom 6 bits of each word set to 0. The horizontal and vertical dimensions of the BR plane is halved relative to the image dimensions, and each R and B value is shared with the G components for whichfloor(iG × 0.5) = iB = iR
andfloor(jG × 0.5) = jB = jR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane, andIMAGE_ASPECT_PLANE_1_BIT
for the BR plane. Images in this format must be defined with a width and height that is a multiple of two.FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16
specifies an unsigned normalized multi-planar format that has a 10-bit G component in the top 10 bits of each 16-bit word of plane 0, a 10-bit B component in the top 10 bits of each 16-bit word of plane 1, and a 10-bit R component in the top 10 bits of each 16-bit word of plane 2, with the bottom 6 bits of each word set to 0. The horizontal dimension of the R and B plane is halved relative to the image dimensions, and each R and B value is shared with the G components for whichfloor(iG × 0.5) = iB = iR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane,IMAGE_ASPECT_PLANE_1_BIT
for the B plane, andIMAGE_ASPECT_PLANE_2_BIT
for the R plane. Images in this format must be defined with a width that is a multiple of two.FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16
specifies an unsigned normalized multi-planar format that has a 10-bit G component in the top 10 bits of each 16-bit word of plane 0, and a two-component, 32-bit BR plane 1 consisting of a 10-bit B component in the top 10 bits of the word in bytes 0..1, and a 10-bit R component in the top 10 bits of the word in bytes 2..3, the bottom 6 bits of each word set to 0. The horizontal dimensions of the BR plane is halved relative to the image dimensions, and each R and B value is shared with the G components for whichfloor(iG × 0.5) = iB = iR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane, andIMAGE_ASPECT_PLANE_1_BIT
for the BR plane. Images in this format must be defined with a width that is a multiple of two.FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16
specifies an unsigned normalized multi-planar format that has a 10-bit G component in the top 10 bits of each 16-bit word of plane 0, a 10-bit B component in the top 10 bits of each 16-bit word of plane 1, and a 10-bit R component in the top 10 bits of each 16-bit word of plane 2, with the bottom 6 bits of each word set to 0. Each plane has the same dimensions and each R, G and B component contributes to a single texel. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane,IMAGE_ASPECT_PLANE_1_BIT
for the B plane, andIMAGE_ASPECT_PLANE_2_BIT
for the R plane.FORMAT_R12X4_UNORM_PACK16
specifies a one-component, 16-bit unsigned normalized format that has a single 12-bit R component in the top 12 bits of a 16-bit word, with the bottom 4 bits set to 0.FORMAT_R12X4G12X4_UNORM_2PACK16
specifies a two-component, 32-bit unsigned normalized format that has a 12-bit R component in the top 12 bits of the word in bytes 0..1, and a 12-bit G component in the top 12 bits of the word in bytes 2..3, with the bottom 4 bits of each word set to 0.FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16
specifies a four-component, 64-bit unsigned normalized format that has a 12-bit R component in the top 12 bits of the word in bytes 0..1, a 12-bit G component in the top 12 bits of the word in bytes 2..3, a 12-bit B component in the top 12 bits of the word in bytes 4..5, and a 12-bit A component in the top 12 bits of the word in bytes 6..7, with the bottom 4 bits of each word set to 0.FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16
specifies a four-component, 64-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has a 12-bit G component for the even i coordinate in the top 12 bits of the word in bytes 0..1, a 12-bit B component in the top 12 bits of the word in bytes 2..3, a 12-bit G component for the odd i coordinate in the top 12 bits of the word in bytes 4..5, and a 12-bit R component in the top 12 bits of the word in bytes 6..7, with the bottom 4 bits of each word set to 0. Images in this format must be defined with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16
specifies a four-component, 64-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has a 12-bit B component in the top 12 bits of the word in bytes 0..1, a 12-bit G component for the even i coordinate in the top 12 bits of the word in bytes 2..3, a 12-bit R component in the top 12 bits of the word in bytes 4..5, and a 12-bit G component for the odd i coordinate in the top 12 bits of the word in bytes 6..7, with the bottom 4 bits of each word set to 0. Images in this format must be defined with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16
specifies an unsigned normalized multi-planar format that has a 12-bit G component in the top 12 bits of each 16-bit word of plane 0, a 12-bit B component in the top 12 bits of each 16-bit word of plane 1, and a 12-bit R component in the top 12 bits of each 16-bit word of plane 2, with the bottom 4 bits of each word set to 0. The horizontal and vertical dimensions of the R and B planes are halved relative to the image dimensions, and each R and B component is shared with the G components for whichfloor(iG × 0.5) = iB = iR
andfloor(jG × 0.5) = jB = jR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane,IMAGE_ASPECT_PLANE_1_BIT
for the B plane, andIMAGE_ASPECT_PLANE_2_BIT
for the R plane. Images in this format must be defined with a width and height that is a multiple of two.FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16
specifies an unsigned normalized multi-planar format that has a 12-bit G component in the top 12 bits of each 16-bit word of plane 0, and a two-component, 32-bit BR plane 1 consisting of a 12-bit B component in the top 12 bits of the word in bytes 0..1, and a 12-bit R component in the top 12 bits of the word in bytes 2..3, the bottom 4 bits of each word set to 0. The horizontal and vertical dimensions of the BR plane is halved relative to the image dimensions, and each R and B value is shared with the G components for whichfloor(iG × 0.5) = iB = iR
andfloor(jG × 0.5) = jB = jR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane, andIMAGE_ASPECT_PLANE_1_BIT
for the BR plane. Images in this format must be defined with a width and height that is a multiple of two.FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16
specifies an unsigned normalized multi-planar format that has a 12-bit G component in the top 12 bits of each 16-bit word of plane 0, a 12-bit B component in the top 12 bits of each 16-bit word of plane 1, and a 12-bit R component in the top 12 bits of each 16-bit word of plane 2, with the bottom 4 bits of each word set to 0. The horizontal dimension of the R and B plane is halved relative to the image dimensions, and each R and B value is shared with the G components for whichfloor(iG × 0.5) = iB = iR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane,IMAGE_ASPECT_PLANE_1_BIT
for the B plane, andIMAGE_ASPECT_PLANE_2_BIT
for the R plane. Images in this format must be defined with a width that is a multiple of two.FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16
specifies an unsigned normalized multi-planar format that has a 12-bit G component in the top 12 bits of each 16-bit word of plane 0, and a two-component, 32-bit BR plane 1 consisting of a 12-bit B component in the top 12 bits of the word in bytes 0..1, and a 12-bit R component in the top 12 bits of the word in bytes 2..3, the bottom 4 bits of each word set to 0. The horizontal dimensions of the BR plane is halved relative to the image dimensions, and each R and B value is shared with the G components for whichfloor(iG × 0.5) = iB = iR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane, andIMAGE_ASPECT_PLANE_1_BIT
for the BR plane. Images in this format must be defined with a width that is a multiple of two.FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16
specifies an unsigned normalized multi-planar format that has a 12-bit G component in the top 12 bits of each 16-bit word of plane 0, a 12-bit B component in the top 12 bits of each 16-bit word of plane 1, and a 12-bit R component in the top 12 bits of each 16-bit word of plane 2, with the bottom 4 bits of each word set to 0. Each plane has the same dimensions and each R, G and B component contributes to a single texel. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane,IMAGE_ASPECT_PLANE_1_BIT
for the B plane, andIMAGE_ASPECT_PLANE_2_BIT
for the R plane.FORMAT_G16B16G16R16_422_UNORM
specifies a four-component, 64-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has a 16-bit G component for the even i coordinate in the word in bytes 0..1, a 16-bit B component in the word in bytes 2..3, a 16-bit G component for the odd i coordinate in the word in bytes 4..5, and a 16-bit R component in the word in bytes 6..7. Images in this format must be defined with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.FORMAT_B16G16R16G16_422_UNORM
specifies a four-component, 64-bit format containing a pair of G components, an R component, and a B component, collectively encoding a 2×1 rectangle of unsigned normalized RGB texel data. One G value is present at each i coordinate, with the B and R values shared across both G values and thus recorded at half the horizontal resolution of the image. This format has a 16-bit B component in the word in bytes 0..1, a 16-bit G component for the even i coordinate in the word in bytes 2..3, a 16-bit R component in the word in bytes 4..5, and a 16-bit G component for the odd i coordinate in the word in bytes 6..7. Images in this format must be defined with a width that is a multiple of two. For the purposes of the constraints on copy extents, this format is treated as a compressed format with a 2×1 compressed texel block.FORMAT_G16_B16_R16_3PLANE_420_UNORM
specifies an unsigned normalized multi-planar format that has a 16-bit G component in each 16-bit word of plane 0, a 16-bit B component in each 16-bit word of plane 1, and a 16-bit R component in each 16-bit word of plane 2. The horizontal and vertical dimensions of the R and B planes are halved relative to the image dimensions, and each R and B component is shared with the G components for whichfloor(iG × 0.5) = iB = iR
andfloor(jG × 0.5) = jB = jR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane,IMAGE_ASPECT_PLANE_1_BIT
for the B plane, andIMAGE_ASPECT_PLANE_2_BIT
for the R plane. Images in this format must be defined with a width and height that is a multiple of two.FORMAT_G16_B16R16_2PLANE_420_UNORM
specifies an unsigned normalized multi-planar format that has a 16-bit G component in each 16-bit word of plane 0, and a two-component, 32-bit BR plane 1 consisting of a 16-bit B component in the word in bytes 0..1, and a 16-bit R component in the word in bytes 2..3. The horizontal and vertical dimensions of the BR plane is halved relative to the image dimensions, and each R and B value is shared with the G components for whichfloor(iG × 0.5) = iB = iR
andfloor(jG × 0.5) = jB = jR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane, andIMAGE_ASPECT_PLANE_1_BIT
for the BR plane. Images in this format must be defined with a width and height that is a multiple of two.FORMAT_G16_B16_R16_3PLANE_422_UNORM
specifies an unsigned normalized multi-planar format that has a 16-bit G component in each 16-bit word of plane 0, a 16-bit B component in each 16-bit word of plane 1, and a 16-bit R component in each 16-bit word of plane 2. The horizontal dimension of the R and B plane is halved relative to the image dimensions, and each R and B value is shared with the G components for whichfloor(iG × 0.5) = iB = iR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane,IMAGE_ASPECT_PLANE_1_BIT
for the B plane, andIMAGE_ASPECT_PLANE_2_BIT
for the R plane. Images in this format must be defined with a width that is a multiple of two.FORMAT_G16_B16R16_2PLANE_422_UNORM
specifies an unsigned normalized multi-planar format that has a 16-bit G component in each 16-bit word of plane 0, and a two-component, 32-bit BR plane 1 consisting of a 16-bit B component in the word in bytes 0..1, and a 16-bit R component in the word in bytes 2..3. The horizontal dimensions of the BR plane is halved relative to the image dimensions, and each R and B value is shared with the G components for whichfloor(iG × 0.5) = iB = iR
. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane, andIMAGE_ASPECT_PLANE_1_BIT
for the BR plane. Images in this format must be defined with a width that is a multiple of two.FORMAT_G16_B16_R16_3PLANE_444_UNORM
specifies an unsigned normalized multi-planar format that has a 16-bit G component in each 16-bit word of plane 0, a 16-bit B component in each 16-bit word of plane 1, and a 16-bit R component in each 16-bit word of plane 2. Each plane has the same dimensions and each R, G and B component contributes to a single texel. The location of each plane when this image is in linear layout can be determined viaGetImageSubresourceLayout
, usingIMAGE_ASPECT_PLANE_0_BIT
for the G plane,IMAGE_ASPECT_PLANE_1_BIT
for the B plane, andIMAGE_ASPECT_PLANE_2_BIT
for the R plane.
See Also
VkAttachmentDescription
,VkAttachmentDescription2KHR
,VkBufferViewCreateInfo
,VkFramebufferAttachmentImageInfoKHR
,VkGeometryTrianglesNV
,VkImageCreateInfo
,VkImageFormatListCreateInfoKHR
,VkImageViewASTCDecodeModeEXT
,VkImageViewCreateInfo
,VkPhysicalDeviceImageFormatInfo2
,VkPhysicalDeviceSparseImageFormatInfo2
,VkSamplerYcbcrConversionCreateInfo
,VkSurfaceFormatKHR
,VkSwapchainCreateInfoKHR
,VkVertexInputAttributeDescription
,GetPhysicalDeviceExternalImageFormatPropertiesNV
,GetPhysicalDeviceFormatProperties
,GetPhysicalDeviceFormatProperties2
,GetPhysicalDeviceFormatProperties2KHR
,GetPhysicalDeviceImageFormatProperties
,GetPhysicalDeviceSparseImageFormatProperties
-
VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT, VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT, VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT, VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT, VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT, VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT, VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT, VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT, VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_FORMAT_FEATURE_BLIT_SRC_BIT, VK_FORMAT_FEATURE_BLIT_DST_BIT, VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
VkFormatFeatureFlagBits - Bitmask specifying features supported by a bufferDescription
The following bits may be set in
linearTilingFeatures
,optimalTilingFeatures
, anddrmFormatModifierTilingFeatures
, specifying that the features are supported by images or image views created with the queriedGetPhysicalDeviceFormatProperties
::format
:FORMAT_FEATURE_SAMPLED_IMAGE_BIT
specifies that an image view can be sampled from.FORMAT_FEATURE_STORAGE_IMAGE_BIT
specifies that an image view can be used as a storage images.FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
specifies that an image view can be used as storage image that supports atomic operations.FORMAT_FEATURE_COLOR_ATTACHMENT_BIT
specifies that an image view can be used as a framebuffer color attachment and as an input attachment.FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT
specifies that an image view can be used as a framebuffer color attachment that supports blending and as an input attachment.FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT
specifies that an image view can be used as a framebuffer depth/stencil attachment and as an input attachment.FORMAT_FEATURE_BLIT_SRC_BIT
specifies that an image can be used assrcImage
for thevkCmdBlitImage
command.FORMAT_FEATURE_BLIT_DST_BIT
specifies that an image can be used asdstImage
for thevkCmdBlitImage
command.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
specifies that ifFORMAT_FEATURE_SAMPLED_IMAGE_BIT
is also set, an image view can be used with a sampler that has either ofmagFilter
orminFilter
set toFILTER_LINEAR
, ormipmapMode
set toSAMPLER_MIPMAP_MODE_LINEAR
. IfFORMAT_FEATURE_BLIT_SRC_BIT
is also set, an image can be used as thesrcImage
toCmdBlitImage
with afilter
ofFILTER_LINEAR
. This bit must only be exposed for formats that also support theFORMAT_FEATURE_SAMPLED_IMAGE_BIT
orFORMAT_FEATURE_BLIT_SRC_BIT
. If the format being queried is a depth/stencil format, this bit only specifies that the depth aspect (not the stencil aspect) of an image of this format supports linear filtering, and that linear filtering of the depth aspect is supported whether depth compare is enabled in the sampler or not. If this bit is not present, linear filtering with depth compare disabled is unsupported and linear filtering with depth compare enabled is supported, but may compute the filtered value in an implementation-dependent manner which differs from the normal rules of linear filtering. The resulting value must be in the range[0,1]
and should be proportional to, or a weighted average of, the number of comparison passes or failures.FORMAT_FEATURE_TRANSFER_SRC_BIT
specifies that an image can be used as a source image for copy commands.FORMAT_FEATURE_TRANSFER_DST_BIT
specifies that an image can be used as a destination image for copy commands and clear commands.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT
specifiesVkImage
can be used as a sampled image with a min or maxVkSamplerReductionModeEXT
. This bit must only be exposed for formats that also support theFORMAT_FEATURE_SAMPLED_IMAGE_BIT
.FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
specifies thatVkImage
can be used with a sampler that has either ofmagFilter
orminFilter
set toFILTER_CUBIC_EXT
, or be the source image for a blit withfilter
set toFILTER_CUBIC_EXT
. This bit must only be exposed for formats that also support theFORMAT_FEATURE_SAMPLED_IMAGE_BIT
. If the format being queried is a depth/stencil format, this only specifies that the depth aspect is cubic filterable.FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT
specifies that an application can define a sampler Y’CBCR conversion using this format as a source, and that an image of this format can be used with aVkSamplerYcbcrConversionCreateInfo
xChromaOffset
and/oryChromaOffset
ofCHROMA_LOCATION_MIDPOINT
. Otherwise bothxChromaOffset
andyChromaOffset
must beCHROMA_LOCATION_COSITED_EVEN
. If a format does not incorporate chroma downsampling (it is not a “422” or “420” format) but the implementation supports sampler Y’CBCR conversion for this format, the implementation must setFORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT
.FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT
specifies that an application can define a sampler Y’CBCR conversion using this format as a source, and that an image of this format can be used with aVkSamplerYcbcrConversionCreateInfo
xChromaOffset
and/oryChromaOffset
ofCHROMA_LOCATION_COSITED_EVEN
. Otherwise bothxChromaOffset
andyChromaOffset
must beCHROMA_LOCATION_MIDPOINT
. If neitherFORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT
norFORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT
is set, the application must not define a sampler Y’CBCR conversion using this format as a source.FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT
specifies that the format can do linear sampler filtering (min/magFilter) whilst sampler Y’CBCR conversion is enabled.FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT
specifies that the format can have different chroma, min, and mag filters.FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT
specifies that reconstruction is explicit, as described in Chroma Reconstruction. If this bit is not present, reconstruction is implicit by default.FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT
specifies that reconstruction can be forcibly made explicit by settingVkSamplerYcbcrConversionCreateInfo
::forceExplicitReconstruction
toTRUE
.FORMAT_FEATURE_DISJOINT_BIT
specifies that a multi-planar image can have theIMAGE_CREATE_DISJOINT_BIT
set during image creation. An implementation must not setFORMAT_FEATURE_DISJOINT_BIT
for single-plane formats.FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT
specifies that an image view can be used as a fragment density map attachment.
The following bits may be set in
bufferFeatures
, specifying that the features are supported by buffers or buffer views created with the queriedGetPhysicalDeviceProperties
::format
:FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT
specifies that the format can be used to create a buffer view that can be bound to aDESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
descriptor.FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT
specifies that the format can be used to create a buffer view that can be bound to aDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
descriptor.FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT
specifies that atomic operations are supported onDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
with this format.FORMAT_FEATURE_VERTEX_BUFFER_BIT
specifies that the format can be used as a vertex attribute format (VkVertexInputAttributeDescription
::format
).
See Also
VkFormatFeatureFlags
-
VK_IMAGE_TYPE_1D, VK_IMAGE_TYPE_2D, VK_IMAGE_TYPE_3D
VkImageType - Specifies the type of an image objectDescription
IMAGE_TYPE_1D
specifies a one-dimensional image.IMAGE_TYPE_2D
specifies a two-dimensional image.IMAGE_TYPE_3D
specifies a three-dimensional image.
See Also
VkImageCreateInfo
,VkPhysicalDeviceImageFormatInfo2
,VkPhysicalDeviceSparseImageFormatInfo2
,GetPhysicalDeviceExternalImageFormatPropertiesNV
,GetPhysicalDeviceImageFormatProperties
,GetPhysicalDeviceSparseImageFormatProperties
-
VK_IMAGE_TILING_OPTIMAL, VK_IMAGE_TILING_LINEAR
VkImageTiling - Specifies the tiling arrangement of data in an imageDescription
IMAGE_TILING_OPTIMAL
specifies optimal tiling (texels are laid out in an implementation-dependent arrangement, for more optimal memory access).IMAGE_TILING_LINEAR
specifies linear tiling (texels are laid out in memory in row-major order, possibly with some padding on each row).IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
indicates that the image’s tiling is defined by a Linux DRM format modifier. The modifier is specified at image creation withVkImageDrmFormatModifierListCreateInfoEXT
orVkImageDrmFormatModifierExplicitCreateInfoEXT
, and can be queried withGetImageDrmFormatModifierPropertiesEXT
.
See Also
VkImageCreateInfo
,VkPhysicalDeviceImageFormatInfo2
,VkPhysicalDeviceSparseImageFormatInfo2
,GetPhysicalDeviceExternalImageFormatPropertiesNV
,GetPhysicalDeviceImageFormatProperties
,GetPhysicalDeviceSparseImageFormatProperties
-
VK_IMAGE_USAGE_TRANSFER_SRC_BIT, VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_USAGE_SAMPLED_BIT, VK_IMAGE_USAGE_STORAGE_BIT, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT
VkImageUsageFlagBits - Bitmask specifying intended usage of an imageDescription
IMAGE_USAGE_TRANSFER_SRC_BIT
specifies that the image can be used as the source of a transfer command.IMAGE_USAGE_TRANSFER_DST_BIT
specifies that the image can be used as the destination of a transfer command.IMAGE_USAGE_SAMPLED_BIT
specifies that the image can be used to create aVkImageView
suitable for occupying aVkDescriptorSet
slot either of typeDESCRIPTOR_TYPE_SAMPLED_IMAGE
orDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
, and be sampled by a shader.IMAGE_USAGE_STORAGE_BIT
specifies that the image can be used to create aVkImageView
suitable for occupying aVkDescriptorSet
slot of typeDESCRIPTOR_TYPE_STORAGE_IMAGE
.IMAGE_USAGE_COLOR_ATTACHMENT_BIT
specifies that the image can be used to create aVkImageView
suitable for use as a color or resolve attachment in aVkFramebuffer
.IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
specifies that the image can be used to create aVkImageView
suitable for use as a depth/stencil or depth/stencil resolve attachment in aVkFramebuffer
.IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
specifies that the memory bound to this image will have been allocated with theMEMORY_PROPERTY_LAZILY_ALLOCATED_BIT
(see Memory Allocation for more detail). This bit can be set for any image that can be used to create aVkImageView
suitable for use as a color, resolve, depth/stencil, or input attachment.IMAGE_USAGE_INPUT_ATTACHMENT_BIT
specifies that the image can be used to create aVkImageView
suitable for occupyingVkDescriptorSet
slot of typeDESCRIPTOR_TYPE_INPUT_ATTACHMENT
; be read from a shader as an input attachment; and be used as an input attachment in a framebuffer.IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
specifies that the image can be used to create aVkImageView
suitable for use as a shading rate image.IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
specifies that the image can be used to create aVkImageView
suitable for use as a fragment density map image.
See Also
VkImageUsageFlags
-
VK_IMAGE_CREATE_SPARSE_BINDING_BIT
VkImageCreateFlagBits - Bitmask specifying additional parameters of an imageDescription
IMAGE_CREATE_SPARSE_BINDING_BIT
specifies that the image will be backed using sparse memory binding.IMAGE_CREATE_SPARSE_RESIDENCY_BIT
specifies that the image can be partially backed using sparse memory binding. Images created with this flag must also be created with theIMAGE_CREATE_SPARSE_BINDING_BIT
flag.IMAGE_CREATE_SPARSE_ALIASED_BIT
specifies that the image will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another image (or another portion of the same image). Images created with this flag must also be created with theIMAGE_CREATE_SPARSE_BINDING_BIT
flagIMAGE_CREATE_MUTABLE_FORMAT_BIT
specifies that the image can be used to create aVkImageView
with a different format from the image. For multi-planar formats,IMAGE_CREATE_MUTABLE_FORMAT_BIT
specifies that aVkImageView
can be created of a plane of the image.IMAGE_CREATE_CUBE_COMPATIBLE_BIT
specifies that the image can be used to create aVkImageView
of typeIMAGE_VIEW_TYPE_CUBE
orIMAGE_VIEW_TYPE_CUBE_ARRAY
.IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT
specifies that the image can be used to create aVkImageView
of typeIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
.IMAGE_CREATE_PROTECTED_BIT
specifies that the image is a protected image.IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT
specifies that the image can be used with a non-zero value of thesplitInstanceBindRegionCount
member of aVkBindImageMemoryDeviceGroupInfo
structure passed intoBindImageMemory2
. This flag also has the effect of making the image use the standard sparse image block dimensions.IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT
specifies that the image having a compressed format can be used to create aVkImageView
with an uncompressed format where each texel in the image view corresponds to a compressed texel block of the image.IMAGE_CREATE_EXTENDED_USAGE_BIT
specifies that the image can be created with usage flags that are not supported for the format the image is created with but are supported for at least one format aVkImageView
created from the image can have.IMAGE_CREATE_DISJOINT_BIT
specifies that an image with a multi-planar format must have each plane separately bound to memory, rather than having a single memory binding for the whole image; the presence of this bit distinguishes a disjoint image from an image without this bit set.IMAGE_CREATE_ALIAS_BIT
specifies that two images created with the same creation parameters and aliased to the same memory can interpret the contents of the memory consistently with each other, subject to the rules described in the Memory Aliasing section. This flag further specifies that each plane of a disjoint image can share an in-memory non-linear representation with single-plane images, and that a single-plane image can share an in-memory non-linear representation with a plane of a multi-planar disjoint image, according to the rules in Compatible formats of planes of multi-planar formats. If thepNext
chain includes aVkExternalMemoryImageCreateInfo
orVkExternalMemoryImageCreateInfoNV
structure whosehandleTypes
member is not 0, it is as ifIMAGE_CREATE_ALIAS_BIT
is set.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
specifies that an image with a depth or depth/stencil format can be used with custom sample locations when used as a depth/stencil attachment.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV
specifies that the image is a corner-sampled image.IMAGE_CREATE_SUBSAMPLED_BIT_EXT
specifies that an image can be in a subsampled format which may be more optimal when written as an attachment by a render pass that has a fragment density map attachment. Accessing a subsampled image has additional considerations:- Image data read as an image sampler is undefined if the sampler was not created with
flags
containingSAMPLER_CREATE_SUBSAMPLED_BIT_EXT
or was not sampled through the use of a combined image sampler with an immutable sampler inVkDescriptorSetLayoutBinding
. - Image data read with an input attachment is undefined if the contents were not written as an attachment in an earlier subpass of the same render pass.
- Image data read with load operations may be resampled to the fragment density of the render pass.
- Image contents outside of the render area become undefined if the image is stored as a render pass attachment.
- Image data read as an image sampler is undefined if the sampler was not created with
See Sparse Resource Features and Sparse Physical Device Features for more details.
See Also
VkImageCreateFlags
- See Also:
- Constant Field Values
-
VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT
VkImageCreateFlagBits - Bitmask specifying additional parameters of an imageDescription
IMAGE_CREATE_SPARSE_BINDING_BIT
specifies that the image will be backed using sparse memory binding.IMAGE_CREATE_SPARSE_RESIDENCY_BIT
specifies that the image can be partially backed using sparse memory binding. Images created with this flag must also be created with theIMAGE_CREATE_SPARSE_BINDING_BIT
flag.IMAGE_CREATE_SPARSE_ALIASED_BIT
specifies that the image will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another image (or another portion of the same image). Images created with this flag must also be created with theIMAGE_CREATE_SPARSE_BINDING_BIT
flagIMAGE_CREATE_MUTABLE_FORMAT_BIT
specifies that the image can be used to create aVkImageView
with a different format from the image. For multi-planar formats,IMAGE_CREATE_MUTABLE_FORMAT_BIT
specifies that aVkImageView
can be created of a plane of the image.IMAGE_CREATE_CUBE_COMPATIBLE_BIT
specifies that the image can be used to create aVkImageView
of typeIMAGE_VIEW_TYPE_CUBE
orIMAGE_VIEW_TYPE_CUBE_ARRAY
.IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT
specifies that the image can be used to create aVkImageView
of typeIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
.IMAGE_CREATE_PROTECTED_BIT
specifies that the image is a protected image.IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT
specifies that the image can be used with a non-zero value of thesplitInstanceBindRegionCount
member of aVkBindImageMemoryDeviceGroupInfo
structure passed intoBindImageMemory2
. This flag also has the effect of making the image use the standard sparse image block dimensions.IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT
specifies that the image having a compressed format can be used to create aVkImageView
with an uncompressed format where each texel in the image view corresponds to a compressed texel block of the image.IMAGE_CREATE_EXTENDED_USAGE_BIT
specifies that the image can be created with usage flags that are not supported for the format the image is created with but are supported for at least one format aVkImageView
created from the image can have.IMAGE_CREATE_DISJOINT_BIT
specifies that an image with a multi-planar format must have each plane separately bound to memory, rather than having a single memory binding for the whole image; the presence of this bit distinguishes a disjoint image from an image without this bit set.IMAGE_CREATE_ALIAS_BIT
specifies that two images created with the same creation parameters and aliased to the same memory can interpret the contents of the memory consistently with each other, subject to the rules described in the Memory Aliasing section. This flag further specifies that each plane of a disjoint image can share an in-memory non-linear representation with single-plane images, and that a single-plane image can share an in-memory non-linear representation with a plane of a multi-planar disjoint image, according to the rules in Compatible formats of planes of multi-planar formats. If thepNext
chain includes aVkExternalMemoryImageCreateInfo
orVkExternalMemoryImageCreateInfoNV
structure whosehandleTypes
member is not 0, it is as ifIMAGE_CREATE_ALIAS_BIT
is set.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
specifies that an image with a depth or depth/stencil format can be used with custom sample locations when used as a depth/stencil attachment.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV
specifies that the image is a corner-sampled image.IMAGE_CREATE_SUBSAMPLED_BIT_EXT
specifies that an image can be in a subsampled format which may be more optimal when written as an attachment by a render pass that has a fragment density map attachment. Accessing a subsampled image has additional considerations:- Image data read as an image sampler is undefined if the sampler was not created with
flags
containingSAMPLER_CREATE_SUBSAMPLED_BIT_EXT
or was not sampled through the use of a combined image sampler with an immutable sampler inVkDescriptorSetLayoutBinding
. - Image data read with an input attachment is undefined if the contents were not written as an attachment in an earlier subpass of the same render pass.
- Image data read with load operations may be resampled to the fragment density of the render pass.
- Image contents outside of the render area become undefined if the image is stored as a render pass attachment.
- Image data read as an image sampler is undefined if the sampler was not created with
See Sparse Resource Features and Sparse Physical Device Features for more details.
See Also
VkImageCreateFlags
- See Also:
- Constant Field Values
-
VK_IMAGE_CREATE_SPARSE_ALIASED_BIT
VkImageCreateFlagBits - Bitmask specifying additional parameters of an imageDescription
IMAGE_CREATE_SPARSE_BINDING_BIT
specifies that the image will be backed using sparse memory binding.IMAGE_CREATE_SPARSE_RESIDENCY_BIT
specifies that the image can be partially backed using sparse memory binding. Images created with this flag must also be created with theIMAGE_CREATE_SPARSE_BINDING_BIT
flag.IMAGE_CREATE_SPARSE_ALIASED_BIT
specifies that the image will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another image (or another portion of the same image). Images created with this flag must also be created with theIMAGE_CREATE_SPARSE_BINDING_BIT
flagIMAGE_CREATE_MUTABLE_FORMAT_BIT
specifies that the image can be used to create aVkImageView
with a different format from the image. For multi-planar formats,IMAGE_CREATE_MUTABLE_FORMAT_BIT
specifies that aVkImageView
can be created of a plane of the image.IMAGE_CREATE_CUBE_COMPATIBLE_BIT
specifies that the image can be used to create aVkImageView
of typeIMAGE_VIEW_TYPE_CUBE
orIMAGE_VIEW_TYPE_CUBE_ARRAY
.IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT
specifies that the image can be used to create aVkImageView
of typeIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
.IMAGE_CREATE_PROTECTED_BIT
specifies that the image is a protected image.IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT
specifies that the image can be used with a non-zero value of thesplitInstanceBindRegionCount
member of aVkBindImageMemoryDeviceGroupInfo
structure passed intoBindImageMemory2
. This flag also has the effect of making the image use the standard sparse image block dimensions.IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT
specifies that the image having a compressed format can be used to create aVkImageView
with an uncompressed format where each texel in the image view corresponds to a compressed texel block of the image.IMAGE_CREATE_EXTENDED_USAGE_BIT
specifies that the image can be created with usage flags that are not supported for the format the image is created with but are supported for at least one format aVkImageView
created from the image can have.IMAGE_CREATE_DISJOINT_BIT
specifies that an image with a multi-planar format must have each plane separately bound to memory, rather than having a single memory binding for the whole image; the presence of this bit distinguishes a disjoint image from an image without this bit set.IMAGE_CREATE_ALIAS_BIT
specifies that two images created with the same creation parameters and aliased to the same memory can interpret the contents of the memory consistently with each other, subject to the rules described in the Memory Aliasing section. This flag further specifies that each plane of a disjoint image can share an in-memory non-linear representation with single-plane images, and that a single-plane image can share an in-memory non-linear representation with a plane of a multi-planar disjoint image, according to the rules in Compatible formats of planes of multi-planar formats. If thepNext
chain includes aVkExternalMemoryImageCreateInfo
orVkExternalMemoryImageCreateInfoNV
structure whosehandleTypes
member is not 0, it is as ifIMAGE_CREATE_ALIAS_BIT
is set.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
specifies that an image with a depth or depth/stencil format can be used with custom sample locations when used as a depth/stencil attachment.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV
specifies that the image is a corner-sampled image.IMAGE_CREATE_SUBSAMPLED_BIT_EXT
specifies that an image can be in a subsampled format which may be more optimal when written as an attachment by a render pass that has a fragment density map attachment. Accessing a subsampled image has additional considerations:- Image data read as an image sampler is undefined if the sampler was not created with
flags
containingSAMPLER_CREATE_SUBSAMPLED_BIT_EXT
or was not sampled through the use of a combined image sampler with an immutable sampler inVkDescriptorSetLayoutBinding
. - Image data read with an input attachment is undefined if the contents were not written as an attachment in an earlier subpass of the same render pass.
- Image data read with load operations may be resampled to the fragment density of the render pass.
- Image contents outside of the render area become undefined if the image is stored as a render pass attachment.
- Image data read as an image sampler is undefined if the sampler was not created with
See Sparse Resource Features and Sparse Physical Device Features for more details.
See Also
VkImageCreateFlags
- See Also:
- Constant Field Values
-
VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT
VkImageCreateFlagBits - Bitmask specifying additional parameters of an imageDescription
IMAGE_CREATE_SPARSE_BINDING_BIT
specifies that the image will be backed using sparse memory binding.IMAGE_CREATE_SPARSE_RESIDENCY_BIT
specifies that the image can be partially backed using sparse memory binding. Images created with this flag must also be created with theIMAGE_CREATE_SPARSE_BINDING_BIT
flag.IMAGE_CREATE_SPARSE_ALIASED_BIT
specifies that the image will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another image (or another portion of the same image). Images created with this flag must also be created with theIMAGE_CREATE_SPARSE_BINDING_BIT
flagIMAGE_CREATE_MUTABLE_FORMAT_BIT
specifies that the image can be used to create aVkImageView
with a different format from the image. For multi-planar formats,IMAGE_CREATE_MUTABLE_FORMAT_BIT
specifies that aVkImageView
can be created of a plane of the image.IMAGE_CREATE_CUBE_COMPATIBLE_BIT
specifies that the image can be used to create aVkImageView
of typeIMAGE_VIEW_TYPE_CUBE
orIMAGE_VIEW_TYPE_CUBE_ARRAY
.IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT
specifies that the image can be used to create aVkImageView
of typeIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
.IMAGE_CREATE_PROTECTED_BIT
specifies that the image is a protected image.IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT
specifies that the image can be used with a non-zero value of thesplitInstanceBindRegionCount
member of aVkBindImageMemoryDeviceGroupInfo
structure passed intoBindImageMemory2
. This flag also has the effect of making the image use the standard sparse image block dimensions.IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT
specifies that the image having a compressed format can be used to create aVkImageView
with an uncompressed format where each texel in the image view corresponds to a compressed texel block of the image.IMAGE_CREATE_EXTENDED_USAGE_BIT
specifies that the image can be created with usage flags that are not supported for the format the image is created with but are supported for at least one format aVkImageView
created from the image can have.IMAGE_CREATE_DISJOINT_BIT
specifies that an image with a multi-planar format must have each plane separately bound to memory, rather than having a single memory binding for the whole image; the presence of this bit distinguishes a disjoint image from an image without this bit set.IMAGE_CREATE_ALIAS_BIT
specifies that two images created with the same creation parameters and aliased to the same memory can interpret the contents of the memory consistently with each other, subject to the rules described in the Memory Aliasing section. This flag further specifies that each plane of a disjoint image can share an in-memory non-linear representation with single-plane images, and that a single-plane image can share an in-memory non-linear representation with a plane of a multi-planar disjoint image, according to the rules in Compatible formats of planes of multi-planar formats. If thepNext
chain includes aVkExternalMemoryImageCreateInfo
orVkExternalMemoryImageCreateInfoNV
structure whosehandleTypes
member is not 0, it is as ifIMAGE_CREATE_ALIAS_BIT
is set.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
specifies that an image with a depth or depth/stencil format can be used with custom sample locations when used as a depth/stencil attachment.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV
specifies that the image is a corner-sampled image.IMAGE_CREATE_SUBSAMPLED_BIT_EXT
specifies that an image can be in a subsampled format which may be more optimal when written as an attachment by a render pass that has a fragment density map attachment. Accessing a subsampled image has additional considerations:- Image data read as an image sampler is undefined if the sampler was not created with
flags
containingSAMPLER_CREATE_SUBSAMPLED_BIT_EXT
or was not sampled through the use of a combined image sampler with an immutable sampler inVkDescriptorSetLayoutBinding
. - Image data read with an input attachment is undefined if the contents were not written as an attachment in an earlier subpass of the same render pass.
- Image data read with load operations may be resampled to the fragment density of the render pass.
- Image contents outside of the render area become undefined if the image is stored as a render pass attachment.
- Image data read as an image sampler is undefined if the sampler was not created with
See Sparse Resource Features and Sparse Physical Device Features for more details.
See Also
VkImageCreateFlags
- See Also:
- Constant Field Values
-
VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT
VkImageCreateFlagBits - Bitmask specifying additional parameters of an imageDescription
IMAGE_CREATE_SPARSE_BINDING_BIT
specifies that the image will be backed using sparse memory binding.IMAGE_CREATE_SPARSE_RESIDENCY_BIT
specifies that the image can be partially backed using sparse memory binding. Images created with this flag must also be created with theIMAGE_CREATE_SPARSE_BINDING_BIT
flag.IMAGE_CREATE_SPARSE_ALIASED_BIT
specifies that the image will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another image (or another portion of the same image). Images created with this flag must also be created with theIMAGE_CREATE_SPARSE_BINDING_BIT
flagIMAGE_CREATE_MUTABLE_FORMAT_BIT
specifies that the image can be used to create aVkImageView
with a different format from the image. For multi-planar formats,IMAGE_CREATE_MUTABLE_FORMAT_BIT
specifies that aVkImageView
can be created of a plane of the image.IMAGE_CREATE_CUBE_COMPATIBLE_BIT
specifies that the image can be used to create aVkImageView
of typeIMAGE_VIEW_TYPE_CUBE
orIMAGE_VIEW_TYPE_CUBE_ARRAY
.IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT
specifies that the image can be used to create aVkImageView
of typeIMAGE_VIEW_TYPE_2D
orIMAGE_VIEW_TYPE_2D_ARRAY
.IMAGE_CREATE_PROTECTED_BIT
specifies that the image is a protected image.IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT
specifies that the image can be used with a non-zero value of thesplitInstanceBindRegionCount
member of aVkBindImageMemoryDeviceGroupInfo
structure passed intoBindImageMemory2
. This flag also has the effect of making the image use the standard sparse image block dimensions.IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT
specifies that the image having a compressed format can be used to create aVkImageView
with an uncompressed format where each texel in the image view corresponds to a compressed texel block of the image.IMAGE_CREATE_EXTENDED_USAGE_BIT
specifies that the image can be created with usage flags that are not supported for the format the image is created with but are supported for at least one format aVkImageView
created from the image can have.IMAGE_CREATE_DISJOINT_BIT
specifies that an image with a multi-planar format must have each plane separately bound to memory, rather than having a single memory binding for the whole image; the presence of this bit distinguishes a disjoint image from an image without this bit set.IMAGE_CREATE_ALIAS_BIT
specifies that two images created with the same creation parameters and aliased to the same memory can interpret the contents of the memory consistently with each other, subject to the rules described in the Memory Aliasing section. This flag further specifies that each plane of a disjoint image can share an in-memory non-linear representation with single-plane images, and that a single-plane image can share an in-memory non-linear representation with a plane of a multi-planar disjoint image, according to the rules in Compatible formats of planes of multi-planar formats. If thepNext
chain includes aVkExternalMemoryImageCreateInfo
orVkExternalMemoryImageCreateInfoNV
structure whosehandleTypes
member is not 0, it is as ifIMAGE_CREATE_ALIAS_BIT
is set.IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
specifies that an image with a depth or depth/stencil format can be used with custom sample locations when used as a depth/stencil attachment.IMAGE_CREATE_CORNER_SAMPLED_BIT_NV
specifies that the image is a corner-sampled image.IMAGE_CREATE_SUBSAMPLED_BIT_EXT
specifies that an image can be in a subsampled format which may be more optimal when written as an attachment by a render pass that has a fragment density map attachment. Accessing a subsampled image has additional considerations:- Image data read as an image sampler is undefined if the sampler was not created with
flags
containingSAMPLER_CREATE_SUBSAMPLED_BIT_EXT
or was not sampled through the use of a combined image sampler with an immutable sampler inVkDescriptorSetLayoutBinding
. - Image data read with an input attachment is undefined if the contents were not written as an attachment in an earlier subpass of the same render pass.
- Image data read with load operations may be resampled to the fragment density of the render pass.
- Image contents outside of the render area become undefined if the image is stored as a render pass attachment.
- Image data read as an image sampler is undefined if the sampler was not created with
See Sparse Resource Features and Sparse Physical Device Features for more details.
See Also
VkImageCreateFlags
- See Also:
- Constant Field Values
-
VK_SAMPLE_COUNT_1_BIT, VK_SAMPLE_COUNT_2_BIT, VK_SAMPLE_COUNT_4_BIT, VK_SAMPLE_COUNT_8_BIT, VK_SAMPLE_COUNT_16_BIT, VK_SAMPLE_COUNT_32_BIT, VK_SAMPLE_COUNT_64_BIT
VkSampleCountFlagBits - Bitmask specifying sample counts supported for an image used for storage operationsDescription
SAMPLE_COUNT_1_BIT
specifies an image with one sample per pixel.SAMPLE_COUNT_2_BIT
specifies an image with 2 samples per pixel.SAMPLE_COUNT_4_BIT
specifies an image with 4 samples per pixel.SAMPLE_COUNT_8_BIT
specifies an image with 8 samples per pixel.SAMPLE_COUNT_16_BIT
specifies an image with 16 samples per pixel.SAMPLE_COUNT_32_BIT
specifies an image with 32 samples per pixel.SAMPLE_COUNT_64_BIT
specifies an image with 64 samples per pixel.
See Also
VkAttachmentDescription
,VkAttachmentDescription2KHR
,VkFramebufferMixedSamplesCombinationNV
,VkImageCreateInfo
,VkPhysicalDeviceSparseImageFormatInfo2
,VkPipelineMultisampleStateCreateInfo
,VkSampleCountFlags
,VkSampleLocationsInfoEXT
,GetPhysicalDeviceMultisamplePropertiesEXT
,GetPhysicalDeviceSparseImageFormatProperties
-
VK_PHYSICAL_DEVICE_TYPE_OTHER, VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU, VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU, VK_PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU, VK_PHYSICAL_DEVICE_TYPE_CPU
VkPhysicalDeviceType - Supported physical device typesDescription
PHYSICAL_DEVICE_TYPE_OTHER
- the device does not match any other available types.PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
- the device is typically one embedded in or tightly coupled with the host.PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
- the device is typically a separate processor connected to the host via an interlink.PHYSICAL_DEVICE_TYPE_VIRTUAL_GPU
- the device is typically a virtual node in a virtualization environment.PHYSICAL_DEVICE_TYPE_CPU
- the device is typically running on the same processors as the host.
The physical device type is advertised for informational purposes only, and does not directly affect the operation of the system. However, the device type may correlate with other advertised properties or capabilities of the system, such as how many memory heaps there are.
See Also
-
VK_QUEUE_GRAPHICS_BIT, VK_QUEUE_COMPUTE_BIT, VK_QUEUE_TRANSFER_BIT, VK_QUEUE_SPARSE_BINDING_BIT
VkQueueFlagBits - Bitmask specifying capabilities of queues in a queue familyDescription
QUEUE_GRAPHICS_BIT
specifies that queues in this queue family support graphics operations.QUEUE_COMPUTE_BIT
specifies that queues in this queue family support compute operations.QUEUE_TRANSFER_BIT
specifies that queues in this queue family support transfer operations.QUEUE_SPARSE_BINDING_BIT
specifies that queues in this queue family support sparse memory management operations (see Sparse Resources). If any of the sparse resource features are enabled, then at least one queue family must support this bit.- if
QUEUE_PROTECTED_BIT
is set, then the queues in this queue family support theDEVICE_QUEUE_CREATE_PROTECTED_BIT
bit. (see Protected Memory). If the protected memory physical device feature is supported, then at least one queue family of at least one physical device exposed by the implementation must support this bit.
If an implementation exposes any queue family that supports graphics operations, at least one queue family of at least one physical device exposed by the implementation must support both graphics and compute operations.
Furthermore, if the protected memory physical device feature is supported, then at least one queue family of at least one physical device exposed by the implementation must support graphics operations, compute operations, and protected memory operations.
Note
All commands that are allowed on a queue that supports transfer operations are also allowed on a queue that supports either graphics or compute operations. Thus, if the capabilities of a queue family include
QUEUE_GRAPHICS_BIT
orQUEUE_COMPUTE_BIT
, then reporting theQUEUE_TRANSFER_BIT
capability separately for that queue family is optional:.For further details see Queues.
See Also
VkQueueFlags
-
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, VK_MEMORY_PROPERTY_HOST_CACHED_BIT, VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT
VkMemoryPropertyFlagBits - Bitmask specifying properties for a memory typeDescription
MEMORY_PROPERTY_DEVICE_LOCAL_BIT
bit specifies that memory allocated with this type is the most efficient for device access. This property will be set if and only if the memory type belongs to a heap with theMEMORY_HEAP_DEVICE_LOCAL_BIT
set.MEMORY_PROPERTY_HOST_VISIBLE_BIT
bit specifies that memory allocated with this type can be mapped for host access usingMapMemory
.MEMORY_PROPERTY_HOST_COHERENT_BIT
bit specifies that the host cache management commandsFlushMappedMemoryRanges
andInvalidateMappedMemoryRanges
are not needed to flush host writes to the device or make device writes visible to the host, respectively.MEMORY_PROPERTY_HOST_CACHED_BIT
bit specifies that memory allocated with this type is cached on the host. Host memory accesses to uncached memory are slower than to cached memory, however uncached memory is always host coherent.MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT
bit specifies that the memory type only allows device access to the memory. Memory types must not have bothMEMORY_PROPERTY_LAZILY_ALLOCATED_BIT
andMEMORY_PROPERTY_HOST_VISIBLE_BIT
set. Additionally, the object’s backing memory may be provided by the implementation lazily as specified in Lazily Allocated Memory.MEMORY_PROPERTY_PROTECTED_BIT
bit specifies that the memory type only allows device access to the memory, and allows protected queue operations to access the memory. Memory types must not haveMEMORY_PROPERTY_PROTECTED_BIT
set and any ofMEMORY_PROPERTY_HOST_VISIBLE_BIT
set, orMEMORY_PROPERTY_HOST_COHERENT_BIT
set, orMEMORY_PROPERTY_HOST_CACHED_BIT
set.MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD
bit specifies that device accesses to allocations of this memory type are automatically made available and visible.MEMORY_PROPERTY_DEVICE_UNCACHED_BIT_AMD
bit specifies that memory allocated with this type is not cached on the device. Uncached device memory is always device coherent.
For any memory allocated with both the
MEMORY_PROPERTY_HOST_COHERENT_BIT
and theMEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD
, host or device accesses also perform automatic memory domain transfer operations, such that writes are always automatically available and visible to both host and device memory domains.Note
Device coherence is a useful property for certain debugging use cases (e.g. crash analysis, where performing separate coherence actions could mean values are not reported correctly). However, device coherent accesses may be slower than equivalent accesses without device coherence, particularly if they are also device uncached. For device uncached memory in particular, repeated accesses to the same or neighbouring memory locations over a short time period (e.g. within a frame) may be slower than it would be for the equivalent cached memory type. As such, it's generally inadvisable to use device coherent or device uncached memory except when really needed.
See Also
VkMemoryPropertyFlags
-
VK_MEMORY_HEAP_DEVICE_LOCAL_BIT
VkMemoryHeapFlagBits - Bitmask specifying attribute flags for a heapDescription
MEMORY_HEAP_DEVICE_LOCAL_BIT
specifies that the heap corresponds to device local memory. Device local memory may have different performance characteristics than host local memory, and may support different memory property flags.MEMORY_HEAP_MULTI_INSTANCE_BIT
specifies that in a logical device representing more than one physical device, there is a per-physical device instance of the heap memory. By default, an allocation from such a heap will be replicated to each physical device’s instance of the heap.
See Also
VkMemoryHeapFlags
-
VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT, VK_PIPELINE_STAGE_VERTEX_INPUT_BIT, VK_PIPELINE_STAGE_VERTEX_SHADER_BIT, VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT, VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT, VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT
VkPipelineStageFlagBits - Bitmask specifying pipeline stagesDescription
PIPELINE_STAGE_TOP_OF_PIPE_BIT
specifies the stage of the pipeline where any commands are initially received by the queue.PIPELINE_STAGE_DRAW_INDIRECT_BIT
specifies the stage of the pipeline where Draw/DispatchIndirect data structures are consumed. This stage also includes reading commands written byCmdProcessCommandsNVX
.PIPELINE_STAGE_TASK_SHADER_BIT_NV
specifies the task shader stage.PIPELINE_STAGE_MESH_SHADER_BIT_NV
specifies the mesh shader stage.PIPELINE_STAGE_VERTEX_INPUT_BIT
specifies the stage of the pipeline where vertex and index buffers are consumed.PIPELINE_STAGE_VERTEX_SHADER_BIT
specifies the vertex shader stage.PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT
specifies the tessellation control shader stage.PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT
specifies the tessellation evaluation shader stage.PIPELINE_STAGE_GEOMETRY_SHADER_BIT
specifies the geometry shader stage.PIPELINE_STAGE_FRAGMENT_SHADER_BIT
specifies the fragment shader stage.PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT
specifies the stage of the pipeline where early fragment tests (depth and stencil tests before fragment shading) are performed. This stage also includes subpass load operations for framebuffer attachments with a depth/stencil format.PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT
specifies the stage of the pipeline where late fragment tests (depth and stencil tests after fragment shading) are performed. This stage also includes subpass store operations for framebuffer attachments with a depth/stencil format.PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT
specifies the stage of the pipeline after blending where the final color values are output from the pipeline. This stage also includes subpass load and store operations and multisample resolve operations for framebuffer attachments with a color or depth/stencil format.PIPELINE_STAGE_COMPUTE_SHADER_BIT
specifies the execution of a compute shader.PIPELINE_STAGE_TRANSFER_BIT
specifies the execution of copy commands. This includes the operations resulting from all copy commands, clear commands (with the exception ofCmdClearAttachments
), andCmdCopyQueryPoolResults
.PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
specifies the final stage in the pipeline where operations generated by all commands complete execution.PIPELINE_STAGE_HOST_BIT
specifies a pseudo-stage indicating execution on the host of reads/writes of device memory. This stage is not invoked by any commands recorded in a command buffer.PIPELINE_STAGE_RAY_TRACING_SHADER_BIT_NV
specifies the execution of the ray tracing shader stages.PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_NV
specifies the execution ofCmdBuildAccelerationStructureNV
,CmdCopyAccelerationStructureNV
, andCmdWriteAccelerationStructuresPropertiesNV
.PIPELINE_STAGE_ALL_GRAPHICS_BIT
specifies the execution of all graphics pipeline stages, and is equivalent to the logical OR of:PIPELINE_STAGE_TOP_OF_PIPE_BIT
PIPELINE_STAGE_DRAW_INDIRECT_BIT
PIPELINE_STAGE_TASK_SHADER_BIT_NV
PIPELINE_STAGE_MESH_SHADER_BIT_NV
PIPELINE_STAGE_VERTEX_INPUT_BIT
PIPELINE_STAGE_VERTEX_SHADER_BIT
PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT
PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT
PIPELINE_STAGE_GEOMETRY_SHADER_BIT
PIPELINE_STAGE_FRAGMENT_SHADER_BIT
PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT
PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT
PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT
PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT
PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT
PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV
PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT
PIPELINE_STAGE_ALL_COMMANDS_BIT
is equivalent to the logical OR of every other pipeline stage flag that is supported on the queue it is used with.PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT
specifies the stage of the pipeline where the predicate of conditional rendering is consumed.PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT
specifies the stage of the pipeline where vertex attribute output values are written to the transform feedback buffers.PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX
specifies the stage of the pipeline where device-side generation of commands viaCmdProcessCommandsNVX
is handled.PIPELINE_STAGE_SHADING_RATE_IMAGE_BIT_NV
specifies the stage of the pipeline where the shading rate image is read to determine the shading rate for portions of a rasterized primitive.PIPELINE_STAGE_FRAGMENT_DENSITY_PROCESS_BIT_EXT
specifies the stage of the pipeline where the fragment density map is read to generate the fragment areas.
Note
An execution dependency with only
PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
in the destination stage mask will only prevent that stage from executing in subsequently submitted commands. As this stage does not perform any actual execution, this is not observable - in effect, it does not delay processing of subsequent commands. Similarly an execution dependency with onlyPIPELINE_STAGE_TOP_OF_PIPE_BIT
in the source stage mask will effectively not wait for any prior commands to complete.When defining a memory dependency, using only
PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
orPIPELINE_STAGE_TOP_OF_PIPE_BIT
would never make any accesses available and/or visible because these stages do not access memory.PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT
andPIPELINE_STAGE_TOP_OF_PIPE_BIT
are useful for accomplishing layout transitions and queue ownership operations when the required execution dependency is satisfied by other means - for example, semaphore operations between queues.See Also
VkCheckpointDataNV
,VkPipelineStageFlags
,CmdWriteBufferMarkerAMD
,CmdWriteTimestamp
-
VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_ASPECT_DEPTH_BIT, VK_IMAGE_ASPECT_STENCIL_BIT, VK_IMAGE_ASPECT_METADATA_BIT
VkImageAspectFlagBits - Bitmask specifying which aspects of an image are included in a viewDescription
IMAGE_ASPECT_COLOR_BIT
specifies the color aspect.IMAGE_ASPECT_DEPTH_BIT
specifies the depth aspect.IMAGE_ASPECT_STENCIL_BIT
specifies the stencil aspect.IMAGE_ASPECT_METADATA_BIT
specifies the metadata aspect, used for sparse sparse resource operations.
See Also
VkBindImagePlaneMemoryInfo
,VkImageAspectFlags
,VkImagePlaneMemoryRequirementsInfo
-
VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT, VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT, VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT
VkSparseImageFormatFlagBits - Bitmask specifying additional information about a sparse image resourceDescription
SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT
specifies that the image uses a single mip tail region for all array layers.SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT
specifies that the first mip level whose dimensions are not integer multiples of the corresponding dimensions of the sparse image block begins the mip tail region.SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT
specifies that the image uses non-standard sparse image block dimensions, and theimageGranularity
values do not match the standard sparse image block dimensions for the given format.
See Also
VkSparseImageFormatFlags
-
VK_SPARSE_MEMORY_BIND_METADATA_BIT
VkSparseMemoryBindFlagBits - Bitmask specifying usage of a sparse memory binding operationDescription
SPARSE_MEMORY_BIND_METADATA_BIT
specifies that the memory being bound is only for the metadata aspect.
See Also
VkSparseMemoryBindFlags
-
VK_FENCE_CREATE_SIGNALED_BIT
VkFenceCreateFlagBits - Bitmask specifying initial state and behavior of a fenceDescription
FENCE_CREATE_SIGNALED_BIT
specifies that the fence object is created in the signaled state. Otherwise, it is created in the unsignaled state.
See Also
VkFenceCreateFlags
-
VK_QUERY_TYPE_OCCLUSION, VK_QUERY_TYPE_PIPELINE_STATISTICS, VK_QUERY_TYPE_TIMESTAMP
VkQueryType - Specify the type of queries managed by a query poolDescription
QUERY_TYPE_OCCLUSION
specifies an occlusion query.QUERY_TYPE_PIPELINE_STATISTICS
specifies a pipeline statistics query.QUERY_TYPE_TIMESTAMP
specifies a timestamp query.QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT
specifies a transform feedback query.QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV
specifies a ray tracing acceleration structure size query.QUERY_TYPE_PERFORMANCE_QUERY_INTEL
specifies a Intel performance query.
See Also
VkQueryPoolCreateInfo
,CmdWriteAccelerationStructuresPropertiesNV
-
VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT, VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT, VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT, VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT, VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT
VkQueryPipelineStatisticFlagBits - Bitmask specifying queried pipeline statisticsDescription
QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT
specifies that queries managed by the pool will count the number of vertices processed by the input assembly stage. Vertices corresponding to incomplete primitives may contribute to the count.QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT
specifies that queries managed by the pool will count the number of primitives processed by the input assembly stage. If primitive restart is enabled, restarting the primitive topology has no effect on the count. Incomplete primitives may be counted.QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT
specifies that queries managed by the pool will count the number of vertex shader invocations. This counter’s value is incremented each time a vertex shader is invoked.QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT
specifies that queries managed by the pool will count the number of geometry shader invocations. This counter’s value is incremented each time a geometry shader is invoked. In the case of instanced geometry shaders, the geometry shader invocations count is incremented for each separate instanced invocation.QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT
specifies that queries managed by the pool will count the number of primitives generated by geometry shader invocations. The counter’s value is incremented each time the geometry shader emits a primitive. Restarting primitive topology using the SPIR-V instructionsOpEndPrimitive
orOpEndStreamPrimitive
has no effect on the geometry shader output primitives count.QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT
specifies that queries managed by the pool will count the number of primitives processed by the Primitive Clipping stage of the pipeline. The counter’s value is incremented each time a primitive reaches the primitive clipping stage.QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT
specifies that queries managed by the pool will count the number of primitives output by the Primitive Clipping stage of the pipeline. The counter’s value is incremented each time a primitive passes the primitive clipping stage. The actual number of primitives output by the primitive clipping stage for a particular input primitive is implementation-dependent but must satisfy the following conditions:- If at least one vertex of the input primitive lies inside the clipping volume, the counter is incremented by one or more.
- Otherwise, the counter is incremented by zero or more.
QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT
specifies that queries managed by the pool will count the number of fragment shader invocations. The counter’s value is incremented each time the fragment shader is invoked.QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT
specifies that queries managed by the pool will count the number of patches processed by the tessellation control shader. The counter’s value is incremented once for each patch for which a tessellation control shader is invoked.QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT
specifies that queries managed by the pool will count the number of invocations of the tessellation evaluation shader. The counter’s value is incremented each time the tessellation evaluation shader is invoked.QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT
specifies that queries managed by the pool will count the number of compute shader invocations. The counter’s value is incremented every time the compute shader is invoked. Implementations may skip the execution of certain compute shader invocations or execute additional compute shader invocations for implementation-dependent reasons as long as the results of rendering otherwise remain unchanged.
These values are intended to measure relative statistics on one implementation. Various device architectures will count these values differently. Any or all counters may be affected by the issues described in Query Operation.
Note
For example, tile-based rendering devices may need to replay the scene multiple times, affecting some of the counts.
If a pipeline has
rasterizerDiscardEnable
enabled, implementations may discard primitives after the final vertex processing stage. As a result, ifrasterizerDiscardEnable
is enabled, the clipping input and output primitives counters may not be incremented.When a pipeline statistics query finishes, the result for that query is marked as available. The application can copy the result to a buffer (via
vkCmdCopyQueryPoolResults
), or request it be put into host memory (viavkGetQueryPoolResults
).See Also
VkQueryPipelineStatisticFlags
-
VK_QUERY_RESULT_64_BIT, VK_QUERY_RESULT_WAIT_BIT, VK_QUERY_RESULT_WITH_AVAILABILITY_BIT, VK_QUERY_RESULT_PARTIAL_BIT
VkQueryResultFlagBits - Bitmask specifying how and when query results are returnedDescription
QUERY_RESULT_64_BIT
specifies the results will be written as an array of 64-bit unsigned integer values. If this bit is not set, the results will be written as an array of 32-bit unsigned integer values.QUERY_RESULT_WAIT_BIT
specifies that Vulkan will wait for each query’s status to become available before retrieving its results.QUERY_RESULT_WITH_AVAILABILITY_BIT
specifies that the availability status accompanies the results.QUERY_RESULT_PARTIAL_BIT
specifies that returning partial results is acceptable.
See Also
VkQueryResultFlags
-
VK_BUFFER_CREATE_SPARSE_BINDING_BIT, VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT, VK_BUFFER_CREATE_SPARSE_ALIASED_BIT
VkBufferCreateFlagBits - Bitmask specifying additional parameters of a bufferDescription
BUFFER_CREATE_SPARSE_BINDING_BIT
specifies that the buffer will be backed using sparse memory binding.BUFFER_CREATE_SPARSE_RESIDENCY_BIT
specifies that the buffer can be partially backed using sparse memory binding. Buffers created with this flag must also be created with theBUFFER_CREATE_SPARSE_BINDING_BIT
flag.BUFFER_CREATE_SPARSE_ALIASED_BIT
specifies that the buffer will be backed using sparse memory binding with memory ranges that might also simultaneously be backing another buffer (or another portion of the same buffer). Buffers created with this flag must also be created with theBUFFER_CREATE_SPARSE_BINDING_BIT
flag.BUFFER_CREATE_PROTECTED_BIT
specifies that the buffer is a protected buffer.BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT
specifies that the buffer’s address can be saved and reused on a subsequent run (e.g. for trace capture and replay), seeVkBufferDeviceAddressCreateInfoEXT
for more detail.
See Sparse Resource Features and Physical Device Features for details of the sparse memory features supported on a device.
See Also
VkBufferCreateFlags
-
VK_BUFFER_USAGE_TRANSFER_SRC_BIT, VK_BUFFER_USAGE_TRANSFER_DST_BIT, VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, VK_BUFFER_USAGE_INDEX_BUFFER_BIT, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT, VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT
VkBufferUsageFlagBits - Bitmask specifying allowed usage of a bufferDescription
BUFFER_USAGE_TRANSFER_SRC_BIT
specifies that the buffer can be used as the source of a transfer command (see the definition ofPIPELINE_STAGE_TRANSFER_BIT
).BUFFER_USAGE_TRANSFER_DST_BIT
specifies that the buffer can be used as the destination of a transfer command.BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
specifies that the buffer can be used to create aVkBufferView
suitable for occupying aVkDescriptorSet
slot of typeDESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
.BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
specifies that the buffer can be used to create aVkBufferView
suitable for occupying aVkDescriptorSet
slot of typeDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
.BUFFER_USAGE_UNIFORM_BUFFER_BIT
specifies that the buffer can be used in aVkDescriptorBufferInfo
suitable for occupying aVkDescriptorSet
slot either of typeDESCRIPTOR_TYPE_UNIFORM_BUFFER
orDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
.BUFFER_USAGE_STORAGE_BUFFER_BIT
specifies that the buffer can be used in aVkDescriptorBufferInfo
suitable for occupying aVkDescriptorSet
slot either of typeDESCRIPTOR_TYPE_STORAGE_BUFFER
orDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
.BUFFER_USAGE_INDEX_BUFFER_BIT
specifies that the buffer is suitable for passing as thebuffer
parameter tovkCmdBindIndexBuffer
.BUFFER_USAGE_VERTEX_BUFFER_BIT
specifies that the buffer is suitable for passing as an element of thepBuffers
array tovkCmdBindVertexBuffers
.BUFFER_USAGE_INDIRECT_BUFFER_BIT
specifies that the buffer is suitable for passing as thebuffer
parameter tovkCmdDrawIndirect
,vkCmdDrawIndexedIndirect
,vkCmdDrawMeshTasksIndirectNV
,vkCmdDrawMeshTasksIndirectCountNV
, orvkCmdDispatchIndirect
. It is also suitable for passing as thebuffer
member ofVkIndirectCommandsTokenNVX
, orsequencesCountBuffer
orsequencesIndexBuffer
member ofVkCmdProcessCommandsInfoNVX
BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT
specifies that the buffer is suitable for passing as thebuffer
parameter toCmdBeginConditionalRenderingEXT
.BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT
specifies that the buffer is suitable for using for binding as a transform feedback buffer withCmdBindTransformFeedbackBuffersEXT
.BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT
specifies that the buffer is suitable for using as a counter buffer withCmdBeginTransformFeedbackEXT
andCmdEndTransformFeedbackEXT
.BUFFER_USAGE_RAY_TRACING_BIT_NV
specifies that the buffer is suitable for use inCmdTraceRaysNV
andCmdBuildAccelerationStructureNV
.BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT
specifies that the buffer can be used to retrieve a buffer device address viaGetBufferDeviceAddressEXT
and use that address to access the buffer’s memory from a shader.
See Also
VkBufferUsageFlags
-
VK_SHARING_MODE_EXCLUSIVE, VK_SHARING_MODE_CONCURRENT
VkSharingMode - Buffer and image sharing modesDescription
SHARING_MODE_EXCLUSIVE
specifies that access to any range or image subresource of the object will be exclusive to a single queue family at a time.SHARING_MODE_CONCURRENT
specifies that concurrent access to any range or image subresource of the object from multiple queue families is supported.
Note
SHARING_MODE_CONCURRENT
may result in lower performance access to the buffer or image thanSHARING_MODE_EXCLUSIVE
.Ranges of buffers and image subresources of image objects created using
SHARING_MODE_EXCLUSIVE
must only be accessed by queues in the queue family that has ownership of the resource. Upon creation, such resources are not owned by any queue family; ownership is implicitly acquired upon first use within a queue. Once a resource usingSHARING_MODE_EXCLUSIVE
is owned by some queue family, the application must perform a queue family ownership transfer to make the memory contents of a range or image subresource accessible to a different queue family.Note
Images still require a layout transition from
IMAGE_LAYOUT_UNDEFINED
orIMAGE_LAYOUT_PREINITIALIZED
before being used on the first queue.A queue family can take ownership of an image subresource or buffer range of a resource created with
SHARING_MODE_EXCLUSIVE
, without an ownership transfer, in the same way as for a resource that was just created; however, taking ownership in this way has the effect that the contents of the image subresource or buffer range are undefined.Ranges of buffers and image subresources of image objects created using
SHARING_MODE_CONCURRENT
must only be accessed by queues from the queue families specified through thequeueFamilyIndexCount
andpQueueFamilyIndices
members of the corresponding create info structures.See Also
VkBufferCreateInfo
,VkImageCreateInfo
,VkPhysicalDeviceImageDrmFormatModifierInfoEXT
,VkSwapchainCreateInfoKHR
-
VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_PREINITIALIZED
VkImageLayout - Layout of image and image subresourcesDescription
The type(s) of device access supported by each layout are:
IMAGE_LAYOUT_UNDEFINED
does not support device access. This layout must only be used as theinitialLayout
member ofVkImageCreateInfo
orVkAttachmentDescription
, or as theoldLayout
in an image transition. When transitioning out of this layout, the contents of the memory are not guaranteed to be preserved.IMAGE_LAYOUT_PREINITIALIZED
does not support device access. This layout must only be used as theinitialLayout
member ofVkImageCreateInfo
orVkAttachmentDescription
, or as theoldLayout
in an image transition. When transitioning out of this layout, the contents of the memory are preserved. This layout is intended to be used as the initial layout for an image whose contents are written by the host, and hence the data can be written to memory immediately, without first executing a layout transition. Currently,IMAGE_LAYOUT_PREINITIALIZED
is only useful with linear images because there is not a standard layout defined forIMAGE_TILING_OPTIMAL
images.IMAGE_LAYOUT_GENERAL
supports all types of device access.IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
must only be used as a color or resolve attachment in aVkFramebuffer
. This layout is valid only for image subresources of images created with theIMAGE_USAGE_COLOR_ATTACHMENT_BIT
usage bit enabled.IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL
must only be used as a depth/stencil or depth/stencil resolve attachment in aVkFramebuffer
. This layout is valid only for image subresources of images created with theIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
usage bit enabled.IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
must only be used as a read-only depth/stencil attachment in aVkFramebuffer
and/or as a read-only image in a shader (which can be read as a sampled image, combined image/sampler and/or input attachment). This layout is valid only for image subresources of images created with theIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
usage bit enabled. Only image views created with ausage
value includingIMAGE_USAGE_SAMPLED_BIT
can be used as a sampled image or combined image/sampler in a shader. Similarly, only image views created with ausage
value includingIMAGE_USAGE_INPUT_ATTACHMENT_BIT
can be used as input attachments.IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
: must only be used as a depth/stencil attachment in aVkFramebuffer
, where the depth aspect is read-only, and/or as a read-only image in a shader (which can be read as a sampled image, combined image/sampler and/or input attachment) where only the depth aspect is accessed. This layout is valid only for image subresources of images created with theIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
usage bit enabled. Only image views created with ausage
value includingIMAGE_USAGE_SAMPLED_BIT
can be used as a sampled image or combined image/sampler in a shader. Similarly, only image views created with ausage
value includingIMAGE_USAGE_INPUT_ATTACHMENT_BIT
can be used as input attachments.IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
: must only be used as a depth/stencil attachment in aVkFramebuffer
, where the stencil aspect is read-only, and/or as a read-only image in a shader (which can be read as a sampled image, combined image/sampler and/or input attachment) where only the stencil aspect is accessed. This layout is valid only for image subresources of images created with theIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
usage bit enabled. Only image views created with ausage
value includingIMAGE_USAGE_SAMPLED_BIT
can be used as a sampled image or combined image/sampler in a shader. Similarly, only image views created with ausage
value includingIMAGE_USAGE_INPUT_ATTACHMENT_BIT
can be used as input attachments.IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
must only be used as a read-only image in a shader (which can be read as a sampled image, combined image/sampler and/or input attachment). This layout is valid only for image subresources of images created with theIMAGE_USAGE_SAMPLED_BIT
orIMAGE_USAGE_INPUT_ATTACHMENT_BIT
usage bit enabled.IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
must only be used as a source image of a transfer command (see the definition ofPIPELINE_STAGE_TRANSFER_BIT
). This layout is valid only for image subresources of images created with theIMAGE_USAGE_TRANSFER_SRC_BIT
usage bit enabled.IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
must only be used as a destination image of a transfer command. This layout is valid only for image subresources of images created with theIMAGE_USAGE_TRANSFER_DST_BIT
usage bit enabled.IMAGE_LAYOUT_PRESENT_SRC_KHR
must only be used for presenting a presentable image for display. A swapchain’s image must be transitioned to this layout before callingQueuePresentKHR
, and must be transitioned away from this layout after callingAcquireNextImageKHR
.IMAGE_LAYOUT_SHARED_PRESENT_KHR
is valid only for shared presentable images, and must be used for any usage the image supports.IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV
must only be used as a read-only shading-rate-image. This layout is valid only for image subresources of images created with theIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
usage bit enabled.IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT
must only be used as a fragment density map attachment in aVkRenderPass
. This layout is valid only for image subresources of images created with theIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
usage bit enabled.
The layout of each image subresource is not a state of the image subresource itself, but is rather a property of how the data in memory is organized, and thus for each mechanism of accessing an image in the API the application must specify a parameter or structure member that indicates which image layout the image subresource(s) are considered to be in when the image will be accessed. For transfer commands, this is a parameter to the command (see Clear Commands and Copy Commands). For use as a framebuffer attachment, this is a member in the substructures of the
VkRenderPassCreateInfo
(see Render Pass). For use in a descriptor set, this is a member in theVkDescriptorImageInfo
structure (see Descriptor Set Updates).See Also
VkAttachmentDescription
,VkAttachmentDescription2KHR
,VkAttachmentReference
,VkAttachmentReference2KHR
,VkDescriptorImageInfo
,VkImageCreateInfo
,VkImageMemoryBarrier
,CmdBindShadingRateImageNV
,CmdBlitImage
,CmdClearColorImage
,CmdClearDepthStencilImage
,CmdCopyBufferToImage
,CmdCopyImage
,CmdCopyImageToBuffer
,CmdResolveImage
-
VK_IMAGE_VIEW_TYPE_1D, VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D_ARRAY, VK_IMAGE_VIEW_TYPE_CUBE_ARRAY
VkImageViewType - Image view typesDescription
The exact image view type is partially implicit, based on the image's type and sample count, as well as the view creation parameters as described in the image view compatibility table for
CreateImageView
. This table also shows which SPIR-VOpTypeImage
Dim
andArrayed
parameters correspond to each image view type.See Also
VkImageViewCreateInfo
,VkPhysicalDeviceImageViewImageFormatInfoEXT
Enum values:
-
VK_COMPONENT_SWIZZLE_IDENTITY, VK_COMPONENT_SWIZZLE_ZERO, VK_COMPONENT_SWIZZLE_ONE, VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A
VkComponentSwizzle - Specify how a component is swizzledDescription
COMPONENT_SWIZZLE_IDENTITY
specifies that the component is set to the identity swizzle.COMPONENT_SWIZZLE_ZERO
specifies that the component is set to zero.COMPONENT_SWIZZLE_ONE
specifies that the component is set to either 1 or 1.0, depending on whether the type of the image view format is integer or floating-point respectively, as determined by the Format Definition section for eachVkFormat
.COMPONENT_SWIZZLE_R
specifies that the component is set to the value of the R component of the image.COMPONENT_SWIZZLE_G
specifies that the component is set to the value of the G component of the image.COMPONENT_SWIZZLE_B
specifies that the component is set to the value of the B component of the image.COMPONENT_SWIZZLE_A
specifies that the component is set to the value of the A component of the image.
Setting the identity swizzle on a component is equivalent to setting the identity mapping on that component. That is:
Component Mappings Equivalent To
COMPONENT_SWIZZLE_IDENTITY
Component Identity Mapping components.r
COMPONENT_SWIZZLE_R
components.g
COMPONENT_SWIZZLE_G
components.b
COMPONENT_SWIZZLE_B
components.a
COMPONENT_SWIZZLE_A
See Also
-
VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT, VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT, VK_PIPELINE_CREATE_DERIVATIVE_BIT
VkPipelineCreateFlagBits - Bitmask controlling how a pipeline is createdDescription
PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT
specifies that the created pipeline will not be optimized. Using this flag may reduce the time taken to create the pipeline.PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT
specifies that the pipeline to be created is allowed to be the parent of a pipeline that will be created in a subsequent call toCreateGraphicsPipelines
orCreateComputePipelines
.PIPELINE_CREATE_DERIVATIVE_BIT
specifies that the pipeline to be created will be a child of a previously created parent pipeline.PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT
specifies that any shader input variables decorated asViewIndex
will be assigned values as if they were decorated asDeviceIndex
.PIPELINE_CREATE_DISPATCH_BASE
specifies that a compute pipeline can be used withCmdDispatchBase
with a non-zero base workgroup.PIPELINE_CREATE_DEFER_COMPILE_BIT_NV
specifies that a pipeline is created with all shaders in the deferred state. Before using the pipeline the application must callCompileDeferredNV
exactly once on each shader in the pipeline before using the pipeline.PIPELINE_CREATE_CAPTURE_STATISTICS_BIT_KHR
specifies that the shader compiler should capture statistics for the executables produced by the compile process which can later be retrieved by callingGetPipelineExecutableStatisticsKHR
. Enabling this flag must not affect the final compiled pipeline but may disable pipeline caching or otherwise affect pipeline creation time.PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR
specifies that the shader compiler should capture the internal representations of executables produced by the compile process which can later be retrieved by callingGetPipelineExecutableInternalRepresentationsKHR
. Enabling this flag must not affect the final compiled pipeline but may disable pipeline caching or otherwise affect pipeline creation time.
It is valid to set both
PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT
andPIPELINE_CREATE_DERIVATIVE_BIT
. This allows a pipeline to be both a parent and possibly a child in a pipeline hierarchy. See Pipeline Derivatives for more information.See Also
VkPipelineCreateFlags
-
VK_SHADER_STAGE_VERTEX_BIT, VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, VK_SHADER_STAGE_GEOMETRY_BIT, VK_SHADER_STAGE_FRAGMENT_BIT, VK_SHADER_STAGE_COMPUTE_BIT, VK_SHADER_STAGE_ALL_GRAPHICS, VK_SHADER_STAGE_ALL
VkShaderStageFlagBits - Bitmask specifying a pipeline stageDescription
SHADER_STAGE_VERTEX_BIT
specifies the vertex stage.SHADER_STAGE_TESSELLATION_CONTROL_BIT
specifies the tessellation control stage.SHADER_STAGE_TESSELLATION_EVALUATION_BIT
specifies the tessellation evaluation stage.SHADER_STAGE_GEOMETRY_BIT
specifies the geometry stage.SHADER_STAGE_FRAGMENT_BIT
specifies the fragment stage.SHADER_STAGE_COMPUTE_BIT
specifies the compute stage.SHADER_STAGE_TASK_BIT_NV
specifies the task stage.SHADER_STAGE_MESH_BIT_NV
specifies the mesh stage.SHADER_STAGE_ALL_GRAPHICS
is a combination of bits used as shorthand to specify all graphics stages defined above (excluding the compute stage).SHADER_STAGE_ALL
is a combination of bits used as shorthand to specify all shader stages supported by the device, including all additional stages which are introduced by extensions.SHADER_STAGE_RAYGEN_BIT_NV
specifies the ray generation stage.SHADER_STAGE_ANY_HIT_BIT_NV
specifies the any-hit stage.SHADER_STAGE_CLOSEST_HIT_BIT_NV
specifies the closest hit stage.SHADER_STAGE_MISS_BIT_NV
specifies the miss stage.SHADER_STAGE_INTERSECTION_BIT_NV
specifies the intersection stage.SHADER_STAGE_CALLABLE_BIT_NV
specifies the callable stage.
Note
SHADER_STAGE_ALL_GRAPHICS
only includes the original five graphics stages included in Vulkan 1.0, and not any stages added by extensions. Thus, it may not have the desired effect in all cases.See Also
VkPipelineShaderStageCreateInfo
,VkShaderStageFlags
,GetShaderInfoAMD
-
VK_VERTEX_INPUT_RATE_VERTEX, VK_VERTEX_INPUT_RATE_INSTANCE
VkVertexInputRate - Specify rate at which vertex attributes are pulled from buffersDescription
VERTEX_INPUT_RATE_VERTEX
specifies that vertex attribute addressing is a function of the vertex index.VERTEX_INPUT_RATE_INSTANCE
specifies that vertex attribute addressing is a function of the instance index.
See Also
-
VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_LIST, VK_PRIMITIVE_TOPOLOGY_LINE_STRIP, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN, VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY, VK_PRIMITIVE_TOPOLOGY_PATCH_LIST
VkPrimitiveTopology - Supported primitive topologiesDescription
PRIMITIVE_TOPOLOGY_POINT_LIST
specifies a series of separate point primitives.PRIMITIVE_TOPOLOGY_LINE_LIST
specifies a series of separate line primitives.PRIMITIVE_TOPOLOGY_LINE_STRIP
specifies a series of connected line primitives with consecutive lines sharing a vertex.PRIMITIVE_TOPOLOGY_TRIANGLE_LIST
specifies a series of separate triangle primitives.PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP
specifies a series of connected triangle primitives with consecutive triangles sharing an edge.PRIMITIVE_TOPOLOGY_TRIANGLE_FAN
specifies a series of connected triangle primitives with all triangles sharing a common vertex.PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY
specifies a series separate line primitives with adjacency.PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY
specifies a series connected line primitives with adjacency, with consecutive primitives sharing three vertices.PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY
specifies a series separate triangle primitives with adjacency.PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY
specifies connected triangle primitives with adjacency, with consecutive triangles sharing an edge.PRIMITIVE_TOPOLOGY_PATCH_LIST
specifies separate patch primitives.
Each primitive topology, and its construction from a list of vertices, is described in detail below with a supporting diagram, according to the following key:
Vertex A point in 3-dimensional space. Positions chosen within the diagrams are arbitrary and for illustration only. Vertex Number Sequence position of a vertex within the provided vertex data. Provoking Vertex Provoking vertex within the main primitive. The arrow points along an edge of the relevant primitive, following winding order. Used in flat shading. Primitive Edge An edge connecting the points of a main primitive. Adjacency Edge Points connected by these lines do not contribute to a main primitive, and are only accessible in a geometry shader. Winding Order The relative order in which vertices are defined within a primitive, used in the facing determination. This ordering has no specific start or end point. The diagrams are supported with mathematical definitions where the vertices (
v
) and primitives (p
) are numbered starting from0
;v0
is the first vertex in the provided data andp0
is the first primitive in the set of primitives defined by the vertices and topology.See Also
-
VK_POLYGON_MODE_FILL, VK_POLYGON_MODE_LINE, VK_POLYGON_MODE_POINT
VkPolygonMode - Control polygon rasterization modeDescription
POLYGON_MODE_POINT
specifies that polygon vertices are drawn as points.POLYGON_MODE_LINE
specifies that polygon edges are drawn as line segments.POLYGON_MODE_FILL
specifies that polygons are rendered using the polygon rasterization rules in this section.POLYGON_MODE_FILL_RECTANGLE_NV
specifies that polygons are rendered using polygon rasterization rules, modified to consider a sample within the primitive if the sample location is inside the axis-aligned bounding box of the triangle after projection. Note that the barycentric weights used in attribute interpolation can extend outside the range[0,1]
when these primitives are shaded. Special treatment is given to a sample position on the boundary edge of the bounding box. In such a case, if two rectangles lie on either side of a common edge (with identical endpoints) on which a sample position lies, then exactly one of the triangles must produce a fragment that covers that sample during rasterization. Polygons rendered inPOLYGON_MODE_FILL_RECTANGLE_NV
mode may be clipped by the frustum or by user clip planes. If clipping is applied, the triangle is culled rather than clipped.Area calculation and facingness are determined for
POLYGON_MODE_FILL_RECTANGLE_NV
mode using the triangle's vertices.
These modes affect only the final rasterization of polygons: in particular, a polygon's vertices are shaded and the polygon is clipped and possibly culled before these modes are applied.
See Also
-
VK_CULL_MODE_NONE, VK_CULL_MODE_FRONT_BIT, VK_CULL_MODE_BACK_BIT, VK_CULL_MODE_FRONT_AND_BACK
VkCullModeFlagBits - Bitmask controlling triangle cullingDescription
CULL_MODE_NONE
specifies that no triangles are discardedCULL_MODE_FRONT_BIT
specifies that front-facing triangles are discardedCULL_MODE_BACK_BIT
specifies that back-facing triangles are discardedCULL_MODE_FRONT_AND_BACK
specifies that all triangles are discarded.
Following culling, fragments are produced for any triangles which have not been discarded.
See Also
VkCullModeFlags
-
VK_FRONT_FACE_COUNTER_CLOCKWISE, VK_FRONT_FACE_CLOCKWISE
VkFrontFace - Interpret polygon front-facing orientationDescription
FRONT_FACE_COUNTER_CLOCKWISE
specifies that a triangle with positive area is considered front-facing.FRONT_FACE_CLOCKWISE
specifies that a triangle with negative area is considered front-facing.
Any triangle which is not front-facing is back-facing, including zero-area triangles.
See Also
-
VK_COMPARE_OP_NEVER, VK_COMPARE_OP_LESS, VK_COMPARE_OP_EQUAL, VK_COMPARE_OP_LESS_OR_EQUAL, VK_COMPARE_OP_GREATER, VK_COMPARE_OP_NOT_EQUAL, VK_COMPARE_OP_GREATER_OR_EQUAL, VK_COMPARE_OP_ALWAYS
VkCompareOp - Stencil comparison functionDescription
COMPARE_OP_NEVER
specifies that the test never passes.COMPARE_OP_LESS
specifies that the test passes whenR < S
.COMPARE_OP_EQUAL
specifies that the test passes whenR = S
.COMPARE_OP_LESS_OR_EQUAL
specifies that the test passes whenR ≤ S
.COMPARE_OP_GREATER
specifies that the test passes whenR > S
.COMPARE_OP_NOT_EQUAL
specifies that the test passes whenR ≠ S
.COMPARE_OP_GREATER_OR_EQUAL
specifies that the test passes whenR ≥ S
.COMPARE_OP_ALWAYS
specifies that the test always passes.
See Also
VkPipelineDepthStencilStateCreateInfo
,VkSamplerCreateInfo
,VkStencilOpState
-
VK_STENCIL_OP_KEEP, VK_STENCIL_OP_ZERO, VK_STENCIL_OP_REPLACE, VK_STENCIL_OP_INCREMENT_AND_CLAMP, VK_STENCIL_OP_DECREMENT_AND_CLAMP, VK_STENCIL_OP_INVERT, VK_STENCIL_OP_INCREMENT_AND_WRAP, VK_STENCIL_OP_DECREMENT_AND_WRAP
VkStencilOp - Stencil comparison functionDescription
STENCIL_OP_KEEP
keeps the current value.STENCIL_OP_ZERO
sets the value to 0.STENCIL_OP_REPLACE
sets the value toreference
.STENCIL_OP_INCREMENT_AND_CLAMP
increments the current value and clamps to the maximum representable unsigned value.STENCIL_OP_DECREMENT_AND_CLAMP
decrements the current value and clamps to 0.STENCIL_OP_INVERT
bitwise-inverts the current value.STENCIL_OP_INCREMENT_AND_WRAP
increments the current value and wraps to 0 when the maximum value would have been exceeded.STENCIL_OP_DECREMENT_AND_WRAP
decrements the current value and wraps to the maximum possible value when the value would go below 0.
For purposes of increment and decrement, the stencil bits are considered as an unsigned integer.
If the stencil test fails, the sample's coverage bit is cleared in the fragment. If there is no stencil framebuffer attachment, stencil modification cannot occur, and it is as if the stencil tests always pass.
If the stencil test passes, the
writeMask
member of theVkStencilOpState
structures controls how the updated stencil value is written to the stencil framebuffer attachment.The least significant
s
bits ofwriteMask
, wheres
is the number of bits in the stencil framebuffer attachment, specify an integer mask. Where a1
appears in this mask, the corresponding bit in the stencil value in the depth/stencil attachment is written; where a0
appears, the bit is not written. ThewriteMask
value uses either the front-facing or back-facing state based on the facingness of the fragment. Fragments generated by front-facing primitives use the front mask and fragments generated by back-facing primitives use the back mask.See Also
-
VK_LOGIC_OP_CLEAR, VK_LOGIC_OP_AND, VK_LOGIC_OP_AND_REVERSE, VK_LOGIC_OP_COPY, VK_LOGIC_OP_AND_INVERTED, VK_LOGIC_OP_NO_OP, VK_LOGIC_OP_XOR, VK_LOGIC_OP_OR, VK_LOGIC_OP_NOR, VK_LOGIC_OP_EQUIVALENT, VK_LOGIC_OP_INVERT, VK_LOGIC_OP_OR_REVERSE, VK_LOGIC_OP_COPY_INVERTED, VK_LOGIC_OP_OR_INVERTED, VK_LOGIC_OP_NAND, VK_LOGIC_OP_SET
VkLogicOp - Framebuffer logical operationsDescription
The logical operations supported by Vulkan are summarized in the following table in which
¬
is bitwise invert,∧
is bitwise and,∨
is bitwise or,⊕
is bitwise exclusive or,s
is the fragment’sRs0, Gs0, Bs0
orAs0
component value for the fragment output corresponding to the color attachment being updated, andd
is the color attachment’sR, G, B
orA
component value:
Logical Operations
Mode Operation LOGIC_OP_CLEAR
0
LOGIC_OP_AND
s ∧ d
LOGIC_OP_AND_REVERSE
s ∧ ¬ d
LOGIC_OP_COPY
s
LOGIC_OP_AND_INVERTED
¬ s ∧ d
LOGIC_OP_NO_OP
d
LOGIC_OP_XOR
s ⊕ d
LOGIC_OP_OR
s ∨ d
LOGIC_OP_NOR
¬ (s ∨ d)
LOGIC_OP_EQUIVALENT
¬ (s ⊕ d)
LOGIC_OP_INVERT
¬ d
LOGIC_OP_OR_REVERSE
s ∨ ¬ d
LOGIC_OP_COPY_INVERTED
¬ s
LOGIC_OP_OR_INVERTED
¬ s ∨ d
LOGIC_OP_NAND
¬ (s ∧ d)
LOGIC_OP_SET
all 1s The result of the logical operation is then written to the color attachment as controlled by the component write mask, described in Blend Operations.
See Also
-
VK_BLEND_FACTOR_ZERO, VK_BLEND_FACTOR_ONE, VK_BLEND_FACTOR_SRC_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC_COLOR, VK_BLEND_FACTOR_DST_COLOR, VK_BLEND_FACTOR_ONE_MINUS_DST_COLOR, VK_BLEND_FACTOR_SRC_ALPHA, VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA, VK_BLEND_FACTOR_DST_ALPHA, VK_BLEND_FACTOR_ONE_MINUS_DST_ALPHA, VK_BLEND_FACTOR_CONSTANT_COLOR, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR, VK_BLEND_FACTOR_CONSTANT_ALPHA, VK_BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA, VK_BLEND_FACTOR_SRC_ALPHA_SATURATE, VK_BLEND_FACTOR_SRC1_COLOR, VK_BLEND_FACTOR_ONE_MINUS_SRC1_COLOR, VK_BLEND_FACTOR_SRC1_ALPHA, VK_BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA
VkBlendFactor - Framebuffer blending factorsDescription
The semantics of each enum value is described in the table below:
Blend Factors
VkBlendFactor
RGB Blend Factors (Sr,Sg,Sb)
or(Dr,Dg,Db)
Alpha Blend Factor ( Sa
orDa
)BLEND_FACTOR_ZERO
(0,0,0)
0
BLEND_FACTOR_ONE
(1,1,1)
1
BLEND_FACTOR_SRC_COLOR
(Rs0,Gs0,Bs0)
As0
BLEND_FACTOR_ONE_MINUS_SRC_COLOR
(1-Rs0,1-Gs0,1-Bs0)
1-As0
BLEND_FACTOR_DST_COLOR
(Rd,Gd,Bd)
Ad
BLEND_FACTOR_ONE_MINUS_DST_COLOR
(1-Rd,1-Gd,1-Bd)
1-Ad
BLEND_FACTOR_SRC_ALPHA
(As0,As0,As0)
As0
BLEND_FACTOR_ONE_MINUS_SRC_ALPHA
(1-As0,1-As0,1-As0)
1-As0
BLEND_FACTOR_DST_ALPHA
(Ad,Ad,Ad)
Ad
BLEND_FACTOR_ONE_MINUS_DST_ALPHA
(1-Ad,1-Ad,1-Ad)
1-Ad
BLEND_FACTOR_CONSTANT_COLOR
(Rc,Gc,Bc)
Ac
BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR
(1-Rc,1-Gc,1-Bc)
1-Ac
BLEND_FACTOR_CONSTANT_ALPHA
(Ac,Ac,Ac)
Ac
BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA
(1-Ac,1-Ac,1-Ac)
1-Ac
BLEND_FACTOR_SRC_ALPHA_SATURATE
(f,f,f)
;f = min(As0,1-Ad)
1
BLEND_FACTOR_SRC1_COLOR
(Rs1,Gs1,Bs1)
As1
BLEND_FACTOR_ONE_MINUS_SRC1_COLOR
(1-Rs1,1-Gs1,1-Bs1)
1-As1
BLEND_FACTOR_SRC1_ALPHA
(As1,As1,As1)
As1
BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA
(1-As1,1-As1,1-As1)
1-As1
In this table, the following conventions are used:
Rs0,Gs0,Bs0
andAs0
represent the first source color R, G, B, and A components, respectively, for the fragment output location corresponding to the color attachment being blended.Rs1,Gs1,Bs1
andAs1
represent the second source color R, G, B, and A components, respectively, used in dual source blending modes, for the fragment output location corresponding to the color attachment being blended.Rd,Gd,Bd
andAd
represent the R, G, B, and A components of the destination color. That is, the color currently in the corresponding color attachment for this fragment/sample.Rc,Gc,Bc
andAc
represent the blend constant R, G, B, and A components, respectively.
See Also
-
VK_BLEND_OP_ADD, VK_BLEND_OP_SUBTRACT, VK_BLEND_OP_REVERSE_SUBTRACT, VK_BLEND_OP_MIN, VK_BLEND_OP_MAX
VkBlendOp - Framebuffer blending operationsDescription
The semantics of each basic blend operations is described in the table below:
Basic Blend Operations
VkBlendOp
RGB Components Alpha Component BLEND_OP_ADD
R = Rs0 × Sr + Rd × Dr
G = Gs0 × Sg + Gd × Dg
B = Bs0 × Sb + Bd × Db
A = As0 × Sa + Ad × Da
BLEND_OP_SUBTRACT
R = Rs0 × Sr - Rd × Dr
G = Gs0 × Sg - Gd × Dg
B = Bs0 × Sb - Bd × Db
A = As0 × Sa - Ad × Da
BLEND_OP_REVERSE_SUBTRACT
R = Rd × Dr - Rs0 × Sr
G = Gd × Dg - Gs0 × Sg
B = Bd × Db - Bs0 × Sb
A = Ad × Da - As0 × Sa
BLEND_OP_MIN
R = min(Rs0,Rd)
G = min(Gs0,Gd)
B = min(Bs0,Bd)
A = min(As0,Ad)
BLEND_OP_MAX
R = max(Rs0,Rd)
G = max(Gs0,Gd)
B = max(Bs0,Bd)
A = max(As0,Ad)
In this table, the following conventions are used:
Rs0, Gs0, Bs0
andAs0
represent the first source color R, G, B, and A components, respectively.Rd, Gd, Bd
andAd
represent the R, G, B, and A components of the destination color. That is, the color currently in the corresponding color attachment for this fragment/sample.Sr, Sg, Sb
andSa
represent the source blend factor R, G, B, and A components, respectively.Dr, Dg, Db
andDa
represent the destination blend factor R, G, B, and A components, respectively.
The blending operation produces a new set of values
R, G, B
andA
, which are written to the framebuffer attachment. If blending is not enabled for this attachment, thenR, G, B
andA
are assignedRs0, Gs0, Bs0
andAs0
, respectively.If the color attachment is fixed-point, the components of the source and destination values and blend factors are each clamped to
[0,1]
or[-1,1]
respectively for an unsigned normalized or signed normalized color attachment prior to evaluating the blend operations. If the color attachment is floating-point, no clamping occurs.See Also
-
VK_COLOR_COMPONENT_R_BIT, VK_COLOR_COMPONENT_G_BIT, VK_COLOR_COMPONENT_B_BIT, VK_COLOR_COMPONENT_A_BIT
VkColorComponentFlagBits - Bitmask controlling which components are written to the framebufferDescription
COLOR_COMPONENT_R_BIT
specifies that theR
value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified.COLOR_COMPONENT_G_BIT
specifies that theG
value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified.COLOR_COMPONENT_B_BIT
specifies that theB
value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified.COLOR_COMPONENT_A_BIT
specifies that theA
value is written to the color attachment for the appropriate sample. Otherwise, the value in memory is unmodified.
The color write mask operation is applied regardless of whether blending is enabled.
See Also
VkColorComponentFlags
-
VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR, VK_DYNAMIC_STATE_LINE_WIDTH, VK_DYNAMIC_STATE_DEPTH_BIAS, VK_DYNAMIC_STATE_BLEND_CONSTANTS, VK_DYNAMIC_STATE_DEPTH_BOUNDS, VK_DYNAMIC_STATE_STENCIL_COMPARE_MASK, VK_DYNAMIC_STATE_STENCIL_WRITE_MASK, VK_DYNAMIC_STATE_STENCIL_REFERENCE
VkDynamicState - Indicate which dynamic state is taken from dynamic state commandsDescription
DYNAMIC_STATE_VIEWPORT
specifies that thepViewports
state inVkPipelineViewportStateCreateInfo
will be ignored and must be set dynamically withCmdSetViewport
before any draw commands. The number of viewports used by a pipeline is still specified by theviewportCount
member ofVkPipelineViewportStateCreateInfo
.DYNAMIC_STATE_SCISSOR
specifies that thepScissors
state inVkPipelineViewportStateCreateInfo
will be ignored and must be set dynamically withCmdSetScissor
before any draw commands. The number of scissor rectangles used by a pipeline is still specified by thescissorCount
member ofVkPipelineViewportStateCreateInfo
.DYNAMIC_STATE_LINE_WIDTH
specifies that thelineWidth
state inVkPipelineRasterizationStateCreateInfo
will be ignored and must be set dynamically withCmdSetLineWidth
before any draw commands that generate line primitives for the rasterizer.DYNAMIC_STATE_DEPTH_BIAS
specifies that thedepthBiasConstantFactor
,depthBiasClamp
anddepthBiasSlopeFactor
states inVkPipelineRasterizationStateCreateInfo
will be ignored and must be set dynamically withCmdSetDepthBias
before any draws are performed withdepthBiasEnable
inVkPipelineRasterizationStateCreateInfo
set toTRUE
.DYNAMIC_STATE_BLEND_CONSTANTS
specifies that theblendConstants
state inVkPipelineColorBlendStateCreateInfo
will be ignored and must be set dynamically withCmdSetBlendConstants
before any draws are performed with a pipeline state withVkPipelineColorBlendAttachmentState
memberblendEnable
set toTRUE
and any of the blend functions using a constant blend color.DYNAMIC_STATE_DEPTH_BOUNDS
specifies that theminDepthBounds
andmaxDepthBounds
states ofVkPipelineDepthStencilStateCreateInfo
will be ignored and must be set dynamically withCmdSetDepthBounds
before any draws are performed with a pipeline state withVkPipelineDepthStencilStateCreateInfo
memberdepthBoundsTestEnable
set toTRUE
.DYNAMIC_STATE_STENCIL_COMPARE_MASK
specifies that thecompareMask
state inVkPipelineDepthStencilStateCreateInfo
for bothfront
andback
will be ignored and must be set dynamically withCmdSetStencilCompareMask
before any draws are performed with a pipeline state withVkPipelineDepthStencilStateCreateInfo
memberstencilTestEnable
set toTRUE
DYNAMIC_STATE_STENCIL_WRITE_MASK
specifies that thewriteMask
state inVkPipelineDepthStencilStateCreateInfo
for bothfront
andback
will be ignored and must be set dynamically withCmdSetStencilWriteMask
before any draws are performed with a pipeline state withVkPipelineDepthStencilStateCreateInfo
memberstencilTestEnable
set toTRUE
DYNAMIC_STATE_STENCIL_REFERENCE
specifies that thereference
state inVkPipelineDepthStencilStateCreateInfo
for bothfront
andback
will be ignored and must be set dynamically withCmdSetStencilReference
before any draws are performed with a pipeline state withVkPipelineDepthStencilStateCreateInfo
memberstencilTestEnable
set toTRUE
DYNAMIC_STATE_VIEWPORT_W_SCALING_NV
specifies that thepViewportScalings
state inVkPipelineViewportWScalingStateCreateInfoNV
will be ignored and must be set dynamically withCmdSetViewportWScalingNV
before any draws are performed with a pipeline state withVkPipelineViewportWScalingStateCreateInfoNV
memberviewportScalingEnable
set toTRUE
DYNAMIC_STATE_DISCARD_RECTANGLE_EXT
specifies that thepDiscardRectangles
state inVkPipelineDiscardRectangleStateCreateInfoEXT
will be ignored and must be set dynamically withCmdSetDiscardRectangleEXT
before any draw or clear commands. TheVkDiscardRectangleModeEXT
and the number of active discard rectangles is still specified by thediscardRectangleMode
anddiscardRectangleCount
members ofVkPipelineDiscardRectangleStateCreateInfoEXT
.DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT
specifies that thesampleLocationsInfo
state inVkPipelineSampleLocationsStateCreateInfoEXT
will be ignored and must be set dynamically withCmdSetSampleLocationsEXT
before any draw or clear commands. Enabling custom sample locations is still indicated by thesampleLocationsEnable
member ofVkPipelineSampleLocationsStateCreateInfoEXT
.DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV
specifies that thepExclusiveScissors
state inVkPipelineViewportExclusiveScissorStateCreateInfoNV
will be ignored and must be set dynamically withCmdSetExclusiveScissorNV
before any draw commands. The number of exclusive scissor rectangles used by a pipeline is still specified by theexclusiveScissorCount
member ofVkPipelineViewportExclusiveScissorStateCreateInfoNV
.DYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NV
specifies that thepShadingRatePalettes
state inVkPipelineViewportShadingRateImageStateCreateInfoNV
will be ignored and must be set dynamically withCmdSetViewportShadingRatePaletteNV
before any draw commands.DYNAMIC_STATE_VIEWPORT_COARSE_SAMPLE_ORDER_NV
specifies that the coarse sample order state inVkPipelineViewportCoarseSampleOrderStateCreateInfoNV
will be ignored and must be set dynamically withCmdSetCoarseSampleOrderNV
before any draw commands.DYNAMIC_STATE_LINE_STIPPLE_EXT
specifies that thelineStippleFactor
andlineStipplePattern
state inVkPipelineRasterizationLineStateCreateInfoEXT
will be ignored and must be set dynamically withCmdSetLineStippleEXT
before any draws are performed with a pipeline state withVkPipelineRasterizationLineStateCreateInfoEXT
memberstippledLineEnable
set toTRUE
.
See Also
-
VK_FILTER_NEAREST, VK_FILTER_LINEAR
VkFilter - Specify filters used for texture lookupsDescription
FILTER_NEAREST
specifies nearest filtering.FILTER_LINEAR
specifies linear filtering.FILTER_CUBIC_EXT
specifies cubic filtering.
These filters are described in detail in Texel Filtering.
See Also
VkSamplerCreateInfo
,VkSamplerYcbcrConversionCreateInfo
,CmdBlitImage
-
VK_SAMPLER_MIPMAP_MODE_NEAREST, VK_SAMPLER_MIPMAP_MODE_LINEAR
VkSamplerMipmapMode - Specify mipmap mode used for texture lookupsDescription
SAMPLER_MIPMAP_MODE_NEAREST
specifies nearest filtering.SAMPLER_MIPMAP_MODE_LINEAR
specifies linear filtering.
These modes are described in detail in Texel Filtering.
See Also
-
VK_SAMPLER_ADDRESS_MODE_REPEAT, VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT, VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER
VkSamplerAddressMode - Specify behavior of sampling with texture coordinates outside an imageDescription
SAMPLER_ADDRESS_MODE_REPEAT
specifies that the repeat wrap mode will be used.SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT
specifies that the mirrored repeat wrap mode will be used.SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
specifies that the clamp to edge wrap mode will be used.SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER
specifies that the clamp to border wrap mode will be used.SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE
specifies that the mirror clamp to edge wrap mode will be used. This is only valid if theVK_KHR_sampler_mirror_clamp_to_edge
extension is enabled.
See Also
-
VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK, VK_BORDER_COLOR_INT_TRANSPARENT_BLACK, VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK, VK_BORDER_COLOR_INT_OPAQUE_BLACK, VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE, VK_BORDER_COLOR_INT_OPAQUE_WHITE
VkBorderColor - Specify border color used for texture lookupsDescription
BORDER_COLOR_FLOAT_TRANSPARENT_BLACK
specifies a transparent, floating-point format, black color.BORDER_COLOR_INT_TRANSPARENT_BLACK
specifies a transparent, integer format, black color.BORDER_COLOR_FLOAT_OPAQUE_BLACK
specifies an opaque, floating-point format, black color.BORDER_COLOR_INT_OPAQUE_BLACK
specifies an opaque, integer format, black color.BORDER_COLOR_FLOAT_OPAQUE_WHITE
specifies an opaque, floating-point format, white color.BORDER_COLOR_INT_OPAQUE_WHITE
specifies an opaque, integer format, white color.
These colors are described in detail in Texel Replacement.
See Also
-
VK_DESCRIPTOR_TYPE_SAMPLER, VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
VkDescriptorType - Specifies the type of a descriptor in a descriptor setDescription
DESCRIPTOR_TYPE_SAMPLER
specifies a sampler descriptor.DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
specifies a combined image sampler descriptor.DESCRIPTOR_TYPE_SAMPLED_IMAGE
specifies a sampled image descriptor.DESCRIPTOR_TYPE_STORAGE_IMAGE
specifies a storage image descriptor.DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
specifies a uniform texel buffer descriptor.DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
specifies a storage texel buffer descriptor.DESCRIPTOR_TYPE_UNIFORM_BUFFER
specifies a uniform buffer descriptor.DESCRIPTOR_TYPE_STORAGE_BUFFER
specifies a storage buffer descriptor.DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
specifies a dynamic uniform buffer descriptor.DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
specifies a dynamic storage buffer descriptor.DESCRIPTOR_TYPE_INPUT_ATTACHMENT
specifies an input attachment descriptor.DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
specifies an inline uniform block.
When a descriptor set is updated via elements of
VkWriteDescriptorSet
, members ofpImageInfo
,pBufferInfo
andpTexelBufferView
are only accessed by the implementation when they correspond to descriptor type being defined - otherwise they are ignored. The members accessed are as follows for each descriptor type:- For
DESCRIPTOR_TYPE_SAMPLER
, only thesampler
member of each element ofVkWriteDescriptorSet
::pImageInfo
is accessed. - For
DESCRIPTOR_TYPE_SAMPLED_IMAGE
,DESCRIPTOR_TYPE_STORAGE_IMAGE
, orDESCRIPTOR_TYPE_INPUT_ATTACHMENT
, only theimageView
andimageLayout
members of each element ofVkWriteDescriptorSet
::pImageInfo
are accessed. - For
DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
, all members of each element ofVkWriteDescriptorSet
::pImageInfo
are accessed. - For
DESCRIPTOR_TYPE_UNIFORM_BUFFER
,DESCRIPTOR_TYPE_STORAGE_BUFFER
,DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
, orDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
, all members of each element ofVkWriteDescriptorSet
::pBufferInfo
are accessed. - For
DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
orDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
, each element ofVkWriteDescriptorSet
::pTexelBufferView
is accessed.
When updating descriptors with a
descriptorType
ofDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
, none of thepImageInfo
,pBufferInfo
, orpTexelBufferView
members are accessed, instead the source data of the descriptor update operation is taken from the instance ofVkWriteDescriptorSetInlineUniformBlockEXT
in thepNext
chain ofVkWriteDescriptorSet
. When updating descriptors with adescriptorType
ofDESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV
, none of thepImageInfo
,pBufferInfo
, orpTexelBufferView
members are accessed, instead the source data of the descriptor update operation is taken from the instance ofVkWriteDescriptorSetAccelerationStructureNV
in thepNext
chain ofVkWriteDescriptorSet
.See Also
VkDescriptorPoolSize
,VkDescriptorSetLayoutBinding
,VkDescriptorUpdateTemplateEntry
,VkImageViewHandleInfoNVX
,VkWriteDescriptorSet
-
VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT
VkDescriptorPoolCreateFlagBits - Bitmask specifying certain supported operations on a descriptor poolDescription
DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT
specifies that descriptor sets can return their individual allocations to the pool, i.e. all ofAllocateDescriptorSets
,FreeDescriptorSets
, andResetDescriptorPool
are allowed. Otherwise, descriptor sets allocated from the pool must not be individually freed back to the pool, i.e. onlyAllocateDescriptorSets
andResetDescriptorPool
are allowed.DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT
specifies that descriptor sets allocated from this pool can include bindings with theDESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT
bit set. It is valid to allocate descriptor sets that have bindings that do not set theDESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT
bit from a pool that hasDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT_EXT
set.
See Also
VkDescriptorPoolCreateFlags
-
VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT
VkAttachmentDescriptionFlagBits - Bitmask specifying additional properties of an attachmentDescription
ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT
specifies that the attachment aliases the same device memory as other attachments.
See Also
VkAttachmentDescriptionFlags
-
VK_ATTACHMENT_LOAD_OP_LOAD, VK_ATTACHMENT_LOAD_OP_CLEAR, VK_ATTACHMENT_LOAD_OP_DONT_CARE
VkAttachmentLoadOp - Specify how contents of an attachment are treated at the beginning of a subpassDescription
ATTACHMENT_LOAD_OP_LOAD
specifies that the previous contents of the image within the render area will be preserved. For attachments with a depth/stencil format, this uses the access typeACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT
. For attachments with a color format, this uses the access typeACCESS_COLOR_ATTACHMENT_READ_BIT
.ATTACHMENT_LOAD_OP_CLEAR
specifies that the contents within the render area will be cleared to a uniform value, which is specified when a render pass instance is begun. For attachments with a depth/stencil format, this uses the access typeACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
. For attachments with a color format, this uses the access typeACCESS_COLOR_ATTACHMENT_WRITE_BIT
.ATTACHMENT_LOAD_OP_DONT_CARE
specifies that the previous contents within the area need not be preserved; the contents of the attachment will be undefined inside the render area. For attachments with a depth/stencil format, this uses the access typeACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
. For attachments with a color format, this uses the access typeACCESS_COLOR_ATTACHMENT_WRITE_BIT
.
See Also
-
VK_ATTACHMENT_STORE_OP_STORE, VK_ATTACHMENT_STORE_OP_DONT_CARE
VkAttachmentStoreOp - Specify how contents of an attachment are treated at the end of a subpassDescription
ATTACHMENT_STORE_OP_STORE
specifies the contents generated during the render pass and within the render area are written to memory. For attachments with a depth/stencil format, this uses the access typeACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
. For attachments with a color format, this uses the access typeACCESS_COLOR_ATTACHMENT_WRITE_BIT
.ATTACHMENT_STORE_OP_DONT_CARE
specifies the contents within the render area are not needed after rendering, and may be discarded; the contents of the attachment will be undefined inside the render area. For attachments with a depth/stencil format, this uses the access typeACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
. For attachments with a color format, this uses the access typeACCESS_COLOR_ATTACHMENT_WRITE_BIT
.
See Also
-
VK_PIPELINE_BIND_POINT_GRAPHICS, VK_PIPELINE_BIND_POINT_COMPUTE
VkPipelineBindPoint - Specify the bind point of a pipeline object to a command bufferDescription
PIPELINE_BIND_POINT_COMPUTE
specifies binding as a compute pipeline.PIPELINE_BIND_POINT_GRAPHICS
specifies binding as a graphics pipeline.PIPELINE_BIND_POINT_RAY_TRACING_NV
specifies binding as a ray tracing pipeline.
See Also
VkDescriptorUpdateTemplateCreateInfo
,VkIndirectCommandsLayoutCreateInfoNVX
,VkSubpassDescription
,VkSubpassDescription2KHR
,CmdBindDescriptorSets
,CmdBindPipeline
,CmdPushDescriptorSetKHR
-
VK_ACCESS_INDIRECT_COMMAND_READ_BIT, VK_ACCESS_INDEX_READ_BIT, VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT, VK_ACCESS_UNIFORM_READ_BIT, VK_ACCESS_INPUT_ATTACHMENT_READ_BIT, VK_ACCESS_SHADER_READ_BIT, VK_ACCESS_SHADER_WRITE_BIT, VK_ACCESS_COLOR_ATTACHMENT_READ_BIT, VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT, VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT, VK_ACCESS_TRANSFER_READ_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_HOST_READ_BIT, VK_ACCESS_HOST_WRITE_BIT, VK_ACCESS_MEMORY_READ_BIT, VK_ACCESS_MEMORY_WRITE_BIT
VkAccessFlagBits - Bitmask specifying memory access types that will participate in a memory dependencyDescription
ACCESS_INDIRECT_COMMAND_READ_BIT
specifies read access to indirect command data read as part of an indirect drawing or dispatch command.ACCESS_INDEX_READ_BIT
specifies read access to an index buffer as part of an indexed drawing command, bound byCmdBindIndexBuffer
.ACCESS_VERTEX_ATTRIBUTE_READ_BIT
specifies read access to a vertex buffer as part of a drawing command, bound byCmdBindVertexBuffers
.ACCESS_UNIFORM_READ_BIT
specifies read access to a uniform buffer.ACCESS_INPUT_ATTACHMENT_READ_BIT
specifies read access to an input attachment within a render pass during fragment shading.ACCESS_SHADER_READ_BIT
specifies read access to a storage buffer, physical storage buffer, uniform texel buffer, storage texel buffer, sampled image, or storage image.ACCESS_SHADER_WRITE_BIT
specifies write access to a storage buffer, physical storage buffer, storage texel buffer, or storage image.ACCESS_COLOR_ATTACHMENT_READ_BIT
specifies read access to a color attachment, such as via blending, logic operations, or via certain subpass load operations. It does not include advanced blend operations.ACCESS_COLOR_ATTACHMENT_WRITE_BIT
specifies write access to a color, resolve, or depth/stencil resolve attachment during a render pass or via certain subpass load and store operations.ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT
specifies read access to a depth/stencil attachment, via depth or stencil operations or via certain subpass load operations.ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT
specifies write access to a depth/stencil attachment, via depth or stencil operations or via certain subpass load and store operations.ACCESS_TRANSFER_READ_BIT
specifies read access to an image or buffer in a copy operation.ACCESS_TRANSFER_WRITE_BIT
specifies write access to an image or buffer in a clear or copy operation.ACCESS_HOST_READ_BIT
specifies read access by a host operation. Accesses of this type are not performed through a resource, but directly on memory.ACCESS_HOST_WRITE_BIT
specifies write access by a host operation. Accesses of this type are not performed through a resource, but directly on memory.ACCESS_MEMORY_READ_BIT
specifies read access via non-specific entities. These entities include the Vulkan device and host, but may also include entities external to the Vulkan device or otherwise not part of the core Vulkan pipeline. When included in a destination access mask, makes all available writes visible to all future read accesses on entities known to the Vulkan device.ACCESS_MEMORY_WRITE_BIT
specifies write access via non-specific entities. These entities include the Vulkan device and host, but may also include entities external to the Vulkan device or otherwise not part of the core Vulkan pipeline. When included in a source access mask, all writes that are performed by entities known to the Vulkan device are made available. When included in a destination access mask, makes all available writes visible to all future write accesses on entities known to the Vulkan device.ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT
specifies read access to a predicate as part of conditional rendering.ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT
specifies write access to a transform feedback buffer made when transform feedback is active.ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT
specifies read access to a transform feedback counter buffer which is read whenvkCmdBeginTransformFeedbackEXT
executes.ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT
specifies write access to a transform feedback counter buffer which is written whenvkCmdEndTransformFeedbackEXT
executes.ACCESS_COMMAND_PROCESS_READ_BIT_NVX
specifies reads fromVkBuffer
inputs toCmdProcessCommandsNVX
.ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX
specifies writes to the target command buffer inCmdProcessCommandsNVX
.ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT
is similar toACCESS_COLOR_ATTACHMENT_READ_BIT
, but also includes advanced blend operations.ACCESS_SHADING_RATE_IMAGE_READ_BIT_NV
specifies read access to a shading rate image as part of a drawing command, as bound byCmdBindShadingRateImageNV
.ACCESS_ACCELERATION_STRUCTURE_READ_BIT_NV
specifies read access to an acceleration structure as part of a trace or build command.ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_NV
specifies write access to an acceleration structure as part of a build command.ACCESS_FRAGMENT_DENSITY_MAP_READ_BIT_EXT
specifies read access to a fragment density map attachment during dynamic fragment density map operations
Certain access types are only performed by a subset of pipeline stages. Any synchronization command that takes both stage masks and access masks uses both to define the access scopes - only the specified access types performed by the specified stages are included in the access scope. An application must not specify an access flag in a synchronization command if it does not include a pipeline stage in the corresponding stage mask that is able to perform accesses of that type. The following table lists, for each access flag, which pipeline stages can perform that type of access.
Supported access types
If a memory object does not have the
MEMORY_PROPERTY_HOST_COHERENT_BIT
property, thenFlushMappedMemoryRanges
must be called in order to guarantee that writes to the memory object from the host are made available to the host domain, where they can be further made available to the device domain via a domain operation. Similarly,InvalidateMappedMemoryRanges
must be called to guarantee that writes which are available to the host domain are made visible to host operations.If the memory object does have the
MEMORY_PROPERTY_HOST_COHERENT_BIT
property flag, writes to the memory object from the host are automatically made available to the host domain. Similarly, writes made available to the host domain are automatically made visible to the host.Note
The
QueueSubmit
command automatically performs a domain operation from host to device for all writes performed before the command executes, so in most cases an explicit memory barrier is not needed for this case. In the few circumstances where a submit does not occur between the host write and the device read access, writes can be made available by using an explicit memory barrier.See Also
VkAccessFlags
-
VK_DEPENDENCY_BY_REGION_BIT
VkDependencyFlagBits - Bitmask specifying how execution and memory dependencies are formedDescription
DEPENDENCY_BY_REGION_BIT
specifies that dependencies will be framebuffer-local.DEPENDENCY_VIEW_LOCAL_BIT
specifies that a subpass has more than one view.DEPENDENCY_DEVICE_GROUP_BIT
specifies that dependencies are non-device-local dependency.
See Also
VkDependencyFlags
-
VK_COMMAND_POOL_CREATE_TRANSIENT_BIT, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT
VkCommandPoolCreateFlagBits - Bitmask specifying usage behavior for a command poolDescription
COMMAND_POOL_CREATE_TRANSIENT_BIT
specifies that command buffers allocated from the pool will be short-lived, meaning that they will be reset or freed in a relatively short timeframe. This flag may be used by the implementation to control memory allocation behavior within the pool.COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT
allows any command buffer allocated from a pool to be individually reset to the initial state; either by callingResetCommandBuffer
, or via the implicit reset when callingBeginCommandBuffer
. If this flag is not set on a pool, thenvkResetCommandBuffer
must not be called for any command buffer allocated from that pool.COMMAND_POOL_CREATE_PROTECTED_BIT
specifies that command buffers allocated from the pool are protected command buffers. If the protected memory feature is not enabled, theCOMMAND_POOL_CREATE_PROTECTED_BIT
bit offlags
must not be set.
See Also
VkCommandPoolCreateFlags
-
VK_COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT
VkCommandPoolResetFlagBits - Bitmask controlling behavior of a command pool resetDescription
COMMAND_POOL_RESET_RELEASE_RESOURCES_BIT
specifies that resetting a command pool recycles all of the resources from the command pool back to the system.
See Also
VkCommandPoolResetFlags
-
VK_COMMAND_BUFFER_LEVEL_PRIMARY, VK_COMMAND_BUFFER_LEVEL_SECONDARY
VkCommandBufferLevel - Enumerant specifying a command buffer levelDescription
COMMAND_BUFFER_LEVEL_PRIMARY
specifies a primary command buffer.COMMAND_BUFFER_LEVEL_SECONDARY
specifies a secondary command buffer.
See Also
-
VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
VkCommandBufferUsageFlagBits - Bitmask specifying usage behavior for command bufferDescription
COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT
specifies that each recording of the command buffer will only be submitted once, and the command buffer will be reset and recorded again between each submission.COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT
specifies that a secondary command buffer is considered to be entirely inside a render pass. If this is a primary command buffer, then this bit is ignored.COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
specifies that a command buffer can be resubmitted to a queue while it is in the pending state, and recorded into multiple primary command buffers.
See Also
VkCommandBufferUsageFlags
-
VK_QUERY_CONTROL_PRECISE_BIT
VkQueryControlFlagBits - Bitmask specifying constraints on a queryDescription
QUERY_CONTROL_PRECISE_BIT
specifies the precision of occlusion queries.
See Also
VkQueryControlFlags
-
VK_COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT
VkCommandBufferResetFlagBits - Bitmask controlling behavior of a command buffer resetDescription
COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT
specifies that most or all memory resources currently owned by the command buffer should be returned to the parent command pool. If this flag is not set, then the command buffer may hold onto memory resources and reuse them when recording commands.commandBuffer
is moved to the initial state.
See Also
VkCommandBufferResetFlags
-
VK_STENCIL_FACE_FRONT_BIT, VK_STENCIL_FACE_BACK_BIT, VK_STENCIL_FACE_FRONT_AND_BACK, VK_STENCIL_FRONT_AND_BACK
VkStencilFaceFlagBits - Bitmask specifying sets of stencil state for which to update the compare maskDescription
STENCIL_FACE_FRONT_BIT
specifies that only the front set of stencil state is updated.STENCIL_FACE_BACK_BIT
specifies that only the back set of stencil state is updated.STENCIL_FACE_FRONT_AND_BACK
is the combination ofSTENCIL_FACE_FRONT_BIT
andSTENCIL_FACE_BACK_BIT
, and specifies that both sets of stencil state are updated.
See Also
VkStencilFaceFlags
Enum values:
-
VK_INDEX_TYPE_UINT16, VK_INDEX_TYPE_UINT32
VkIndexType - Type of index buffer indicesDescription
INDEX_TYPE_UINT16
specifies that indices are 16-bit unsigned integer values.INDEX_TYPE_UINT32
specifies that indices are 32-bit unsigned integer values.INDEX_TYPE_NONE_NV
specifies that no indices are provided.INDEX_TYPE_UINT8_EXT
specifies that indices are 8-bit unsigned integer values.
See Also
VkGeometryTrianglesNV
,VkObjectTableIndexBufferEntryNVX
,CmdBindIndexBuffer
-
VK_SUBPASS_CONTENTS_INLINE, VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS
VkSubpassContents - Specify how commands in the first subpass of a render pass are providedDescription
SUBPASS_CONTENTS_INLINE
specifies that the contents of the subpass will be recorded inline in the primary command buffer, and secondary command buffers must not be executed within the subpass.SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS
specifies that the contents are recorded in secondary command buffers that will be called from the primary command buffer, andCmdExecuteCommands
is the only valid command on the command buffer untilCmdNextSubpass
orCmdEndRenderPass
.
See Also
-
VK_OBJECT_TYPE_UNKNOWN, VK_OBJECT_TYPE_INSTANCE, VK_OBJECT_TYPE_PHYSICAL_DEVICE, VK_OBJECT_TYPE_DEVICE, VK_OBJECT_TYPE_QUEUE, VK_OBJECT_TYPE_SEMAPHORE, VK_OBJECT_TYPE_COMMAND_BUFFER, VK_OBJECT_TYPE_FENCE, VK_OBJECT_TYPE_DEVICE_MEMORY, VK_OBJECT_TYPE_BUFFER, VK_OBJECT_TYPE_IMAGE, VK_OBJECT_TYPE_EVENT, VK_OBJECT_TYPE_QUERY_POOL, VK_OBJECT_TYPE_BUFFER_VIEW, VK_OBJECT_TYPE_IMAGE_VIEW, VK_OBJECT_TYPE_SHADER_MODULE, VK_OBJECT_TYPE_PIPELINE_CACHE, VK_OBJECT_TYPE_PIPELINE_LAYOUT, VK_OBJECT_TYPE_RENDER_PASS, VK_OBJECT_TYPE_PIPELINE, VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT, VK_OBJECT_TYPE_SAMPLER, VK_OBJECT_TYPE_DESCRIPTOR_POOL, VK_OBJECT_TYPE_DESCRIPTOR_SET, VK_OBJECT_TYPE_FRAMEBUFFER, VK_OBJECT_TYPE_COMMAND_POOL
VkObjectType - Specify an enumeration to track object handle typesDescription
VkObjectType and Vulkan Handle Relationship
See Also
-
VK_VENDOR_ID_VIV, VK_VENDOR_ID_VSI, VK_VENDOR_ID_KAZAN
VkVendorId - Khronos vendor IDsDescription
Note
Khronos vendor IDs may be allocated by vendors at any time. Only the latest canonical versions of this Specification, of the corresponding
vk.xml
API Registry, and of the correspondingvulkan_core.h
header file must contain all reserved Khronos vendor IDs.Only Khronos vendor IDs are given symbolic names at present. PCI vendor IDs returned by the implementation can be looked up in the PCI-SIG database.
See Also
No cross-references are available
Enum values:
-
VK_API_VERSION_1_0
The API version number for Vulkan 1.0.The patch version number in this macro will always be zero. The supported patch version for a physical device can be queried with
GetPhysicalDeviceProperties
.
-
VK_HEADER_VERSION
The Vulkan registry version used to generate the LWJGL bindings.
-
VK_NULL_HANDLE
The reserved handleVK_NULL_HANDLE
can be passed in place of valid object handles when explicitly called out in the specification. Any command that creates an object successfully must not returnVK_NULL_HANDLE
. It is valid to passVK_NULL_HANDLE
to anyvkDestroy*
orvkFree*
command, which will silently ignore these values.
-
VK_MAX_PHYSICAL_DEVICE_NAME_SIZE, VK_UUID_SIZE, VK_MAX_EXTENSION_NAME_SIZE, VK_MAX_DESCRIPTION_SIZE, VK_MAX_MEMORY_TYPES, VK_MAX_MEMORY_HEAPS, VK_REMAINING_MIP_LEVELS, VK_REMAINING_ARRAY_LAYERS, VK_ATTACHMENT_UNUSED, VK_TRUE, VK_FALSE, VK_QUEUE_FAMILY_IGNORED, VK_SUBPASS_EXTERNAL, VK_LOD_CLAMP_NONE, VK_WHOLE_SIZE
API Constants
-
-
Method Detail
-
nvkCreateInstance
public static int nvkCreateInstance(long pCreateInfo, long pAllocator, long pInstance)
Unsafe version of:CreateInstance
-
vkCreateInstance
public static int vkCreateInstance(VkInstanceCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, org.lwjgl.PointerBuffer pInstance)
Create a new Vulkan instance.C Specification
To create an instance object, call:
VkResult vkCreateInstance( const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance);
Description
vkCreateInstance
verifies that the requested layers exist. If not,vkCreateInstance
will returnERROR_LAYER_NOT_PRESENT
. NextvkCreateInstance
verifies that the requested extensions are supported (e.g. in the implementation or in any enabled instance layer) and if any requested extension is not supported,vkCreateInstance
must returnERROR_EXTENSION_NOT_PRESENT
. After verifying and enabling the instance layers and extensions theVkInstance
object is created and returned to the application. If a requested extension is only supported by a layer, both the layer and the extension need to be specified atvkCreateInstance
time for the creation to succeed.Valid Usage
- All required extensions for each extension in the
VkInstanceCreateInfo
::ppEnabledExtensionNames
list must also be present in that list.
Valid Usage (Implicit)
pCreateInfo
must be a valid pointer to a validVkInstanceCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pInstance
must be a valid pointer to aVkInstance
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
pCreateInfo
- points to an instance ofVkInstanceCreateInfo
controlling creation of the instance.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pInstance
- points aVkInstance
handle in which the resulting instance is returned.
- All required extensions for each extension in the
-
nvkDestroyInstance
public static void nvkDestroyInstance(VkInstance instance, long pAllocator)
Unsafe version of:DestroyInstance
-
vkDestroyInstance
public static void vkDestroyInstance(VkInstance instance, @Nullable VkAllocationCallbacks pAllocator)
Destroy an instance of Vulkan.C Specification
To destroy an instance, call:
void vkDestroyInstance( VkInstance instance, const VkAllocationCallbacks* pAllocator);
Valid Usage
- All child objects created using
instance
must have been destroyed prior to destroyinginstance
- If
VkAllocationCallbacks
were provided wheninstance
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided wheninstance
was created,pAllocator
must beNULL
Valid Usage (Implicit)
- If
instance
is notNULL
,instance
must be a validVkInstance
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure
Host Synchronization
- Host access to
instance
must be externally synchronized
See Also
- Parameters:
instance
- the handle of the instance to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All child objects created using
-
nvkEnumeratePhysicalDevices
public static int nvkEnumeratePhysicalDevices(VkInstance instance, long pPhysicalDeviceCount, long pPhysicalDevices)
Unsafe version of:EnumeratePhysicalDevices
- Parameters:
pPhysicalDeviceCount
- a pointer to an integer related to the number of physical devices available or queried, as described below.
-
vkEnumeratePhysicalDevices
public static int vkEnumeratePhysicalDevices(VkInstance instance, java.nio.IntBuffer pPhysicalDeviceCount, @Nullable org.lwjgl.PointerBuffer pPhysicalDevices)
Enumerates the physical devices accessible to a Vulkan instance.C Specification
To retrieve a list of physical device objects representing the physical devices installed in the system, call:
VkResult vkEnumeratePhysicalDevices( VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
Description
If
pPhysicalDevices
isNULL
, then the number of physical devices available is returned inpPhysicalDeviceCount
. Otherwise,pPhysicalDeviceCount
must point to a variable set by the user to the number of elements in thepPhysicalDevices
array, and on return the variable is overwritten with the number of handles actually written topPhysicalDevices
. IfpPhysicalDeviceCount
is less than the number of physical devices available, at mostpPhysicalDeviceCount
structures will be written. IfpPhysicalDeviceCount
is smaller than the number of physical devices available,INCOMPLETE
will be returned instead ofSUCCESS
, to indicate that not all the available physical devices were returned.Valid Usage (Implicit)
instance
must be a validVkInstance
handlepPhysicalDeviceCount
must be a valid pointer to auint32_t
value- If the value referenced by
pPhysicalDeviceCount
is not 0, andpPhysicalDevices
is notNULL
,pPhysicalDevices
must be a valid pointer to an array ofpPhysicalDeviceCount
VkPhysicalDevice
handles
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
instance
- a handle to a Vulkan instance previously created withCreateInstance
.pPhysicalDeviceCount
- a pointer to an integer related to the number of physical devices available or queried, as described below.pPhysicalDevices
- eitherNULL
or a pointer to an array ofVkPhysicalDevice
handles.
-
nvkGetPhysicalDeviceFeatures
public static void nvkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, long pFeatures)
Unsafe version of:GetPhysicalDeviceFeatures
-
vkGetPhysicalDeviceFeatures
public static void vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures pFeatures)
Reports capabilities of a physical device.C Specification
To query supported features, call:
void vkGetPhysicalDeviceFeatures( VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures);
Valid Usage (Implicit)
physicalDevice
must be a validVkPhysicalDevice
handlepFeatures
must be a valid pointer to aVkPhysicalDeviceFeatures
structure
See Also
- Parameters:
physicalDevice
- the physical device from which to query the supported features.pFeatures
- a pointer to aVkPhysicalDeviceFeatures
structure in which the physical device features are returned. For each feature, a value ofTRUE
specifies that the feature is supported on this physical device, andFALSE
specifies that the feature is not supported.
-
nvkGetPhysicalDeviceFormatProperties
public static void nvkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, int format, long pFormatProperties)
Unsafe version of:GetPhysicalDeviceFormatProperties
-
vkGetPhysicalDeviceFormatProperties
public static void vkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, int format, VkFormatProperties pFormatProperties)
Lists physical device's format capabilities.C Specification
To query supported format features which are properties of the physical device, call:
void vkGetPhysicalDeviceFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties);
Valid Usage (Implicit)
physicalDevice
must be a validVkPhysicalDevice
handleformat
must be a validVkFormat
valuepFormatProperties
must be a valid pointer to aVkFormatProperties
structure
See Also
- Parameters:
physicalDevice
- the physical device from which to query the format properties.format
- the format whose properties are queried.pFormatProperties
- a pointer to aVkFormatProperties
structure in which physical device properties forformat
are returned.
-
nvkGetPhysicalDeviceImageFormatProperties
public static int nvkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, int format, int type, int tiling, int usage, int flags, long pImageFormatProperties)
Unsafe version of:GetPhysicalDeviceImageFormatProperties
-
vkGetPhysicalDeviceImageFormatProperties
public static int vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, int format, int type, int tiling, int usage, int flags, VkImageFormatProperties pImageFormatProperties)
Lists physical device's image format capabilities.C Specification
To query additional capabilities specific to image types, call:
VkResult vkGetPhysicalDeviceImageFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties);
Description
The
format
,type
,tiling
,usage
, andflags
parameters correspond to parameters that would be consumed byCreateImage
(as members ofVkImageCreateInfo
).If
format
is not a supported image format, or if the combination offormat
,type
,tiling
,usage
, andflags
is not supported for images, thenvkGetPhysicalDeviceImageFormatProperties
returnsERROR_FORMAT_NOT_SUPPORTED
.The limitations on an image format that are reported by
vkGetPhysicalDeviceImageFormatProperties
have the following property: ifusage1
andusage2
of typeVkImageUsageFlags
are such that the bits set inusage1
are a subset of the bits set inusage2
, andflags1
andflags2
of typeVkImageCreateFlags
are such that the bits set inflags1
are a subset of the bits set inflags2
, then the limitations forusage1
andflags1
must be no more strict than the limitations forusage2
andflags2
, for all values offormat
,type
, andtiling
.Valid Usage
tiling
must not beIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
. (UseGetPhysicalDeviceImageFormatProperties2
instead).
Valid Usage (Implicit)
physicalDevice
must be a validVkPhysicalDevice
handleformat
must be a validVkFormat
valuetype
must be a validVkImageType
valuetiling
must be a validVkImageTiling
valueusage
must be a valid combination ofVkImageUsageFlagBits
valuesusage
must not be 0flags
must be a valid combination ofVkImageCreateFlagBits
valuespImageFormatProperties
must be a valid pointer to aVkImageFormatProperties
structure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
physicalDevice
- the physical device from which to query the image capabilities.format
- aVkFormat
value specifying the image format, corresponding toVkImageCreateInfo
::format
.type
- aVkImageType
value specifying the image type, corresponding toVkImageCreateInfo
::imageType
.tiling
- aVkImageTiling
value specifying the image tiling, corresponding toVkImageCreateInfo
::tiling
.usage
- a bitmask ofVkImageUsageFlagBits
specifying the intended usage of the image, corresponding toVkImageCreateInfo
::usage
.flags
- a bitmask ofVkImageCreateFlagBits
specifying additional parameters of the image, corresponding toVkImageCreateInfo
::flags
.pImageFormatProperties
- points to an instance of theVkImageFormatProperties
structure in which capabilities are returned.
-
nvkGetPhysicalDeviceProperties
public static void nvkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, long pProperties)
Unsafe version of:GetPhysicalDeviceProperties
-
vkGetPhysicalDeviceProperties
public static void vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties pProperties)
Returns properties of a physical device.C Specification
To query general properties of physical devices once enumerated, call:
void vkGetPhysicalDeviceProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties);
Valid Usage (Implicit)
physicalDevice
must be a validVkPhysicalDevice
handlepProperties
must be a valid pointer to aVkPhysicalDeviceProperties
structure
See Also
- Parameters:
physicalDevice
- the handle to the physical device whose properties will be queried.pProperties
- points to an instance of theVkPhysicalDeviceProperties
structure, that will be filled with returned information.
-
nvkGetPhysicalDeviceQueueFamilyProperties
public static void nvkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, long pQueueFamilyPropertyCount, long pQueueFamilyProperties)
Unsafe version of:GetPhysicalDeviceQueueFamilyProperties
- Parameters:
pQueueFamilyPropertyCount
- a pointer to an integer related to the number of queue families available or queried, as described below.
-
vkGetPhysicalDeviceQueueFamilyProperties
public static void vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, java.nio.IntBuffer pQueueFamilyPropertyCount, @Nullable VkQueueFamilyProperties.Buffer pQueueFamilyProperties)
Reports properties of the queues of the specified physical device.C Specification
To query properties of queues available on a physical device, call:
void vkGetPhysicalDeviceQueueFamilyProperties( VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties);
Description
If
pQueueFamilyProperties
isNULL
, then the number of queue families available is returned inpQueueFamilyPropertyCount
. Implementations must support at least one queue family. Otherwise,pQueueFamilyPropertyCount
must point to a variable set by the user to the number of elements in thepQueueFamilyProperties
array, and on return the variable is overwritten with the number of structures actually written topQueueFamilyProperties
. IfpQueueFamilyPropertyCount
is less than the number of queue families available, at mostpQueueFamilyPropertyCount
structures will be written.Valid Usage (Implicit)
physicalDevice
must be a validVkPhysicalDevice
handlepQueueFamilyPropertyCount
must be a valid pointer to auint32_t
value- If the value referenced by
pQueueFamilyPropertyCount
is not 0, andpQueueFamilyProperties
is notNULL
,pQueueFamilyProperties
must be a valid pointer to an array ofpQueueFamilyPropertyCount
VkQueueFamilyProperties
structures
See Also
- Parameters:
physicalDevice
- the handle to the physical device whose properties will be queried.pQueueFamilyPropertyCount
- a pointer to an integer related to the number of queue families available or queried, as described below.pQueueFamilyProperties
- eitherNULL
or a pointer to an array ofVkQueueFamilyProperties
structures.
-
nvkGetPhysicalDeviceMemoryProperties
public static void nvkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, long pMemoryProperties)
Unsafe version of:GetPhysicalDeviceMemoryProperties
-
vkGetPhysicalDeviceMemoryProperties
public static void vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties pMemoryProperties)
Reports memory information for the specified physical device.C Specification
To query memory properties, call:
void vkGetPhysicalDeviceMemoryProperties( VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties);
Valid Usage (Implicit)
physicalDevice
must be a validVkPhysicalDevice
handlepMemoryProperties
must be a valid pointer to aVkPhysicalDeviceMemoryProperties
structure
See Also
- Parameters:
physicalDevice
- the handle to the device to query.pMemoryProperties
- points to an instance of theVkPhysicalDeviceMemoryProperties
structure in which the properties are returned.
-
nvkGetInstanceProcAddr
public static long nvkGetInstanceProcAddr(VkInstance instance, long pName)
Unsafe version of:GetInstanceProcAddr
-
vkGetInstanceProcAddr
public static long vkGetInstanceProcAddr(VkInstance instance, java.nio.ByteBuffer pName) public static long vkGetInstanceProcAddr(VkInstance instance, java.lang.CharSequence pName)
Return a function pointer for a command.C Specification
Function pointers for all Vulkan commands can be obtained with the command:
PFN_vkVoidFunction vkGetInstanceProcAddr( VkInstance instance, const char* pName);
Description
vkGetInstanceProcAddr
itself is obtained in a platform- and loader- specific manner. Typically, the loader library will export this command as a function symbol, so applications can link against the loader library, or load it dynamically and look up the symbol using platform-specific APIs.The table below defines the various use cases for
vkGetInstanceProcAddr
and expected return value ("fp
" is "function pointer
") for each case.The returned function pointer is of type
PFN_vkVoidFunction
, and must be cast to the type of the command being queried.vkGetInstanceProcAddr behavior
instance
pName
return value *1 NULL
undefined invalid non- NULL
instance*1 undefined NULL
EnumerateInstanceVersion
fp NULL
EnumerateInstanceExtensionProperties
fp NULL
EnumerateInstanceLayerProperties
fp NULL
CreateInstance
fp instance core Vulkan command fp2 instance enabled instance extension commands for instance
fp2 instance available device extension3 commands for instance
fp2 any other case, not covered above NULL
- 1
- "*" means any representable value for the parameter (including valid values, invalid values, and
NULL
). - 2
- The returned function pointer must only be called with a dispatchable object (the first parameter) that is
instance
or a child ofinstance
, e.g.VkInstance
,VkPhysicalDevice
,VkDevice
,VkQueue
, orVkCommandBuffer
. - 3
- An “available device extension” is a device extension supported by any physical device enumerated by
instance
.
Valid Usage (Implicit)
- If
instance
is notNULL
,instance
must be a validVkInstance
handle pName
must be a null-terminated UTF-8 string
See Also
PFN_vkVoidFunction
- Parameters:
instance
- the instance that the function pointer will be compatible with, orNULL
for commands not dependent on any instance.pName
- the name of the command to obtain.
-
nvkGetDeviceProcAddr
public static long nvkGetDeviceProcAddr(VkDevice device, long pName)
Unsafe version of:GetDeviceProcAddr
-
vkGetDeviceProcAddr
public static long vkGetDeviceProcAddr(VkDevice device, java.nio.ByteBuffer pName) public static long vkGetDeviceProcAddr(VkDevice device, java.lang.CharSequence pName)
Return a function pointer for a command.C Specification
In order to support systems with multiple Vulkan implementations, the function pointers returned by
vkGetInstanceProcAddr
may point to dispatch code that calls a different real implementation for differentVkDevice
objects or their child objects. The overhead of the internal dispatch forVkDevice
objects can be avoided by obtaining device-specific function pointers for any commands that use a device or device-child object as their dispatchable object. Such function pointers can be obtained with the command:PFN_vkVoidFunction vkGetDeviceProcAddr( VkDevice device, const char* pName);
Description
The returned function pointer is of type
PFN_vkVoidFunction
, and must be cast to the type of the command being queried. The function pointer must only be called with a dispatchable object (the first parameter) that isdevice
or a child ofdevice
.vkGetDeviceProcAddr behavior
device
pName
return value NULL
*<1> undefined invalid device *<1> undefined device NULL
undefined device core device-level Vulkan command fp2 device enabled device extension device-level commands fp2 any other case, not covered above NULL
- 1
- "*" means any representable value for the parameter (including valid values, invalid values, and
NULL
). - 2
- The returned function pointer must only be called with a dispatchable object (the first parameter) that is
device
or a child ofdevice
e.g.VkDevice
,VkQueue
, orVkCommandBuffer
.
Valid Usage (Implicit)
device
must be a validVkDevice
handlepName
must be a null-terminated UTF-8 string
See Also
PFN_vkVoidFunction
-
nvkCreateDevice
public static int nvkCreateDevice(VkPhysicalDevice physicalDevice, long pCreateInfo, long pAllocator, long pDevice)
Unsafe version of:CreateDevice
-
vkCreateDevice
public static int vkCreateDevice(VkPhysicalDevice physicalDevice, VkDeviceCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, org.lwjgl.PointerBuffer pDevice)
Create a new device instance.C Specification
A logical device is created as a connection to a physical device. To create a logical device, call:
VkResult vkCreateDevice( VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice);
Description
vkCreateDevice
verifies that extensions and features requested in theppEnabledExtensionNames
andpEnabledFeatures
members ofpCreateInfo
, respectively, are supported by the implementation. If any requested extension is not supported,vkCreateDevice
must returnERROR_EXTENSION_NOT_PRESENT
. If any requested feature is not supported,vkCreateDevice
must returnERROR_FEATURE_NOT_PRESENT
. Support for extensions can be checked before creating a device by queryingEnumerateDeviceExtensionProperties
. Support for features can similarly be checked by queryingGetPhysicalDeviceFeatures
.After verifying and enabling the extensions the
VkDevice
object is created and returned to the application. If a requested extension is only supported by a layer, both the layer and the extension need to be specified atvkCreateInstance
time for the creation to succeed.Multiple logical devices can be created from the same physical device. Logical device creation may fail due to lack of device-specific resources (in addition to the other errors). If that occurs,
vkCreateDevice
will returnERROR_TOO_MANY_OBJECTS
.Valid Usage
- All required extensions for each extension in the
VkDeviceCreateInfo
::ppEnabledExtensionNames
list must also be present in that list.
Valid Usage (Implicit)
physicalDevice
must be a validVkPhysicalDevice
handlepCreateInfo
must be a valid pointer to a validVkDeviceCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pDevice
must be a valid pointer to aVkDevice
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
physicalDevice
- must be one of the device handles returned from a call tovkEnumeratePhysicalDevices
(see Physical Device Enumeration).pCreateInfo
- a pointer to aVkDeviceCreateInfo
structure containing information about how to create the device.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pDevice
- points to a handle in which the createdVkDevice
is returned.
- All required extensions for each extension in the
-
nvkDestroyDevice
public static void nvkDestroyDevice(VkDevice device, long pAllocator)
Unsafe version of:DestroyDevice
-
vkDestroyDevice
public static void vkDestroyDevice(VkDevice device, @Nullable VkAllocationCallbacks pAllocator)
Destroy a logical device.C Specification
To destroy a device, call:
void vkDestroyDevice( VkDevice device, const VkAllocationCallbacks* pAllocator);
Description
To ensure that no work is active on the device,
DeviceWaitIdle
can be used to gate the destruction of the device. Prior to destroying a device, an application is responsible for destroying/freeing any Vulkan objects that were created using that device as the first parameter of the correspondingvkCreate*
orvkAllocate*
command.Note
The lifetime of each of these objects is bound by the lifetime of the
VkDevice
object. Therefore, to avoid resource leaks, it is critical that an application explicitly free all of these resources prior to callingvkDestroyDevice
.Valid Usage
- All child objects created on
device
must have been destroyed prior to destroyingdevice
- If
VkAllocationCallbacks
were provided whendevice
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whendevice
was created,pAllocator
must beNULL
Valid Usage (Implicit)
- If
device
is notNULL
,device
must be a validVkDevice
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure
Host Synchronization
- Host access to
device
must be externally synchronized
See Also
- Parameters:
device
- the logical device to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All child objects created on
-
nvkEnumerateInstanceExtensionProperties
public static int nvkEnumerateInstanceExtensionProperties(long pLayerName, long pPropertyCount, long pProperties)
Unsafe version of:EnumerateInstanceExtensionProperties
- Parameters:
pPropertyCount
- a pointer to an integer related to the number of extension properties available or queried, as described below.
-
vkEnumerateInstanceExtensionProperties
public static int vkEnumerateInstanceExtensionProperties(@Nullable java.nio.ByteBuffer pLayerName, java.nio.IntBuffer pPropertyCount, @Nullable VkExtensionProperties.Buffer pProperties) public static int vkEnumerateInstanceExtensionProperties(@Nullable java.lang.CharSequence pLayerName, java.nio.IntBuffer pPropertyCount, @Nullable VkExtensionProperties.Buffer pProperties)
Returns up to requested number of global extension properties.C Specification
To query the available instance extensions, call:
VkResult vkEnumerateInstanceExtensionProperties( const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties);
Description
When
pLayerName
parameter isNULL
, only extensions provided by the Vulkan implementation or by implicitly enabled layers are returned. WhenpLayerName
is the name of a layer, the instance extensions provided by that layer are returned.If
pProperties
isNULL
, then the number of extensions properties available is returned inpPropertyCount
. Otherwise,pPropertyCount
must point to a variable set by the user to the number of elements in thepProperties
array, and on return the variable is overwritten with the number of structures actually written topProperties
. IfpPropertyCount
is less than the number of extension properties available, at mostpPropertyCount
structures will be written. IfpPropertyCount
is smaller than the number of extensions available,INCOMPLETE
will be returned instead ofSUCCESS
, to indicate that not all the available properties were returned.Because the list of available layers may change externally between calls to
EnumerateInstanceExtensionProperties
, two calls may retrieve different results if apLayerName
is available in one call but not in another. The extensions supported by a layer may also change between two calls, e.g. if the layer implementation is replaced by a different version between those calls.Implementations must not advertise any pair of extensions that cannot be enabled together due to behavioral differences, or any extension that cannot be enabled against the advertised version.
Valid Usage (Implicit)
- If
pLayerName
is notNULL
,pLayerName
must be a null-terminated UTF-8 string pPropertyCount
must be a valid pointer to auint32_t
value- If the value referenced by
pPropertyCount
is not 0, andpProperties
is notNULL
,pProperties
must be a valid pointer to an array ofpPropertyCount
VkExtensionProperties
structures
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
pLayerName
- eitherNULL
or a pointer to a null-terminated UTF-8 string naming the layer to retrieve extensions from.pPropertyCount
- a pointer to an integer related to the number of extension properties available or queried, as described below.pProperties
- eitherNULL
or a pointer to an array ofVkExtensionProperties
structures.
- If
-
nvkEnumerateDeviceExtensionProperties
public static int nvkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, long pLayerName, long pPropertyCount, long pProperties)
Unsafe version of:EnumerateDeviceExtensionProperties
- Parameters:
pPropertyCount
- a pointer to an integer related to the number of extension properties available or queried, and is treated in the same fashion as theEnumerateInstanceExtensionProperties
::pPropertyCount
parameter.
-
vkEnumerateDeviceExtensionProperties
public static int vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, @Nullable java.nio.ByteBuffer pLayerName, java.nio.IntBuffer pPropertyCount, @Nullable VkExtensionProperties.Buffer pProperties) public static int vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, @Nullable java.lang.CharSequence pLayerName, java.nio.IntBuffer pPropertyCount, @Nullable VkExtensionProperties.Buffer pProperties)
Returns properties of available physical device extensions.C Specification
To query the extensions available to a given physical device, call:
VkResult vkEnumerateDeviceExtensionProperties( VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties);
Description
When
pLayerName
parameter isNULL
, only extensions provided by the Vulkan implementation or by implicitly enabled layers are returned. WhenpLayerName
is the name of a layer, the device extensions provided by that layer are returned.Implementations must not advertise any pair of extensions that cannot be enabled together due to behavioral differences, or any extension that cannot be enabled against the advertised version.
Valid Usage (Implicit)
physicalDevice
must be a validVkPhysicalDevice
handle- If
pLayerName
is notNULL
,pLayerName
must be a null-terminated UTF-8 string pPropertyCount
must be a valid pointer to auint32_t
value- If the value referenced by
pPropertyCount
is not 0, andpProperties
is notNULL
,pProperties
must be a valid pointer to an array ofpPropertyCount
VkExtensionProperties
structures
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
physicalDevice
- the physical device that will be queried.pLayerName
- eitherNULL
or a pointer to a null-terminated UTF-8 string naming the layer to retrieve extensions from.pPropertyCount
- a pointer to an integer related to the number of extension properties available or queried, and is treated in the same fashion as theEnumerateInstanceExtensionProperties
::pPropertyCount
parameter.pProperties
- eitherNULL
or a pointer to an array ofVkExtensionProperties
structures.
-
nvkEnumerateInstanceLayerProperties
public static int nvkEnumerateInstanceLayerProperties(long pPropertyCount, long pProperties)
Unsafe version of:EnumerateInstanceLayerProperties
- Parameters:
pPropertyCount
- a pointer to an integer related to the number of layer properties available or queried, as described below.
-
vkEnumerateInstanceLayerProperties
public static int vkEnumerateInstanceLayerProperties(java.nio.IntBuffer pPropertyCount, @Nullable VkLayerProperties.Buffer pProperties)
Returns up to requested number of global layer properties.C Specification
To query the available layers, call:
VkResult vkEnumerateInstanceLayerProperties( uint32_t* pPropertyCount, VkLayerProperties* pProperties);
Description
If
pProperties
isNULL
, then the number of layer properties available is returned inpPropertyCount
. Otherwise,pPropertyCount
must point to a variable set by the user to the number of elements in thepProperties
array, and on return the variable is overwritten with the number of structures actually written topProperties
. IfpPropertyCount
is less than the number of layer properties available, at mostpPropertyCount
structures will be written. IfpPropertyCount
is smaller than the number of layers available,INCOMPLETE
will be returned instead ofSUCCESS
, to indicate that not all the available layer properties were returned.The list of available layers may change at any time due to actions outside of the Vulkan implementation, so two calls to
vkEnumerateInstanceLayerProperties
with the same parameters may return different results, or retrieve differentpPropertyCount
values orpProperties
contents. Once an instance has been created, the layers enabled for that instance will continue to be enabled and valid for the lifetime of that instance, even if some of them become unavailable for future instances.Valid Usage (Implicit)
pPropertyCount
must be a valid pointer to auint32_t
value- If the value referenced by
pPropertyCount
is not 0, andpProperties
is notNULL
,pProperties
must be a valid pointer to an array ofpPropertyCount
VkLayerProperties
structures
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
pPropertyCount
- a pointer to an integer related to the number of layer properties available or queried, as described below.pProperties
- eitherNULL
or a pointer to an array ofVkLayerProperties
structures.
-
nvkEnumerateDeviceLayerProperties
public static int nvkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, long pPropertyCount, long pProperties)
Unsafe version of:EnumerateDeviceLayerProperties
- Parameters:
pPropertyCount
- a pointer to an integer related to the number of layer properties available or queried.
-
vkEnumerateDeviceLayerProperties
public static int vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, java.nio.IntBuffer pPropertyCount, @Nullable VkLayerProperties.Buffer pProperties)
Returns properties of available physical device layers.C Specification
To enumerate device layers, call:
VkResult vkEnumerateDeviceLayerProperties( VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties);
Description
If
pProperties
isNULL
, then the number of layer properties available is returned inpPropertyCount
. Otherwise,pPropertyCount
must point to a variable set by the user to the number of elements in thepProperties
array, and on return the variable is overwritten with the number of structures actually written topProperties
. IfpPropertyCount
is less than the number of layer properties available, at mostpPropertyCount
structures will be written. IfpPropertyCount
is smaller than the number of layers available,INCOMPLETE
will be returned instead ofSUCCESS
, to indicate that not all the available layer properties were returned.The list of layers enumerated by
vkEnumerateDeviceLayerProperties
must be exactly the sequence of layers enabled for the instance. The members ofVkLayerProperties
for each enumerated layer must be the same as the properties when the layer was enumerated byvkEnumerateInstanceLayerProperties
.Valid Usage (Implicit)
physicalDevice
must be a validVkPhysicalDevice
handlepPropertyCount
must be a valid pointer to auint32_t
value- If the value referenced by
pPropertyCount
is not 0, andpProperties
is notNULL
,pProperties
must be a valid pointer to an array ofpPropertyCount
VkLayerProperties
structures
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
pPropertyCount
- a pointer to an integer related to the number of layer properties available or queried.pProperties
- eitherNULL
or a pointer to an array ofVkLayerProperties
structures.
-
nvkGetDeviceQueue
public static void nvkGetDeviceQueue(VkDevice device, int queueFamilyIndex, int queueIndex, long pQueue)
Unsafe version of:GetDeviceQueue
-
vkGetDeviceQueue
public static void vkGetDeviceQueue(VkDevice device, int queueFamilyIndex, int queueIndex, org.lwjgl.PointerBuffer pQueue)
Get a queue handle from a device.C Specification
To retrieve a handle to a
VkQueue
object, call:void vkGetDeviceQueue( VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue);
Description
vkGetDeviceQueue
must only be used to get queues that were created with theflags
parameter ofVkDeviceQueueCreateInfo
set to zero. To get queues that were created with a non-zeroflags
parameter useGetDeviceQueue2
.Valid Usage
queueFamilyIndex
must be one of the queue family indices specified whendevice
was created, via theVkDeviceQueueCreateInfo
structurequeueIndex
must be less than the number of queues created for the specified queue family index whendevice
was created, via thequeueCount
member of theVkDeviceQueueCreateInfo
structureVkDeviceQueueCreateInfo
::flags
must have been set to zero whendevice
was created
Valid Usage (Implicit)
device
must be a validVkDevice
handlepQueue
must be a valid pointer to aVkQueue
handle
- Parameters:
device
- the logical device that owns the queue.queueFamilyIndex
- the index of the queue family to which the queue belongs.queueIndex
- the index within this queue family of the queue to retrieve.pQueue
- a pointer to aVkQueue
object that will be filled with the handle for the requested queue.
-
nvkQueueSubmit
public static int nvkQueueSubmit(VkQueue queue, int submitCount, long pSubmits, long fence)
Unsafe version of:QueueSubmit
- Parameters:
submitCount
- the number of elements in thepSubmits
array.
-
vkQueueSubmit
public static int vkQueueSubmit(VkQueue queue, @Nullable VkSubmitInfo.Buffer pSubmits, long fence)
Submits a sequence of semaphores or command buffers to a queue.C Specification
To submit command buffers to a queue, call:
VkResult vkQueueSubmit( VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence);
Description
Note
Submission can be a high overhead operation, and applications should attempt to batch work together into as few calls to
vkQueueSubmit
as possible.vkQueueSubmit
is a queue submission command, with each batch defined by an element ofpSubmits
as an instance of theVkSubmitInfo
structure. Batches begin execution in the order they appear inpSubmits
, but may complete out of order.Fence and semaphore operations submitted with
QueueSubmit
have additional ordering constraints compared to other submission commands, with dependencies involving previous and subsequent queue operations. Information about these additional constraints can be found in the semaphore and fence sections of the synchronization chapter.Details on the interaction of
pWaitDstStageMask
with synchronization are described in the semaphore wait operation section of the synchronization chapter.The order that batches appear in
pSubmits
is used to determine submission order, and thus all the implicit ordering guarantees that respect it. Other than these implicit ordering guarantees and any explicit synchronization primitives, these batches may overlap or otherwise execute out of order.If any command buffer submitted to this queue is in the executable state, it is moved to the pending state. Once execution of all submissions of a command buffer complete, it moves from the pending state, back to the executable state. If a command buffer was recorded with the
COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT
flag, it instead moves back to the invalid state.If
vkQueueSubmit
fails, it may returnERROR_OUT_OF_HOST_MEMORY
orERROR_OUT_OF_DEVICE_MEMORY
. If it does, the implementation must ensure that the state and contents of any resources or synchronization primitives referenced by the submitted command buffers and any semaphores referenced bypSubmits
is unaffected by the call or its failure. IfvkQueueSubmit
fails in such a way that the implementation is unable to make that guarantee, the implementation must returnERROR_DEVICE_LOST
. See Lost Device.Valid Usage
- If
fence
is notNULL_HANDLE
,fence
must be unsignaled - If
fence
is notNULL_HANDLE
,fence
must not be associated with any other queue command that has not yet completed execution on that queue - Any calls to
CmdSetEvent
,CmdResetEvent
orCmdWaitEvents
that have been recorded into any of the command buffer elements of thepCommandBuffers
member of any element ofpSubmits
, must not reference anyVkEvent
that is referenced by any of those commands in a command buffer that has been submitted to another queue and is still in the pending state. - Any stage flag included in any element of the
pWaitDstStageMask
member of any element ofpSubmits
must be a pipeline stage supported by one of the capabilities ofqueue
, as specified in the table of supported pipeline stages. - Each element of the
pSignalSemaphores
member of any element ofpSubmits
must be unsignaled when the semaphore signal operation it defines is executed on the device - When a semaphore unsignal operation defined by any element of the
pWaitSemaphores
member of any element ofpSubmits
executes onqueue
, there must be no other queues waiting on the same semaphore. - All elements of the
pWaitSemaphores
member of all elements ofpSubmits
must be semaphores that are signaled, or have semaphore signal operations previously submitted for execution. - Each element of the
pCommandBuffers
member of each element ofpSubmits
must be in the pending or executable state. - If any element of the
pCommandBuffers
member of any element ofpSubmits
was not recorded with theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
, it must not be in the pending state. - Any secondary command buffers recorded into any element of the
pCommandBuffers
member of any element ofpSubmits
must be in the pending or executable state. - If any secondary command buffers recorded into any element of the
pCommandBuffers
member of any element ofpSubmits
was not recorded with theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
, it must not be in the pending state. - Each element of the
pCommandBuffers
member of each element ofpSubmits
must have been allocated from aVkCommandPool
that was created for the same queue familyqueue
belongs to. - If any element of
pSubmits
->pCommandBuffers
includes a Queue Family Transfer Acquire Operation, there must exist a previously submitted Queue Family Transfer Release Operation on a queue in the queue family identified by the acquire operation, with parameters matching the acquire operation as defined in the definition of such acquire operations, and which happens before the acquire operation.
Valid Usage (Implicit)
queue
must be a validVkQueue
handle- If
submitCount
is not 0,pSubmits
must be a valid pointer to an array ofsubmitCount
validVkSubmitInfo
structures - If
fence
is notNULL_HANDLE
,fence
must be a validVkFence
handle - Both of
fence
, andqueue
that are valid handles must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
queue
must be externally synchronized - Host access to
fence
must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type - - Any - Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
queue
- the queue that the command buffers will be submitted to.pSubmits
- a pointer to an array ofVkSubmitInfo
structures, each specifying a command buffer submission batch.fence
- an optional: handle to a fence to be signaled once all submitted command buffers have completed execution. Iffence
is notNULL_HANDLE
, it defines a fence signal operation.
- If
-
vkQueueSubmit
public static int vkQueueSubmit(VkQueue queue, VkSubmitInfo pSubmit, long fence)
Submits a sequence of semaphores or command buffers to a queue.C Specification
To submit command buffers to a queue, call:
VkResult vkQueueSubmit( VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence);
Description
Note
Submission can be a high overhead operation, and applications should attempt to batch work together into as few calls to
vkQueueSubmit
as possible.vkQueueSubmit
is a queue submission command, with each batch defined by an element ofpSubmits
as an instance of theVkSubmitInfo
structure. Batches begin execution in the order they appear inpSubmits
, but may complete out of order.Fence and semaphore operations submitted with
QueueSubmit
have additional ordering constraints compared to other submission commands, with dependencies involving previous and subsequent queue operations. Information about these additional constraints can be found in the semaphore and fence sections of the synchronization chapter.Details on the interaction of
pWaitDstStageMask
with synchronization are described in the semaphore wait operation section of the synchronization chapter.The order that batches appear in
pSubmits
is used to determine submission order, and thus all the implicit ordering guarantees that respect it. Other than these implicit ordering guarantees and any explicit synchronization primitives, these batches may overlap or otherwise execute out of order.If any command buffer submitted to this queue is in the executable state, it is moved to the pending state. Once execution of all submissions of a command buffer complete, it moves from the pending state, back to the executable state. If a command buffer was recorded with the
COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT
flag, it instead moves back to the invalid state.If
vkQueueSubmit
fails, it may returnERROR_OUT_OF_HOST_MEMORY
orERROR_OUT_OF_DEVICE_MEMORY
. If it does, the implementation must ensure that the state and contents of any resources or synchronization primitives referenced by the submitted command buffers and any semaphores referenced bypSubmits
is unaffected by the call or its failure. IfvkQueueSubmit
fails in such a way that the implementation is unable to make that guarantee, the implementation must returnERROR_DEVICE_LOST
. See Lost Device.Valid Usage
- If
fence
is notNULL_HANDLE
,fence
must be unsignaled - If
fence
is notNULL_HANDLE
,fence
must not be associated with any other queue command that has not yet completed execution on that queue - Any calls to
CmdSetEvent
,CmdResetEvent
orCmdWaitEvents
that have been recorded into any of the command buffer elements of thepCommandBuffers
member of any element ofpSubmits
, must not reference anyVkEvent
that is referenced by any of those commands in a command buffer that has been submitted to another queue and is still in the pending state. - Any stage flag included in any element of the
pWaitDstStageMask
member of any element ofpSubmits
must be a pipeline stage supported by one of the capabilities ofqueue
, as specified in the table of supported pipeline stages. - Each element of the
pSignalSemaphores
member of any element ofpSubmits
must be unsignaled when the semaphore signal operation it defines is executed on the device - When a semaphore unsignal operation defined by any element of the
pWaitSemaphores
member of any element ofpSubmits
executes onqueue
, there must be no other queues waiting on the same semaphore. - All elements of the
pWaitSemaphores
member of all elements ofpSubmits
must be semaphores that are signaled, or have semaphore signal operations previously submitted for execution. - Each element of the
pCommandBuffers
member of each element ofpSubmits
must be in the pending or executable state. - If any element of the
pCommandBuffers
member of any element ofpSubmits
was not recorded with theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
, it must not be in the pending state. - Any secondary command buffers recorded into any element of the
pCommandBuffers
member of any element ofpSubmits
must be in the pending or executable state. - If any secondary command buffers recorded into any element of the
pCommandBuffers
member of any element ofpSubmits
was not recorded with theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
, it must not be in the pending state. - Each element of the
pCommandBuffers
member of each element ofpSubmits
must have been allocated from aVkCommandPool
that was created for the same queue familyqueue
belongs to. - If any element of
pSubmits
->pCommandBuffers
includes a Queue Family Transfer Acquire Operation, there must exist a previously submitted Queue Family Transfer Release Operation on a queue in the queue family identified by the acquire operation, with parameters matching the acquire operation as defined in the definition of such acquire operations, and which happens before the acquire operation.
Valid Usage (Implicit)
queue
must be a validVkQueue
handle- If
submitCount
is not 0,pSubmits
must be a valid pointer to an array ofsubmitCount
validVkSubmitInfo
structures - If
fence
is notNULL_HANDLE
,fence
must be a validVkFence
handle - Both of
fence
, andqueue
that are valid handles must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
queue
must be externally synchronized - Host access to
fence
must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type - - Any - Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
queue
- the queue that the command buffers will be submitted to.fence
- an optional: handle to a fence to be signaled once all submitted command buffers have completed execution. Iffence
is notNULL_HANDLE
, it defines a fence signal operation.
- If
-
vkQueueWaitIdle
public static int vkQueueWaitIdle(VkQueue queue)
Wait for a queue to become idle.C Specification
To wait on the host for the completion of outstanding queue operations for a given queue, call:
VkResult vkQueueWaitIdle( VkQueue queue);
Description
vkQueueWaitIdle
is equivalent to submitting a fence to a queue and waiting with an infinite timeout for that fence to signal.Valid Usage (Implicit)
queue
must be a validVkQueue
handle
Host Synchronization
- Host access to
queue
must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type - - Any - Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
queue
- the queue on which to wait.
-
vkDeviceWaitIdle
public static int vkDeviceWaitIdle(VkDevice device)
Wait for a device to become idle.C Specification
To wait on the host for the completion of outstanding queue operations for all queues on a given logical device, call:
VkResult vkDeviceWaitIdle( VkDevice device);
Description
vkDeviceWaitIdle
is equivalent to callingvkQueueWaitIdle
for all queues owned bydevice
.Valid Usage (Implicit)
device
must be a validVkDevice
handle
Host Synchronization
- Host access to all
VkQueue
objects created fromdevice
must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device to idle.
-
nvkAllocateMemory
public static int nvkAllocateMemory(VkDevice device, long pAllocateInfo, long pAllocator, long pMemory)
Unsafe version of:AllocateMemory
-
vkAllocateMemory
public static int vkAllocateMemory(VkDevice device, VkMemoryAllocateInfo pAllocateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pMemory)
Allocate device memory.C Specification
To allocate memory objects, call:
VkResult vkAllocateMemory( VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory);
Description
Allocations returned by
vkAllocateMemory
are guaranteed to meet any alignment requirement of the implementation. For example, if an implementation requires 128 byte alignment for images and 64 byte alignment for buffers, the device memory returned through this mechanism would be 128-byte aligned. This ensures that applications can correctly suballocate objects of different types (with potentially different alignment requirements) in the same memory object.When memory is allocated, its contents are undefined with the following constraint:
- The contents of unprotected memory must not be a function of data protected memory objects, even if those memory objects were previously freed.
Note
The contents of memory allocated by one application should not be a function of data from protected memory objects of another application, even if those memory objects were previously freed.
The maximum number of valid memory allocations that can exist simultaneously within a
VkDevice
may be restricted by implementation- or platform-dependent limits. If a call toAllocateMemory
would cause the total number of allocations to exceed these limits, such a call will fail and must returnERROR_TOO_MANY_OBJECTS
. ThemaxMemoryAllocationCount
feature describes the number of allocations that can exist simultaneously before encountering these internal limits.Some platforms may have a limit on the maximum size of a single allocation. For example, certain systems may fail to create allocations with a size greater than or equal to 4GB. Such a limit is implementation-dependent, and if such a failure occurs then the error
ERROR_OUT_OF_DEVICE_MEMORY
must be returned. This limit is advertised inVkPhysicalDeviceMaintenance3Properties
::maxMemoryAllocationSize
.The cumulative memory size allocated to a heap can be limited by the size of the specified heap. In such cases, allocated memory is tracked on a per-device and per-heap basis. Some platforms allow overallocation into other heaps. The overallocation behavior can be specified through the
VK_AMD_memory_overallocation_behavior
extension.Valid Usage
pAllocateInfo
->allocationSize
must be less than or equal to sVkPhysicalDeviceMemoryProperties::memoryHeaps
[pAllocateInfo
->memoryTypeIndex
].size
as returned byGetPhysicalDeviceMemoryProperties
for theVkPhysicalDevice
thatdevice
was created from.pAllocateInfo
->memoryTypeIndex
must be less thanVkPhysicalDeviceMemoryProperties
::memoryTypeCount
as returned byGetPhysicalDeviceMemoryProperties
for theVkPhysicalDevice
thatdevice
was created from.- If the
deviceCoherentMemory
feature is not enabled,pAllocateInfo
->memoryTypeIndex
must not identify a memory type supportingMEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD
Valid Usage (Implicit)
device
must be a validVkDevice
handlepAllocateInfo
must be a valid pointer to a validVkMemoryAllocateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pMemory
must be a valid pointer to aVkDeviceMemory
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that owns the memory.pAllocateInfo
- a pointer to an instance of theVkMemoryAllocateInfo
structure describing parameters of the allocation. A successful returned allocation must use the requested parameters — no substitution is permitted by the implementation.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pMemory
- a pointer to aVkDeviceMemory
handle in which information about the allocated memory is returned.
-
nvkFreeMemory
public static void nvkFreeMemory(VkDevice device, long memory, long pAllocator)
Unsafe version of:FreeMemory
-
vkFreeMemory
public static void vkFreeMemory(VkDevice device, long memory, @Nullable VkAllocationCallbacks pAllocator)
Free device memory.C Specification
To free a memory object, call:
void vkFreeMemory( VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator);
Description
Before freeing a memory object, an application must ensure the memory object is no longer in use by the device--for example by command buffers in the pending state. Memory can be freed whilst still bound to resources, but those resources must not be used afterwards. If there are still any bound images or buffers, the memory may not be immediately released by the implementation, but must be released by the time all bound images and buffers have been destroyed. Once memory is released, it is returned to the heap from which it was allocated.
How memory objects are bound to Images and Buffers is described in detail in the Resource Memory Association section.
If a memory object is mapped at the time it is freed, it is implicitly unmapped.
Note
As described below, host writes are not implicitly flushed when the memory object is unmapped, but the implementation must guarantee that writes that have not been flushed do not affect any other memory.
Valid Usage
- All submitted commands that refer to
memory
(via images or buffers) must have completed execution
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
memory
is notNULL_HANDLE
,memory
must be a validVkDeviceMemory
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
memory
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
memory
must be externally synchronized
See Also
- Parameters:
device
- the logical device that owns the memory.memory
- theVkDeviceMemory
object to be freed.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All submitted commands that refer to
-
nvkMapMemory
public static int nvkMapMemory(VkDevice device, long memory, long offset, long size, int flags, long ppData)
Unsafe version of:MapMemory
-
vkMapMemory
public static int vkMapMemory(VkDevice device, long memory, long offset, long size, int flags, org.lwjgl.PointerBuffer ppData)
Map a memory object into application address space.C Specification
To retrieve a host virtual address pointer to a region of a mappable memory object, call:
VkResult vkMapMemory( VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData);
Description
After a successful call to
vkMapMemory
the memory objectmemory
is considered to be currently host mapped. It is an application error to callvkMapMemory
on a memory object that is already host mapped.Note
vkMapMemory
will fail if the implementation is unable to allocate an appropriately sized contiguous virtual address range, e.g. due to virtual address space fragmentation or platform limits. In such cases,vkMapMemory
must returnERROR_MEMORY_MAP_FAILED
. The application can improve the likelihood of success by reducing the size of the mapped range and/or removing unneeded mappings usingUnmapMemory
.vkMapMemory
does not check whether the device memory is currently in use before returning the host-accessible pointer. The application must guarantee that any previously submitted command that writes to this range has completed before the host reads from or writes to that range, and that any previously submitted command that reads from that range has completed before the host writes to that region (see here for details on fulfilling such a guarantee). If the device memory was allocated without theMEMORY_PROPERTY_HOST_COHERENT_BIT
set, these guarantees must be made for an extended range: the application must round down the start of the range to the nearest multiple ofVkPhysicalDeviceLimits
::nonCoherentAtomSize
, and round the end of the range up to the nearest multiple ofVkPhysicalDeviceLimits
::nonCoherentAtomSize
.While a range of device memory is host mapped, the application is responsible for synchronizing both device and host access to that memory range.
Note
It is important for the application developer to become meticulously familiar with all of the mechanisms described in the chapter on Synchronization and Cache Control as they are crucial to maintaining memory access ordering.
Valid Usage
memory
must not be currently host mappedoffset
must be less than the size ofmemory
- If
size
is not equal toWHOLE_SIZE
,size
must be greater than 0 - If
size
is not equal toWHOLE_SIZE
,size
must be less than or equal to the size of thememory
minusoffset
memory
must have been created with a memory type that reportsMEMORY_PROPERTY_HOST_VISIBLE_BIT
memory
must not have been allocated with multiple instances.
Valid Usage (Implicit)
device
must be a validVkDevice
handlememory
must be a validVkDeviceMemory
handleflags
must be 0ppData
must be a valid pointer to a pointer valuememory
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
memory
must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the memory.memory
- theVkDeviceMemory
object to be mapped.offset
- a zero-based byte offset from the beginning of the memory object.size
- the size of the memory range to map, orWHOLE_SIZE
to map fromoffset
to the end of the allocation.flags
- reserved for future use.ppData
- points to a pointer in which is returned a host-accessible pointer to the beginning of the mapped range. This pointer minusoffset
must be aligned to at leastVkPhysicalDeviceLimits
::minMemoryMapAlignment
.
-
vkUnmapMemory
public static void vkUnmapMemory(VkDevice device, long memory)
Unmap a previously mapped memory object.C Specification
To unmap a memory object once host access to it is no longer needed by the application, call:
void vkUnmapMemory( VkDevice device, VkDeviceMemory memory);
Valid Usage
memory
must be currently host mapped
Valid Usage (Implicit)
device
must be a validVkDevice
handlememory
must be a validVkDeviceMemory
handlememory
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
memory
must be externally synchronized
- Parameters:
device
- the logical device that owns the memory.memory
- the memory object to be unmapped.
-
nvkFlushMappedMemoryRanges
public static int nvkFlushMappedMemoryRanges(VkDevice device, int memoryRangeCount, long pMemoryRanges)
Unsafe version of:FlushMappedMemoryRanges
- Parameters:
memoryRangeCount
- the length of thepMemoryRanges
array.
-
vkFlushMappedMemoryRanges
public static int vkFlushMappedMemoryRanges(VkDevice device, VkMappedMemoryRange.Buffer pMemoryRanges)
Flush mapped memory ranges.C Specification
To flush ranges of non-coherent memory from the host caches, call:
VkResult vkFlushMappedMemoryRanges( VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges);
Description
vkFlushMappedMemoryRanges
guarantees that host writes to the memory ranges described bypMemoryRanges
are made available to the host memory domain, such that they can be made available to the device memory domain via memory domain operations using theACCESS_HOST_WRITE_BIT
access type.Within each range described by
pMemoryRanges
, each set ofnonCoherentAtomSize
bytes in that range is flushed if any byte in that set has been written by the host since it was first host mapped, or the last time it was flushed. IfpMemoryRanges
includes sets ofnonCoherentAtomSize
bytes where no bytes have been written by the host, those bytes must not be flushed.Unmapping non-coherent memory does not implicitly flush the host mapped memory, and host writes that have not been flushed may not ever be visible to the device. However, implementations must ensure that writes that have not been flushed do not become visible to any other memory.
Note
The above guarantee avoids a potential memory corruption in scenarios where host writes to a mapped memory object have not been flushed before the memory is unmapped (or freed), and the virtual address range is subsequently reused for a different mapping (or memory allocation).
Valid Usage (Implicit)
device
must be a validVkDevice
handlepMemoryRanges
must be a valid pointer to an array ofmemoryRangeCount
validVkMappedMemoryRange
structuresmemoryRangeCount
must be greater than 0
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that owns the memory ranges.pMemoryRanges
- a pointer to an array ofVkMappedMemoryRange
structures describing the memory ranges to flush.
-
vkFlushMappedMemoryRanges
public static int vkFlushMappedMemoryRanges(VkDevice device, VkMappedMemoryRange pMemoryRange)
Flush mapped memory ranges.C Specification
To flush ranges of non-coherent memory from the host caches, call:
VkResult vkFlushMappedMemoryRanges( VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges);
Description
vkFlushMappedMemoryRanges
guarantees that host writes to the memory ranges described bypMemoryRanges
are made available to the host memory domain, such that they can be made available to the device memory domain via memory domain operations using theACCESS_HOST_WRITE_BIT
access type.Within each range described by
pMemoryRanges
, each set ofnonCoherentAtomSize
bytes in that range is flushed if any byte in that set has been written by the host since it was first host mapped, or the last time it was flushed. IfpMemoryRanges
includes sets ofnonCoherentAtomSize
bytes where no bytes have been written by the host, those bytes must not be flushed.Unmapping non-coherent memory does not implicitly flush the host mapped memory, and host writes that have not been flushed may not ever be visible to the device. However, implementations must ensure that writes that have not been flushed do not become visible to any other memory.
Note
The above guarantee avoids a potential memory corruption in scenarios where host writes to a mapped memory object have not been flushed before the memory is unmapped (or freed), and the virtual address range is subsequently reused for a different mapping (or memory allocation).
Valid Usage (Implicit)
device
must be a validVkDevice
handlepMemoryRanges
must be a valid pointer to an array ofmemoryRangeCount
validVkMappedMemoryRange
structuresmemoryRangeCount
must be greater than 0
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that owns the memory ranges.
-
nvkInvalidateMappedMemoryRanges
public static int nvkInvalidateMappedMemoryRanges(VkDevice device, int memoryRangeCount, long pMemoryRanges)
Unsafe version of:InvalidateMappedMemoryRanges
- Parameters:
memoryRangeCount
- the length of thepMemoryRanges
array.
-
vkInvalidateMappedMemoryRanges
public static int vkInvalidateMappedMemoryRanges(VkDevice device, VkMappedMemoryRange.Buffer pMemoryRanges)
Invalidate ranges of mapped memory objects.C Specification
To invalidate ranges of non-coherent memory from the host caches, call:
VkResult vkInvalidateMappedMemoryRanges( VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges);
Description
vkInvalidateMappedMemoryRanges
guarantees that device writes to the memory ranges described bypMemoryRanges
, which have been made available to the host memory domain using theACCESS_HOST_WRITE_BIT
andACCESS_HOST_READ_BIT
access types, are made visible to the host. If a range of non-coherent memory is written by the host and then invalidated without first being flushed, its contents are undefined.Within each range described by
pMemoryRanges
, each set ofnonCoherentAtomSize
bytes in that range is invalidated if any byte in that set has been written by the device since it was first host mapped, or the last time it was invalidated.Note
Mapping non-coherent memory does not implicitly invalidate the mapped memory, and device writes that have not been invalidated must be made visible before the host reads or overwrites them.
Valid Usage (Implicit)
device
must be a validVkDevice
handlepMemoryRanges
must be a valid pointer to an array ofmemoryRangeCount
validVkMappedMemoryRange
structuresmemoryRangeCount
must be greater than 0
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that owns the memory ranges.pMemoryRanges
- a pointer to an array ofVkMappedMemoryRange
structures describing the memory ranges to invalidate.
-
vkInvalidateMappedMemoryRanges
public static int vkInvalidateMappedMemoryRanges(VkDevice device, VkMappedMemoryRange pMemoryRange)
Invalidate ranges of mapped memory objects.C Specification
To invalidate ranges of non-coherent memory from the host caches, call:
VkResult vkInvalidateMappedMemoryRanges( VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges);
Description
vkInvalidateMappedMemoryRanges
guarantees that device writes to the memory ranges described bypMemoryRanges
, which have been made available to the host memory domain using theACCESS_HOST_WRITE_BIT
andACCESS_HOST_READ_BIT
access types, are made visible to the host. If a range of non-coherent memory is written by the host and then invalidated without first being flushed, its contents are undefined.Within each range described by
pMemoryRanges
, each set ofnonCoherentAtomSize
bytes in that range is invalidated if any byte in that set has been written by the device since it was first host mapped, or the last time it was invalidated.Note
Mapping non-coherent memory does not implicitly invalidate the mapped memory, and device writes that have not been invalidated must be made visible before the host reads or overwrites them.
Valid Usage (Implicit)
device
must be a validVkDevice
handlepMemoryRanges
must be a valid pointer to an array ofmemoryRangeCount
validVkMappedMemoryRange
structuresmemoryRangeCount
must be greater than 0
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that owns the memory ranges.
-
nvkGetDeviceMemoryCommitment
public static void nvkGetDeviceMemoryCommitment(VkDevice device, long memory, long pCommittedMemoryInBytes)
Unsafe version of:GetDeviceMemoryCommitment
-
vkGetDeviceMemoryCommitment
public static void vkGetDeviceMemoryCommitment(VkDevice device, long memory, java.nio.LongBuffer pCommittedMemoryInBytes)
Query the current commitment for a VkDeviceMemory.C Specification
To determine the amount of lazily-allocated memory that is currently committed for a memory object, call:
void vkGetDeviceMemoryCommitment( VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes);
Description
The implementation may update the commitment at any time, and the value returned by this query may be out of date.
The implementation guarantees to allocate any committed memory from the heapIndex indicated by the memory type that the memory object was created with.
Valid Usage
memory
must have been created with a memory type that reportsMEMORY_PROPERTY_LAZILY_ALLOCATED_BIT
Valid Usage (Implicit)
device
must be a validVkDevice
handlememory
must be a validVkDeviceMemory
handlepCommittedMemoryInBytes
must be a valid pointer to aVkDeviceSize
valuememory
must have been created, allocated, or retrieved fromdevice
- Parameters:
device
- the logical device that owns the memory.memory
- the memory object being queried.pCommittedMemoryInBytes
- a pointer to aVkDeviceSize
value in which the number of bytes currently committed is returned, on success.
-
vkBindBufferMemory
public static int vkBindBufferMemory(VkDevice device, long buffer, long memory, long memoryOffset)
Bind device memory to a buffer object.C Specification
To attach memory to a buffer object, call:
VkResult vkBindBufferMemory( VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset);
Description
vkBindBufferMemory
is equivalent to passing the same parameters throughVkBindBufferMemoryInfo
toBindBufferMemory2
.Valid Usage
buffer
must not already be backed by a memory objectbuffer
must not have been created with any sparse memory binding flagsmemoryOffset
must be less than the size ofmemory
memory
must have been allocated using one of the memory types allowed in thememoryTypeBits
member of theVkMemoryRequirements
structure returned from a call tovkGetBufferMemoryRequirements
withbuffer
memoryOffset
must be an integer multiple of thealignment
member of theVkMemoryRequirements
structure returned from a call tovkGetBufferMemoryRequirements
withbuffer
- The
size
member of theVkMemoryRequirements
structure returned from a call tovkGetBufferMemoryRequirements
withbuffer
must be less than or equal to the size ofmemory
minusmemoryOffset
- If
buffer
requires a dedicated allocation(as reported byGetBufferMemoryRequirements2
inVkMemoryDedicatedRequirements
::requiresDedicatedAllocation forbuffer
),memory
must have been created withVkMemoryDedicatedAllocateInfo
::buffer
equal tobuffer
- If the
VkMemoryAllocateInfo
provided whenmemory
was allocated included an instance ofVkMemoryDedicatedAllocateInfo
in itspNext
chain, andVkMemoryDedicatedAllocateInfo
::buffer
was notNULL_HANDLE
, thenbuffer
must equalVkMemoryDedicatedAllocateInfo
::buffer
, andmemoryOffset
must be zero. - If buffer was created with the
BUFFER_CREATE_PROTECTED_BIT
bit set, the buffer must be bound to a memory object allocated with a memory type that reportsMEMORY_PROPERTY_PROTECTED_BIT
- If buffer was created with the
BUFFER_CREATE_PROTECTED_BIT
bit not set, the buffer must not be bound to a memory object created with a memory type that reportsMEMORY_PROPERTY_PROTECTED_BIT
- If
buffer
was created withVkDedicatedAllocationBufferCreateInfoNV
::dedicatedAllocation
equal toTRUE
,memory
must have been created withVkDedicatedAllocationMemoryAllocateInfoNV
::buffer
equal to a buffer handle created with identical creation parameters tobuffer
andmemoryOffset
must be zero - If the value of
VkExportMemoryAllocateInfo
::handleTypes
used to allocatememory
is not 0, it must include at least one of the handles set inVkExternalMemoryBufferCreateInfo
::handleTypes
whenbuffer
was created - If
memory
was created by a memory import operation, the external handle type of the imported memory must also have been set inVkExternalMemoryBufferCreateInfo
::handleTypes
whenbuffer
was created
Valid Usage (Implicit)
device
must be a validVkDevice
handlebuffer
must be a validVkBuffer
handlememory
must be a validVkDeviceMemory
handlebuffer
must have been created, allocated, or retrieved fromdevice
memory
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
buffer
must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the buffer and memory.buffer
- the buffer to be attached to memory.memory
- aVkDeviceMemory
object describing the device memory to attach.memoryOffset
- the start offset of the region ofmemory
which is to be bound to the buffer. The number of bytes returned in theVkMemoryRequirements
::size
member inmemory
, starting frommemoryOffset
bytes, will be bound to the specified buffer.
-
vkBindImageMemory
public static int vkBindImageMemory(VkDevice device, long image, long memory, long memoryOffset)
Bind device memory to an image object.C Specification
To attach memory to a
VkImage
object created without theIMAGE_CREATE_DISJOINT_BIT
set, call:VkResult vkBindImageMemory( VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset);
Description
vkBindImageMemory
is equivalent to passing the same parameters throughVkBindImageMemoryInfo
toBindImageMemory2
.Valid Usage
image
must not have been created with theIMAGE_CREATE_DISJOINT_BIT
set.image
must not already be backed by a memory objectimage
must not have been created with any sparse memory binding flagsmemoryOffset
must be less than the size ofmemory
memory
must have been allocated using one of the memory types allowed in thememoryTypeBits
member of theVkMemoryRequirements
structure returned from a call tovkGetImageMemoryRequirements
withimage
memoryOffset
must be an integer multiple of thealignment
member of theVkMemoryRequirements
structure returned from a call tovkGetImageMemoryRequirements
withimage
- The
size
member of theVkMemoryRequirements
structure returned from a call tovkGetImageMemoryRequirements
withimage
must be less than or equal to the size ofmemory
minusmemoryOffset
- If
image
requires a dedicated allocation (as reported byGetImageMemoryRequirements2
inVkMemoryDedicatedRequirements
::requiresDedicatedAllocation forimage
),memory
must have been created withVkMemoryDedicatedAllocateInfo
::image
equal toimage
- If the dedicated allocation image aliasing feature is not enabled, and the
VkMemoryAllocateInfo
provided whenmemory
was allocated included an instance ofVkMemoryDedicatedAllocateInfo
in itspNext
chain, andVkMemoryDedicatedAllocateInfo
::image
was notNULL_HANDLE
, thenimage
must equalVkMemoryDedicatedAllocateInfo
::image
andmemoryOffset
must be zero. - If the dedicated allocation image aliasing feature is enabled, and the
VkMemoryAllocateInfo
provided whenmemory
was allocated included an instance ofVkMemoryDedicatedAllocateInfo
in itspNext
chain, andVkMemoryDedicatedAllocateInfo
::image
was notNULL_HANDLE
, thenmemoryOffset
must be zero, andimage
must be either equal toVkMemoryDedicatedAllocateInfo
::image
or an image that was created using the same parameters inVkImageCreateInfo
, with the exception thatextent
andarrayLayers
may differ subject to the following restrictions: every dimension in theextent
parameter of the image being bound must be equal to or smaller than the original image for which the allocation was created; and thearrayLayers
parameter of the image being bound must be equal to or smaller than the original image for which the allocation was created. - If image was created with the
IMAGE_CREATE_PROTECTED_BIT
bit set, the image must be bound to a memory object allocated with a memory type that reportsMEMORY_PROPERTY_PROTECTED_BIT
- If image was created with the
IMAGE_CREATE_PROTECTED_BIT
bit not set, the image must not be bound to a memory object created with a memory type that reportsMEMORY_PROPERTY_PROTECTED_BIT
- If
image
was created withVkDedicatedAllocationImageCreateInfoNV
::dedicatedAllocation
equal toTRUE
,memory
must have been created withVkDedicatedAllocationMemoryAllocateInfoNV
::image
equal to an image handle created with identical creation parameters toimage
andmemoryOffset
must be zero - If the value of
VkExportMemoryAllocateInfo
::handleTypes
used to allocatememory
is not 0, it must include at least one of the handles set inVkExternalMemoryImageCreateInfo
::handleTypes
whenimage
was created - If
memory
was created by a memory import operation, the external handle type of the imported memory must also have been set inVkExternalMemoryImageCreateInfo
::handleTypes
whenimage
was created
Valid Usage (Implicit)
device
must be a validVkDevice
handleimage
must be a validVkImage
handlememory
must be a validVkDeviceMemory
handleimage
must have been created, allocated, or retrieved fromdevice
memory
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
image
must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the image and memory.image
- the image.memory
- theVkDeviceMemory
object describing the device memory to attach.memoryOffset
- the start offset of the region ofmemory
which is to be bound to the image. The number of bytes returned in theVkMemoryRequirements
::size
member inmemory
, starting frommemoryOffset
bytes, will be bound to the specified image.
-
nvkGetBufferMemoryRequirements
public static void nvkGetBufferMemoryRequirements(VkDevice device, long buffer, long pMemoryRequirements)
Unsafe version of:GetBufferMemoryRequirements
-
vkGetBufferMemoryRequirements
public static void vkGetBufferMemoryRequirements(VkDevice device, long buffer, VkMemoryRequirements pMemoryRequirements)
Returns the memory requirements for specified Vulkan object.C Specification
To determine the memory requirements for a buffer resource, call:
void vkGetBufferMemoryRequirements( VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements);
Valid Usage (Implicit)
device
must be a validVkDevice
handlebuffer
must be a validVkBuffer
handlepMemoryRequirements
must be a valid pointer to aVkMemoryRequirements
structurebuffer
must have been created, allocated, or retrieved fromdevice
See Also
- Parameters:
device
- the logical device that owns the buffer.buffer
- the buffer to query.pMemoryRequirements
- points to an instance of theVkMemoryRequirements
structure in which the memory requirements of the buffer object are returned.
-
nvkGetImageMemoryRequirements
public static void nvkGetImageMemoryRequirements(VkDevice device, long image, long pMemoryRequirements)
Unsafe version of:GetImageMemoryRequirements
-
vkGetImageMemoryRequirements
public static void vkGetImageMemoryRequirements(VkDevice device, long image, VkMemoryRequirements pMemoryRequirements)
Returns the memory requirements for specified Vulkan object.C Specification
To determine the memory requirements for an image resource which is not created with the
IMAGE_CREATE_DISJOINT_BIT
flag set, call:void vkGetImageMemoryRequirements( VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements);
Valid Usage
image
must not have been created with theIMAGE_CREATE_DISJOINT_BIT
flag set
Valid Usage (Implicit)
device
must be a validVkDevice
handleimage
must be a validVkImage
handlepMemoryRequirements
must be a valid pointer to aVkMemoryRequirements
structureimage
must have been created, allocated, or retrieved fromdevice
See Also
- Parameters:
device
- the logical device that owns the image.image
- the image to query.pMemoryRequirements
- points to an instance of theVkMemoryRequirements
structure in which the memory requirements of the image object are returned.
-
nvkGetImageSparseMemoryRequirements
public static void nvkGetImageSparseMemoryRequirements(VkDevice device, long image, long pSparseMemoryRequirementCount, long pSparseMemoryRequirements)
Unsafe version of:GetImageSparseMemoryRequirements
- Parameters:
pSparseMemoryRequirementCount
- a pointer to an integer related to the number of sparse memory requirements available or queried, as described below.
-
vkGetImageSparseMemoryRequirements
public static void vkGetImageSparseMemoryRequirements(VkDevice device, long image, java.nio.IntBuffer pSparseMemoryRequirementCount, @Nullable VkSparseImageMemoryRequirements.Buffer pSparseMemoryRequirements)
Query the memory requirements for a sparse image.C Specification
To query sparse memory requirements for an image, call:
void vkGetImageSparseMemoryRequirements( VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements);
Description
If
pSparseMemoryRequirements
isNULL
, then the number of sparse memory requirements available is returned inpSparseMemoryRequirementCount
. Otherwise,pSparseMemoryRequirementCount
must point to a variable set by the user to the number of elements in thepSparseMemoryRequirements
array, and on return the variable is overwritten with the number of structures actually written topSparseMemoryRequirements
. IfpSparseMemoryRequirementCount
is less than the number of sparse memory requirements available, at mostpSparseMemoryRequirementCount
structures will be written.If the image was not created with
IMAGE_CREATE_SPARSE_RESIDENCY_BIT
thenpSparseMemoryRequirementCount
will be set to zero andpSparseMemoryRequirements
will not be written to.Note
It is legal for an implementation to report a larger value in
VkMemoryRequirements
::size
than would be obtained by adding together memory sizes for allVkSparseImageMemoryRequirements
returned byvkGetImageSparseMemoryRequirements
. This may occur when the implementation requires unused padding in the address range describing the resource.Valid Usage (Implicit)
device
must be a validVkDevice
handleimage
must be a validVkImage
handlepSparseMemoryRequirementCount
must be a valid pointer to auint32_t
value- If the value referenced by
pSparseMemoryRequirementCount
is not 0, andpSparseMemoryRequirements
is notNULL
,pSparseMemoryRequirements
must be a valid pointer to an array ofpSparseMemoryRequirementCount
VkSparseImageMemoryRequirements
structures image
must have been created, allocated, or retrieved fromdevice
See Also
- Parameters:
device
- the logical device that owns the image.image
- theVkImage
object to get the memory requirements for.pSparseMemoryRequirementCount
- a pointer to an integer related to the number of sparse memory requirements available or queried, as described below.pSparseMemoryRequirements
- eitherNULL
or a pointer to an array ofVkSparseImageMemoryRequirements
structures.
-
nvkGetPhysicalDeviceSparseImageFormatProperties
public static void nvkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, int format, int type, int samples, int usage, int tiling, long pPropertyCount, long pProperties)
Unsafe version of:GetPhysicalDeviceSparseImageFormatProperties
- Parameters:
pPropertyCount
- a pointer to an integer related to the number of sparse format properties available or queried, as described below.
-
vkGetPhysicalDeviceSparseImageFormatProperties
public static void vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, int format, int type, int samples, int usage, int tiling, java.nio.IntBuffer pPropertyCount, @Nullable VkSparseImageFormatProperties.Buffer pProperties)
Retrieve properties of an image format applied to sparse images.C Specification
vkGetPhysicalDeviceSparseImageFormatProperties
returns an array ofVkSparseImageFormatProperties
. Each element will describe properties for one set of image aspects that are bound simultaneously in the image. This is usually one element for each aspect in the image, but for interleaved depth/stencil images there is only one element describing the combined aspects.void vkGetPhysicalDeviceSparseImageFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties);
Description
If
pProperties
isNULL
, then the number of sparse format properties available is returned inpPropertyCount
. Otherwise,pPropertyCount
must point to a variable set by the user to the number of elements in thepProperties
array, and on return the variable is overwritten with the number of structures actually written topProperties
. IfpPropertyCount
is less than the number of sparse format properties available, at mostpPropertyCount
structures will be written.If
IMAGE_CREATE_SPARSE_RESIDENCY_BIT
is not supported for the given arguments,pPropertyCount
will be set to zero upon return, and no data will be written topProperties
.Multiple aspects are returned for depth/stencil images that are implemented as separate planes by the implementation. The depth and stencil data planes each have unique
VkSparseImageFormatProperties
data.Depth/stencil images with depth and stencil data interleaved into a single plane will return a single
VkSparseImageFormatProperties
structure with theaspectMask
set toIMAGE_ASPECT_DEPTH_BIT
|IMAGE_ASPECT_STENCIL_BIT
.Valid Usage
samples
must be a bit value that is set inVkImageFormatProperties
::sampleCounts
returned byvkGetPhysicalDeviceImageFormatProperties
withformat
,type
,tiling
, andusage
equal to those in this command andflags
equal to the value that is set inVkImageCreateInfo
::flags
when the image is created
Valid Usage (Implicit)
physicalDevice
must be a validVkPhysicalDevice
handleformat
must be a validVkFormat
valuetype
must be a validVkImageType
valuesamples
must be a validVkSampleCountFlagBits
valueusage
must be a valid combination ofVkImageUsageFlagBits
valuesusage
must not be 0tiling
must be a validVkImageTiling
valuepPropertyCount
must be a valid pointer to auint32_t
value- If the value referenced by
pPropertyCount
is not 0, andpProperties
is notNULL
,pProperties
must be a valid pointer to an array ofpPropertyCount
VkSparseImageFormatProperties
structures
See Also
- Parameters:
physicalDevice
- the physical device from which to query the sparse image capabilities.format
- the image format.type
- the dimensionality of image.samples
- the number of samples per texel as defined inVkSampleCountFlagBits
.usage
- a bitmask describing the intended usage of the image.tiling
- the tiling arrangement of the texel blocks in memory.pPropertyCount
- a pointer to an integer related to the number of sparse format properties available or queried, as described below.pProperties
- eitherNULL
or a pointer to an array ofVkSparseImageFormatProperties
structures.
-
nvkQueueBindSparse
public static int nvkQueueBindSparse(VkQueue queue, int bindInfoCount, long pBindInfo, long fence)
Unsafe version of:QueueBindSparse
- Parameters:
bindInfoCount
- the number of elements in thepBindInfo
array.
-
vkQueueBindSparse
public static int vkQueueBindSparse(VkQueue queue, @Nullable VkBindSparseInfo.Buffer pBindInfo, long fence) public static int vkQueueBindSparse(VkQueue queue, VkBindSparseInfo pBindInfo, long fence)
Bind device memory to a sparse resource object.C Specification
To submit sparse binding operations to a queue, call:
VkResult vkQueueBindSparse( VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence);
Description
vkQueueBindSparse
is a queue submission command, with each batch defined by an element ofpBindInfo
as an instance of theVkBindSparseInfo
structure. Batches begin execution in the order they appear inpBindInfo
, but may complete out of order.Within a batch, a given range of a resource must not be bound more than once. Across batches, if a range is to be bound to one allocation and offset and then to another allocation and offset, then the application must guarantee (usually using semaphores) that the binding operations are executed in the correct order, as well as to order binding operations against the execution of command buffer submissions.
As no operation to
QueueBindSparse
causes any pipeline stage to access memory, synchronization primitives used in this command effectively only define execution dependencies.Additional information about fence and semaphore operation is described in the synchronization chapter.
Valid Usage
- If
fence
is notNULL_HANDLE
,fence
must be unsignaled - If
fence
is notNULL_HANDLE
,fence
must not be associated with any other queue command that has not yet completed execution on that queue - Each element of the
pSignalSemaphores
member of each element ofpBindInfo
must be unsignaled when the semaphore signal operation it defines is executed on the device - When a semaphore unsignal operation defined by any element of the
pWaitSemaphores
member of any element ofpBindInfo
executes onqueue
, there must be no other queues waiting on the same semaphore. - All elements of the
pWaitSemaphores
member of all elements ofpBindInfo
must be semaphores that are signaled, or have semaphore signal operations previously submitted for execution.
Valid Usage (Implicit)
queue
must be a validVkQueue
handle- If
bindInfoCount
is not 0,pBindInfo
must be a valid pointer to an array ofbindInfoCount
validVkBindSparseInfo
structures - If
fence
is notNULL_HANDLE
,fence
must be a validVkFence
handle - The
queue
must support sparse binding operations - Both of
fence
, andqueue
that are valid handles must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
queue
must be externally synchronized - Host access to
pBindInfo
[].pBufferBinds[].buffer must be externally synchronized - Host access to
pBindInfo
[].pImageOpaqueBinds[].image must be externally synchronized - Host access to
pBindInfo
[].pImageBinds[].image must be externally synchronized - Host access to
fence
must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type - - SPARSE_BINDING - Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
queue
- the queue that the sparse binding operations will be submitted to.pBindInfo
- an array ofVkBindSparseInfo
structures, each specifying a sparse binding submission batch.fence
- an optional: handle to a fence to be signaled. Iffence
is notNULL_HANDLE
, it defines a fence signal operation.
- If
-
nvkCreateFence
public static int nvkCreateFence(VkDevice device, long pCreateInfo, long pAllocator, long pFence)
Unsafe version of:CreateFence
-
vkCreateFence
public static int vkCreateFence(VkDevice device, VkFenceCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pFence)
Create a new fence object.C Specification
To create a fence, call:
VkResult vkCreateFence( VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence);
Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkFenceCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pFence
must be a valid pointer to aVkFence
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the fence.pCreateInfo
- a pointer to an instance of theVkFenceCreateInfo
structure which contains information about how the fence is to be created.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pFence
- points to a handle in which the resulting fence object is returned.
-
nvkDestroyFence
public static void nvkDestroyFence(VkDevice device, long fence, long pAllocator)
Unsafe version of:DestroyFence
-
vkDestroyFence
public static void vkDestroyFence(VkDevice device, long fence, @Nullable VkAllocationCallbacks pAllocator)
Destroy a fence object.C Specification
To destroy a fence, call:
void vkDestroyFence( VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator);
Valid Usage
- All queue submission commands that refer to
fence
must have completed execution - If
VkAllocationCallbacks
were provided whenfence
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenfence
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
fence
is notNULL_HANDLE
,fence
must be a validVkFence
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
fence
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
fence
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the fence.fence
- the handle of the fence to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All queue submission commands that refer to
-
nvkResetFences
public static int nvkResetFences(VkDevice device, int fenceCount, long pFences)
Unsafe version of:ResetFences
- Parameters:
fenceCount
- the number of fences to reset.
-
vkResetFences
public static int vkResetFences(VkDevice device, java.nio.LongBuffer pFences)
Resets one or more fence objects.C Specification
To set the state of fences to unsignaled from the host, call:
VkResult vkResetFences( VkDevice device, uint32_t fenceCount, const VkFence* pFences);
Description
If any member of
pFences
currently has its payload imported with temporary permanence, that fence's prior permanent payload is first restored. The remaining operations described therefore operate on the restored payload.When
ResetFences
is executed on the host, it defines a fence unsignal operation for each fence, which resets the fence to the unsignaled state.If any member of
pFences
is already in the unsignaled state whenResetFences
is executed, thenResetFences
has no effect on that fence.Valid Usage
- Each element of
pFences
must not be currently associated with any queue command that has not yet completed execution on that queue
Valid Usage (Implicit)
device
must be a validVkDevice
handlepFences
must be a valid pointer to an array offenceCount
validVkFence
handlesfenceCount
must be greater than 0- Each element of
pFences
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to each member of
pFences
must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the fences.pFences
- a pointer to an array of fence handles to reset.
- Each element of
-
vkResetFences
public static int vkResetFences(VkDevice device, long pFence)
Resets one or more fence objects.C Specification
To set the state of fences to unsignaled from the host, call:
VkResult vkResetFences( VkDevice device, uint32_t fenceCount, const VkFence* pFences);
Description
If any member of
pFences
currently has its payload imported with temporary permanence, that fence's prior permanent payload is first restored. The remaining operations described therefore operate on the restored payload.When
ResetFences
is executed on the host, it defines a fence unsignal operation for each fence, which resets the fence to the unsignaled state.If any member of
pFences
is already in the unsignaled state whenResetFences
is executed, thenResetFences
has no effect on that fence.Valid Usage
- Each element of
pFences
must not be currently associated with any queue command that has not yet completed execution on that queue
Valid Usage (Implicit)
device
must be a validVkDevice
handlepFences
must be a valid pointer to an array offenceCount
validVkFence
handlesfenceCount
must be greater than 0- Each element of
pFences
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to each member of
pFences
must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the fences.
- Each element of
-
vkGetFenceStatus
public static int vkGetFenceStatus(VkDevice device, long fence)
Return the status of a fence.C Specification
To query the status of a fence from the host, call:
VkResult vkGetFenceStatus( VkDevice device, VkFence fence);
Description
Upon success,
vkGetFenceStatus
returns the status of the fence object, with the following return codes:Fence Object Status Codes
Status Meaning SUCCESS
The fence specified by fence
is signaled.NOT_READY
The fence specified by fence
is unsignaled.ERROR_DEVICE_LOST
The device has been lost. See Lost Device. If a queue submission command is pending execution, then the value returned by this command may immediately be out of date.
If the device has been lost (see Lost Device),
vkGetFenceStatus
may return any of the above status codes. If the device has been lost andvkGetFenceStatus
is called repeatedly, it will eventually return eitherSUCCESS
orERROR_DEVICE_LOST
.Valid Usage (Implicit)
device
must be a validVkDevice
handlefence
must be a validVkFence
handlefence
must have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the fence.fence
- the handle of the fence to query.
-
nvkWaitForFences
public static int nvkWaitForFences(VkDevice device, int fenceCount, long pFences, int waitAll, long timeout)
Unsafe version of:WaitForFences
- Parameters:
fenceCount
- the number of fences to wait on.
-
vkWaitForFences
public static int vkWaitForFences(VkDevice device, java.nio.LongBuffer pFences, boolean waitAll, long timeout)
Wait for one or more fences to become signaled.C Specification
To wait for one or more fences to enter the signaled state on the host, call:
VkResult vkWaitForFences( VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout);
Description
If the condition is satisfied when
vkWaitForFences
is called, thenvkWaitForFences
returns immediately. If the condition is not satisfied at the timevkWaitForFences
is called, thenvkWaitForFences
will block and wait up totimeout
nanoseconds for the condition to become satisfied.If
timeout
is zero, thenvkWaitForFences
does not wait, but simply returns the current state of the fences.TIMEOUT
will be returned in this case if the condition is not satisfied, even though no actual wait was performed.If the specified timeout period expires before the condition is satisfied,
vkWaitForFences
returnsTIMEOUT
. If the condition is satisfied beforetimeout
nanoseconds has expired,vkWaitForFences
returnsSUCCESS
.If device loss occurs (see Lost Device) before the timeout has expired,
vkWaitForFences
must return in finite time with eitherSUCCESS
orERROR_DEVICE_LOST
.Note
While we guarantee that
vkWaitForFences
must return in finite time, no guarantees are made that it returns immediately upon device loss. However, the client can reasonably expect that the delay will be on the order of seconds and that callingvkWaitForFences
will not result in a permanently (or seemingly permanently) dead process.Valid Usage (Implicit)
device
must be a validVkDevice
handlepFences
must be a valid pointer to an array offenceCount
validVkFence
handlesfenceCount
must be greater than 0- Each element of
pFences
must have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the fences.pFences
- a pointer to an array offenceCount
fence handles.waitAll
- the condition that must be satisfied to successfully unblock the wait. IfwaitAll
isTRUE
, then the condition is that all fences inpFences
are signaled. Otherwise, the condition is that at least one fence inpFences
is signaled.timeout
- the timeout period in units of nanoseconds.timeout
is adjusted to the closest value allowed by the implementation-dependent timeout accuracy, which may be substantially longer than one nanosecond, and may be longer than the requested period.
-
vkWaitForFences
public static int vkWaitForFences(VkDevice device, long pFence, boolean waitAll, long timeout)
Wait for one or more fences to become signaled.C Specification
To wait for one or more fences to enter the signaled state on the host, call:
VkResult vkWaitForFences( VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout);
Description
If the condition is satisfied when
vkWaitForFences
is called, thenvkWaitForFences
returns immediately. If the condition is not satisfied at the timevkWaitForFences
is called, thenvkWaitForFences
will block and wait up totimeout
nanoseconds for the condition to become satisfied.If
timeout
is zero, thenvkWaitForFences
does not wait, but simply returns the current state of the fences.TIMEOUT
will be returned in this case if the condition is not satisfied, even though no actual wait was performed.If the specified timeout period expires before the condition is satisfied,
vkWaitForFences
returnsTIMEOUT
. If the condition is satisfied beforetimeout
nanoseconds has expired,vkWaitForFences
returnsSUCCESS
.If device loss occurs (see Lost Device) before the timeout has expired,
vkWaitForFences
must return in finite time with eitherSUCCESS
orERROR_DEVICE_LOST
.Note
While we guarantee that
vkWaitForFences
must return in finite time, no guarantees are made that it returns immediately upon device loss. However, the client can reasonably expect that the delay will be on the order of seconds and that callingvkWaitForFences
will not result in a permanently (or seemingly permanently) dead process.Valid Usage (Implicit)
device
must be a validVkDevice
handlepFences
must be a valid pointer to an array offenceCount
validVkFence
handlesfenceCount
must be greater than 0- Each element of
pFences
must have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the fences.waitAll
- the condition that must be satisfied to successfully unblock the wait. IfwaitAll
isTRUE
, then the condition is that all fences inpFences
are signaled. Otherwise, the condition is that at least one fence inpFences
is signaled.timeout
- the timeout period in units of nanoseconds.timeout
is adjusted to the closest value allowed by the implementation-dependent timeout accuracy, which may be substantially longer than one nanosecond, and may be longer than the requested period.
-
nvkCreateSemaphore
public static int nvkCreateSemaphore(VkDevice device, long pCreateInfo, long pAllocator, long pSemaphore)
Unsafe version of:CreateSemaphore
-
vkCreateSemaphore
public static int vkCreateSemaphore(VkDevice device, VkSemaphoreCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pSemaphore)
Create a new queue semaphore object.C Specification
To create a semaphore, call:
VkResult vkCreateSemaphore( VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore);
Description
When created, the semaphore is in the unsignaled state.
Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkSemaphoreCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pSemaphore
must be a valid pointer to aVkSemaphore
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the semaphore.pCreateInfo
- a pointer to an instance of theVkSemaphoreCreateInfo
structure which contains information about how the semaphore is to be created.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pSemaphore
- points to a handle in which the resulting semaphore object is returned.
-
nvkDestroySemaphore
public static void nvkDestroySemaphore(VkDevice device, long semaphore, long pAllocator)
Unsafe version of:DestroySemaphore
-
vkDestroySemaphore
public static void vkDestroySemaphore(VkDevice device, long semaphore, @Nullable VkAllocationCallbacks pAllocator)
Destroy a semaphore object.C Specification
To destroy a semaphore, call:
void vkDestroySemaphore( VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator);
Valid Usage
- All submitted batches that refer to
semaphore
must have completed execution - If
VkAllocationCallbacks
were provided whensemaphore
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whensemaphore
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
semaphore
is notNULL_HANDLE
,semaphore
must be a validVkSemaphore
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
semaphore
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
semaphore
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the semaphore.semaphore
- the handle of the semaphore to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All submitted batches that refer to
-
nvkCreateEvent
public static int nvkCreateEvent(VkDevice device, long pCreateInfo, long pAllocator, long pEvent)
Unsafe version of:CreateEvent
-
vkCreateEvent
public static int vkCreateEvent(VkDevice device, VkEventCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pEvent)
Create a new event object.C Specification
To create an event, call:
VkResult vkCreateEvent( VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkEvent* pEvent);
Description
When created, the event object is in the unsignaled state.
Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkEventCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pEvent
must be a valid pointer to aVkEvent
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the event.pCreateInfo
- a pointer to an instance of theVkEventCreateInfo
structure which contains information about how the event is to be created.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pEvent
- points to a handle in which the resulting event object is returned.
-
nvkDestroyEvent
public static void nvkDestroyEvent(VkDevice device, long event, long pAllocator)
Unsafe version of:DestroyEvent
-
vkDestroyEvent
public static void vkDestroyEvent(VkDevice device, long event, @Nullable VkAllocationCallbacks pAllocator)
Destroy an event object.C Specification
To destroy an event, call:
void vkDestroyEvent( VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator);
Valid Usage
- All submitted commands that refer to
event
must have completed execution - If
VkAllocationCallbacks
were provided whenevent
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenevent
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
event
is notNULL_HANDLE
,event
must be a validVkEvent
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
event
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
event
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the event.event
- the handle of the event to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All submitted commands that refer to
-
vkGetEventStatus
public static int vkGetEventStatus(VkDevice device, long event)
Retrieve the status of an event object.C Specification
To query the state of an event from the host, call:
VkResult vkGetEventStatus( VkDevice device, VkEvent event);
Description
Upon success,
vkGetEventStatus
returns the state of the event object with the following return codes:Event Object Status Codes
Status Meaning EVENT_SET
The event specified by event
is signaled.EVENT_RESET
The event specified by event
is unsignaled.If a
vkCmdSetEvent
orvkCmdResetEvent
command is in a command buffer that is in the pending state, then the value returned by this command may immediately be out of date.The state of an event can be updated by the host. The state of the event is immediately changed, and subsequent calls to
vkGetEventStatus
will return the new state. If an event is already in the requested state, then updating it to the same state has no effect.Valid Usage (Implicit)
device
must be a validVkDevice
handleevent
must be a validVkEvent
handleevent
must have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the event.event
- the handle of the event to query.
-
vkSetEvent
public static int vkSetEvent(VkDevice device, long event)
Set an event to signaled state.C Specification
To set the state of an event to signaled from the host, call:
VkResult vkSetEvent( VkDevice device, VkEvent event);
Description
When
SetEvent
is executed on the host, it defines an event signal operation which sets the event to the signaled state.If
event
is already in the signaled state whenSetEvent
is executed, thenSetEvent
has no effect, and no event signal operation occurs.Valid Usage (Implicit)
device
must be a validVkDevice
handleevent
must be a validVkEvent
handleevent
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
event
must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the event.event
- the event to set.
-
vkResetEvent
public static int vkResetEvent(VkDevice device, long event)
Reset an event to non-signaled state.C Specification
To set the state of an event to unsignaled from the host, call:
VkResult vkResetEvent( VkDevice device, VkEvent event);
Description
When
ResetEvent
is executed on the host, it defines an event unsignal operation which resets the event to the unsignaled state.If
event
is already in the unsignaled state whenResetEvent
is executed, thenResetEvent
has no effect, and no event unsignal operation occurs.Valid Usage
event
must not be waited on by avkCmdWaitEvents
command that is currently executing
Valid Usage (Implicit)
device
must be a validVkDevice
handleevent
must be a validVkEvent
handleevent
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
event
must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the event.event
- the event to reset.
-
nvkCreateQueryPool
public static int nvkCreateQueryPool(VkDevice device, long pCreateInfo, long pAllocator, long pQueryPool)
Unsafe version of:CreateQueryPool
-
vkCreateQueryPool
public static int vkCreateQueryPool(VkDevice device, VkQueryPoolCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pQueryPool)
Create a new query pool object.C Specification
To create a query pool, call:
VkResult vkCreateQueryPool( VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool);
Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkQueryPoolCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pQueryPool
must be a valid pointer to aVkQueryPool
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the query pool.pCreateInfo
- a pointer to an instance of theVkQueryPoolCreateInfo
structure containing the number and type of queries to be managed by the pool.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pQueryPool
- a pointer to aVkQueryPool
handle in which the resulting query pool object is returned.
-
nvkDestroyQueryPool
public static void nvkDestroyQueryPool(VkDevice device, long queryPool, long pAllocator)
Unsafe version of:DestroyQueryPool
-
vkDestroyQueryPool
public static void vkDestroyQueryPool(VkDevice device, long queryPool, @Nullable VkAllocationCallbacks pAllocator)
Destroy a query pool object.C Specification
To destroy a query pool, call:
void vkDestroyQueryPool( VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator);
Valid Usage
- All submitted commands that refer to
queryPool
must have completed execution - If
VkAllocationCallbacks
were provided whenqueryPool
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenqueryPool
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
queryPool
is notNULL_HANDLE
,queryPool
must be a validVkQueryPool
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
queryPool
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
queryPool
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the query pool.queryPool
- the query pool to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All submitted commands that refer to
-
nvkGetQueryPoolResults
public static int nvkGetQueryPoolResults(VkDevice device, long queryPool, int firstQuery, int queryCount, long dataSize, long pData, long stride, int flags)
Unsafe version of:GetQueryPoolResults
- Parameters:
dataSize
- the size in bytes of the buffer pointed to bypData
.
-
vkGetQueryPoolResults
public static int vkGetQueryPoolResults(VkDevice device, long queryPool, int firstQuery, int queryCount, java.nio.ByteBuffer pData, long stride, int flags) public static int vkGetQueryPoolResults(VkDevice device, long queryPool, int firstQuery, int queryCount, java.nio.IntBuffer pData, long stride, int flags) public static int vkGetQueryPoolResults(VkDevice device, long queryPool, int firstQuery, int queryCount, java.nio.LongBuffer pData, long stride, int flags)
Copy results of queries in a query pool to a host memory region.C Specification
To retrieve status and results for a set of queries, call:
VkResult vkGetQueryPoolResults( VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags);
Description
The range of queries read is defined by
[firstQuery, firstQuery + queryCount - 1]
. For pipeline statistics queries, each query index in the pool contains one integer value for each bit that is enabled inVkQueryPoolCreateInfo
::pname pipelineStatistics when the pool is created.If no bits are set in
flags
, and all requested queries are in the available state, results are written as an array of 32-bit unsigned integer values. The behavior when not all queries are available, is described below.If
QUERY_RESULT_64_BIT
is not set and the result overflows a 32-bit value, the value may either wrap or saturate. Similarly, ifQUERY_RESULT_64_BIT
is set and the result overflows a 64-bit value, the value may either wrap or saturate.If
QUERY_RESULT_WAIT_BIT
is set, Vulkan will wait for each query to be in the available state before retrieving the numerical results for that query. In this case,vkGetQueryPoolResults
is guaranteed to succeed and returnSUCCESS
if the queries become available in a finite time (i.e. if they have been issued and not reset). If queries will never finish (e.g. due to being reset but not issued), thenvkGetQueryPoolResults
may not return in finite time.If
QUERY_RESULT_WAIT_BIT
andQUERY_RESULT_PARTIAL_BIT
are both not set then no result values are written topData
for queries that are in the unavailable state at the time of the call, andvkGetQueryPoolResults
returnsNOT_READY
. However, availability state is still written topData
for those queries ifQUERY_RESULT_WITH_AVAILABILITY_BIT
is set.Note
Applications must take care to ensure that use of the
QUERY_RESULT_WAIT_BIT
bit has the desired effect.For example, if a query has been used previously and a command buffer records the commands
vkCmdResetQueryPool
,vkCmdBeginQuery
, andvkCmdEndQuery
for that query, then the query will remain in the available state untilvkResetQueryPoolEXT
is called or thevkCmdResetQueryPool
command executes on a queue. Applications can use fences or events to ensure that a query has already been reset before checking for its results or availability status. Otherwise, a stale value could be returned from a previous use of the query.The above also applies when
QUERY_RESULT_WAIT_BIT
is used in combination withQUERY_RESULT_WITH_AVAILABILITY_BIT
. In this case, the returned availability status may reflect the result of a previous use of the query unlessvkResetQueryPoolEXT
is called or thevkCmdResetQueryPool
command has been executed since the last use of the query.Note
Applications can double-buffer query pool usage, with a pool per frame, and reset queries at the end of the frame in which they are read.
If
QUERY_RESULT_PARTIAL_BIT
is set,QUERY_RESULT_WAIT_BIT
is not set, and the query's status is unavailable, an intermediate result value between zero and the final result value is written topData
for that query.QUERY_RESULT_PARTIAL_BIT
must not be used if the pool'squeryType
isQUERY_TYPE_TIMESTAMP
.If
QUERY_RESULT_WITH_AVAILABILITY_BIT
is set, the final integer value written for each query is non-zero if the query's status was available or zero if the status was unavailable. WhenQUERY_RESULT_WITH_AVAILABILITY_BIT
is used, implementations must guarantee that if they return a non-zero availability value then the numerical results must be valid, assuming the results are not reset by a subsequent command.Note
Satisfying this guarantee may require careful ordering by the application, e.g. to read the availability status before reading the results.
Valid Usage
firstQuery
must be less than the number of queries inqueryPool
- If
QUERY_RESULT_64_BIT
is not set inflags
thenpData
andstride
must be multiples of 4 - If
QUERY_RESULT_64_BIT
is set inflags
thenpData
andstride
must be multiples of 8 - The sum of
firstQuery
andqueryCount
must be less than or equal to the number of queries inqueryPool
dataSize
must be large enough to contain the result of each query, as described here- If the
queryType
used to createqueryPool
wasQUERY_TYPE_TIMESTAMP
,flags
must not containQUERY_RESULT_PARTIAL_BIT
Valid Usage (Implicit)
device
must be a validVkDevice
handlequeryPool
must be a validVkQueryPool
handlepData
must be a valid pointer to an array ofdataSize
bytesflags
must be a valid combination ofVkQueryResultFlagBits
valuesdataSize
must be greater than 0queryPool
must have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the query pool.queryPool
- the query pool managing the queries containing the desired results.firstQuery
- the initial query index.queryCount
- the number of queries to read.pData
- a pointer to a user-allocated buffer where the results will be writtenstride
- the stride in bytes between results for individual queries withinpData
.flags
- a bitmask ofVkQueryResultFlagBits
specifying how and when results are returned.
-
nvkCreateBuffer
public static int nvkCreateBuffer(VkDevice device, long pCreateInfo, long pAllocator, long pBuffer)
Unsafe version of:CreateBuffer
-
vkCreateBuffer
public static int vkCreateBuffer(VkDevice device, VkBufferCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pBuffer)
Create a new buffer object.C Specification
To create buffers, call:
VkResult vkCreateBuffer( VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer);
Valid Usage
- If the
flags
member ofpCreateInfo
includesBUFFER_CREATE_SPARSE_BINDING_BIT
, creating thisVkBuffer
must not cause the total required sparse memory for all currently valid sparse resources on the device to exceedVkPhysicalDeviceLimits
::sparseAddressSpaceSize
Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkBufferCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pBuffer
must be a valid pointer to aVkBuffer
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the buffer object.pCreateInfo
- a pointer to an instance of theVkBufferCreateInfo
structure containing parameters affecting creation of the buffer.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pBuffer
- points to aVkBuffer
handle in which the resulting buffer object is returned.
- If the
-
nvkDestroyBuffer
public static void nvkDestroyBuffer(VkDevice device, long buffer, long pAllocator)
Unsafe version of:DestroyBuffer
-
vkDestroyBuffer
public static void vkDestroyBuffer(VkDevice device, long buffer, @Nullable VkAllocationCallbacks pAllocator)
Destroy a buffer object.C Specification
To destroy a buffer, call:
void vkDestroyBuffer( VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator);
Valid Usage
- All submitted commands that refer to
buffer
, either directly or via aVkBufferView
, must have completed execution - If
VkAllocationCallbacks
were provided whenbuffer
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenbuffer
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
buffer
is notNULL_HANDLE
,buffer
must be a validVkBuffer
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
buffer
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
buffer
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the buffer.buffer
- the buffer to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All submitted commands that refer to
-
nvkCreateBufferView
public static int nvkCreateBufferView(VkDevice device, long pCreateInfo, long pAllocator, long pView)
Unsafe version of:CreateBufferView
-
vkCreateBufferView
public static int vkCreateBufferView(VkDevice device, VkBufferViewCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pView)
Create a new buffer view object.C Specification
To create a buffer view, call:
VkResult vkCreateBufferView( VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferView* pView);
Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkBufferViewCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pView
must be a valid pointer to aVkBufferView
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the buffer view.pCreateInfo
- a pointer to an instance of theVkBufferViewCreateInfo
structure containing parameters to be used to create the buffer.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pView
- points to aVkBufferView
handle in which the resulting buffer view object is returned.
-
nvkDestroyBufferView
public static void nvkDestroyBufferView(VkDevice device, long bufferView, long pAllocator)
Unsafe version of:DestroyBufferView
-
vkDestroyBufferView
public static void vkDestroyBufferView(VkDevice device, long bufferView, @Nullable VkAllocationCallbacks pAllocator)
Destroy a buffer view object.C Specification
To destroy a buffer view, call:
void vkDestroyBufferView( VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator);
Valid Usage
- All submitted commands that refer to
bufferView
must have completed execution - If
VkAllocationCallbacks
were provided whenbufferView
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenbufferView
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
bufferView
is notNULL_HANDLE
,bufferView
must be a validVkBufferView
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
bufferView
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
bufferView
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the buffer view.bufferView
- the buffer view to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All submitted commands that refer to
-
nvkCreateImage
public static int nvkCreateImage(VkDevice device, long pCreateInfo, long pAllocator, long pImage)
Unsafe version of:CreateImage
-
vkCreateImage
public static int vkCreateImage(VkDevice device, VkImageCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pImage)
Create a new image object.C Specification
To create images, call:
VkResult vkCreateImage( VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage);
Valid Usage
- If the
flags
member ofpCreateInfo
includesIMAGE_CREATE_SPARSE_BINDING_BIT
, creating thisVkImage
must not cause the total required sparse memory for all currently valid sparse resources on the device to exceedVkPhysicalDeviceLimits
::sparseAddressSpaceSize
Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkImageCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pImage
must be a valid pointer to aVkImage
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the image.pCreateInfo
- a pointer to an instance of theVkImageCreateInfo
structure containing parameters to be used to create the image.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pImage
- points to aVkImage
handle in which the resulting image object is returned.
- If the
-
nvkDestroyImage
public static void nvkDestroyImage(VkDevice device, long image, long pAllocator)
Unsafe version of:DestroyImage
-
vkDestroyImage
public static void vkDestroyImage(VkDevice device, long image, @Nullable VkAllocationCallbacks pAllocator)
Destroy an image object.C Specification
To destroy an image, call:
void vkDestroyImage( VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator);
Valid Usage
- All submitted commands that refer to
image
, either directly or via aVkImageView
, must have completed execution - If
VkAllocationCallbacks
were provided whenimage
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenimage
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
image
is notNULL_HANDLE
,image
must be a validVkImage
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
image
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
image
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the image.image
- the image to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All submitted commands that refer to
-
nvkGetImageSubresourceLayout
public static void nvkGetImageSubresourceLayout(VkDevice device, long image, long pSubresource, long pLayout)
Unsafe version of:GetImageSubresourceLayout
-
vkGetImageSubresourceLayout
public static void vkGetImageSubresourceLayout(VkDevice device, long image, VkImageSubresource pSubresource, VkSubresourceLayout pLayout)
Retrieve information about an image subresource.C Specification
To query the memory layout of an image subresource, call:
void vkGetImageSubresourceLayout( VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout);
Description
If the image is linear, then the returned layout is valid for host access.
If the image's tiling is
IMAGE_TILING_LINEAR
and its format is a multi-planar format, thenvkGetImageSubresourceLayout
describes one format plane of the image. If the image's tiling isIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
, thenvkGetImageSubresourceLayout
describes one memory plane of the image. If the image's tiling isIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
and the image is non-linear, then the returned layout has an implementation-dependent meaning; the vendor of the image's DRM format modifier may provide documentation that explains how to interpret the returned layout.vkGetImageSubresourceLayout
is invariant for the lifetime of a single image.Valid Usage
image
must have been created withtiling
equal toIMAGE_TILING_LINEAR
orIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
- The
aspectMask
member ofpSubresource
must only have a single bit set - The
mipLevel
member ofpSubresource
must be less than themipLevels
specified inVkImageCreateInfo
whenimage
was created - The
arrayLayer
member ofpSubresource
must be less than thearrayLayers
specified inVkImageCreateInfo
whenimage
was created - If the
tiling
of theimage
isIMAGE_TILING_LINEAR
and itsformat
is a multi-planar format with two planes, theaspectMask
member ofpSubresource
must beIMAGE_ASPECT_PLANE_0_BIT
orIMAGE_ASPECT_PLANE_1_BIT
- If the
tiling
of theimage
isIMAGE_TILING_LINEAR
and itsformat
is a multi-planar format with three planes, theaspectMask
member ofpSubresource
must beIMAGE_ASPECT_PLANE_0_BIT
,IMAGE_ASPECT_PLANE_1_BIT
orIMAGE_ASPECT_PLANE_2_BIT
- If the
tiling
of theimage
isIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
, then theaspectMask
member ofpSubresource
must beVK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT
and the indexi
must be less than thedrmFormatModifierPlaneCount
associated with the image’sformat
anddrmFormatModifier
.
Valid Usage (Implicit)
device
must be a validVkDevice
handleimage
must be a validVkImage
handlepSubresource
must be a valid pointer to a validVkImageSubresource
structurepLayout
must be a valid pointer to aVkSubresourceLayout
structureimage
must have been created, allocated, or retrieved fromdevice
See Also
- Parameters:
device
- the logical device that owns the image.image
- the image whose layout is being queried.pSubresource
- a pointer to aVkImageSubresource
structure selecting a specific image for the image subresource.pLayout
- points to aVkSubresourceLayout
structure in which the layout is returned.
-
nvkCreateImageView
public static int nvkCreateImageView(VkDevice device, long pCreateInfo, long pAllocator, long pView)
Unsafe version of:CreateImageView
-
vkCreateImageView
public static int vkCreateImageView(VkDevice device, VkImageViewCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pView)
Create an image view from an existing image.C Specification
To create an image view, call:
VkResult vkCreateImageView( VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView);
Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkImageViewCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pView
must be a valid pointer to aVkImageView
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the image view.pCreateInfo
- a pointer to an instance of theVkImageViewCreateInfo
structure containing parameters to be used to create the image view.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pView
- points to aVkImageView
handle in which the resulting image view object is returned.
-
nvkDestroyImageView
public static void nvkDestroyImageView(VkDevice device, long imageView, long pAllocator)
Unsafe version of:DestroyImageView
-
vkDestroyImageView
public static void vkDestroyImageView(VkDevice device, long imageView, @Nullable VkAllocationCallbacks pAllocator)
Destroy an image view object.C Specification
To destroy an image view, call:
void vkDestroyImageView( VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator);
Valid Usage
- All submitted commands that refer to
imageView
must have completed execution - If
VkAllocationCallbacks
were provided whenimageView
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenimageView
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
imageView
is notNULL_HANDLE
,imageView
must be a validVkImageView
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
imageView
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
imageView
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the image view.imageView
- the image view to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All submitted commands that refer to
-
nvkCreateShaderModule
public static int nvkCreateShaderModule(VkDevice device, long pCreateInfo, long pAllocator, long pShaderModule)
Unsafe version of:CreateShaderModule
-
vkCreateShaderModule
public static int vkCreateShaderModule(VkDevice device, VkShaderModuleCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pShaderModule)
Creates a new shader module object.C Specification
To create a shader module, call:
VkResult vkCreateShaderModule( VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule);
Description
Once a shader module has been created, any entry points it contains can be used in pipeline shader stages as described in Compute Pipelines and Graphics Pipelines.
If the shader stage fails to compile
ERROR_INVALID_SHADER_NV
will be generated and the compile log will be reported back to the application byVK_EXT_debug_report
if enabled.Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkShaderModuleCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pShaderModule
must be a valid pointer to aVkShaderModule
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the shader module.pCreateInfo
- a pointer to an instance of theVkShaderModuleCreateInfo
structure.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pShaderModule
- points to aVkShaderModule
handle in which the resulting shader module object is returned.
-
nvkDestroyShaderModule
public static void nvkDestroyShaderModule(VkDevice device, long shaderModule, long pAllocator)
Unsafe version of:DestroyShaderModule
-
vkDestroyShaderModule
public static void vkDestroyShaderModule(VkDevice device, long shaderModule, @Nullable VkAllocationCallbacks pAllocator)
Destroy a shader module.C Specification
To destroy a shader module, call:
void vkDestroyShaderModule( VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator);
Description
A shader module can be destroyed while pipelines created using its shaders are still in use.
Valid Usage
- If
VkAllocationCallbacks
were provided whenshaderModule
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenshaderModule
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
shaderModule
is notNULL_HANDLE
,shaderModule
must be a validVkShaderModule
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
shaderModule
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
shaderModule
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the shader module.shaderModule
- the handle of the shader module to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- If
-
nvkCreatePipelineCache
public static int nvkCreatePipelineCache(VkDevice device, long pCreateInfo, long pAllocator, long pPipelineCache)
Unsafe version of:CreatePipelineCache
-
vkCreatePipelineCache
public static int vkCreatePipelineCache(VkDevice device, VkPipelineCacheCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pPipelineCache)
Creates a new pipeline cache.C Specification
To create pipeline cache objects, call:
VkResult vkCreatePipelineCache( VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache);
Description
Note
Applications can track and manage the total host memory size of a pipeline cache object using the
pAllocator
. Applications can limit the amount of data retrieved from a pipeline cache object invkGetPipelineCacheData
. Implementations should not internally limit the total number of entries added to a pipeline cache object or the total host memory consumed.Once created, a pipeline cache can be passed to the
vkCreateGraphicsPipelines
andvkCreateComputePipelines
commands. If the pipeline cache passed into these commands is notNULL_HANDLE
, the implementation will query it for possible reuse opportunities and update it with new content. The use of the pipeline cache object in these commands is internally synchronized, and the same pipeline cache object can be used in multiple threads simultaneously.Note
Implementations should make every effort to limit any critical sections to the actual accesses to the cache, which is expected to be significantly shorter than the duration of the
vkCreateGraphicsPipelines
andvkCreateComputePipelines
commands.Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkPipelineCacheCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pPipelineCache
must be a valid pointer to aVkPipelineCache
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the pipeline cache object.pCreateInfo
- a pointer to aVkPipelineCacheCreateInfo
structure that contains the initial parameters for the pipeline cache object.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pPipelineCache
- a pointer to aVkPipelineCache
handle in which the resulting pipeline cache object is returned.
-
nvkDestroyPipelineCache
public static void nvkDestroyPipelineCache(VkDevice device, long pipelineCache, long pAllocator)
Unsafe version of:DestroyPipelineCache
-
vkDestroyPipelineCache
public static void vkDestroyPipelineCache(VkDevice device, long pipelineCache, @Nullable VkAllocationCallbacks pAllocator)
Destroy a pipeline cache object.C Specification
To destroy a pipeline cache, call:
void vkDestroyPipelineCache( VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator);
Valid Usage
- If
VkAllocationCallbacks
were provided whenpipelineCache
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenpipelineCache
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
pipelineCache
is notNULL_HANDLE
,pipelineCache
must be a validVkPipelineCache
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
pipelineCache
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
pipelineCache
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the pipeline cache object.pipelineCache
- the handle of the pipeline cache to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- If
-
nvkGetPipelineCacheData
public static int nvkGetPipelineCacheData(VkDevice device, long pipelineCache, long pDataSize, long pData)
Unsafe version of:GetPipelineCacheData
- Parameters:
pDataSize
- a pointer to a value related to the amount of data in the pipeline cache, as described below.
-
vkGetPipelineCacheData
public static int vkGetPipelineCacheData(VkDevice device, long pipelineCache, org.lwjgl.PointerBuffer pDataSize, @Nullable java.nio.ByteBuffer pData)
Get the data store from a pipeline cache.C Specification
Data can be retrieved from a pipeline cache object using the command:
VkResult vkGetPipelineCacheData( VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData);
Description
If
pData
isNULL
, then the maximum size of the data that can be retrieved from the pipeline cache, in bytes, is returned inpDataSize
. Otherwise,pDataSize
must point to a variable set by the user to the size of the buffer, in bytes, pointed to bypData
, and on return the variable is overwritten with the amount of data actually written topData
.If
pDataSize
is less than the maximum size that can be retrieved by the pipeline cache, at mostpDataSize
bytes will be written topData
, andvkGetPipelineCacheData
will returnINCOMPLETE
. Any data written topData
is valid and can be provided as thepInitialData
member of theVkPipelineCacheCreateInfo
structure passed tovkCreatePipelineCache
.Two calls to
vkGetPipelineCacheData
with the same parameters must retrieve the same data unless a command that modifies the contents of the cache is called between them.Applications can store the data retrieved from the pipeline cache, and use these data, possibly in a future run of the application, to populate new pipeline cache objects. The results of pipeline compiles, however, may depend on the vendor ID, device ID, driver version, and other details of the device. To enable applications to detect when previously retrieved data is incompatible with the device, the initial bytes written to
pData
must be a header consisting of the following members:Layout for pipeline cache header version
PIPELINE_CACHE_HEADER_VERSION_ONE
Offset Size Meaning 0 4 length in bytes of the entire pipeline cache header written as a stream of bytes, with the least significant byte first 4 4 a VkPipelineCacheHeaderVersion
value written as a stream of bytes, with the least significant byte first8 4 a vendor ID equal to VkPhysicalDeviceProperties
::vendorID
written as a stream of bytes, with the least significant byte first12 4 a device ID equal to VkPhysicalDeviceProperties
::deviceID
written as a stream of bytes, with the least significant byte first16 UUID_SIZE
a pipeline cache ID equal to VkPhysicalDeviceProperties
::pipelineCacheUUID
The first four bytes encode the length of the entire pipeline cache header, in bytes. This value includes all fields in the header including the pipeline cache version field and the size of the length field.
The next four bytes encode the pipeline cache version, as described for
VkPipelineCacheHeaderVersion
. A consumer of the pipeline cache should use the cache version to interpret the remainder of the cache header.If
pDataSize
is less than what is necessary to store this header, nothing will be written topData
and zero will be written topDataSize
.Valid Usage (Implicit)
device
must be a validVkDevice
handlepipelineCache
must be a validVkPipelineCache
handlepDataSize
must be a valid pointer to asize_t
value- If the value referenced by
pDataSize
is not 0, andpData
is notNULL
,pData
must be a valid pointer to an array ofpDataSize
bytes pipelineCache
must have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the pipeline cache.pipelineCache
- the pipeline cache to retrieve data from.pDataSize
- a pointer to a value related to the amount of data in the pipeline cache, as described below.pData
- eitherNULL
or a pointer to a buffer.
-
nvkMergePipelineCaches
public static int nvkMergePipelineCaches(VkDevice device, long dstCache, int srcCacheCount, long pSrcCaches)
Unsafe version of:MergePipelineCaches
- Parameters:
srcCacheCount
- the length of thepSrcCaches
array.
-
vkMergePipelineCaches
public static int vkMergePipelineCaches(VkDevice device, long dstCache, java.nio.LongBuffer pSrcCaches)
Combine the data stores of pipeline caches.C Specification
Pipeline cache objects can be merged using the command:
VkResult vkMergePipelineCaches( VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches);
Description
Note
The details of the merge operation are implementation dependent, but implementations should merge the contents of the specified pipelines and prune duplicate entries.
Valid Usage
dstCache
must not appear in the list of source caches
Valid Usage (Implicit)
device
must be a validVkDevice
handledstCache
must be a validVkPipelineCache
handlepSrcCaches
must be a valid pointer to an array ofsrcCacheCount
validVkPipelineCache
handlessrcCacheCount
must be greater than 0dstCache
must have been created, allocated, or retrieved fromdevice
- Each element of
pSrcCaches
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
dstCache
must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the pipeline cache objects.dstCache
- the handle of the pipeline cache to merge results into.pSrcCaches
- an array of pipeline cache handles, which will be merged intodstCache
. The previous contents ofdstCache
are included after the merge.
-
nvkCreateGraphicsPipelines
public static int nvkCreateGraphicsPipelines(VkDevice device, long pipelineCache, int createInfoCount, long pCreateInfos, long pAllocator, long pPipelines)
Unsafe version of:CreateGraphicsPipelines
- Parameters:
createInfoCount
- the length of thepCreateInfos
andpPipelines
arrays.
-
vkCreateGraphicsPipelines
public static int vkCreateGraphicsPipelines(VkDevice device, long pipelineCache, VkGraphicsPipelineCreateInfo.Buffer pCreateInfos, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pPipelines)
Create graphics pipelines.C Specification
To create graphics pipelines, call:
VkResult vkCreateGraphicsPipelines( VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines);
Description
The
VkGraphicsPipelineCreateInfo
structure includes an array of shader create info structures containing all the desired active shader stages, as well as creation info to define all relevant fixed-function stages, and a pipeline layout.Valid Usage
- If the
flags
member of any element ofpCreateInfos
contains thePIPELINE_CREATE_DERIVATIVE_BIT
flag, and thebasePipelineIndex
member of that same element is not-1
,basePipelineIndex
must be less than the index intopCreateInfos
that corresponds to that element - If the
flags
member of any element ofpCreateInfos
contains thePIPELINE_CREATE_DERIVATIVE_BIT
flag, the base pipeline must have been created with thePIPELINE_CREATE_ALLOW_DERIVATIVES_BIT
flag set
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
pipelineCache
is notNULL_HANDLE
,pipelineCache
must be a validVkPipelineCache
handle pCreateInfos
must be a valid pointer to an array ofcreateInfoCount
validVkGraphicsPipelineCreateInfo
structures- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pPipelines
must be a valid pointer to an array ofcreateInfoCount
VkPipeline
handlescreateInfoCount
must be greater than 0- If
pipelineCache
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the graphics pipelines.pipelineCache
- eitherNULL_HANDLE
, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.pCreateInfos
- an array ofVkGraphicsPipelineCreateInfo
structures.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pPipelines
- a pointer to an array in which the resulting graphics pipeline objects are returned.
- If the
-
nvkCreateComputePipelines
public static int nvkCreateComputePipelines(VkDevice device, long pipelineCache, int createInfoCount, long pCreateInfos, long pAllocator, long pPipelines)
Unsafe version of:CreateComputePipelines
- Parameters:
createInfoCount
- the length of thepCreateInfos
andpPipelines
arrays.
-
vkCreateComputePipelines
public static int vkCreateComputePipelines(VkDevice device, long pipelineCache, VkComputePipelineCreateInfo.Buffer pCreateInfos, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pPipelines)
Creates a new compute pipeline object.C Specification
To create compute pipelines, call:
VkResult vkCreateComputePipelines( VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines);
Valid Usage
- If the
flags
member of any element ofpCreateInfos
contains thePIPELINE_CREATE_DERIVATIVE_BIT
flag, and thebasePipelineIndex
member of that same element is not-1
,basePipelineIndex
must be less than the index intopCreateInfos
that corresponds to that element - If the
flags
member of any element ofpCreateInfos
contains thePIPELINE_CREATE_DERIVATIVE_BIT
flag, the base pipeline must have been created with thePIPELINE_CREATE_ALLOW_DERIVATIVES_BIT
flag set
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
pipelineCache
is notNULL_HANDLE
,pipelineCache
must be a validVkPipelineCache
handle pCreateInfos
must be a valid pointer to an array ofcreateInfoCount
validVkComputePipelineCreateInfo
structures- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pPipelines
must be a valid pointer to an array ofcreateInfoCount
VkPipeline
handlescreateInfoCount
must be greater than 0- If
pipelineCache
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the compute pipelines.pipelineCache
- eitherNULL_HANDLE
, indicating that pipeline caching is disabled; or the handle of a valid pipeline cache object, in which case use of that cache is enabled for the duration of the command.pCreateInfos
- an array ofVkComputePipelineCreateInfo
structures.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pPipelines
- a pointer to an array in which the resulting compute pipeline objects are returned.
- If the
-
nvkDestroyPipeline
public static void nvkDestroyPipeline(VkDevice device, long pipeline, long pAllocator)
Unsafe version of:DestroyPipeline
-
vkDestroyPipeline
public static void vkDestroyPipeline(VkDevice device, long pipeline, @Nullable VkAllocationCallbacks pAllocator)
Destroy a pipeline object.C Specification
To destroy a graphics or compute pipeline, call:
void vkDestroyPipeline( VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator);
Valid Usage
- All submitted commands that refer to
pipeline
must have completed execution - If
VkAllocationCallbacks
were provided whenpipeline
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenpipeline
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
pipeline
is notNULL_HANDLE
,pipeline
must be a validVkPipeline
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
pipeline
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
pipeline
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the pipeline.pipeline
- the handle of the pipeline to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All submitted commands that refer to
-
nvkCreatePipelineLayout
public static int nvkCreatePipelineLayout(VkDevice device, long pCreateInfo, long pAllocator, long pPipelineLayout)
Unsafe version of:CreatePipelineLayout
-
vkCreatePipelineLayout
public static int vkCreatePipelineLayout(VkDevice device, VkPipelineLayoutCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pPipelineLayout)
Creates a new pipeline layout object.C Specification
To create a pipeline layout, call:
VkResult vkCreatePipelineLayout( VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout);
Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkPipelineLayoutCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pPipelineLayout
must be a valid pointer to aVkPipelineLayout
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the pipeline layout.pCreateInfo
- a pointer to an instance of theVkPipelineLayoutCreateInfo
structure specifying the state of the pipeline layout object.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pPipelineLayout
- points to aVkPipelineLayout
handle in which the resulting pipeline layout object is returned.
-
nvkDestroyPipelineLayout
public static void nvkDestroyPipelineLayout(VkDevice device, long pipelineLayout, long pAllocator)
Unsafe version of:DestroyPipelineLayout
-
vkDestroyPipelineLayout
public static void vkDestroyPipelineLayout(VkDevice device, long pipelineLayout, @Nullable VkAllocationCallbacks pAllocator)
Destroy a pipeline layout object.C Specification
To destroy a pipeline layout, call:
void vkDestroyPipelineLayout( VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator);
Valid Usage
- If
VkAllocationCallbacks
were provided whenpipelineLayout
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenpipelineLayout
was created,pAllocator
must beNULL
pipelineLayout
must not have been passed to anyvkCmd*
command for any command buffers that are still in the recording state whenvkDestroyPipelineLayout
is called
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
pipelineLayout
is notNULL_HANDLE
,pipelineLayout
must be a validVkPipelineLayout
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
pipelineLayout
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
pipelineLayout
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the pipeline layout.pipelineLayout
- the pipeline layout to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- If
-
nvkCreateSampler
public static int nvkCreateSampler(VkDevice device, long pCreateInfo, long pAllocator, long pSampler)
Unsafe version of:CreateSampler
-
vkCreateSampler
public static int vkCreateSampler(VkDevice device, VkSamplerCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pSampler)
Create a new sampler object.C Specification
To create a sampler object, call:
VkResult vkCreateSampler( VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSampler* pSampler);
Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkSamplerCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pSampler
must be a valid pointer to aVkSampler
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the sampler.pCreateInfo
- a pointer to an instance of theVkSamplerCreateInfo
structure specifying the state of the sampler object.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pSampler
- points to aVkSampler
handle in which the resulting sampler object is returned.
-
nvkDestroySampler
public static void nvkDestroySampler(VkDevice device, long sampler, long pAllocator)
Unsafe version of:DestroySampler
-
vkDestroySampler
public static void vkDestroySampler(VkDevice device, long sampler, @Nullable VkAllocationCallbacks pAllocator)
Destroy a sampler object.C Specification
To destroy a sampler, call:
void vkDestroySampler( VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator);
Valid Usage
- All submitted commands that refer to
sampler
must have completed execution - If
VkAllocationCallbacks
were provided whensampler
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whensampler
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
sampler
is notNULL_HANDLE
,sampler
must be a validVkSampler
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
sampler
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
sampler
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the sampler.sampler
- the sampler to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All submitted commands that refer to
-
nvkCreateDescriptorSetLayout
public static int nvkCreateDescriptorSetLayout(VkDevice device, long pCreateInfo, long pAllocator, long pSetLayout)
Unsafe version of:CreateDescriptorSetLayout
-
vkCreateDescriptorSetLayout
public static int vkCreateDescriptorSetLayout(VkDevice device, VkDescriptorSetLayoutCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pSetLayout)
Create a new descriptor set layout.C Specification
To create descriptor set layout objects, call:
VkResult vkCreateDescriptorSetLayout( VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout);
Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkDescriptorSetLayoutCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pSetLayout
must be a valid pointer to aVkDescriptorSetLayout
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the descriptor set layout.pCreateInfo
- a pointer to an instance of theVkDescriptorSetLayoutCreateInfo
structure specifying the state of the descriptor set layout object.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pSetLayout
- points to aVkDescriptorSetLayout
handle in which the resulting descriptor set layout object is returned.
-
nvkDestroyDescriptorSetLayout
public static void nvkDestroyDescriptorSetLayout(VkDevice device, long descriptorSetLayout, long pAllocator)
Unsafe version of:DestroyDescriptorSetLayout
-
vkDestroyDescriptorSetLayout
public static void vkDestroyDescriptorSetLayout(VkDevice device, long descriptorSetLayout, @Nullable VkAllocationCallbacks pAllocator)
Destroy a descriptor set layout object.C Specification
To destroy a descriptor set layout, call:
void vkDestroyDescriptorSetLayout( VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator);
Valid Usage
- If
VkAllocationCallbacks
were provided whendescriptorSetLayout
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whendescriptorSetLayout
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
descriptorSetLayout
is notNULL_HANDLE
,descriptorSetLayout
must be a validVkDescriptorSetLayout
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
descriptorSetLayout
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
descriptorSetLayout
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the descriptor set layout.descriptorSetLayout
- the descriptor set layout to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- If
-
nvkCreateDescriptorPool
public static int nvkCreateDescriptorPool(VkDevice device, long pCreateInfo, long pAllocator, long pDescriptorPool)
Unsafe version of:CreateDescriptorPool
-
vkCreateDescriptorPool
public static int vkCreateDescriptorPool(VkDevice device, VkDescriptorPoolCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pDescriptorPool)
Creates a descriptor pool object.C Specification
To create a descriptor pool object, call:
VkResult vkCreateDescriptorPool( VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool);
Description
pAllocator
controls host memory allocation as described in the Memory Allocation chapter.The created descriptor pool is returned in
pDescriptorPool
.Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkDescriptorPoolCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pDescriptorPool
must be a valid pointer to aVkDescriptorPool
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the descriptor pool.pCreateInfo
- a pointer to an instance of theVkDescriptorPoolCreateInfo
structure specifying the state of the descriptor pool object.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pDescriptorPool
- points to aVkDescriptorPool
handle in which the resulting descriptor pool object is returned.
-
nvkDestroyDescriptorPool
public static void nvkDestroyDescriptorPool(VkDevice device, long descriptorPool, long pAllocator)
Unsafe version of:DestroyDescriptorPool
-
vkDestroyDescriptorPool
public static void vkDestroyDescriptorPool(VkDevice device, long descriptorPool, @Nullable VkAllocationCallbacks pAllocator)
Destroy a descriptor pool object.C Specification
To destroy a descriptor pool, call:
void vkDestroyDescriptorPool( VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator);
Description
When a pool is destroyed, all descriptor sets allocated from the pool are implicitly freed and become invalid. Descriptor sets allocated from a given pool do not need to be freed before destroying that descriptor pool.
Valid Usage
- All submitted commands that refer to
descriptorPool
(via any allocated descriptor sets) must have completed execution - If
VkAllocationCallbacks
were provided whendescriptorPool
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whendescriptorPool
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
descriptorPool
is notNULL_HANDLE
,descriptorPool
must be a validVkDescriptorPool
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
descriptorPool
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
descriptorPool
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the descriptor pool.descriptorPool
- the descriptor pool to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All submitted commands that refer to
-
vkResetDescriptorPool
public static int vkResetDescriptorPool(VkDevice device, long descriptorPool, int flags)
Resets a descriptor pool object.C Specification
To return all descriptor sets allocated from a given pool to the pool, rather than freeing individual descriptor sets, call:
VkResult vkResetDescriptorPool( VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags);
Description
Resetting a descriptor pool recycles all of the resources from all of the descriptor sets allocated from the descriptor pool back to the descriptor pool, and the descriptor sets are implicitly freed.
Valid Usage
- All uses of
descriptorPool
(via any allocated descriptor sets) must have completed execution
Valid Usage (Implicit)
device
must be a validVkDevice
handledescriptorPool
must be a validVkDescriptorPool
handleflags
must be 0descriptorPool
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
descriptorPool
must be externally synchronized - Host access to any
VkDescriptorSet
objects allocated fromdescriptorPool
must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the descriptor pool.descriptorPool
- the descriptor pool to be reset.flags
- reserved for future use.
- All uses of
-
nvkAllocateDescriptorSets
public static int nvkAllocateDescriptorSets(VkDevice device, long pAllocateInfo, long pDescriptorSets)
Unsafe version of:AllocateDescriptorSets
-
vkAllocateDescriptorSets
public static int vkAllocateDescriptorSets(VkDevice device, VkDescriptorSetAllocateInfo pAllocateInfo, java.nio.LongBuffer pDescriptorSets)
Allocate one or more descriptor sets.C Specification
To allocate descriptor sets from a descriptor pool, call:
VkResult vkAllocateDescriptorSets( VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets);
Description
The allocated descriptor sets are returned in
pDescriptorSets
.When a descriptor set is allocated, the initial state is largely uninitialized and all descriptors are undefined. Descriptors also become undefined if the underlying resource is destroyed. Descriptor sets containing undefined descriptors can still be bound and used, subject to the following conditions:
- For descriptor set bindings created with the
DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT
bit set, all descriptors in that binding that are dynamically used must have been populated before the descriptor set is consumed. - For descriptor set bindings created without the
DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT_EXT
bit set, all descriptors in that binding that are statically used must have been populated before the descriptor set is consumed. - Descriptor bindings with descriptor type of
DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
can be undefined when the descriptor set is consumed; though values in that block will be undefined. - Entries that are not used by a pipeline can have undefined descriptors.
If a call to
vkAllocateDescriptorSets
would cause the total number of descriptor sets allocated from the pool to exceed the value ofVkDescriptorPoolCreateInfo
::maxSets
used to createpAllocateInfo
->descriptorPool
, then the allocation may fail due to lack of space in the descriptor pool. Similarly, the allocation may fail due to lack of space if the call tovkAllocateDescriptorSets
would cause the number of any given descriptor type to exceed the sum of all thedescriptorCount
members of each element ofVkDescriptorPoolCreateInfo
::pPoolSizes
with amember
equal to that type.Additionally, the allocation may also fail if a call to
vkAllocateDescriptorSets
would cause the total number of inline uniform block bindings allocated from the pool to exceed the value ofVkDescriptorPoolInlineUniformBlockCreateInfoEXT
::maxInlineUniformBlockBindings
used to create the descriptor pool.If the allocation fails due to no more space in the descriptor pool, and not because of system or device memory exhaustion, then
ERROR_OUT_OF_POOL_MEMORY
must be returned.vkAllocateDescriptorSets
can be used to create multiple descriptor sets. If the creation of any of those descriptor sets fails, then the implementation must destroy all successfully created descriptor set objects from this command, set all entries of thepDescriptorSets
array toNULL_HANDLE
and return the error.Valid Usage (Implicit)
device
must be a validVkDevice
handlepAllocateInfo
must be a valid pointer to a validVkDescriptorSetAllocateInfo
structurepDescriptorSets
must be a valid pointer to an array ofpAllocateInfo
::descriptorSetCountVkDescriptorSet
handles- The value referenced by
pAllocateInfo
::descriptorSetCount
must be greater than 0
Host Synchronization
- Host access to
pAllocateInfo
::descriptorPool must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that owns the descriptor pool.pAllocateInfo
- a pointer to an instance of theVkDescriptorSetAllocateInfo
structure describing parameters of the allocation.pDescriptorSets
- a pointer to an array ofVkDescriptorSet
handles in which the resulting descriptor set objects are returned.
- For descriptor set bindings created with the
-
nvkFreeDescriptorSets
public static int nvkFreeDescriptorSets(VkDevice device, long descriptorPool, int descriptorSetCount, long pDescriptorSets)
Unsafe version of:FreeDescriptorSets
- Parameters:
descriptorSetCount
- the number of elements in thepDescriptorSets
array.
-
vkFreeDescriptorSets
public static int vkFreeDescriptorSets(VkDevice device, long descriptorPool, java.nio.LongBuffer pDescriptorSets)
Free one or more descriptor sets.C Specification
To free allocated descriptor sets, call:
VkResult vkFreeDescriptorSets( VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets);
Description
After a successful call to
vkFreeDescriptorSets
, all descriptor sets inpDescriptorSets
are invalid.Valid Usage
- All submitted commands that refer to any element of
pDescriptorSets
must have completed execution pDescriptorSets
must be a valid pointer to an array ofdescriptorSetCount
VkDescriptorSet
handles, each element of which must either be a valid handle orNULL_HANDLE
- Each valid handle in
pDescriptorSets
must have been allocated fromdescriptorPool
descriptorPool
must have been created with theDESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT
flag
Valid Usage (Implicit)
device
must be a validVkDevice
handledescriptorPool
must be a validVkDescriptorPool
handledescriptorSetCount
must be greater than 0descriptorPool
must have been created, allocated, or retrieved fromdevice
- Each element of
pDescriptorSets
that is a valid handle must have been created, allocated, or retrieved fromdescriptorPool
Host Synchronization
- Host access to
descriptorPool
must be externally synchronized - Host access to each member of
pDescriptorSets
must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the descriptor pool.descriptorPool
- the descriptor pool from which the descriptor sets were allocated.pDescriptorSets
- an array of handles toVkDescriptorSet
objects.
- All submitted commands that refer to any element of
-
vkFreeDescriptorSets
public static int vkFreeDescriptorSets(VkDevice device, long descriptorPool, long pDescriptorSet)
Free one or more descriptor sets.C Specification
To free allocated descriptor sets, call:
VkResult vkFreeDescriptorSets( VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets);
Description
After a successful call to
vkFreeDescriptorSets
, all descriptor sets inpDescriptorSets
are invalid.Valid Usage
- All submitted commands that refer to any element of
pDescriptorSets
must have completed execution pDescriptorSets
must be a valid pointer to an array ofdescriptorSetCount
VkDescriptorSet
handles, each element of which must either be a valid handle orNULL_HANDLE
- Each valid handle in
pDescriptorSets
must have been allocated fromdescriptorPool
descriptorPool
must have been created with theDESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT
flag
Valid Usage (Implicit)
device
must be a validVkDevice
handledescriptorPool
must be a validVkDescriptorPool
handledescriptorSetCount
must be greater than 0descriptorPool
must have been created, allocated, or retrieved fromdevice
- Each element of
pDescriptorSets
that is a valid handle must have been created, allocated, or retrieved fromdescriptorPool
Host Synchronization
- Host access to
descriptorPool
must be externally synchronized - Host access to each member of
pDescriptorSets
must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the descriptor pool.descriptorPool
- the descriptor pool from which the descriptor sets were allocated.
- All submitted commands that refer to any element of
-
nvkUpdateDescriptorSets
public static void nvkUpdateDescriptorSets(VkDevice device, int descriptorWriteCount, long pDescriptorWrites, int descriptorCopyCount, long pDescriptorCopies)
Unsafe version of:UpdateDescriptorSets
- Parameters:
descriptorWriteCount
- the number of elements in thepDescriptorWrites
array.descriptorCopyCount
- the number of elements in thepDescriptorCopies
array.
-
vkUpdateDescriptorSets
public static void vkUpdateDescriptorSets(VkDevice device, @Nullable VkWriteDescriptorSet.Buffer pDescriptorWrites, @Nullable VkCopyDescriptorSet.Buffer pDescriptorCopies)
Update the contents of a descriptor set object.C Specification
Once allocated, descriptor sets can be updated with a combination of write and copy operations. To update descriptor sets, call:
void vkUpdateDescriptorSets( VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies);
Description
The operations described by
pDescriptorWrites
are performed first, followed by the operations described bypDescriptorCopies
. Within each array, the operations are performed in the order they appear in the array.Each element in the
pDescriptorWrites
array describes an operation updating the descriptor set using descriptors for resources specified in the structure.Each element in the
pDescriptorCopies
array is aVkCopyDescriptorSet
structure describing an operation copying descriptors between sets.If the
dstSet
member of any element ofpDescriptorWrites
orpDescriptorCopies
is bound, accessed, or modified by any command that was recorded to a command buffer which is currently in the recording or executable state, and any of the descriptor bindings that are updated were not created with theDESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT
orDESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT
bits set, that command buffer becomes invalid.Valid Usage
- Descriptor bindings updated by this command which were created without the
DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT
orDESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT_EXT
bits set must not be used by any command that was recorded to a command buffer which is in the pending state.
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
descriptorWriteCount
is not 0,pDescriptorWrites
must be a valid pointer to an array ofdescriptorWriteCount
validVkWriteDescriptorSet
structures - If
descriptorCopyCount
is not 0,pDescriptorCopies
must be a valid pointer to an array ofdescriptorCopyCount
validVkCopyDescriptorSet
structures
Host Synchronization
- Host access to
pDescriptorWrites
[].dstSet must be externally synchronized - Host access to
pDescriptorCopies
[].dstSet must be externally synchronized
See Also
- Parameters:
device
- the logical device that updates the descriptor sets.pDescriptorWrites
- a pointer to an array ofVkWriteDescriptorSet
structures describing the descriptor sets to write to.pDescriptorCopies
- a pointer to an array ofVkCopyDescriptorSet
structures describing the descriptor sets to copy between.
- Descriptor bindings updated by this command which were created without the
-
nvkCreateFramebuffer
public static int nvkCreateFramebuffer(VkDevice device, long pCreateInfo, long pAllocator, long pFramebuffer)
Unsafe version of:CreateFramebuffer
-
vkCreateFramebuffer
public static int vkCreateFramebuffer(VkDevice device, VkFramebufferCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pFramebuffer)
Create a new framebuffer object.C Specification
To create a framebuffer, call:
VkResult vkCreateFramebuffer( VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer);
Valid Usage
- If
pCreateInfo
→flags
does not includeFRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR
, andattachmentCount
is not 0, each element ofpCreateInfo
→pAttachments
must have been created ondevice
Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkFramebufferCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pFramebuffer
must be a valid pointer to aVkFramebuffer
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the framebuffer.pCreateInfo
- points to aVkFramebufferCreateInfo
structure which describes additional information about framebuffer creation.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pFramebuffer
- points to aVkFramebuffer
handle in which the resulting framebuffer object is returned.
- If
-
nvkDestroyFramebuffer
public static void nvkDestroyFramebuffer(VkDevice device, long framebuffer, long pAllocator)
Unsafe version of:DestroyFramebuffer
-
vkDestroyFramebuffer
public static void vkDestroyFramebuffer(VkDevice device, long framebuffer, @Nullable VkAllocationCallbacks pAllocator)
Destroy a framebuffer object.C Specification
To destroy a framebuffer, call:
void vkDestroyFramebuffer( VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator);
Valid Usage
- All submitted commands that refer to
framebuffer
must have completed execution - If
VkAllocationCallbacks
were provided whenframebuffer
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenframebuffer
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
framebuffer
is notNULL_HANDLE
,framebuffer
must be a validVkFramebuffer
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
framebuffer
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
framebuffer
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the framebuffer.framebuffer
- the handle of the framebuffer to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All submitted commands that refer to
-
nvkCreateRenderPass
public static int nvkCreateRenderPass(VkDevice device, long pCreateInfo, long pAllocator, long pRenderPass)
Unsafe version of:CreateRenderPass
-
vkCreateRenderPass
public static int vkCreateRenderPass(VkDevice device, VkRenderPassCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pRenderPass)
Create a new render pass object.C Specification
To create a render pass, call:
VkResult vkCreateRenderPass( VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass);
Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkRenderPassCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pRenderPass
must be a valid pointer to aVkRenderPass
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the render pass.pCreateInfo
- a pointer to an instance of theVkRenderPassCreateInfo
structure that describes the parameters of the render pass.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pRenderPass
- points to aVkRenderPass
handle in which the resulting render pass object is returned.
-
nvkDestroyRenderPass
public static void nvkDestroyRenderPass(VkDevice device, long renderPass, long pAllocator)
Unsafe version of:DestroyRenderPass
-
vkDestroyRenderPass
public static void vkDestroyRenderPass(VkDevice device, long renderPass, @Nullable VkAllocationCallbacks pAllocator)
Destroy a render pass object.C Specification
To destroy a render pass, call:
void vkDestroyRenderPass( VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator);
Valid Usage
- All submitted commands that refer to
renderPass
must have completed execution - If
VkAllocationCallbacks
were provided whenrenderPass
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenrenderPass
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
renderPass
is notNULL_HANDLE
,renderPass
must be a validVkRenderPass
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
renderPass
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
renderPass
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the render pass.renderPass
- the handle of the render pass to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All submitted commands that refer to
-
nvkGetRenderAreaGranularity
public static void nvkGetRenderAreaGranularity(VkDevice device, long renderPass, long pGranularity)
Unsafe version of:GetRenderAreaGranularity
-
vkGetRenderAreaGranularity
public static void vkGetRenderAreaGranularity(VkDevice device, long renderPass, VkExtent2D pGranularity)
Returns the granularity for optimal render area.C Specification
To query the render area granularity, call:
void vkGetRenderAreaGranularity( VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity);
Description
The conditions leading to an optimal
renderArea
are:- the
offset.x
member inrenderArea
is a multiple of thewidth
member of the returnedVkExtent2D
(the horizontal granularity). - the
offset.y
member inrenderArea
is a multiple of theheight
of the returnedVkExtent2D
(the vertical granularity). - either the
offset.width
member inrenderArea
is a multiple of the horizontal granularity oroffset.x
+offset.width
is equal to thewidth
of theframebuffer
in theVkRenderPassBeginInfo
. - either the
offset.height
member inrenderArea
is a multiple of the vertical granularity oroffset.y
+offset.height
is equal to theheight
of theframebuffer
in theVkRenderPassBeginInfo
.
Subpass dependencies are not affected by the render area, and apply to the entire image subresources attached to the framebuffer as specified in the description of automatic layout transitions. Similarly, pipeline barriers are valid even if their effect extends outside the render area.
Valid Usage (Implicit)
device
must be a validVkDevice
handlerenderPass
must be a validVkRenderPass
handlepGranularity
must be a valid pointer to aVkExtent2D
structurerenderPass
must have been created, allocated, or retrieved fromdevice
See Also
- Parameters:
device
- the logical device that owns the render pass.renderPass
- a handle to a render pass.pGranularity
- points to aVkExtent2D
structure in which the granularity is returned.
- the
-
nvkCreateCommandPool
public static int nvkCreateCommandPool(VkDevice device, long pCreateInfo, long pAllocator, long pCommandPool)
Unsafe version of:CreateCommandPool
-
vkCreateCommandPool
public static int vkCreateCommandPool(VkDevice device, VkCommandPoolCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pCommandPool)
Create a new command pool object.C Specification
To create a command pool, call:
VkResult vkCreateCommandPool( VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool);
Valid Usage
pCreateInfo
::queueFamilyIndex
must be the index of a queue family available in the logical devicedevice
.
Valid Usage (Implicit)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkCommandPoolCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pCommandPool
must be a valid pointer to aVkCommandPool
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that creates the command pool.pCreateInfo
- a pointer to an instance of theVkCommandPoolCreateInfo
structure specifying the state of the command pool object.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pCommandPool
- points to aVkCommandPool
handle in which the created pool is returned.
-
nvkDestroyCommandPool
public static void nvkDestroyCommandPool(VkDevice device, long commandPool, long pAllocator)
Unsafe version of:DestroyCommandPool
-
vkDestroyCommandPool
public static void vkDestroyCommandPool(VkDevice device, long commandPool, @Nullable VkAllocationCallbacks pAllocator)
Destroy a command pool object.C Specification
To destroy a command pool, call:
void vkDestroyCommandPool( VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator);
Description
When a pool is destroyed, all command buffers allocated from the pool are freed.
Any primary command buffer allocated from another
VkCommandPool
that is in the recording or executable state and has a secondary command buffer allocated fromcommandPool
recorded into it, becomes invalid.Valid Usage
- All
VkCommandBuffer
objects allocated fromcommandPool
must not be in the pending state. - If
VkAllocationCallbacks
were provided whencommandPool
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whencommandPool
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle- If
commandPool
is notNULL_HANDLE
,commandPool
must be a validVkCommandPool
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
commandPool
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
commandPool
must be externally synchronized
See Also
- Parameters:
device
- the logical device that destroys the command pool.commandPool
- the handle of the command pool to destroy.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.
- All
-
vkResetCommandPool
public static int vkResetCommandPool(VkDevice device, long commandPool, int flags)
Reset a command pool.C Specification
To reset a command pool, call:
VkResult vkResetCommandPool( VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags);
Description
Resetting a command pool recycles all of the resources from all of the command buffers allocated from the command pool back to the command pool. All command buffers that have been allocated from the command pool are put in the initial state.
Any primary command buffer allocated from another
VkCommandPool
that is in the recording or executable state and has a secondary command buffer allocated fromcommandPool
recorded into it, becomes invalid.Valid Usage
- All
VkCommandBuffer
objects allocated fromcommandPool
must not be in the pending state
Valid Usage (Implicit)
device
must be a validVkDevice
handlecommandPool
must be a validVkCommandPool
handleflags
must be a valid combination ofVkCommandPoolResetFlagBits
valuescommandPool
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
commandPool
must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device
- the logical device that owns the command pool.commandPool
- the command pool to reset.flags
- a bitmask ofVkCommandPoolResetFlagBits
controlling the reset operation.
- All
-
nvkAllocateCommandBuffers
public static int nvkAllocateCommandBuffers(VkDevice device, long pAllocateInfo, long pCommandBuffers)
Unsafe version of:AllocateCommandBuffers
-
vkAllocateCommandBuffers
public static int vkAllocateCommandBuffers(VkDevice device, VkCommandBufferAllocateInfo pAllocateInfo, org.lwjgl.PointerBuffer pCommandBuffers)
Allocate command buffers from an existing command pool.C Specification
To allocate command buffers, call:
VkResult vkAllocateCommandBuffers( VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers);
Description
vkAllocateCommandBuffers
can be used to create multiple command buffers. If the creation of any of those command buffers fails, the implementation must destroy all successfully created command buffer objects from this command, set all entries of thepCommandBuffers
array toNULL
and return the error.When command buffers are first allocated, they are in the initial state.
Valid Usage (Implicit)
device
must be a validVkDevice
handlepAllocateInfo
must be a valid pointer to a validVkCommandBufferAllocateInfo
structurepCommandBuffers
must be a valid pointer to an array ofpAllocateInfo
::commandBufferCountVkCommandBuffer
handles- The value referenced by
pAllocateInfo
::commandBufferCount
must be greater than 0
Host Synchronization
- Host access to
pAllocateInfo
::commandPool must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device
- the logical device that owns the command pool.pAllocateInfo
- a pointer to an instance of theVkCommandBufferAllocateInfo
structure describing parameters of the allocation.pCommandBuffers
- a pointer to an array ofVkCommandBuffer
handles in which the resulting command buffer objects are returned. The array must be at least the length specified by thecommandBufferCount
member ofpAllocateInfo
. Each allocated command buffer begins in the initial state.
-
nvkFreeCommandBuffers
public static void nvkFreeCommandBuffers(VkDevice device, long commandPool, int commandBufferCount, long pCommandBuffers)
Unsafe version of:FreeCommandBuffers
- Parameters:
commandBufferCount
- the length of thepCommandBuffers
array.
-
vkFreeCommandBuffers
public static void vkFreeCommandBuffers(VkDevice device, long commandPool, org.lwjgl.PointerBuffer pCommandBuffers)
Free command buffers.C Specification
To free command buffers, call:
void vkFreeCommandBuffers( VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers);
Description
Any primary command buffer that is in the recording or executable state and has any element of
pCommandBuffers
recorded into it, becomes invalid.Valid Usage
- All elements of
pCommandBuffers
must not be in the pending state pCommandBuffers
must be a valid pointer to an array ofcommandBufferCount
VkCommandBuffer
handles, each element of which must either be a valid handle orNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handlecommandPool
must be a validVkCommandPool
handlecommandBufferCount
must be greater than 0commandPool
must have been created, allocated, or retrieved fromdevice
- Each element of
pCommandBuffers
that is a valid handle must have been created, allocated, or retrieved fromcommandPool
Host Synchronization
- Host access to
commandPool
must be externally synchronized - Host access to each member of
pCommandBuffers
must be externally synchronized
- Parameters:
device
- the logical device that owns the command pool.commandPool
- the command pool from which the command buffers were allocated.pCommandBuffers
- an array of handles of command buffers to free.
- All elements of
-
vkFreeCommandBuffers
public static void vkFreeCommandBuffers(VkDevice device, long commandPool, VkCommandBuffer pCommandBuffer)
Free command buffers.C Specification
To free command buffers, call:
void vkFreeCommandBuffers( VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers);
Description
Any primary command buffer that is in the recording or executable state and has any element of
pCommandBuffers
recorded into it, becomes invalid.Valid Usage
- All elements of
pCommandBuffers
must not be in the pending state pCommandBuffers
must be a valid pointer to an array ofcommandBufferCount
VkCommandBuffer
handles, each element of which must either be a valid handle orNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handlecommandPool
must be a validVkCommandPool
handlecommandBufferCount
must be greater than 0commandPool
must have been created, allocated, or retrieved fromdevice
- Each element of
pCommandBuffers
that is a valid handle must have been created, allocated, or retrieved fromcommandPool
Host Synchronization
- Host access to
commandPool
must be externally synchronized - Host access to each member of
pCommandBuffers
must be externally synchronized
- Parameters:
device
- the logical device that owns the command pool.commandPool
- the command pool from which the command buffers were allocated.
- All elements of
-
nvkBeginCommandBuffer
public static int nvkBeginCommandBuffer(VkCommandBuffer commandBuffer, long pBeginInfo)
Unsafe version of:BeginCommandBuffer
-
vkBeginCommandBuffer
public static int vkBeginCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferBeginInfo pBeginInfo)
Start recording a command buffer.C Specification
To begin recording a command buffer, call:
VkResult vkBeginCommandBuffer( VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo);
Valid Usage
commandBuffer
must not be in the recording or pending state.- If
commandBuffer
was allocated from aVkCommandPool
which did not have theCOMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT
flag set,commandBuffer
must be in the initial state. - If
commandBuffer
is a secondary command buffer, thepInheritanceInfo
member ofpBeginInfo
must be a validVkCommandBufferInheritanceInfo
structure - If
commandBuffer
is a secondary command buffer and either theocclusionQueryEnable
member of thepInheritanceInfo
member ofpBeginInfo
isFALSE
, or the precise occlusion queries feature is not enabled, thequeryFlags
member of thepInheritanceInfo
memberpBeginInfo
must not containQUERY_CONTROL_PRECISE_BIT
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlepBeginInfo
must be a valid pointer to a validVkCommandBufferBeginInfo
structure
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
commandBuffer
- the handle of the command buffer which is to be put in the recording state.pBeginInfo
- an instance of theVkCommandBufferBeginInfo
structure, which defines additional information about how the command buffer begins recording.
-
vkEndCommandBuffer
public static int vkEndCommandBuffer(VkCommandBuffer commandBuffer)
Finish recording a command buffer.C Specification
To complete recording of a command buffer, call:
VkResult vkEndCommandBuffer( VkCommandBuffer commandBuffer);
Description
If there was an error during recording, the application will be notified by an unsuccessful return code returned by
vkEndCommandBuffer
. If the application wishes to further use the command buffer, the command buffer must be reset. The command buffer must have been in the recording state, and is moved to the executable state.Valid Usage
commandBuffer
must be in the recording state.- If
commandBuffer
is a primary command buffer, there must not be an active render pass instance - All queries made active during the recording of
commandBuffer
must have been made inactive - Conditional rendering must not be active
- If
commandBuffer
is a secondary command buffer, there must not be an outstandingCmdBeginDebugUtilsLabelEXT
command recorded tocommandBuffer
that has not previously been ended by a call toCmdEndDebugUtilsLabelEXT
. - If
commandBuffer
is a secondary command buffer, there must not be an outstandingCmdDebugMarkerBeginEXT
command recorded tocommandBuffer
that has not previously been ended by a call toCmdDebugMarkerEndEXT
.
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handle
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
commandBuffer
- the command buffer to complete recording.
-
vkResetCommandBuffer
public static int vkResetCommandBuffer(VkCommandBuffer commandBuffer, int flags)
Reset a command buffer to the initial state.C Specification
To reset command buffers, call:
VkResult vkResetCommandBuffer( VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags);
Description
Any primary command buffer that is in the recording or executable state and has
commandBuffer
recorded into it, becomes invalid.Valid Usage
commandBuffer
must not be in the pending statecommandBuffer
must have been allocated from a pool that was created with theCOMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handleflags
must be a valid combination ofVkCommandBufferResetFlagBits
values
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
commandBuffer
- the command buffer to reset. The command buffer can be in any state other than pending, and is moved into the initial state.flags
- a bitmask ofVkCommandBufferResetFlagBits
controlling the reset operation.
-
vkCmdBindPipeline
public static void vkCmdBindPipeline(VkCommandBuffer commandBuffer, int pipelineBindPoint, long pipeline)
Bind a pipeline object to a command buffer.C Specification
Once a pipeline has been created, it can be bound to the command buffer using the command:
void vkCmdBindPipeline( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline);
Description
Once bound, a pipeline binding affects subsequent graphics or compute commands in the command buffer until a different pipeline is bound to the bind point. The pipeline bound to
PIPELINE_BIND_POINT_COMPUTE
controls the behavior ofCmdDispatch
andCmdDispatchIndirect
. The pipeline bound toPIPELINE_BIND_POINT_GRAPHICS
controls the behavior of all drawing commands. The pipeline bound toPIPELINE_BIND_POINT_RAY_TRACING_NV
controls the behavior ofCmdTraceRaysNV
. No other commands are affected by the pipeline state.Valid Usage
- If
pipelineBindPoint
isPIPELINE_BIND_POINT_COMPUTE
, theVkCommandPool
thatcommandBuffer
was allocated from must support compute operations - If
pipelineBindPoint
isPIPELINE_BIND_POINT_GRAPHICS
, theVkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - If
pipelineBindPoint
isPIPELINE_BIND_POINT_COMPUTE
,pipeline
must be a compute pipeline - If
pipelineBindPoint
isPIPELINE_BIND_POINT_GRAPHICS
,pipeline
must be a graphics pipeline - If the variable multisample rate feature is not supported,
pipeline
is a graphics pipeline, the current subpass has no attachments, and this is not the first call to this function with a graphics pipeline after transitioning to the current subpass, then the sample count specified by this pipeline must match that set in the previous pipeline - If
VkPhysicalDeviceSampleLocationsPropertiesEXT
::variableSampleLocations
isFALSE
, andpipeline
is a graphics pipeline created with aVkPipelineSampleLocationsStateCreateInfoEXT
structure having itssampleLocationsEnable
member set toTRUE
but withoutDYNAMIC_STATE_SAMPLE_LOCATIONS_EXT
enabled then the current render pass instance must have been begun by specifying aVkRenderPassSampleLocationsBeginInfoEXT
structure whosepPostSubpassSampleLocations
member contains an element with asubpassIndex
matching the current subpass index and thesampleLocationsInfo
member of that element must match thesampleLocationsInfo
specified inVkPipelineSampleLocationsStateCreateInfoEXT
when the pipeline was created - This command must not be recorded when transform feedback is active
- If
pipelineBindPoint
isPIPELINE_BIND_POINT_RAY_TRACING_NV
, theVkCommandPool
thatcommandBuffer
was allocated from must support compute operations - If
pipelineBindPoint
isPIPELINE_BIND_POINT_RAY_TRACING_NV
, thepipeline
must be a ray tracing pipeline
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlepipelineBindPoint
must be a validVkPipelineBindPoint
valuepipeline
must be a validVkPipeline
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations - Both of
commandBuffer
, andpipeline
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics Compute - Parameters:
commandBuffer
- the command buffer that the pipeline will be bound to.pipelineBindPoint
- aVkPipelineBindPoint
value specifying whether to bind to the compute or graphics bind point. Binding one does not disturb the other.pipeline
- the pipeline to be bound.
- If
-
nvkCmdSetViewport
public static void nvkCmdSetViewport(VkCommandBuffer commandBuffer, int firstViewport, int viewportCount, long pViewports)
Unsafe version of:CmdSetViewport
- Parameters:
viewportCount
- the number of viewports whose parameters are updated by the command.
-
vkCmdSetViewport
public static void vkCmdSetViewport(VkCommandBuffer commandBuffer, int firstViewport, VkViewport.Buffer pViewports)
Set the viewport on a command buffer.C Specification
If the bound pipeline state object was not created with the
DYNAMIC_STATE_VIEWPORT
dynamic state enabled, viewport transformation parameters are specified using thepViewports
member ofVkPipelineViewportStateCreateInfo
in the pipeline state object. If the pipeline state object was created with theDYNAMIC_STATE_VIEWPORT
dynamic state enabled, the viewport transformation parameters are dynamically set and changed with the command:void vkCmdSetViewport( VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports);
Description
The viewport parameters taken from element
i
ofpViewports
replace the current state for the viewport indexfirstViewport + i
, fori
in[0, viewportCount)
.Valid Usage
- The bound graphics pipeline must have been created with the
DYNAMIC_STATE_VIEWPORT
dynamic state enabled firstViewport
must be less thanVkPhysicalDeviceLimits
::maxViewports
- The sum of
firstViewport
andviewportCount
must be between 1 andVkPhysicalDeviceLimits
::maxViewports
, inclusive - If the multiple viewports feature is not enabled,
firstViewport
must be 0 - If the multiple viewports feature is not enabled,
viewportCount
must be 1
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlepViewports
must be a valid pointer to an array ofviewportCount
validVkViewport
structurescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations viewportCount
must be greater than 0
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.firstViewport
- the index of the first viewport whose parameters are updated by the command.pViewports
- a pointer to an array ofVkViewport
structures specifying viewport parameters.
- The bound graphics pipeline must have been created with the
-
nvkCmdSetScissor
public static void nvkCmdSetScissor(VkCommandBuffer commandBuffer, int firstScissor, int scissorCount, long pScissors)
Unsafe version of:CmdSetScissor
- Parameters:
scissorCount
- the number of scissors whose rectangles are updated by the command.
-
vkCmdSetScissor
public static void vkCmdSetScissor(VkCommandBuffer commandBuffer, int firstScissor, VkRect2D.Buffer pScissors)
Set the dynamic scissor rectangles on a command buffer.C Specification
The scissor test determines if a fragment's framebuffer coordinates
(xf,yf)
lie within the scissor rectangle corresponding to the viewport index (see Controlling the Viewport) used by the primitive that generated the fragment. If the pipeline state object is created withoutDYNAMIC_STATE_SCISSOR
enabled then the scissor rectangles are set by theVkPipelineViewportStateCreateInfo
state of the pipeline state object. Otherwise, to dynamically set the scissor rectangles call:void vkCmdSetScissor( VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors);
Description
The scissor rectangles taken from element
i
ofpScissors
replace the current state for the scissor indexfirstScissor + i
, fori
in[0, scissorCount)
.Each scissor rectangle is described by a
VkRect2D
structure, with theoffset.x
andoffset.y
values determining the upper left corner of the scissor rectangle, and theextent.width
andextent.height
values determining the size in pixels.Valid Usage
- The bound graphics pipeline must have been created with the
DYNAMIC_STATE_SCISSOR
dynamic state enabled firstScissor
must be less thanVkPhysicalDeviceLimits
::maxViewports
- The sum of
firstScissor
andscissorCount
must be between 1 andVkPhysicalDeviceLimits
::maxViewports
, inclusive - If the multiple viewports feature is not enabled,
firstScissor
must be 0 - If the multiple viewports feature is not enabled,
scissorCount
must be 1 - The
x
andy
members ofoffset
must be greater than or equal to 0 - Evaluation of
(offset.x + extent.width)
must not cause a signed integer addition overflow - Evaluation of
(offset.y + extent.height)
must not cause a signed integer addition overflow
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlepScissors
must be a valid pointer to an array ofscissorCount
VkRect2D
structurescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations scissorCount
must be greater than 0
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.firstScissor
- the index of the first scissor whose state is updated by the command.pScissors
- a pointer to an array ofVkRect2D
structures defining scissor rectangles.
- The bound graphics pipeline must have been created with the
-
vkCmdSetLineWidth
public static void vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth)
Set the dynamic line width state.C Specification
Each line segment has an associated width. The line width is specified by the
VkPipelineRasterizationStateCreateInfo
::lineWidth
property of the currently active pipeline, if the pipeline was not created withDYNAMIC_STATE_LINE_WIDTH
enabled.Otherwise, the line width is set by calling
vkCmdSetLineWidth
:void vkCmdSetLineWidth( VkCommandBuffer commandBuffer, float lineWidth);
Valid Usage
- The bound graphics pipeline must have been created with the
DYNAMIC_STATE_LINE_WIDTH
dynamic state enabled - If the wide lines feature is not enabled,
lineWidth
must be1.0
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics - Parameters:
commandBuffer
- the command buffer into which the command will be recorded.lineWidth
- the width of rasterized line segments.
- The bound graphics pipeline must have been created with the
-
vkCmdSetDepthBias
public static void vkCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor)
Set the depth bias dynamic state.C Specification
The depth values of all fragments generated by the rasterization of a polygon can be offset by a single value that is computed for that polygon. This behavior is controlled by the
depthBiasEnable
,depthBiasConstantFactor
,depthBiasClamp
, anddepthBiasSlopeFactor
members ofVkPipelineRasterizationStateCreateInfo
, or by the corresponding parameters to thevkCmdSetDepthBias
command if depth bias state is dynamic.void vkCmdSetDepthBias( VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor);
Description
If
depthBiasEnable
isFALSE
, no depth bias is applied and the fragment's depth values are unchanged.depthBiasSlopeFactor
scales the maximum depth slope of the polygon, anddepthBiasConstantFactor
scales an implementation-dependent constant that relates to the usable resolution of the depth buffer. The resulting values are summed to produce the depth bias value which is then clamped to a minimum or maximum value specified bydepthBiasClamp
.depthBiasSlopeFactor
,depthBiasConstantFactor
, anddepthBiasClamp
can each be positive, negative, or zero.The maximum depth slope
m
of a triangle ism = sqrt((∂zf / ∂xf)2 + (∂zf / ∂yf)2)
where
(xf, yf, zf)
is a point on the triangle.m
may be approximated asm = max(abs(∂zf / ∂xf), abs(∂zf / ∂yf))
The minimum resolvable difference
r
is an implementation-dependent parameter that depends on the depth buffer representation. It is the smallest difference in framebuffer coordinatez
values that is guaranteed to remain distinct throughout polygon rasterization and in the depth buffer. All pairs of fragments generated by the rasterization of two polygons with otherwise identical vertices, butzf
values that differ byr
, will have distinct depth values.For fixed-point depth buffer representations,
r
is constant throughout the range of the entire depth buffer. For floating-point depth buffers, there is no single minimum resolvable difference. In this case, the minimum resolvable difference for a given polygon is dependent on the maximum exponent,e
, in the range ofz
values spanned by the primitive. Ifn
is the number of bits in the floating-point mantissa, the minimum resolvable difference,r
, for the given primitive is defined asr = 2e-n
If a triangle is rasterized using the
POLYGON_MODE_FILL_RECTANGLE_NV
polygon mode, then this minimum resolvable difference may not be resolvable for samples outside of the triangle, where the depth is extrapolated.If no depth buffer is present,
r
is undefined.The bias value
o
for a polygon ism × depthBiasSlopeFactor + r × depthBiasConstantFactor depthBiasClamp = 0 or NaN o = min(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, depthBiasClamp) depthBiasClamp > 0 max(m × depthBiasSlopeFactor + r × depthBiasConstantFactor, depthBiasClamp) depthBiasClamp < 0
m
is computed as described above. If the depth buffer uses a fixed-point representation,m
is a function of depth values in the range[0,1]
, ando
is applied to depth values in the same range.For fixed-point depth buffers, fragment depth values are always limited to the range
[0,1]
by clamping after depth bias addition is performed. Unless theVK_EXT_depth_range_unrestricted
extension is enabled, fragment depth values are clamped even when the depth buffer uses a floating-point representation.Valid Usage
- The bound graphics pipeline must have been created with the
DYNAMIC_STATE_DEPTH_BIAS
dynamic state enabled - If the depth bias clamping feature is not enabled,
depthBiasClamp
must be0.0
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics - Parameters:
commandBuffer
- the command buffer into which the command will be recorded.depthBiasConstantFactor
- a scalar factor controlling the constant depth value added to each fragment.depthBiasClamp
- the maximum (or minimum) depth bias of a fragment.depthBiasSlopeFactor
- a scalar factor applied to a fragment’s slope in depth bias calculations.
-
nvkCmdSetBlendConstants
public static void nvkCmdSetBlendConstants(VkCommandBuffer commandBuffer, long blendConstants)
Unsafe version of:CmdSetBlendConstants
-
vkCmdSetBlendConstants
public static void vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, java.nio.FloatBuffer blendConstants)
Set the values of blend constants.C Specification
Otherwise, to dynamically set and change the blend constant, call:
void vkCmdSetBlendConstants( VkCommandBuffer commandBuffer, const float blendConstants[4]);
Valid Usage
- The bound graphics pipeline must have been created with the
DYNAMIC_STATE_BLEND_CONSTANTS
dynamic state enabled
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics - Parameters:
commandBuffer
- the command buffer into which the command will be recorded.blendConstants
- an array of four values specifying the R, G, B, and A components of the blend constant color used in blending, depending on the blend factor.
- The bound graphics pipeline must have been created with the
-
vkCmdSetDepthBounds
public static void vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds)
Set the depth bounds test values for a command buffer.C Specification
The depth bounds test conditionally disables coverage of a sample based on the outcome of a comparison between the value
za
in the depth attachment at location(xf,yf)
(for the appropriate sample) and a range of values. The test is enabled or disabled by thedepthBoundsTestEnable
member ofVkPipelineDepthStencilStateCreateInfo
: If the pipeline state object is created without theDYNAMIC_STATE_DEPTH_BOUNDS
dynamic state enabled then the range of values used in the depth bounds test are defined by theminDepthBounds
andmaxDepthBounds
members of theVkPipelineDepthStencilStateCreateInfo
structure. Otherwise, to dynamically set the depth bounds range values call:void vkCmdSetDepthBounds( VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds);
Valid Usage
- The bound graphics pipeline must have been created with the
DYNAMIC_STATE_DEPTH_BOUNDS
dynamic state enabled - Unless the
VK_EXT_depth_range_unrestricted
extension is enabledminDepthBounds
must be between0.0
and1.0
, inclusive - Unless the
VK_EXT_depth_range_unrestricted
extension is enabledmaxDepthBounds
must be between0.0
and1.0
, inclusive
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics - Parameters:
commandBuffer
- the command buffer into which the command will be recorded.minDepthBounds
- the lower bound of the range of depth values used in the depth bounds test.maxDepthBounds
- the upper bound of the range.
- The bound graphics pipeline must have been created with the
-
vkCmdSetStencilCompareMask
public static void vkCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, int faceMask, int compareMask)
Set the stencil compare mask dynamic state.C Specification
If the pipeline state object is created with the
DYNAMIC_STATE_STENCIL_COMPARE_MASK
dynamic state enabled, then to dynamically set the stencil compare mask call:void vkCmdSetStencilCompareMask( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask);
Valid Usage
- The bound graphics pipeline must have been created with the
DYNAMIC_STATE_STENCIL_COMPARE_MASK
dynamic state enabled
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlefaceMask
must be a valid combination ofVkStencilFaceFlagBits
valuesfaceMask
must not be 0commandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics - Parameters:
commandBuffer
- the command buffer into which the command will be recorded.faceMask
- a bitmask ofVkStencilFaceFlagBits
specifying the set of stencil state for which to update the compare mask.compareMask
- the new value to use as the stencil compare mask.
- The bound graphics pipeline must have been created with the
-
vkCmdSetStencilWriteMask
public static void vkCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, int faceMask, int writeMask)
Set the stencil write mask dynamic state.C Specification
If the pipeline state object is created with the
DYNAMIC_STATE_STENCIL_WRITE_MASK
dynamic state enabled, then to dynamically set the stencil write mask call:void vkCmdSetStencilWriteMask( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask);
Valid Usage
- The bound graphics pipeline must have been created with the
DYNAMIC_STATE_STENCIL_WRITE_MASK
dynamic state enabled
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlefaceMask
must be a valid combination ofVkStencilFaceFlagBits
valuesfaceMask
must not be 0commandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics - Parameters:
commandBuffer
- the command buffer into which the command will be recorded.faceMask
- a bitmask ofVkStencilFaceFlagBits
specifying the set of stencil state for which to update the write mask, as described above forCmdSetStencilCompareMask
.writeMask
- the new value to use as the stencil write mask.
- The bound graphics pipeline must have been created with the
-
vkCmdSetStencilReference
public static void vkCmdSetStencilReference(VkCommandBuffer commandBuffer, int faceMask, int reference)
Set the stencil reference dynamic state.C Specification
If the pipeline state object is created with the
DYNAMIC_STATE_STENCIL_REFERENCE
dynamic state enabled, then to dynamically set the stencil reference value call:void vkCmdSetStencilReference( VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference);
Valid Usage
- The bound graphics pipeline must have been created with the
DYNAMIC_STATE_STENCIL_REFERENCE
dynamic state enabled
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlefaceMask
must be a valid combination ofVkStencilFaceFlagBits
valuesfaceMask
must not be 0commandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics - Parameters:
commandBuffer
- the command buffer into which the command will be recorded.faceMask
- a bitmask ofVkStencilFaceFlagBits
specifying the set of stencil state for which to update the reference value, as described above forCmdSetStencilCompareMask
.reference
- the new value to use as the stencil reference value.
- The bound graphics pipeline must have been created with the
-
nvkCmdBindDescriptorSets
public static void nvkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, int pipelineBindPoint, long layout, int firstSet, int descriptorSetCount, long pDescriptorSets, int dynamicOffsetCount, long pDynamicOffsets)
Unsafe version of:CmdBindDescriptorSets
- Parameters:
descriptorSetCount
- the number of elements in thepDescriptorSets
array.dynamicOffsetCount
- the number of dynamic offsets in thepDynamicOffsets
array.
-
vkCmdBindDescriptorSets
public static void vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, int pipelineBindPoint, long layout, int firstSet, java.nio.LongBuffer pDescriptorSets, @Nullable java.nio.IntBuffer pDynamicOffsets)
Binds descriptor sets to a command buffer.C Specification
To bind one or more descriptor sets to a command buffer, call:
void vkCmdBindDescriptorSets( VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets);
Description
vkCmdBindDescriptorSets
causes the sets numbered [firstSet
..firstSet
+descriptorSetCount
-1] to use the bindings stored inpDescriptorSets
[0..descriptorSetCount
-1] for subsequent rendering commands (either compute or graphics, according to thepipelineBindPoint
). Any bindings that were previously applied via these sets are no longer valid.Once bound, a descriptor set affects rendering of subsequent graphics or compute commands in the command buffer until a different set is bound to the same set number, or else until the set is disturbed as described in Pipeline Layout Compatibility.
A compatible descriptor set must be bound for all set numbers that any shaders in a pipeline access, at the time that a draw or dispatch command is recorded to execute using that pipeline. However, if none of the shaders in a pipeline statically use any bindings with a particular set number, then no descriptor set need be bound for that set number, even if the pipeline layout includes a non-trivial descriptor set layout for that set number.
If any of the sets being bound include dynamic uniform or storage buffers, then
pDynamicOffsets
includes one element for each array element in each dynamic descriptor type binding in each set. Values are taken frompDynamicOffsets
in an order such that all entries for set N come before set N+1; within a set, entries are ordered by the binding numbers in the descriptor set layouts; and within a binding array, elements are in order.dynamicOffsetCount
must equal the total number of dynamic descriptors in the sets being bound.The effective offset used for dynamic uniform and storage buffer bindings is the sum of the relative offset taken from
pDynamicOffsets
, and the base address of the buffer plus base offset in the descriptor set. The range of the dynamic uniform and storage buffer bindings is the buffer range as specified in the descriptor set.Each of the
pDescriptorSets
must be compatible with the pipeline layout specified bylayout
. The layout used to program the bindings must also be compatible with the pipeline used in subsequent graphics or compute commands, as defined in the Pipeline Layout Compatibility section.The descriptor set contents bound by a call to
vkCmdBindDescriptorSets
may be consumed at the following times:- For descriptor bindings created with the
DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT_EXT
bit set, the contents may be consumed when the command buffer is submitted to a queue, or during shader execution of the resulting draws and dispatches, or any time in between. Otherwise, - during host execution of the command, or during shader execution of the resulting draws and dispatches, or any time in between.
Thus, the contents of a descriptor set binding must not be altered (overwritten by an update command, or freed) between the first point in time that it may be consumed, and when the command completes executing on the queue.
The contents of
pDynamicOffsets
are consumed immediately during execution ofvkCmdBindDescriptorSets
. Once all pending uses have completed, it is legal to update and reuse a descriptor set.Valid Usage
- Each element of
pDescriptorSets
must have been allocated with aVkDescriptorSetLayout
that matches (is the same as, or identically defined as) theVkDescriptorSetLayout
at set n inlayout
, where n is the sum offirstSet
and the index intopDescriptorSets
dynamicOffsetCount
must be equal to the total number of dynamic descriptors inpDescriptorSets
- The sum of
firstSet
anddescriptorSetCount
must be less than or equal toVkPipelineLayoutCreateInfo
::setLayoutCount
provided whenlayout
was created pipelineBindPoint
must be supported by thecommandBuffer
’s parentVkCommandPool
’s queue family- Each element of
pDynamicOffsets
which corresponds to a descriptor binding with typeDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
must be a multiple ofVkPhysicalDeviceLimits
::minUniformBufferOffsetAlignment
- Each element of
pDynamicOffsets
which corresponds to a descriptor binding with typeDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
must be a multiple ofVkPhysicalDeviceLimits
::minStorageBufferOffsetAlignment
- For each dynamic uniform or storage buffer binding in
pDescriptorSets
, the sum of the effective offset, as defined above, and the range of the binding must be less than or equal to the size of the buffer
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlepipelineBindPoint
must be a validVkPipelineBindPoint
valuelayout
must be a validVkPipelineLayout
handlepDescriptorSets
must be a valid pointer to an array ofdescriptorSetCount
validVkDescriptorSet
handles- If
dynamicOffsetCount
is not 0,pDynamicOffsets
must be a valid pointer to an array ofdynamicOffsetCount
uint32_t
values commandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations descriptorSetCount
must be greater than 0- Each of
commandBuffer
,layout
, and the elements ofpDescriptorSets
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics Compute - Parameters:
commandBuffer
- the command buffer that the descriptor sets will be bound to.pipelineBindPoint
- aVkPipelineBindPoint
indicating whether the descriptors will be used by graphics pipelines or compute pipelines. There is a separate set of bind points for each of graphics and compute, so binding one does not disturb the other.layout
- aVkPipelineLayout
object used to program the bindings.firstSet
- the set number of the first descriptor set to be bound.pDescriptorSets
- an array of handles toVkDescriptorSet
objects describing the descriptor sets to write to.pDynamicOffsets
- a pointer to an array ofuint32_t
values specifying dynamic offsets.
- For descriptor bindings created with the
-
vkCmdBindIndexBuffer
public static void vkCmdBindIndexBuffer(VkCommandBuffer commandBuffer, long buffer, long offset, int indexType)
Bind an index buffer to a command buffer.C Specification
To bind an index buffer to a command buffer, call:
void vkCmdBindIndexBuffer( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType);
Valid Usage
offset
must be less than the size ofbuffer
- The sum of
offset
and the address of the range ofVkDeviceMemory
object that is backingbuffer
, must be a multiple of the type indicated byindexType
buffer
must have been created with theBUFFER_USAGE_INDEX_BUFFER_BIT
flag- If
buffer
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object indexType
must not beINDEX_TYPE_NONE_NV
.- If
indexType
isINDEX_TYPE_UINT8_EXT
, the indexTypeUint8 feature must be enabled
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlebuffer
must be a validVkBuffer
handleindexType
must be a validVkIndexType
valuecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - Both of
buffer
, andcommandBuffer
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics - Parameters:
commandBuffer
- the command buffer into which the command is recorded.buffer
- the buffer being bound.offset
- the starting offset in bytes withinbuffer
used in index buffer address calculations.indexType
- aVkIndexType
value specifying whether indices are treated as 16 bits or 32 bits.
-
nvkCmdBindVertexBuffers
public static void nvkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, int firstBinding, int bindingCount, long pBuffers, long pOffsets)
Unsafe version of:CmdBindVertexBuffers
- Parameters:
bindingCount
- the number of vertex input bindings whose state is updated by the command.
-
vkCmdBindVertexBuffers
public static void vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, int firstBinding, java.nio.LongBuffer pBuffers, java.nio.LongBuffer pOffsets)
Bind vertex buffers to a command buffer.C Specification
To bind vertex buffers to a command buffer for use in subsequent draw commands, call:
void vkCmdBindVertexBuffers( VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets);
Description
The values taken from elements
i
ofpBuffers
andpOffsets
replace the current state for the vertex input bindingfirstBinding + i
, fori
in[0, bindingCount)
. The vertex input binding is updated to start at the offset indicated bypOffsets
[i] from the start of the bufferpBuffers
[i]. All vertex input attributes that use each of these bindings will use these updated addresses in their address calculations for subsequent draw commands.Valid Usage
firstBinding
must be less thanVkPhysicalDeviceLimits
::maxVertexInputBindings
- The sum of
firstBinding
andbindingCount
must be less than or equal toVkPhysicalDeviceLimits
::maxVertexInputBindings
- All elements of
pOffsets
must be less than the size of the corresponding element inpBuffers
- All elements of
pBuffers
must have been created with theBUFFER_USAGE_VERTEX_BUFFER_BIT
flag - Each element of
pBuffers
that is non-sparse must be bound completely and contiguously to a singleVkDeviceMemory
object
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlepBuffers
must be a valid pointer to an array ofbindingCount
validVkBuffer
handlespOffsets
must be a valid pointer to an array ofbindingCount
VkDeviceSize
valuescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations bindingCount
must be greater than 0- Both of
commandBuffer
, and the elements ofpBuffers
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics - Parameters:
commandBuffer
- the command buffer into which the command is recorded.firstBinding
- the index of the first vertex input binding whose state is updated by the command.pBuffers
- a pointer to an array of buffer handles.pOffsets
- a pointer to an array of buffer offsets.
-
vkCmdDraw
public static void vkCmdDraw(VkCommandBuffer commandBuffer, int vertexCount, int instanceCount, int firstVertex, int firstInstance)
Draw primitives.C Specification
To record a non-indexed draw, call:
void vkCmdDraw( VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance);
Description
When the command is executed, primitives are assembled using the current primitive topology and
vertexCount
consecutive vertex indices with the firstvertexIndex
value equal tofirstVertex
. The primitives are drawninstanceCount
times withinstanceIndex
starting withfirstInstance
and increasing sequentially for each instance. The assembled primitives execute the bound graphics pipeline.Valid Usage
- If a
VkImageView
is sampled withFILTER_LINEAR
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
VkImageView
is accessed using atomic operations as a result of this command, then the image view’s format features must containFORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
- If a
VkImageView
is sampled withFILTER_CUBIC_EXT
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
- Any
VkImageView
being sampled withFILTER_CUBIC_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubic
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImageView
being sampled withFILTER_CUBIC_EXT
with a reduction mode of eitherSAMPLER_REDUCTION_MODE_MIN_EXT
orSAMPLER_REDUCTION_MODE_MAX_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubicMinmax
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImage
created with aVkImageCreateInfo
::flags
containingIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
sampled as a result of this command must only be sampled using aVkSamplerAddressMode
ofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
. - For each set n that is statically used by the
VkPipeline
bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayout
that is compatible for set n, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - For each push constant that is statically used by the
VkPipeline
bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayout
that is compatible for push constants, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - Descriptors in each bound descriptor set, specified via
vkCmdBindDescriptorSets
, must be valid if they are statically used by theVkPipeline
bound to the pipeline bind point used by this command - A valid pipeline must be bound to the pipeline bind point used by this command
- If the
VkPipeline
object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set forcommandBuffer
- If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImage
with aVkImageView
of the typeIMAGE_VIEW_TYPE_3D
,IMAGE_VIEW_TYPE_CUBE
,IMAGE_VIEW_TYPE_1D_ARRAY
,IMAGE_VIEW_TYPE_2D_ARRAY
orIMAGE_VIEW_TYPE_CUBE_ARRAY
, in any shader stage - If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions withImplicitLod
,Dref
orProj
in their name, in any shader stage - If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions that includes a LOD bias or any offset values, in any shader stage - If the robust buffer access feature is not enabled, and if the
VkPipeline
object bound to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If the robust buffer access feature is not enabled, and if the
VkPipeline
object bound to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If
commandBuffer
is an unprotected command buffer, any resource accessed by theVkPipeline
object bound to the pipeline bind point used by this command must not be a protected resource - The current render pass must be compatible with the
renderPass
member of theVkGraphicsPipelineCreateInfo
structure specified when creating theVkPipeline
bound toPIPELINE_BIND_POINT_GRAPHICS
. - The subpass index of the current render pass must be equal to the
subpass
member of theVkGraphicsPipelineCreateInfo
structure specified when creating theVkPipeline
bound toPIPELINE_BIND_POINT_GRAPHICS
. - Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
- Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command.
- If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to
VkPhysicalDeviceMultiviewProperties
::maxMultiviewInstanceIndex
. - If the bound graphics pipeline was created with
VkPipelineSampleLocationsStateCreateInfoEXT
::sampleLocationsEnable
set toTRUE
and the current subpass has a depth/stencil attachment, then that attachment must have been created with theIMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
bit set - If
commandBuffer
is a protected command buffer, any resource written to by theVkPipeline
object bound to the pipeline bind point used by this command must not be an unprotected resource - If
commandBuffer
is a protected command buffer, pipeline stages other than the framebuffer-space and compute stages in theVkPipeline
object bound to the pipeline bind point must not write to any resource - All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have valid buffers bound
- For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called inside of a render pass instance
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Inside Graphics Graphics - Parameters:
commandBuffer
- the command buffer into which the command is recorded.vertexCount
- the number of vertices to draw.instanceCount
- the number of instances to draw.firstVertex
- the index of the first vertex to draw.firstInstance
- the instance ID of the first instance to draw.
- If a
-
vkCmdDrawIndexed
public static void vkCmdDrawIndexed(VkCommandBuffer commandBuffer, int indexCount, int instanceCount, int firstIndex, int vertexOffset, int firstInstance)
Issue an indexed draw into a command buffer.C Specification
To record an indexed draw, call:
void vkCmdDrawIndexed( VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance);
Description
When the command is executed, primitives are assembled using the current primitive topology and
indexCount
vertices whose indices are retrieved from the index buffer. The index buffer is treated as an array of tightly packed unsigned integers of size defined by theCmdBindIndexBuffer
::indexType
parameter with which the buffer was bound.The first vertex index is at an offset of
firstIndex
*indexSize
+offset
within the bound index buffer, whereoffset
is the offset specified byvkCmdBindIndexBuffer
andindexSize
is the byte size of the type specified byindexType
. Subsequent index values are retrieved from consecutive locations in the index buffer. Indices are first compared to the primitive restart value, then zero extended to 32 bits (if theindexType
isINDEX_TYPE_UINT8_EXT
orINDEX_TYPE_UINT16
) and havevertexOffset
added to them, before being supplied as thevertexIndex
value.The primitives are drawn
instanceCount
times withinstanceIndex
starting withfirstInstance
and increasing sequentially for each instance. The assembled primitives execute the bound graphics pipeline.Valid Usage
- If a
VkImageView
is sampled withFILTER_LINEAR
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
VkImageView
is accessed using atomic operations as a result of this command, then the image view’s format features must containFORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
- If a
VkImageView
is sampled withFILTER_CUBIC_EXT
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
- Any
VkImageView
being sampled withFILTER_CUBIC_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubic
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImageView
being sampled withFILTER_CUBIC_EXT
with a reduction mode of eitherSAMPLER_REDUCTION_MODE_MIN_EXT
orSAMPLER_REDUCTION_MODE_MAX_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubicMinmax
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImage
created with aVkImageCreateInfo
::flags
containingIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
sampled as a result of this command must only be sampled using aVkSamplerAddressMode
ofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
. - For each set n that is statically used by the
VkPipeline
bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayout
that is compatible for set n, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - For each push constant that is statically used by the
VkPipeline
bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayout
that is compatible for push constants, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - Descriptors in each bound descriptor set, specified via
vkCmdBindDescriptorSets
, must be valid if they are statically used by theVkPipeline
bound to the pipeline bind point used by this command - A valid pipeline must be bound to the pipeline bind point used by this command
- If the
VkPipeline
object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set forcommandBuffer
- If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImage
with aVkImageView
of the typeIMAGE_VIEW_TYPE_3D
,IMAGE_VIEW_TYPE_CUBE
,IMAGE_VIEW_TYPE_1D_ARRAY
,IMAGE_VIEW_TYPE_2D_ARRAY
orIMAGE_VIEW_TYPE_CUBE_ARRAY
, in any shader stage - If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions withImplicitLod
,Dref
orProj
in their name, in any shader stage - If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions that includes a LOD bias or any offset values, in any shader stage - If the robust buffer access feature is not enabled, and if the
VkPipeline
object bound to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If the robust buffer access feature is not enabled, and if the
VkPipeline
object bound to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If
commandBuffer
is an unprotected command buffer, any resource accessed by theVkPipeline
object bound to the pipeline bind point used by this command must not be a protected resource - The current render pass must be compatible with the
renderPass
member of theVkGraphicsPipelineCreateInfo
structure specified when creating theVkPipeline
bound toPIPELINE_BIND_POINT_GRAPHICS
. - The subpass index of the current render pass must be equal to the
subpass
member of theVkGraphicsPipelineCreateInfo
structure specified when creating theVkPipeline
bound toPIPELINE_BIND_POINT_GRAPHICS
. - Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
- Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command.
- If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to
VkPhysicalDeviceMultiviewProperties
::maxMultiviewInstanceIndex
. - If the bound graphics pipeline was created with
VkPipelineSampleLocationsStateCreateInfoEXT
::sampleLocationsEnable
set toTRUE
and the current subpass has a depth/stencil attachment, then that attachment must have been created with theIMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
bit set - If
commandBuffer
is a protected command buffer, any resource written to by theVkPipeline
object bound to the pipeline bind point used by this command must not be an unprotected resource - If
commandBuffer
is a protected command buffer, pipeline stages other than the framebuffer-space and compute stages in theVkPipeline
object bound to the pipeline bind point must not write to any resource - All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have valid buffers bound
- For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description
(indexSize * (firstIndex + indexCount) offset)
must be less than or equal to the size of the bound index buffer, withindexSize
being based on the type specified byindexType
, where the index buffer,indexType
, andoffset
are specified viavkCmdBindIndexBuffer
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called inside of a render pass instance
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Inside Graphics Graphics - Parameters:
commandBuffer
- the command buffer into which the command is recorded.indexCount
- the number of vertices to draw.instanceCount
- the number of instances to draw.firstIndex
- the base index within the index buffer.vertexOffset
- the value added to the vertex index before indexing into the vertex buffer.firstInstance
- the instance ID of the first instance to draw.
- If a
-
vkCmdDrawIndirect
public static void vkCmdDrawIndirect(VkCommandBuffer commandBuffer, long buffer, long offset, int drawCount, int stride)
Issue an indirect draw into a command buffer.C Specification
To record a non-indexed indirect draw, call:
void vkCmdDrawIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
Description
vkCmdDrawIndirect
behaves similarly toCmdDraw
except that the parameters are read by the device from a buffer during execution.drawCount
draws are executed by the command, with parameters taken frombuffer
starting atoffset
and increasing bystride
bytes for each successive draw. The parameters of each draw are encoded in an array ofVkDrawIndirectCommand
structures. IfdrawCount
is less than or equal to one,stride
is ignored.Valid Usage
- If a
VkImageView
is sampled withFILTER_LINEAR
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
VkImageView
is accessed using atomic operations as a result of this command, then the image view’s format features must containFORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
- If a
VkImageView
is sampled withFILTER_CUBIC_EXT
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
- Any
VkImageView
being sampled withFILTER_CUBIC_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubic
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImageView
being sampled withFILTER_CUBIC_EXT
with a reduction mode of eitherSAMPLER_REDUCTION_MODE_MIN_EXT
orSAMPLER_REDUCTION_MODE_MAX_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubicMinmax
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImage
created with aVkImageCreateInfo
::flags
containingIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
sampled as a result of this command must only be sampled using aVkSamplerAddressMode
ofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
. - For each set n that is statically used by the
VkPipeline
bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayout
that is compatible for set n, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - For each push constant that is statically used by the
VkPipeline
bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayout
that is compatible for push constants, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - Descriptors in each bound descriptor set, specified via
vkCmdBindDescriptorSets
, must be valid if they are statically used by theVkPipeline
bound to the pipeline bind point used by this command - A valid pipeline must be bound to the pipeline bind point used by this command
- If the
VkPipeline
object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set forcommandBuffer
- If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImage
with aVkImageView
of the typeIMAGE_VIEW_TYPE_3D
,IMAGE_VIEW_TYPE_CUBE
,IMAGE_VIEW_TYPE_1D_ARRAY
,IMAGE_VIEW_TYPE_2D_ARRAY
orIMAGE_VIEW_TYPE_CUBE_ARRAY
, in any shader stage - If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions withImplicitLod
,Dref
orProj
in their name, in any shader stage - If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions that includes a LOD bias or any offset values, in any shader stage - If the robust buffer access feature is not enabled, and if the
VkPipeline
object bound to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If the robust buffer access feature is not enabled, and if the
VkPipeline
object bound to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If
commandBuffer
is an unprotected command buffer, any resource accessed by theVkPipeline
object bound to the pipeline bind point used by this command must not be a protected resource - The current render pass must be compatible with the
renderPass
member of theVkGraphicsPipelineCreateInfo
structure specified when creating theVkPipeline
bound toPIPELINE_BIND_POINT_GRAPHICS
. - The subpass index of the current render pass must be equal to the
subpass
member of theVkGraphicsPipelineCreateInfo
structure specified when creating theVkPipeline
bound toPIPELINE_BIND_POINT_GRAPHICS
. - Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
- Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command.
- If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to
VkPhysicalDeviceMultiviewProperties
::maxMultiviewInstanceIndex
. - If the bound graphics pipeline was created with
VkPipelineSampleLocationsStateCreateInfoEXT
::sampleLocationsEnable
set toTRUE
and the current subpass has a depth/stencil attachment, then that attachment must have been created with theIMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
bit set - All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have valid buffers bound
- For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description
- If
buffer
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object buffer
must have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BIT
bit setoffset
must be a multiple of 4commandBuffer
must not be a protected command buffer- If the multi-draw indirect feature is not enabled,
drawCount
must be 0 or 1 drawCount
must be less than or equal toVkPhysicalDeviceLimits
::maxDrawIndirectCount
- If the drawIndirectFirstInstance feature is not enabled, all the
firstInstance
members of theVkDrawIndirectCommand
structures accessed by this command must be 0 - If
drawCount
is greater than 1,stride
must be a multiple of 4 and must be greater than or equal tosizeof
(VkDrawIndirectCommand
) - If
drawCount
is equal to 1,(offset sizeof(
must be less than or equal to the size ofVkDrawIndirectCommand
))buffer
- If
drawCount
is greater than 1,(stride × (drawCount - 1) + offset sizeof(
must be less than or equal to the size ofVkDrawIndirectCommand
))buffer
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlebuffer
must be a validVkBuffer
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called inside of a render pass instance
- Both of
buffer
, andcommandBuffer
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Inside Graphics Graphics - Parameters:
commandBuffer
- the command buffer into which the command is recorded.buffer
- the buffer containing draw parameters.offset
- the byte offset intobuffer
where parameters begin.drawCount
- the number of draws to execute, and can be zero.stride
- the byte stride between successive sets of draw parameters.
- If a
-
vkCmdDrawIndexedIndirect
public static void vkCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, long buffer, long offset, int drawCount, int stride)
Perform an indexed indirect draw.C Specification
To record an indexed indirect draw, call:
void vkCmdDrawIndexedIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride);
Description
vkCmdDrawIndexedIndirect
behaves similarly toCmdDrawIndexed
except that the parameters are read by the device from a buffer during execution.drawCount
draws are executed by the command, with parameters taken frombuffer
starting atoffset
and increasing bystride
bytes for each successive draw. The parameters of each draw are encoded in an array ofVkDrawIndexedIndirectCommand
structures. IfdrawCount
is less than or equal to one,stride
is ignored.Valid Usage
- If a
VkImageView
is sampled withFILTER_LINEAR
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
VkImageView
is accessed using atomic operations as a result of this command, then the image view’s format features must containFORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
- If a
VkImageView
is sampled withFILTER_CUBIC_EXT
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
- Any
VkImageView
being sampled withFILTER_CUBIC_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubic
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImageView
being sampled withFILTER_CUBIC_EXT
with a reduction mode of eitherSAMPLER_REDUCTION_MODE_MIN_EXT
orSAMPLER_REDUCTION_MODE_MAX_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubicMinmax
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImage
created with aVkImageCreateInfo
::flags
containingIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
sampled as a result of this command must only be sampled using aVkSamplerAddressMode
ofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
. - For each set n that is statically used by the
VkPipeline
bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayout
that is compatible for set n, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - For each push constant that is statically used by the
VkPipeline
bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayout
that is compatible for push constants, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - Descriptors in each bound descriptor set, specified via
vkCmdBindDescriptorSets
, must be valid if they are statically used by theVkPipeline
bound to the pipeline bind point used by this command - A valid pipeline must be bound to the pipeline bind point used by this command
- If the
VkPipeline
object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set forcommandBuffer
- If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImage
with aVkImageView
of the typeIMAGE_VIEW_TYPE_3D
,IMAGE_VIEW_TYPE_CUBE
,IMAGE_VIEW_TYPE_1D_ARRAY
,IMAGE_VIEW_TYPE_2D_ARRAY
orIMAGE_VIEW_TYPE_CUBE_ARRAY
, in any shader stage - If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions withImplicitLod
,Dref
orProj
in their name, in any shader stage - If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions that includes a LOD bias or any offset values, in any shader stage - If the robust buffer access feature is not enabled, and if the
VkPipeline
object bound to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If the robust buffer access feature is not enabled, and if the
VkPipeline
object bound to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If
commandBuffer
is an unprotected command buffer, any resource accessed by theVkPipeline
object bound to the pipeline bind point used by this command must not be a protected resource - The current render pass must be compatible with the
renderPass
member of theVkGraphicsPipelineCreateInfo
structure specified when creating theVkPipeline
bound toPIPELINE_BIND_POINT_GRAPHICS
. - The subpass index of the current render pass must be equal to the
subpass
member of theVkGraphicsPipelineCreateInfo
structure specified when creating theVkPipeline
bound toPIPELINE_BIND_POINT_GRAPHICS
. - Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
- Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command.
- If the draw is recorded in a render pass instance with multiview enabled, the maximum instance index must be less than or equal to
VkPhysicalDeviceMultiviewProperties
::maxMultiviewInstanceIndex
. - If the bound graphics pipeline was created with
VkPipelineSampleLocationsStateCreateInfoEXT
::sampleLocationsEnable
set toTRUE
and the current subpass has a depth/stencil attachment, then that attachment must have been created with theIMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
bit set - All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have valid buffers bound
- For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description
- If
buffer
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object buffer
must have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BIT
bit setoffset
must be a multiple of 4commandBuffer
must not be a protected command buffer- If the multi-draw indirect feature is not enabled,
drawCount
must be 0 or 1 drawCount
must be less than or equal toVkPhysicalDeviceLimits
::maxDrawIndirectCount
- If
drawCount
is greater than 1,stride
must be a multiple of 4 and must be greater than or equal tosizeof
(VkDrawIndexedIndirectCommand
) - If the drawIndirectFirstInstance feature is not enabled, all the
firstInstance
members of theVkDrawIndexedIndirectCommand
structures accessed by this command must be 0 - If
drawCount
is equal to 1,(offset sizeof(
must be less than or equal to the size ofVkDrawIndexedIndirectCommand
))buffer
- If
drawCount
is greater than 1,(stride × (drawCount - 1) + offset sizeof(
must be less than or equal to the size ofVkDrawIndexedIndirectCommand
))buffer
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlebuffer
must be a validVkBuffer
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called inside of a render pass instance
- Both of
buffer
, andcommandBuffer
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Inside Graphics Graphics - Parameters:
commandBuffer
- the command buffer into which the command is recorded.buffer
- the buffer containing draw parameters.offset
- the byte offset intobuffer
where parameters begin.drawCount
- the number of draws to execute, and can be zero.stride
- the byte stride between successive sets of draw parameters.
- If a
-
vkCmdDispatch
public static void vkCmdDispatch(VkCommandBuffer commandBuffer, int groupCountX, int groupCountY, int groupCountZ)
Dispatch compute work items.C Specification
To record a dispatch, call:
void vkCmdDispatch( VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY, uint32_t groupCountZ);
Description
When the command is executed, a global workgroup consisting of
groupCountX × groupCountY × groupCountZ
local workgroups is assembled.Valid Usage
- If a
VkImageView
is sampled withFILTER_LINEAR
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
VkImageView
is accessed using atomic operations as a result of this command, then the image view’s format features must containFORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
- If a
VkImageView
is sampled withFILTER_CUBIC_EXT
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
- Any
VkImageView
being sampled withFILTER_CUBIC_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubic
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImageView
being sampled withFILTER_CUBIC_EXT
with a reduction mode of eitherSAMPLER_REDUCTION_MODE_MIN_EXT
orSAMPLER_REDUCTION_MODE_MAX_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubicMinmax
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImage
created with aVkImageCreateInfo
::flags
containingIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
sampled as a result of this command must only be sampled using aVkSamplerAddressMode
ofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
. - For each set n that is statically used by the
VkPipeline
bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayout
that is compatible for set n, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - For each push constant that is statically used by the
VkPipeline
bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayout
that is compatible for push constants, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - Descriptors in each bound descriptor set, specified via
vkCmdBindDescriptorSets
, must be valid if they are statically used by theVkPipeline
bound to the pipeline bind point used by this command - A valid pipeline must be bound to the pipeline bind point used by this command
- If the
VkPipeline
object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set forcommandBuffer
- If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImage
with aVkImageView
of the typeIMAGE_VIEW_TYPE_3D
,IMAGE_VIEW_TYPE_CUBE
,IMAGE_VIEW_TYPE_1D_ARRAY
,IMAGE_VIEW_TYPE_2D_ARRAY
orIMAGE_VIEW_TYPE_CUBE_ARRAY
, in any shader stage - If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions withImplicitLod
,Dref
orProj
in their name, in any shader stage - If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions that includes a LOD bias or any offset values, in any shader stage - If the robust buffer access feature is not enabled, and if the
VkPipeline
object bound to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If the robust buffer access feature is not enabled, and if the
VkPipeline
object bound to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If
commandBuffer
is an unprotected command buffer, any resource accessed by theVkPipeline
object bound to the pipeline bind point used by this command must not be a protected resource - If
commandBuffer
is a protected command buffer, any resource written to by theVkPipeline
object bound to the pipeline bind point used by this command must not be an unprotected resource - If
commandBuffer
is a protected command buffer, pipeline stages other than the framebuffer-space and compute stages in theVkPipeline
object bound to the pipeline bind point must not write to any resource groupCountX
must be less than or equal toVkPhysicalDeviceLimits
::maxComputeWorkGroupCount
[0]groupCountY
must be less than or equal toVkPhysicalDeviceLimits
::maxComputeWorkGroupCount
[1]groupCountZ
must be less than or equal toVkPhysicalDeviceLimits
::maxComputeWorkGroupCount
[2]
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support compute operations - This command must only be called outside of a render pass instance
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Compute Compute - Parameters:
commandBuffer
- the command buffer into which the command will be recorded.groupCountX
- the number of local workgroups to dispatch in the X dimension.groupCountY
- the number of local workgroups to dispatch in the Y dimension.groupCountZ
- the number of local workgroups to dispatch in the Z dimension.
- If a
-
vkCmdDispatchIndirect
public static void vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, long buffer, long offset)
Dispatch compute work items using indirect parameters.C Specification
To record an indirect command dispatch, call:
void vkCmdDispatchIndirect( VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset);
Description
vkCmdDispatchIndirect
behaves similarly toCmdDispatch
except that the parameters are read by the device from a buffer during execution. The parameters of the dispatch are encoded in aVkDispatchIndirectCommand
structure taken frombuffer
starting atoffset
.Valid Usage
- If a
VkImageView
is sampled withFILTER_LINEAR
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
VkImageView
is accessed using atomic operations as a result of this command, then the image view’s format features must containFORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT
- If a
VkImageView
is sampled withFILTER_CUBIC_EXT
as a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
- Any
VkImageView
being sampled withFILTER_CUBIC_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubic
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImageView
being sampled withFILTER_CUBIC_EXT
with a reduction mode of eitherSAMPLER_REDUCTION_MODE_MIN_EXT
orSAMPLER_REDUCTION_MODE_MAX_EXT
as a result of this command must have aVkImageViewType
and format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT
::filterCubicMinmax
returned byvkGetPhysicalDeviceImageFormatProperties2
- Any
VkImage
created with aVkImageCreateInfo
::flags
containingIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
sampled as a result of this command must only be sampled using aVkSamplerAddressMode
ofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
. - For each set n that is statically used by the
VkPipeline
bound to the pipeline bind point used by this command, a descriptor set must have been bound to n at the same pipeline bind point, with aVkPipelineLayout
that is compatible for set n, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - For each push constant that is statically used by the
VkPipeline
bound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayout
that is compatible for push constants, with theVkPipelineLayout
used to create the currentVkPipeline
, as described in Pipeline Layout Compatibility - Descriptors in each bound descriptor set, specified via
vkCmdBindDescriptorSets
, must be valid if they are statically used by theVkPipeline
bound to the pipeline bind point used by this command - A valid pipeline must be bound to the pipeline bind point used by this command
- If the
VkPipeline
object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set forcommandBuffer
- If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImage
with aVkImageView
of the typeIMAGE_VIEW_TYPE_3D
,IMAGE_VIEW_TYPE_CUBE
,IMAGE_VIEW_TYPE_1D_ARRAY
,IMAGE_VIEW_TYPE_2D_ARRAY
orIMAGE_VIEW_TYPE_CUBE_ARRAY
, in any shader stage - If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions withImplicitLod
,Dref
orProj
in their name, in any shader stage - If the
VkPipeline
object bound to the pipeline bind point used by this command accesses aVkSampler
object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*
orOpImageSparseSample*
instructions that includes a LOD bias or any offset values, in any shader stage - If the robust buffer access feature is not enabled, and if the
VkPipeline
object bound to the pipeline bind point used by this command accesses a uniform buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If the robust buffer access feature is not enabled, and if the
VkPipeline
object bound to the pipeline bind point used by this command accesses a storage buffer, it must not access values outside of the range of the buffer as specified in the descriptor set bound to the same pipeline bind point - If
commandBuffer
is an unprotected command buffer, any resource accessed by theVkPipeline
object bound to the pipeline bind point used by this command must not be a protected resource - If
buffer
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object buffer
must have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BIT
bit setoffset
must be a multiple of 4commandBuffer
must not be a protected command buffer- The sum of
offset
and the size ofVkDispatchIndirectCommand
must be less than or equal to the size ofbuffer
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlebuffer
must be a validVkBuffer
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support compute operations - This command must only be called outside of a render pass instance
- Both of
buffer
, andcommandBuffer
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Compute Compute - Parameters:
commandBuffer
- the command buffer into which the command will be recorded.buffer
- the buffer containing dispatch parameters.offset
- the byte offset intobuffer
where parameters begin.
- If a
-
nvkCmdCopyBuffer
public static void nvkCmdCopyBuffer(VkCommandBuffer commandBuffer, long srcBuffer, long dstBuffer, int regionCount, long pRegions)
Unsafe version of:CmdCopyBuffer
- Parameters:
regionCount
- the number of regions to copy.
-
vkCmdCopyBuffer
public static void vkCmdCopyBuffer(VkCommandBuffer commandBuffer, long srcBuffer, long dstBuffer, VkBufferCopy.Buffer pRegions)
Copy data between buffer regions.C Specification
To copy data between buffer objects, call:
void vkCmdCopyBuffer( VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions);
Description
Each region in
pRegions
is copied from the source buffer to the same region of the destination buffer.srcBuffer
anddstBuffer
can be the same buffer or alias the same memory, but the resulting values are undefined if the copy regions overlap in memory.Valid Usage
- The
srcOffset
member of each element ofpRegions
must be less than the size ofsrcBuffer
- The
dstOffset
member of each element ofpRegions
must be less than the size ofdstBuffer
- The
size
member of each element ofpRegions
must be less than or equal to the size ofsrcBuffer
minussrcOffset
- The
size
member of each element ofpRegions
must be less than or equal to the size ofdstBuffer
minusdstOffset
- The union of the source regions, and the union of the destination regions, specified by the elements of
pRegions
, must not overlap in memory srcBuffer
must have been created withBUFFER_USAGE_TRANSFER_SRC_BIT
usage flag- If
srcBuffer
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object dstBuffer
must have been created withBUFFER_USAGE_TRANSFER_DST_BIT
usage flag- If
dstBuffer
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object - If
commandBuffer
is an unprotected command buffer, thensrcBuffer
must not be a protected buffer - If
commandBuffer
is an unprotected command buffer, thendstBuffer
must not be a protected buffer - If
commandBuffer
is a protected command buffer, thendstBuffer
must not be an unprotected buffer
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlesrcBuffer
must be a validVkBuffer
handledstBuffer
must be a validVkBuffer
handlepRegions
must be a valid pointer to an array ofregionCount
validVkBufferCopy
structurescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support transfer, graphics, or compute operations - This command must only be called outside of a render pass instance
regionCount
must be greater than 0- Each of
commandBuffer
,dstBuffer
, andsrcBuffer
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Transfer Graphics Compute Transfer See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.srcBuffer
- the source buffer.dstBuffer
- the destination buffer.pRegions
- a pointer to an array ofVkBufferCopy
structures specifying the regions to copy.
- The
-
nvkCmdCopyImage
public static void nvkCmdCopyImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, int regionCount, long pRegions)
Unsafe version of:CmdCopyImage
- Parameters:
regionCount
- the number of regions to copy.
-
vkCmdCopyImage
public static void vkCmdCopyImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, VkImageCopy.Buffer pRegions)
Copy data between images.C Specification
To copy data between image objects, call:
void vkCmdCopyImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions);
Description
Each region in
pRegions
is copied from the source image to the same region of the destination image.srcImage
anddstImage
can be the same image or alias the same memory.The formats of
srcImage
anddstImage
must be compatible. Formats are compatible if they share the same class, as shown in the Compatible Formats table. Depth/stencil formats must match exactly.If the format of
srcImage
ordstImage
is a multi-planar image format, regions of each plane to be copied must be specified separately using thesrcSubresource
anddstSubresource
members of theVkImageCopy
structure. In this case, theaspectMask
of thesrcSubresource
ordstSubresource
that refers to the multi-planar image must beIMAGE_ASPECT_PLANE_0_BIT
,IMAGE_ASPECT_PLANE_1_BIT
, orIMAGE_ASPECT_PLANE_2_BIT
. For the purposes ofvkCmdCopyImage
, each plane of a multi-planar image is treated as having the format listed in Compatible formats of planes of multi-planar formats for the plane identified by theaspectMask
of the corresponding subresource. This applies both toVkFormat
and to coordinates used in the copy, which correspond to texels in the plane rather than how these texels map to coordinates in the image as a whole.Note
For example, the
IMAGE_ASPECT_PLANE_1_BIT
plane of aFORMAT_G8_B8R8_2PLANE_420_UNORM
image is compatible with an image of formatFORMAT_R8G8_UNORM
and (less usefully) with theIMAGE_ASPECT_PLANE_0_BIT
plane of an image of formatFORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16
, as each texel is 2 bytes in size.vkCmdCopyImage
allows copying between size-compatible compressed and uncompressed internal formats. Formats are size-compatible if the texel block size of the uncompressed format is equal to the texel block size of the compressed format. Such a copy does not perform on-the-fly compression or decompression. When copying from an uncompressed format to a compressed format, each texel of uncompressed data of the source image is copied as a raw value to the corresponding compressed texel block of the destination image. When copying from a compressed format to an uncompressed format, each compressed texel block of the source image is copied as a raw value to the corresponding texel of uncompressed data in the destination image. Thus, for example, it is legal to copy between a 128-bit uncompressed format and a compressed format which has a 128-bit sized compressed texel block representing 4{times}4 texels (using 8 bits per texel), or between a 64-bit uncompressed format and a compressed format which has a 64-bit sized compressed texel block representing 4{times}4 texels (using 4 bits per texel).When copying between compressed and uncompressed formats the
extent
members represent the texel dimensions of the source image and not the destination. When copying from a compressed image to an uncompressed image the image texel dimensions written to the uncompressed image will be source extent divided by the compressed texel block dimensions. When copying from an uncompressed image to a compressed image the image texel dimensions written to the compressed image will be the source extent multiplied by the compressed texel block dimensions. In both cases the number of bytes read and the number of bytes written will be identical.Copying to or from block-compressed images is typically done in multiples of the compressed texel block size. For this reason the
extent
must be a multiple of the compressed texel block dimension. There is one exception to this rule which is required: to handle compressed images created with dimensions that are not a multiple of the compressed texel block dimensions: if thesrcImage
is compressed, then:- If
extent.width
is not a multiple of the compressed texel block width, then(extent.width + srcOffset.x)
must equal the image subresource width. - If
extent.height
is not a multiple of the compressed texel block height, then(extent.height + srcOffset.y)
must equal the image subresource height. - If
extent.depth
is not a multiple of the compressed texel block depth, then(extent.depth + srcOffset.z)
must equal the image subresource depth.
Similarly, if the
dstImage
is compressed, then:- If
extent.width
is not a multiple of the compressed texel block width, then(extent.width + dstOffset.x)
must equal the image subresource width. - If
extent.height
is not a multiple of the compressed texel block height, then(extent.height + dstOffset.y)
must equal the image subresource height. - If
extent.depth
is not a multiple of the compressed texel block depth, then(extent.depth + dstOffset.z)
must equal the image subresource depth.
This allows the last compressed texel block of the image in each non-multiple dimension to be included as a source or destination of the copy.
"
_422
" image formats that are not multi-planar are treated as having a 2{times}1 compressed texel block for the purposes of these rules.vkCmdCopyImage
can be used to copy image data between multisample images, but both images must have the same number of samples.Valid Usage
- The source region specified by each element of
pRegions
must be a region that is contained withinsrcImage
if thesrcImage
’sVkFormat
is not a multi-planar format, and must be a region that is contained within the plane being copied if thesrcImage
’sVkFormat
is a multi-planar format - The destination region specified by each element of
pRegions
must be a region that is contained withindstImage
if thedstImage
’sVkFormat
is not a multi-planar format, and must be a region that is contained within the plane being copied to if thedstImage
’sVkFormat
is a multi-planar format - The union of all source regions, and the union of all destination regions, specified by the elements of
pRegions
, must not overlap in memory - The format features of
srcImage
must containFORMAT_FEATURE_TRANSFER_SRC_BIT
. srcImage
must have been created withIMAGE_USAGE_TRANSFER_SRC_BIT
usage flag- If
srcImage
is non-sparse then the image or disjoint plane to be copied must be bound completely and contiguously to a singleVkDeviceMemory
object srcImageLayout
must specify the layout of the image subresources ofsrcImage
specified inpRegions
at the time this command is executed on aVkDevice
srcImageLayout
must beIMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
,IMAGE_LAYOUT_GENERAL
, orIMAGE_LAYOUT_SHARED_PRESENT_KHR
- The format features of
dstImage
must containFORMAT_FEATURE_TRANSFER_DST_BIT
. dstImage
must have been created withIMAGE_USAGE_TRANSFER_DST_BIT
usage flag- If
dstImage
is non-sparse then the image or disjoint plane that is the destination of the copy must be bound completely and contiguously to a singleVkDeviceMemory
object dstImageLayout
must specify the layout of the image subresources ofdstImage
specified inpRegions
at the time this command is executed on aVkDevice
dstImageLayout
must beIMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
,IMAGE_LAYOUT_GENERAL
, orIMAGE_LAYOUT_SHARED_PRESENT_KHR
- If the
VkFormat
of each ofsrcImage
anddstImage
is not a multi-planar format, theVkFormat
of each ofsrcImage
anddstImage
must be compatible, as defined above - In a copy to or from a plane of a multi-planar image, the
VkFormat
of the image and plane must be compatible according to the description of compatible planes for the plane being copied - When a copy is performed to or from an image with a multi-planar format, the
aspectMask
of thesrcSubresource
and/ordstSubresource
that refers to the multi-planar image must beIMAGE_ASPECT_PLANE_0_BIT
,IMAGE_ASPECT_PLANE_1_BIT
, orIMAGE_ASPECT_PLANE_2_BIT
(withIMAGE_ASPECT_PLANE_2_BIT
valid only for aVkFormat
with three planes) - The sample count of
srcImage
anddstImage
must match - If
commandBuffer
is an unprotected command buffer, thensrcImage
must not be a protected image - If
commandBuffer
is an unprotected command buffer, thendstImage
must not be a protected image - If
commandBuffer
is a protected command buffer, thendstImage
must not be an unprotected image - The
srcSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified inVkImageCreateInfo
whensrcImage
was created - The
dstSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified inVkImageCreateInfo
whendstImage
was created - The
srcSubresource.baseArrayLayer srcSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified inVkImageCreateInfo
whensrcImage
was created - The
dstSubresource.baseArrayLayer dstSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified inVkImageCreateInfo
whendstImage
was created - The
srcOffset
andextent
members of each element ofpRegions
must respect the image transfer granularity requirements ofcommandBuffer
’s command pool’s queue family, as described inVkQueueFamilyProperties
- The
dstOffset
andextent
members of each element ofpRegions
must respect the image transfer granularity requirements ofcommandBuffer
’s command pool’s queue family, as described inVkQueueFamilyProperties
dstImage
andsrcImage
must not have been created withflags
containingIMAGE_CREATE_SUBSAMPLED_BIT_EXT
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlesrcImage
must be a validVkImage
handlesrcImageLayout
must be a validVkImageLayout
valuedstImage
must be a validVkImage
handledstImageLayout
must be a validVkImageLayout
valuepRegions
must be a valid pointer to an array ofregionCount
validVkImageCopy
structurescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support transfer, graphics, or compute operations - This command must only be called outside of a render pass instance
regionCount
must be greater than 0- Each of
commandBuffer
,dstImage
, andsrcImage
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Transfer Graphics Compute Transfer See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.srcImage
- the source image.srcImageLayout
- the current layout of the source image subresource.dstImage
- the destination image.dstImageLayout
- the current layout of the destination image subresource.pRegions
- a pointer to an array ofVkImageCopy
structures specifying the regions to copy.
- If
-
nvkCmdBlitImage
public static void nvkCmdBlitImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, int regionCount, long pRegions, int filter)
Unsafe version of:CmdBlitImage
- Parameters:
regionCount
- the number of regions to blit.
-
vkCmdBlitImage
public static void vkCmdBlitImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, VkImageBlit.Buffer pRegions, int filter)
Copy regions of an image, potentially performing format conversion,.C Specification
To copy regions of a source image into a destination image, potentially performing format conversion, arbitrary scaling, and filtering, call:
void vkCmdBlitImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter);
Description
vkCmdBlitImage
must not be used for multisampled source or destination images. UseCmdResolveImage
for this purpose.As the sizes of the source and destination extents can differ in any dimension, texels in the source extent are scaled and filtered to the destination extent. Scaling occurs via the following operations:
- For each destination texel, the integer coordinate of that texel is converted to an unnormalized texture coordinate, using the effective inverse of the equations described in unnormalized to integer conversion:
ubase = i + ½
vbase = j + ½
wbase = k + ½
- These base coordinates are then offset by the first destination offset:
uoffset = ubase - xdst0
voffset = vbase - ydst0
woffset = wbase - zdst0
aoffset = a - baseArrayCountdst
- The scale is determined from the source and destination regions, and applied to the offset coordinates:
scale_u = (xsrc1 - xsrc0) / (xdst1 - xdst0)
scale_v = (ysrc1 - ysrc0) / (ydst1 - ydst0)
scale_w = (zsrc1 - zsrc0) / (zdst1 - zdst0)
uscaled = uoffset * scaleu
vscaled = voffset * scalev
wscaled = woffset * scalew
- Finally the source offset is added to the scaled coordinates, to determine the final unnormalized coordinates used to sample from
srcImage
:u = uscaled + xsrc0
v = vscaled + ysrc0
w = wscaled + zsrc0
q = mipLevel
a = aoffset + baseArrayCountsrc
These coordinates are used to sample from the source image, as described in Image Operations chapter, with the filter mode equal to that of
filter
, a mipmap mode ofSAMPLER_MIPMAP_MODE_NEAREST
and an address mode ofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE
. Implementations must clamp at the edge of the source image, and may additionally clamp to the edge of the source region.Note
Due to allowable rounding errors in the generation of the source texture coordinates, it is not always possible to guarantee exactly which source texels will be sampled for a given blit. As rounding errors are implementation dependent, the exact results of a blitting operation are also implementation dependent.
Blits are done layer by layer starting with the
baseArrayLayer
member ofsrcSubresource
for the source anddstSubresource
for the destination.layerCount
layers are blitted to the destination image.3D textures are blitted slice by slice. Slices in the source region bounded by
srcOffsets
[0].z
andsrcOffsets
[1].z
are copied to slices in the destination region bounded bydstOffsets
[0].z
anddstOffsets
[1].z
. For each destination slice, a source z coordinate is linearly interpolated betweensrcOffsets
[0].z
andsrcOffsets
[1].z
. If thefilter
parameter isFILTER_LINEAR
then the value sampled from the source image is taken by doing linear filtering using the interpolated z coordinate. Iffilter
parameter isFILTER_NEAREST
then the value sampled from the source image is taken from the single nearest slice, with an implementation-dependent arithmetic rounding mode.The following filtering and conversion rules apply:
- Integer formats can only be converted to other integer formats with the same signedness.
- No format conversion is supported between depth/stencil images. The formats must match.
- Format conversions on unorm, snorm, unscaled and packed float formats of the copied aspect of the image are performed by first converting the pixels to float values.
- For sRGB source formats, nonlinear RGB values are converted to linear representation prior to filtering.
- After filtering, the float values are first clamped and then cast to the destination image format. In case of sRGB destination format, linear RGB values are converted to nonlinear representation before writing the pixel to the image.
Signed and unsigned integers are converted by first clamping to the representable range of the destination format, then casting the value.
Valid Usage
- The source region specified by each element of
pRegions
must be a region that is contained withinsrcImage
- The destination region specified by each element of
pRegions
must be a region that is contained withindstImage
- The union of all destination regions, specified by the elements of
pRegions
, must not overlap in memory with any texel that may be sampled during the blit operation - The format features of
srcImage
must containFORMAT_FEATURE_BLIT_SRC_BIT
. srcImage
must not use a format listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BIT
image viewssrcImage
must have been created withIMAGE_USAGE_TRANSFER_SRC_BIT
usage flag- If
srcImage
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object srcImageLayout
must specify the layout of the image subresources ofsrcImage
specified inpRegions
at the time this command is executed on aVkDevice
srcImageLayout
must beIMAGE_LAYOUT_SHARED_PRESENT_KHR
,IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
orIMAGE_LAYOUT_GENERAL
- The format features of
dstImage
must containFORMAT_FEATURE_BLIT_DST_BIT
. dstImage
must not use a format listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BIT
image viewsdstImage
must have been created withIMAGE_USAGE_TRANSFER_DST_BIT
usage flag- If
dstImage
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object dstImageLayout
must specify the layout of the image subresources ofdstImage
specified inpRegions
at the time this command is executed on aVkDevice
dstImageLayout
must beIMAGE_LAYOUT_SHARED_PRESENT_KHR
,IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
orIMAGE_LAYOUT_GENERAL
- The sample count of
srcImage
anddstImage
must both be equal toSAMPLE_COUNT_1_BIT
- If either of
srcImage
ordstImage
was created with a signed integerVkFormat
, the other must also have been created with a signed integerVkFormat
- If either of
srcImage
ordstImage
was created with an unsigned integerVkFormat
, the other must also have been created with an unsigned integerVkFormat
- If either of
srcImage
ordstImage
was created with a depth/stencil format, the other must have exactly the same format - If
srcImage
was created with a depth/stencil format,filter
must beFILTER_NEAREST
srcImage
must have been created with asamples
value ofSAMPLE_COUNT_1_BIT
dstImage
must have been created with asamples
value ofSAMPLE_COUNT_1_BIT
- If
filter
isFILTER_LINEAR
, then the format features ofsrcImage
must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
. - If
filter
isFILTER_CUBIC_EXT
, then the format features ofsrcImage
must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
. - If
filter
isFILTER_CUBIC_EXT
,srcImage
must have aVkImageType
ofIMAGE_TYPE_2D
- If
commandBuffer
is an unprotected command buffer, thensrcImage
must not be a protected image - If
commandBuffer
is an unprotected command buffer, thendstImage
must not be a protected image - If
commandBuffer
is a protected command buffer, thendstImage
must not be an unprotected image - The
srcSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified inVkImageCreateInfo
whensrcImage
was created - The
dstSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified inVkImageCreateInfo
whendstImage
was created - The
srcSubresource.baseArrayLayer srcSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified inVkImageCreateInfo
whensrcImage
was created - The
dstSubresource.baseArrayLayer dstSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified inVkImageCreateInfo
whendstImage
was created dstImage
andsrcImage
must not have been created withflags
containingIMAGE_CREATE_SUBSAMPLED_BIT_EXT
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlesrcImage
must be a validVkImage
handlesrcImageLayout
must be a validVkImageLayout
valuedstImage
must be a validVkImage
handledstImageLayout
must be a validVkImageLayout
valuepRegions
must be a valid pointer to an array ofregionCount
validVkImageBlit
structuresfilter
must be a validVkFilter
valuecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called outside of a render pass instance
regionCount
must be greater than 0- Each of
commandBuffer
,dstImage
, andsrcImage
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Graphics Transfer See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.srcImage
- the source image.srcImageLayout
- the layout of the source image subresources for the blit.dstImage
- the destination image.dstImageLayout
- the layout of the destination image subresources for the blit.pRegions
- a pointer to an array ofVkImageBlit
structures specifying the regions to blit.filter
- aVkFilter
specifying the filter to apply if the blits require scaling.
- For each destination texel, the integer coordinate of that texel is converted to an unnormalized texture coordinate, using the effective inverse of the equations described in unnormalized to integer conversion:
-
nvkCmdCopyBufferToImage
public static void nvkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, long srcBuffer, long dstImage, int dstImageLayout, int regionCount, long pRegions)
Unsafe version of:CmdCopyBufferToImage
- Parameters:
regionCount
- the number of regions to copy.
-
vkCmdCopyBufferToImage
public static void vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, long srcBuffer, long dstImage, int dstImageLayout, VkBufferImageCopy.Buffer pRegions)
Copy data from a buffer into an image.C Specification
To copy data from a buffer object to an image object, call:
void vkCmdCopyBufferToImage( VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions);
Description
Each region in
pRegions
is copied from the specified region of the source buffer to the specified region of the destination image.If the format of
dstImage
is a multi-planar image format), regions of each plane to be a target of a copy must be specified separately using thepRegions
member of theVkBufferImageCopy
structure. In this case, theaspectMask
ofimageSubresource
must beIMAGE_ASPECT_PLANE_0_BIT
,IMAGE_ASPECT_PLANE_1_BIT
, orIMAGE_ASPECT_PLANE_2_BIT
. For the purposes ofvkCmdCopyBufferToImage
, each plane of a multi-planar image is treated as having the format listed in Compatible formats of planes of multi-planar formats for the plane identified by theaspectMask
of the corresponding subresource. This applies both toVkFormat
and to coordinates used in the copy, which correspond to texels in the plane rather than how these texels map to coordinates in the image as a whole.Valid Usage
srcBuffer
must be large enough to contain all buffer locations that are accessed according to Buffer and Image Addressing, for each element ofpRegions
- The image region specified by each element of
pRegions
must be a region that is contained withindstImage
if thedstImage
’sVkFormat
is not a multi-planar format, and must be a region that is contained within the plane being copied to if thedstImage
’sVkFormat
is a multi-planar format - The union of all source regions, and the union of all destination regions, specified by the elements of
pRegions
, must not overlap in memory srcBuffer
must have been created withBUFFER_USAGE_TRANSFER_SRC_BIT
usage flag- The format features of
dstImage
must containFORMAT_FEATURE_TRANSFER_DST_BIT
. - If
srcBuffer
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object dstImage
must have been created withIMAGE_USAGE_TRANSFER_DST_BIT
usage flag- If
dstImage
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object dstImage
must have a sample count equal toSAMPLE_COUNT_1_BIT
dstImageLayout
must specify the layout of the image subresources ofdstImage
specified inpRegions
at the time this command is executed on aVkDevice
dstImageLayout
must beIMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
,IMAGE_LAYOUT_GENERAL
, orIMAGE_LAYOUT_SHARED_PRESENT_KHR
- If
commandBuffer
is an unprotected command buffer, thensrcBuffer
must not be a protected buffer - If
commandBuffer
is an unprotected command buffer, thendstImage
must not be a protected image - If
commandBuffer
is a protected command buffer, thendstImage
must not be an unprotected image - The
imageSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified inVkImageCreateInfo
whendstImage
was created - The
imageSubresource.baseArrayLayer imageSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified inVkImageCreateInfo
whendstImage
was created - The
imageOffset
andimageExtent
members of each element ofpRegions
must respect the image transfer granularity requirements ofcommandBuffer
’s command pool’s queue family, as described inVkQueueFamilyProperties
dstImage
must not have been created withflags
containingIMAGE_CREATE_SUBSAMPLED_BIT_EXT
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlesrcBuffer
must be a validVkBuffer
handledstImage
must be a validVkImage
handledstImageLayout
must be a validVkImageLayout
valuepRegions
must be a valid pointer to an array ofregionCount
validVkBufferImageCopy
structurescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support transfer, graphics, or compute operations - This command must only be called outside of a render pass instance
regionCount
must be greater than 0- Each of
commandBuffer
,dstImage
, andsrcBuffer
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Transfer Graphics Compute Transfer See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.srcBuffer
- the source buffer.dstImage
- the destination image.dstImageLayout
- the layout of the destination image subresources for the copy.pRegions
- a pointer to an array ofVkBufferImageCopy
structures specifying the regions to copy.
-
nvkCmdCopyImageToBuffer
public static void nvkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstBuffer, int regionCount, long pRegions)
Unsafe version of:CmdCopyImageToBuffer
- Parameters:
regionCount
- the number of regions to copy.
-
vkCmdCopyImageToBuffer
public static void vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstBuffer, VkBufferImageCopy.Buffer pRegions)
Copy image data into a buffer.C Specification
To copy data from an image object to a buffer object, call:
void vkCmdCopyImageToBuffer( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions);
Description
Each region in
pRegions
is copied from the specified region of the source image to the specified region of the destination buffer.If the
VkFormat
ofsrcImage
is a multi-planar image format, regions of each plane to be a source of a copy must be specified separately using thepRegions
member of theVkBufferImageCopy
structure. In this case, theaspectMask
ofimageSubresource
must beIMAGE_ASPECT_PLANE_0_BIT
,IMAGE_ASPECT_PLANE_1_BIT
, orIMAGE_ASPECT_PLANE_2_BIT
. For the purposes ofvkCmdCopyBufferToImage
, each plane of a multi-planar image is treated as having the format listed in Compatible formats of planes of multi-planar formats for the plane identified by theaspectMask
of the corresponding subresource. This applies both toVkFormat
and to coordinates used in the copy, which correspond to texels in the plane rather than how these texels map to coordinates in the image as a whole.Valid Usage
- The image region specified by each element of
pRegions
must be a region that is contained withinsrcImage
if thesrcImage
’sVkFormat
is not a multi-planar format, and must be a region that is contained within the plane being copied if thesrcImage
’sVkFormat
is a multi-planar format dstBuffer
must be large enough to contain all buffer locations that are accessed according to Buffer and Image Addressing, for each element ofpRegions
- The union of all source regions, and the union of all destination regions, specified by the elements of
pRegions
, must not overlap in memory - The format features of
srcImage
must containFORMAT_FEATURE_TRANSFER_SRC_BIT
. srcImage
must have been created withIMAGE_USAGE_TRANSFER_SRC_BIT
usage flag- If
srcImage
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object srcImage
must have a sample count equal toSAMPLE_COUNT_1_BIT
srcImageLayout
must specify the layout of the image subresources ofsrcImage
specified inpRegions
at the time this command is executed on aVkDevice
srcImageLayout
must beIMAGE_LAYOUT_SHARED_PRESENT_KHR
,IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
orIMAGE_LAYOUT_GENERAL
dstBuffer
must have been created withBUFFER_USAGE_TRANSFER_DST_BIT
usage flag- If
dstBuffer
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object - If
commandBuffer
is an unprotected command buffer, thensrcImage
must not be a protected image - If
commandBuffer
is an unprotected command buffer, thendstBuffer
must not be a protected buffer - If
commandBuffer
is a protected command buffer, thendstBuffer
must not be an unprotected buffer - The
imageSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified inVkImageCreateInfo
whensrcImage
was created - The
imageSubresource.baseArrayLayer imageSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified inVkImageCreateInfo
whensrcImage
was created - The
imageOffset
andimageExtent
members of each element ofpRegions
must respect the image transfer granularity requirements ofcommandBuffer
’s command pool’s queue family, as described inVkQueueFamilyProperties
srcImage
must not have been created withflags
containingIMAGE_CREATE_SUBSAMPLED_BIT_EXT
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlesrcImage
must be a validVkImage
handlesrcImageLayout
must be a validVkImageLayout
valuedstBuffer
must be a validVkBuffer
handlepRegions
must be a valid pointer to an array ofregionCount
validVkBufferImageCopy
structurescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support transfer, graphics, or compute operations - This command must only be called outside of a render pass instance
regionCount
must be greater than 0- Each of
commandBuffer
,dstBuffer
, andsrcImage
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Transfer Graphics Compute Transfer See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.srcImage
- the source image.srcImageLayout
- the layout of the source image subresources for the copy.dstBuffer
- the destination buffer.pRegions
- a pointer to an array ofVkBufferImageCopy
structures specifying the regions to copy.
- The image region specified by each element of
-
nvkCmdUpdateBuffer
public static void nvkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, long dataSize, long pData)
Unsafe version of:CmdUpdateBuffer
- Parameters:
dataSize
- the number of bytes to update, and must be a multiple of 4.
-
vkCmdUpdateBuffer
public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, java.nio.ByteBuffer pData) public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, java.nio.ShortBuffer pData) public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, java.nio.IntBuffer pData) public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, java.nio.LongBuffer pData) public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, java.nio.FloatBuffer pData) public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, java.nio.DoubleBuffer pData)
Update a buffer's contents from host memory.C Specification
To update buffer data inline in a command buffer, call:
void vkCmdUpdateBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const void* pData);
Description
dataSize
must be less than or equal to 65536 bytes. For larger updates, applications can use buffer to buffer copies.Note
Buffer updates performed with
vkCmdUpdateBuffer
first copy the data into command buffer memory when the command is recorded (which requires additional storage and may incur an additional allocation), and then copy the data from the command buffer intodstBuffer
when the command is executed on a device.The additional cost of this functionality compared to buffer to buffer copies means it is only recommended for very small amounts of data, and is why it is limited to only 65536 bytes.
Applications can work around this by issuing multiple
vkCmdUpdateBuffer
commands to different ranges of the same buffer, but it is strongly recommended that they should not.The source data is copied from the user pointer to the command buffer when the command is called.
vkCmdUpdateBuffer
is only allowed outside of a render pass. This command is treated as "transfer
" operation, for the purposes of synchronization barriers. TheBUFFER_USAGE_TRANSFER_DST_BIT
must be specified inusage
ofVkBufferCreateInfo
in order for the buffer to be compatible withvkCmdUpdateBuffer
.Valid Usage
dstOffset
must be less than the size ofdstBuffer
dataSize
must be less than or equal to the size ofdstBuffer
minusdstOffset
dstBuffer
must have been created withBUFFER_USAGE_TRANSFER_DST_BIT
usage flag- If
dstBuffer
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object dstOffset
must be a multiple of 4dataSize
must be less than or equal to 65536dataSize
must be a multiple of 4- If
commandBuffer
is an unprotected command buffer, thendstBuffer
must not be a protected buffer - If
commandBuffer
is a protected command buffer, thendstBuffer
must not be an unprotected buffer
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handledstBuffer
must be a validVkBuffer
handlepData
must be a valid pointer to an array ofdataSize
bytescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support transfer, graphics, or compute operations - This command must only be called outside of a render pass instance
dataSize
must be greater than 0- Both of
commandBuffer
, anddstBuffer
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Transfer Graphics Compute Transfer - Parameters:
commandBuffer
- the command buffer into which the command will be recorded.dstBuffer
- a handle to the buffer to be updated.dstOffset
- the byte offset into the buffer to start updating, and must be a multiple of 4.pData
- a pointer to the source data for the buffer update, and must be at leastdataSize
bytes in size.
-
vkCmdFillBuffer
public static void vkCmdFillBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, long size, int data)
Fill a region of a buffer with a fixed value.C Specification
To clear buffer data, call:
void vkCmdFillBuffer( VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data);
Description
vkCmdFillBuffer
is treated as "transfer
" operation for the purposes of synchronization barriers. TheBUFFER_USAGE_TRANSFER_DST_BIT
must be specified inusage
ofVkBufferCreateInfo
in order for the buffer to be compatible withvkCmdFillBuffer
.Valid Usage
dstOffset
must be less than the size ofdstBuffer
dstOffset
must be a multiple of 4- If
size
is not equal toWHOLE_SIZE
,size
must be greater than 0 - If
size
is not equal toWHOLE_SIZE
,size
must be less than or equal to the size ofdstBuffer
minusdstOffset
- If
size
is not equal toWHOLE_SIZE
,size
must be a multiple of 4 dstBuffer
must have been created withBUFFER_USAGE_TRANSFER_DST_BIT
usage flag- If
dstBuffer
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object - If
commandBuffer
is an unprotected command buffer, thendstBuffer
must not be a protected buffer - If
commandBuffer
is a protected command buffer, thendstBuffer
must not be an unprotected buffer
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handledstBuffer
must be a validVkBuffer
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support transfer, graphics or compute operations - This command must only be called outside of a render pass instance
- Both of
commandBuffer
, anddstBuffer
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Transfer Graphics Compute Transfer - Parameters:
commandBuffer
- the command buffer into which the command will be recorded.dstBuffer
- the buffer to be filled.dstOffset
- the byte offset into the buffer at which to start filling, and must be a multiple of 4.size
- the number of bytes to fill, and must be either a multiple of 4, orWHOLE_SIZE
to fill the range fromoffset
to the end of the buffer. IfWHOLE_SIZE
is used and the remaining size of the buffer is not a multiple of 4, then the nearest smaller multiple is used.data
- the 4-byte word written repeatedly to the buffer to fillsize
bytes of data. The data word is written to memory according to the host endianness.
-
nvkCmdClearColorImage
public static void nvkCmdClearColorImage(VkCommandBuffer commandBuffer, long image, int imageLayout, long pColor, int rangeCount, long pRanges)
Unsafe version of:CmdClearColorImage
- Parameters:
rangeCount
- the number of image subresource range structures inpRanges
.
-
vkCmdClearColorImage
public static void vkCmdClearColorImage(VkCommandBuffer commandBuffer, long image, int imageLayout, VkClearColorValue pColor, VkImageSubresourceRange.Buffer pRanges)
Clear regions of a color image.C Specification
To clear one or more subranges of a color image, call:
void vkCmdClearColorImage( VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
Description
Each specified range in
pRanges
is cleared to the value specified bypColor
.Valid Usage
- The format features of
image
must containFORMAT_FEATURE_TRANSFER_DST_BIT
. image
must have been created withIMAGE_USAGE_TRANSFER_DST_BIT
usage flagimage
must not use a format listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BIT
image views- If
image
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object imageLayout
must specify the layout of the image subresource ranges ofimage
specified inpRanges
at the time this command is executed on aVkDevice
imageLayout
must beIMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
,IMAGE_LAYOUT_GENERAL
, orIMAGE_LAYOUT_SHARED_PRESENT_KHR
- The
VkImageSubresourceRange
::aspectMask
members of the elements of thepRanges
array must each only includeIMAGE_ASPECT_COLOR_BIT
- The
VkImageSubresourceRange
::baseMipLevel
members of the elements of thepRanges
array must each be less than themipLevels
specified inVkImageCreateInfo
whenimage
was created - For each
VkImageSubresourceRange
element ofpRanges
, if thelevelCount
member is notREMAINING_MIP_LEVELS
, thenbaseMipLevel + levelCount
must be less than themipLevels
specified inVkImageCreateInfo
whenimage
was created - The
VkImageSubresourceRange
::baseArrayLayer
members of the elements of thepRanges
array must each be less than thearrayLayers
specified inVkImageCreateInfo
whenimage
was created - For each
VkImageSubresourceRange
element ofpRanges
, if thelayerCount
member is notREMAINING_ARRAY_LAYERS
, thenbaseArrayLayer + layerCount
must be less than thearrayLayers
specified inVkImageCreateInfo
whenimage
was created image
must not have a compressed or depth/stencil format- If
commandBuffer
is an unprotected command buffer, thenimage
must not be a protected image - If
commandBuffer
is a protected command buffer, thenimage
must not be an unprotected image
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handleimage
must be a validVkImage
handleimageLayout
must be a validVkImageLayout
valuepColor
must be a valid pointer to a validVkClearColorValue
unionpRanges
must be a valid pointer to an array ofrangeCount
validVkImageSubresourceRange
structurescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations - This command must only be called outside of a render pass instance
rangeCount
must be greater than 0- Both of
commandBuffer
, andimage
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Graphics Compute Transfer See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.image
- the image to be cleared.imageLayout
- specifies the current layout of the image subresource ranges to be cleared, and must beIMAGE_LAYOUT_SHARED_PRESENT_KHR
,IMAGE_LAYOUT_GENERAL
orIMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
.pColor
- a pointer to aVkClearColorValue
structure that contains the values the image subresource ranges will be cleared to (see Clear Values below).pRanges
- points to an array ofVkImageSubresourceRange
structures that describe a range of mipmap levels, array layers, and aspects to be cleared, as described in Image Views.
- The format features of
-
vkCmdClearColorImage
public static void vkCmdClearColorImage(VkCommandBuffer commandBuffer, long image, int imageLayout, VkClearColorValue pColor, VkImageSubresourceRange pRange)
Clear regions of a color image.C Specification
To clear one or more subranges of a color image, call:
void vkCmdClearColorImage( VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
Description
Each specified range in
pRanges
is cleared to the value specified bypColor
.Valid Usage
- The format features of
image
must containFORMAT_FEATURE_TRANSFER_DST_BIT
. image
must have been created withIMAGE_USAGE_TRANSFER_DST_BIT
usage flagimage
must not use a format listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BIT
image views- If
image
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object imageLayout
must specify the layout of the image subresource ranges ofimage
specified inpRanges
at the time this command is executed on aVkDevice
imageLayout
must beIMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
,IMAGE_LAYOUT_GENERAL
, orIMAGE_LAYOUT_SHARED_PRESENT_KHR
- The
VkImageSubresourceRange
::aspectMask
members of the elements of thepRanges
array must each only includeIMAGE_ASPECT_COLOR_BIT
- The
VkImageSubresourceRange
::baseMipLevel
members of the elements of thepRanges
array must each be less than themipLevels
specified inVkImageCreateInfo
whenimage
was created - For each
VkImageSubresourceRange
element ofpRanges
, if thelevelCount
member is notREMAINING_MIP_LEVELS
, thenbaseMipLevel + levelCount
must be less than themipLevels
specified inVkImageCreateInfo
whenimage
was created - The
VkImageSubresourceRange
::baseArrayLayer
members of the elements of thepRanges
array must each be less than thearrayLayers
specified inVkImageCreateInfo
whenimage
was created - For each
VkImageSubresourceRange
element ofpRanges
, if thelayerCount
member is notREMAINING_ARRAY_LAYERS
, thenbaseArrayLayer + layerCount
must be less than thearrayLayers
specified inVkImageCreateInfo
whenimage
was created image
must not have a compressed or depth/stencil format- If
commandBuffer
is an unprotected command buffer, thenimage
must not be a protected image - If
commandBuffer
is a protected command buffer, thenimage
must not be an unprotected image
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handleimage
must be a validVkImage
handleimageLayout
must be a validVkImageLayout
valuepColor
must be a valid pointer to a validVkClearColorValue
unionpRanges
must be a valid pointer to an array ofrangeCount
validVkImageSubresourceRange
structurescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations - This command must only be called outside of a render pass instance
rangeCount
must be greater than 0- Both of
commandBuffer
, andimage
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Graphics Compute Transfer See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.image
- the image to be cleared.imageLayout
- specifies the current layout of the image subresource ranges to be cleared, and must beIMAGE_LAYOUT_SHARED_PRESENT_KHR
,IMAGE_LAYOUT_GENERAL
orIMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
.pColor
- a pointer to aVkClearColorValue
structure that contains the values the image subresource ranges will be cleared to (see Clear Values below).
- The format features of
-
nvkCmdClearDepthStencilImage
public static void nvkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, long image, int imageLayout, long pDepthStencil, int rangeCount, long pRanges)
Unsafe version of:CmdClearDepthStencilImage
- Parameters:
rangeCount
- the number of image subresource range structures inpRanges
.
-
vkCmdClearDepthStencilImage
public static void vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, long image, int imageLayout, VkClearDepthStencilValue pDepthStencil, VkImageSubresourceRange.Buffer pRanges)
Fill regions of a combined depth/stencil image.C Specification
To clear one or more subranges of a depth/stencil image, call:
void vkCmdClearDepthStencilImage( VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
Valid Usage
- The format features of
image
must containFORMAT_FEATURE_TRANSFER_DST_BIT
. - If any element of
pRanges.aspect
includesIMAGE_ASPECT_STENCIL_BIT
, andimage
was created with separate stencil usage,IMAGE_USAGE_TRANSFER_DST_BIT
must have been included in theVkImageStencilUsageCreateInfoEXT
::stencilUsage
used to createimage
- If any element of
pRanges.aspect
includesIMAGE_ASPECT_STENCIL_BIT
, andimage
was not created with separate stencil usage,IMAGE_USAGE_TRANSFER_DST_BIT
must have been included in theVkImageCreateInfo
::usage
used to createimage
- If any element of
pRanges.aspect
includesIMAGE_ASPECT_DEPTH_BIT
,IMAGE_USAGE_TRANSFER_DST_BIT
must have been included in theVkImageCreateInfo
::usage
used to createimage
- If
image
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object imageLayout
must specify the layout of the image subresource ranges ofimage
specified inpRanges
at the time this command is executed on aVkDevice
imageLayout
must be either ofIMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
orIMAGE_LAYOUT_GENERAL
- The
VkImageSubresourceRange
::aspectMask
members of the elements of thepRanges
array must each only includeIMAGE_ASPECT_DEPTH_BIT
if the image format has a depth component - The
VkImageSubresourceRange
::aspectMask
members of the elements of thepRanges
array must each only includeIMAGE_ASPECT_STENCIL_BIT
if the image format has a stencil component - The
VkImageSubresourceRange
::baseMipLevel
members of the elements of thepRanges
array must each be less than themipLevels
specified inVkImageCreateInfo
whenimage
was created - For each
VkImageSubresourceRange
element ofpRanges
, if thelevelCount
member is notREMAINING_MIP_LEVELS
, thenbaseMipLevel + levelCount
must be less than themipLevels
specified inVkImageCreateInfo
whenimage
was created - The
VkImageSubresourceRange
::baseArrayLayer
members of the elements of thepRanges
array must each be less than thearrayLayers
specified inVkImageCreateInfo
whenimage
was created - For each
VkImageSubresourceRange
element ofpRanges
, if thelayerCount
member is notREMAINING_ARRAY_LAYERS
, thenbaseArrayLayer + layerCount
must be less than thearrayLayers
specified inVkImageCreateInfo
whenimage
was created image
must have a depth/stencil format- If
commandBuffer
is an unprotected command buffer, thenimage
must not be a protected image - If
commandBuffer
is a protected command buffer, thenimage
must not be an unprotected image
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handleimage
must be a validVkImage
handleimageLayout
must be a validVkImageLayout
valuepDepthStencil
must be a valid pointer to a validVkClearDepthStencilValue
structurepRanges
must be a valid pointer to an array ofrangeCount
validVkImageSubresourceRange
structurescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called outside of a render pass instance
rangeCount
must be greater than 0- Both of
commandBuffer
, andimage
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Graphics Transfer See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.image
- the image to be cleared.imageLayout
- specifies the current layout of the image subresource ranges to be cleared, and must beIMAGE_LAYOUT_GENERAL
orIMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
.pDepthStencil
- a pointer to aVkClearDepthStencilValue
structure that contains the values the depth and stencil image subresource ranges will be cleared to (see Clear Values below).pRanges
- points to an array ofVkImageSubresourceRange
structures that describe a range of mipmap levels, array layers, and aspects to be cleared, as described in Image Views.
- The format features of
-
vkCmdClearDepthStencilImage
public static void vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, long image, int imageLayout, VkClearDepthStencilValue pDepthStencil, VkImageSubresourceRange pRange)
Fill regions of a combined depth/stencil image.C Specification
To clear one or more subranges of a depth/stencil image, call:
void vkCmdClearDepthStencilImage( VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges);
Valid Usage
- The format features of
image
must containFORMAT_FEATURE_TRANSFER_DST_BIT
. - If any element of
pRanges.aspect
includesIMAGE_ASPECT_STENCIL_BIT
, andimage
was created with separate stencil usage,IMAGE_USAGE_TRANSFER_DST_BIT
must have been included in theVkImageStencilUsageCreateInfoEXT
::stencilUsage
used to createimage
- If any element of
pRanges.aspect
includesIMAGE_ASPECT_STENCIL_BIT
, andimage
was not created with separate stencil usage,IMAGE_USAGE_TRANSFER_DST_BIT
must have been included in theVkImageCreateInfo
::usage
used to createimage
- If any element of
pRanges.aspect
includesIMAGE_ASPECT_DEPTH_BIT
,IMAGE_USAGE_TRANSFER_DST_BIT
must have been included in theVkImageCreateInfo
::usage
used to createimage
- If
image
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object imageLayout
must specify the layout of the image subresource ranges ofimage
specified inpRanges
at the time this command is executed on aVkDevice
imageLayout
must be either ofIMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
orIMAGE_LAYOUT_GENERAL
- The
VkImageSubresourceRange
::aspectMask
members of the elements of thepRanges
array must each only includeIMAGE_ASPECT_DEPTH_BIT
if the image format has a depth component - The
VkImageSubresourceRange
::aspectMask
members of the elements of thepRanges
array must each only includeIMAGE_ASPECT_STENCIL_BIT
if the image format has a stencil component - The
VkImageSubresourceRange
::baseMipLevel
members of the elements of thepRanges
array must each be less than themipLevels
specified inVkImageCreateInfo
whenimage
was created - For each
VkImageSubresourceRange
element ofpRanges
, if thelevelCount
member is notREMAINING_MIP_LEVELS
, thenbaseMipLevel + levelCount
must be less than themipLevels
specified inVkImageCreateInfo
whenimage
was created - The
VkImageSubresourceRange
::baseArrayLayer
members of the elements of thepRanges
array must each be less than thearrayLayers
specified inVkImageCreateInfo
whenimage
was created - For each
VkImageSubresourceRange
element ofpRanges
, if thelayerCount
member is notREMAINING_ARRAY_LAYERS
, thenbaseArrayLayer + layerCount
must be less than thearrayLayers
specified inVkImageCreateInfo
whenimage
was created image
must have a depth/stencil format- If
commandBuffer
is an unprotected command buffer, thenimage
must not be a protected image - If
commandBuffer
is a protected command buffer, thenimage
must not be an unprotected image
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handleimage
must be a validVkImage
handleimageLayout
must be a validVkImageLayout
valuepDepthStencil
must be a valid pointer to a validVkClearDepthStencilValue
structurepRanges
must be a valid pointer to an array ofrangeCount
validVkImageSubresourceRange
structurescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called outside of a render pass instance
rangeCount
must be greater than 0- Both of
commandBuffer
, andimage
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Graphics Transfer See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.image
- the image to be cleared.imageLayout
- specifies the current layout of the image subresource ranges to be cleared, and must beIMAGE_LAYOUT_GENERAL
orIMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
.pDepthStencil
- a pointer to aVkClearDepthStencilValue
structure that contains the values the depth and stencil image subresource ranges will be cleared to (see Clear Values below).
- The format features of
-
nvkCmdClearAttachments
public static void nvkCmdClearAttachments(VkCommandBuffer commandBuffer, int attachmentCount, long pAttachments, int rectCount, long pRects)
Unsafe version of:CmdClearAttachments
- Parameters:
attachmentCount
- the number of entries in thepAttachments
array.rectCount
- the number of entries in thepRects
array.
-
vkCmdClearAttachments
public static void vkCmdClearAttachments(VkCommandBuffer commandBuffer, VkClearAttachment.Buffer pAttachments, VkClearRect.Buffer pRects)
Clear regions within bound framebuffer attachments.C Specification
To clear one or more regions of color and depth/stencil attachments inside a render pass instance, call:
void vkCmdClearAttachments( VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects);
Description
vkCmdClearAttachments
can clear multiple regions of each attachment used in the current subpass of a render pass instance. This command must be called only inside a render pass instance, and implicitly selects the images to clear based on the current framebuffer attachments and the command parameters.If the render pass has a fragment density map attachment, clears follow the operations of fragment density maps as if each clear region was a primitive which generates fragments. The clear color is applied to all pixels inside each fragment's area regardless if the pixels lie outside of the clear region. Clears may have a different set of supported fragment areas than draws.
Unlike other clear commands,
CmdClearAttachments
executes as a drawing command, rather than a transfer command, with writes performed by it executing in rasterization order. Clears to color attachments are executed as color attachment writes, by thePIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT
stage. Clears to depth/stencil attachments are executed as depth writes and writes by thePIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT
andPIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT
stages.Valid Usage
- If the
aspectMask
member of any element ofpAttachments
containsIMAGE_ASPECT_COLOR_BIT
, then thecolorAttachment
member of that element must either refer to a color attachment which isATTACHMENT_UNUSED
, or must be a valid color attachment. - If the
aspectMask
member of any element ofpAttachments
containsIMAGE_ASPECT_DEPTH_BIT
, then the current subpass' depth/stencil attachment must either beATTACHMENT_UNUSED
, or must have a depth component - If the
aspectMask
member of any element ofpAttachments
containsIMAGE_ASPECT_STENCIL_BIT
, then the current subpass' depth/stencil attachment must either beATTACHMENT_UNUSED
, or must have a stencil component - The
rect
member of each element ofpRects
must have anextent.width
greater than 0 - The
rect
member of each element ofpRects
must have anextent.height
greater than 0 - The rectangular region specified by each element of
pRects
must be contained within the render area of the current render pass instance - The layers specified by each element of
pRects
must be contained within every attachment thatpAttachments
refers to - The
layerCount
member of each element ofpRects
must not be 0 - If
commandBuffer
is an unprotected command buffer, then each attachment to be cleared must not be a protected image. - If
commandBuffer
is a protected command buffer, then each attachment to be cleared must not be an unprotected image. - If the render pass instance this is recorded in uses multiview, then
baseArrayLayer
must be zero andlayerCount
must be one.
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlepAttachments
must be a valid pointer to an array ofattachmentCount
validVkClearAttachment
structurespRects
must be a valid pointer to an array ofrectCount
VkClearRect
structurescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called inside of a render pass instance
attachmentCount
must be greater than 0rectCount
must be greater than 0
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Inside Graphics Graphics See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.pAttachments
- a pointer to an array ofVkClearAttachment
structures defining the attachments to clear and the clear values to use. If any attachment to be cleared in the current subpass isATTACHMENT_UNUSED
, then the clear has no effect on that attachment.pRects
- points to an array ofVkClearRect
structures defining regions within each selected attachment to clear.
- If the
-
nvkCmdResolveImage
public static void nvkCmdResolveImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, int regionCount, long pRegions)
Unsafe version of:CmdResolveImage
- Parameters:
regionCount
- the number of regions to resolve.
-
vkCmdResolveImage
public static void vkCmdResolveImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, VkImageResolve.Buffer pRegions)
Resolve regions of an image.C Specification
To resolve a multisample image to a non-multisample image, call:
void vkCmdResolveImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions);
Description
During the resolve the samples corresponding to each pixel location in the source are converted to a single sample before being written to the destination. If the source formats are floating-point or normalized types, the sample values for each pixel are resolved in an implementation-dependent manner. If the source formats are integer types, a single sample's value is selected for each pixel.
srcOffset
anddstOffset
select the initialx
,y
, andz
offsets in texels of the sub-regions of the source and destination image data.extent
is the size in texels of the source image to resolve inwidth
,height
anddepth
.Resolves are done layer by layer starting with
baseArrayLayer
member ofsrcSubresource
for the source anddstSubresource
for the destination.layerCount
layers are resolved to the destination image.Valid Usage
- The source region specified by each element of
pRegions
must be a region that is contained withinsrcImage
- The destination region specified by each element of
pRegions
must be a region that is contained withindstImage
- The union of all source regions, and the union of all destination regions, specified by the elements of
pRegions
, must not overlap in memory - If
srcImage
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object srcImage
must have a sample count equal to any valid sample count value other thanSAMPLE_COUNT_1_BIT
- If
dstImage
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object dstImage
must have a sample count equal toSAMPLE_COUNT_1_BIT
srcImageLayout
must specify the layout of the image subresources ofsrcImage
specified inpRegions
at the time this command is executed on aVkDevice
srcImageLayout
must beIMAGE_LAYOUT_SHARED_PRESENT_KHR
,IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
orIMAGE_LAYOUT_GENERAL
dstImageLayout
must specify the layout of the image subresources ofdstImage
specified inpRegions
at the time this command is executed on aVkDevice
dstImageLayout
must beIMAGE_LAYOUT_SHARED_PRESENT_KHR
,IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
orIMAGE_LAYOUT_GENERAL
- The format features of
dstImage
must containFORMAT_FEATURE_COLOR_ATTACHMENT_BIT
. srcImage
anddstImage
must have been created with the same image format- If
commandBuffer
is an unprotected command buffer, thensrcImage
must not be a protected image - If
commandBuffer
is an unprotected command buffer, thendstImage
must not be a protected image - If
commandBuffer
is a protected command buffer, thendstImage
must not be an unprotected image - The
srcSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified inVkImageCreateInfo
whensrcImage
was created - The
dstSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified inVkImageCreateInfo
whendstImage
was created - The
srcSubresource.baseArrayLayer srcSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified inVkImageCreateInfo
whensrcImage
was created - The
dstSubresource.baseArrayLayer dstSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified inVkImageCreateInfo
whendstImage
was created dstImage
andsrcImage
must not have been created withflags
containingIMAGE_CREATE_SUBSAMPLED_BIT_EXT
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlesrcImage
must be a validVkImage
handlesrcImageLayout
must be a validVkImageLayout
valuedstImage
must be a validVkImage
handledstImageLayout
must be a validVkImageLayout
valuepRegions
must be a valid pointer to an array ofregionCount
validVkImageResolve
structurescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called outside of a render pass instance
regionCount
must be greater than 0- Each of
commandBuffer
,dstImage
, andsrcImage
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Graphics Transfer See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.srcImage
- the source image.srcImageLayout
- the layout of the source image subresources for the resolve.dstImage
- the destination image.dstImageLayout
- the layout of the destination image subresources for the resolve.pRegions
- a pointer to an array ofVkImageResolve
structures specifying the regions to resolve.
- The source region specified by each element of
-
vkCmdResolveImage
public static void vkCmdResolveImage(VkCommandBuffer commandBuffer, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, VkImageResolve pRegion)
Resolve regions of an image.C Specification
To resolve a multisample image to a non-multisample image, call:
void vkCmdResolveImage( VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions);
Description
During the resolve the samples corresponding to each pixel location in the source are converted to a single sample before being written to the destination. If the source formats are floating-point or normalized types, the sample values for each pixel are resolved in an implementation-dependent manner. If the source formats are integer types, a single sample's value is selected for each pixel.
srcOffset
anddstOffset
select the initialx
,y
, andz
offsets in texels of the sub-regions of the source and destination image data.extent
is the size in texels of the source image to resolve inwidth
,height
anddepth
.Resolves are done layer by layer starting with
baseArrayLayer
member ofsrcSubresource
for the source anddstSubresource
for the destination.layerCount
layers are resolved to the destination image.Valid Usage
- The source region specified by each element of
pRegions
must be a region that is contained withinsrcImage
- The destination region specified by each element of
pRegions
must be a region that is contained withindstImage
- The union of all source regions, and the union of all destination regions, specified by the elements of
pRegions
, must not overlap in memory - If
srcImage
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object srcImage
must have a sample count equal to any valid sample count value other thanSAMPLE_COUNT_1_BIT
- If
dstImage
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object dstImage
must have a sample count equal toSAMPLE_COUNT_1_BIT
srcImageLayout
must specify the layout of the image subresources ofsrcImage
specified inpRegions
at the time this command is executed on aVkDevice
srcImageLayout
must beIMAGE_LAYOUT_SHARED_PRESENT_KHR
,IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
orIMAGE_LAYOUT_GENERAL
dstImageLayout
must specify the layout of the image subresources ofdstImage
specified inpRegions
at the time this command is executed on aVkDevice
dstImageLayout
must beIMAGE_LAYOUT_SHARED_PRESENT_KHR
,IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
orIMAGE_LAYOUT_GENERAL
- The format features of
dstImage
must containFORMAT_FEATURE_COLOR_ATTACHMENT_BIT
. srcImage
anddstImage
must have been created with the same image format- If
commandBuffer
is an unprotected command buffer, thensrcImage
must not be a protected image - If
commandBuffer
is an unprotected command buffer, thendstImage
must not be a protected image - If
commandBuffer
is a protected command buffer, thendstImage
must not be an unprotected image - The
srcSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified inVkImageCreateInfo
whensrcImage
was created - The
dstSubresource.mipLevel
member of each element ofpRegions
must be less than themipLevels
specified inVkImageCreateInfo
whendstImage
was created - The
srcSubresource.baseArrayLayer srcSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified inVkImageCreateInfo
whensrcImage
was created - The
dstSubresource.baseArrayLayer dstSubresource.layerCount
of each element ofpRegions
must be less than or equal to thearrayLayers
specified inVkImageCreateInfo
whendstImage
was created dstImage
andsrcImage
must not have been created withflags
containingIMAGE_CREATE_SUBSAMPLED_BIT_EXT
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlesrcImage
must be a validVkImage
handlesrcImageLayout
must be a validVkImageLayout
valuedstImage
must be a validVkImage
handledstImageLayout
must be a validVkImageLayout
valuepRegions
must be a valid pointer to an array ofregionCount
validVkImageResolve
structurescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called outside of a render pass instance
regionCount
must be greater than 0- Each of
commandBuffer
,dstImage
, andsrcImage
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Graphics Transfer See Also
- Parameters:
commandBuffer
- the command buffer into which the command will be recorded.srcImage
- the source image.srcImageLayout
- the layout of the source image subresources for the resolve.dstImage
- the destination image.dstImageLayout
- the layout of the destination image subresources for the resolve.
- The source region specified by each element of
-
vkCmdSetEvent
public static void vkCmdSetEvent(VkCommandBuffer commandBuffer, long event, int stageMask)
Set an event object to signaled state.C Specification
To set the state of an event to signaled from a device, call:
void vkCmdSetEvent( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
Description
When
CmdSetEvent
is submitted to a queue, it defines an execution dependency on commands that were submitted before it, and defines an event signal operation which sets the event to the signaled state.The first synchronization scope includes all commands that occur earlier in submission order. The synchronization scope is limited to operations on the pipeline stages determined by the source stage mask specified by
stageMask
.The second synchronization scope includes only the event signal operation.
If
event
is already in the signaled state whenCmdSetEvent
is executed on the device, thenCmdSetEvent
has no effect, no event signal operation occurs, and no execution dependency is generated.Valid Usage
stageMask
must not includePIPELINE_STAGE_HOST_BIT
- If the geometry shaders feature is not enabled,
stageMask
must not containPIPELINE_STAGE_GEOMETRY_SHADER_BIT
- If the tessellation shaders feature is not enabled,
stageMask
must not containPIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT
orPIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT
commandBuffer
’s current device mask must include exactly one physical device.- If the mesh shaders feature is not enabled,
stageMask
must not containPIPELINE_STAGE_MESH_SHADER_BIT_NV
- If the task shaders feature is not enabled,
stageMask
must not containPIPELINE_STAGE_TASK_SHADER_BIT_NV
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handleevent
must be a validVkEvent
handlestageMask
must be a valid combination ofVkPipelineStageFlagBits
valuesstageMask
must not be 0commandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations - This command must only be called outside of a render pass instance
- Both of
commandBuffer
, andevent
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Graphics Compute - Parameters:
commandBuffer
- the command buffer into which the command is recorded.event
- the event that will be signaled.stageMask
- specifies the source stage mask used to determine when theevent
is signaled.
-
vkCmdResetEvent
public static void vkCmdResetEvent(VkCommandBuffer commandBuffer, long event, int stageMask)
Reset an event object to non-signaled state.C Specification
To set the state of an event to unsignaled from a device, call:
void vkCmdResetEvent( VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask);
Description
When
CmdResetEvent
is submitted to a queue, it defines an execution dependency on commands that were submitted before it, and defines an event unsignal operation which resets the event to the unsignaled state.The first synchronization scope includes all commands that occur earlier in submission order. The synchronization scope is limited to operations on the pipeline stages determined by the source stage mask specified by
stageMask
.The second synchronization scope includes only the event unsignal operation.
If
event
is already in the unsignaled state whenCmdResetEvent
is executed on the device, thenCmdResetEvent
has no effect, no event unsignal operation occurs, and no execution dependency is generated.Valid Usage
stageMask
must not includePIPELINE_STAGE_HOST_BIT
- If the geometry shaders feature is not enabled,
stageMask
must not containPIPELINE_STAGE_GEOMETRY_SHADER_BIT
- If the tessellation shaders feature is not enabled,
stageMask
must not containPIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT
orPIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT
- When this command executes,
event
must not be waited on by avkCmdWaitEvents
command that is currently executing commandBuffer
’s current device mask must include exactly one physical device.- If the mesh shaders feature is not enabled,
stageMask
must not containPIPELINE_STAGE_MESH_SHADER_BIT_NV
- If the task shaders feature is not enabled,
stageMask
must not containPIPELINE_STAGE_TASK_SHADER_BIT_NV
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handleevent
must be a validVkEvent
handlestageMask
must be a valid combination ofVkPipelineStageFlagBits
valuesstageMask
must not be 0commandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations - This command must only be called outside of a render pass instance
- Both of
commandBuffer
, andevent
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Graphics Compute - Parameters:
commandBuffer
- the command buffer into which the command is recorded.event
- the event that will be unsignaled.stageMask
- a bitmask ofVkPipelineStageFlagBits
specifying the source stage mask used to determine when theevent
is unsignaled.
-
nvkCmdWaitEvents
public static void nvkCmdWaitEvents(VkCommandBuffer commandBuffer, int eventCount, long pEvents, int srcStageMask, int dstStageMask, int memoryBarrierCount, long pMemoryBarriers, int bufferMemoryBarrierCount, long pBufferMemoryBarriers, int imageMemoryBarrierCount, long pImageMemoryBarriers)
Unsafe version of:CmdWaitEvents
- Parameters:
eventCount
- the length of thepEvents
array.memoryBarrierCount
- the length of thepMemoryBarriers
array.bufferMemoryBarrierCount
- the length of thepBufferMemoryBarriers
array.imageMemoryBarrierCount
- the length of thepImageMemoryBarriers
array.
-
vkCmdWaitEvents
public static void vkCmdWaitEvents(VkCommandBuffer commandBuffer, java.nio.LongBuffer pEvents, int srcStageMask, int dstStageMask, @Nullable VkMemoryBarrier.Buffer pMemoryBarriers, @Nullable VkBufferMemoryBarrier.Buffer pBufferMemoryBarriers, @Nullable VkImageMemoryBarrier.Buffer pImageMemoryBarriers)
Wait for one or more events and insert a set of memory.C Specification
To wait for one or more events to enter the signaled state on a device, call:
void vkCmdWaitEvents( VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers);
Description
When
vkCmdWaitEvents
is submitted to a queue, it defines a memory dependency between prior event signal operations on the same queue or the host, and subsequent commands.vkCmdWaitEvents
must not be used to wait on event signal operations occurring on other queues.The first synchronization scope only includes event signal operations that operate on members of
pEvents
, and the operations that happened-before the event signal operations. Event signal operations performed byCmdSetEvent
that occur earlier in submission order are included in the first synchronization scope, if the logically latest pipeline stage in theirstageMask
parameter is logically earlier than or equal to the logically latest pipeline stage insrcStageMask
. Event signal operations performed bySetEvent
are only included in the first synchronization scope ifPIPELINE_STAGE_HOST_BIT
is included insrcStageMask
.The second synchronization scope includes all commands that occur later in submission order. The second synchronization scope is limited to operations on the pipeline stages determined by the destination stage mask specified by
dstStageMask
.The first access scope is limited to access in the pipeline stages determined by the source stage mask specified by
srcStageMask
. Within that, the first access scope only includes the first access scopes defined by elements of thepMemoryBarriers
,pBufferMemoryBarriers
andpImageMemoryBarriers
arrays, which each define a set of memory barriers. If no memory barriers are specified, then the first access scope includes no accesses.The second access scope is limited to access in the pipeline stages determined by the destination stage mask specified by
dstStageMask
. Within that, the second access scope only includes the second access scopes defined by elements of thepMemoryBarriers
,pBufferMemoryBarriers
andpImageMemoryBarriers
arrays, which each define a set of memory barriers. If no memory barriers are specified, then the second access scope includes no accesses.Note
CmdWaitEvents
is used withCmdSetEvent
to define a memory dependency between two sets of action commands, roughly in the same way as pipeline barriers, but split into two commands such that work between the two may execute unhindered.Note
Applications should be careful to avoid race conditions when using events. There is no direct ordering guarantee between a
CmdResetEvent
command and aCmdWaitEvents
command submitted after it, so some other execution dependency must be included between these commands (e.g. a semaphore).Valid Usage
srcStageMask
must be the bitwise OR of thestageMask
parameter used in previous calls tovkCmdSetEvent
with any of the members ofpEvents
andPIPELINE_STAGE_HOST_BIT
if any of the members ofpEvents
was set usingvkSetEvent
- If the geometry shaders feature is not enabled,
srcStageMask
must not containPIPELINE_STAGE_GEOMETRY_SHADER_BIT
- If the geometry shaders feature is not enabled,
dstStageMask
must not containPIPELINE_STAGE_GEOMETRY_SHADER_BIT
- If the tessellation shaders feature is not enabled,
srcStageMask
must not containPIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT
orPIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT
- If the tessellation shaders feature is not enabled,
dstStageMask
must not containPIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT
orPIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT
- If
pEvents
includes one or more events that will be signaled byvkSetEvent
aftercommandBuffer
has been submitted to a queue, thenvkCmdWaitEvents
must not be called inside a render pass instance - Any pipeline stage included in
srcStageMask
ordstStageMask
must be supported by the capabilities of the queue family specified by thequeueFamilyIndex
member of theVkCommandPoolCreateInfo
structure that was used to create theVkCommandPool
thatcommandBuffer
was allocated from, as specified in the table of supported pipeline stages. - Each element of
pMemoryBarriers
,pBufferMemoryBarriers
orpImageMemoryBarriers
must not have any access flag included in itssrcAccessMask
member if that bit is not supported by any of the pipeline stages insrcStageMask
, as specified in the table of supported access types. - Each element of
pMemoryBarriers
,pBufferMemoryBarriers
orpImageMemoryBarriers
must not have any access flag included in itsdstAccessMask
member if that bit is not supported by any of the pipeline stages indstStageMask
, as specified in the table of supported access types. commandBuffer
’s current device mask must include exactly one physical device.- If the mesh shaders feature is not enabled,
srcStageMask
must not containPIPELINE_STAGE_MESH_SHADER_BIT_NV
- If the task shaders feature is not enabled,
srcStageMask
must not containPIPELINE_STAGE_TASK_SHADER_BIT_NV
- If the mesh shaders feature is not enabled,
dstStageMask
must not containPIPELINE_STAGE_MESH_SHADER_BIT_NV
- If the task shaders feature is not enabled,
dstStageMask
must not containPIPELINE_STAGE_TASK_SHADER_BIT_NV
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlepEvents
must be a valid pointer to an array ofeventCount
validVkEvent
handlessrcStageMask
must be a valid combination ofVkPipelineStageFlagBits
valuessrcStageMask
must not be 0dstStageMask
must be a valid combination ofVkPipelineStageFlagBits
valuesdstStageMask
must not be 0- If
memoryBarrierCount
is not 0,pMemoryBarriers
must be a valid pointer to an array ofmemoryBarrierCount
validVkMemoryBarrier
structures - If
bufferMemoryBarrierCount
is not 0,pBufferMemoryBarriers
must be a valid pointer to an array ofbufferMemoryBarrierCount
validVkBufferMemoryBarrier
structures - If
imageMemoryBarrierCount
is not 0,pImageMemoryBarriers
must be a valid pointer to an array ofimageMemoryBarrierCount
validVkImageMemoryBarrier
structures commandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations eventCount
must be greater than 0- Both of
commandBuffer
, and the elements ofpEvents
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics Compute See Also
VkBufferMemoryBarrier
,VkImageMemoryBarrier
,VkMemoryBarrier
- Parameters:
commandBuffer
- the command buffer into which the command is recorded.pEvents
- an array of event object handles to wait on.srcStageMask
- a bitmask ofVkPipelineStageFlagBits
specifying the source stage mask.dstStageMask
- a bitmask ofVkPipelineStageFlagBits
specifying the destination stage mask.pMemoryBarriers
- a pointer to an array ofVkMemoryBarrier
structures.pBufferMemoryBarriers
- a pointer to an array ofVkBufferMemoryBarrier
structures.pImageMemoryBarriers
- a pointer to an array ofVkImageMemoryBarrier
structures.
-
nvkCmdPipelineBarrier
public static void nvkCmdPipelineBarrier(VkCommandBuffer commandBuffer, int srcStageMask, int dstStageMask, int dependencyFlags, int memoryBarrierCount, long pMemoryBarriers, int bufferMemoryBarrierCount, long pBufferMemoryBarriers, int imageMemoryBarrierCount, long pImageMemoryBarriers)
Unsafe version of:CmdPipelineBarrier
- Parameters:
memoryBarrierCount
- the length of thepMemoryBarriers
array.bufferMemoryBarrierCount
- the length of thepBufferMemoryBarriers
array.imageMemoryBarrierCount
- the length of thepImageMemoryBarriers
array.
-
vkCmdPipelineBarrier
public static void vkCmdPipelineBarrier(VkCommandBuffer commandBuffer, int srcStageMask, int dstStageMask, int dependencyFlags, @Nullable VkMemoryBarrier.Buffer pMemoryBarriers, @Nullable VkBufferMemoryBarrier.Buffer pBufferMemoryBarriers, @Nullable VkImageMemoryBarrier.Buffer pImageMemoryBarriers)
Insert a memory dependency.C Specification
To record a pipeline barrier, call:
void vkCmdPipelineBarrier( VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers);
Description
When
CmdPipelineBarrier
is submitted to a queue, it defines a memory dependency between commands that were submitted before it, and those submitted after it.If
CmdPipelineBarrier
was recorded outside a render pass instance, the first synchronization scope includes all commands that occur earlier in submission order. IfCmdPipelineBarrier
was recorded inside a render pass instance, the first synchronization scope includes only commands that occur earlier in submission order within the same subpass. In either case, the first synchronization scope is limited to operations on the pipeline stages determined by the source stage mask specified bysrcStageMask
.If
CmdPipelineBarrier
was recorded outside a render pass instance, the second synchronization scope includes all commands that occur later in submission order. IfCmdPipelineBarrier
was recorded inside a render pass instance, the second synchronization scope includes only commands that occur later in submission order within the same subpass. In either case, the second synchronization scope is limited to operations on the pipeline stages determined by the destination stage mask specified bydstStageMask
.The first access scope is limited to access in the pipeline stages determined by the source stage mask specified by
srcStageMask
. Within that, the first access scope only includes the first access scopes defined by elements of thepMemoryBarriers
,pBufferMemoryBarriers
andpImageMemoryBarriers
arrays, which each define a set of memory barriers. If no memory barriers are specified, then the first access scope includes no accesses.The second access scope is limited to access in the pipeline stages determined by the destination stage mask specified by
dstStageMask
. Within that, the second access scope only includes the second access scopes defined by elements of thepMemoryBarriers
,pBufferMemoryBarriers
andpImageMemoryBarriers
arrays, which each define a set of memory barriers. If no memory barriers are specified, then the second access scope includes no accesses.If
dependencyFlags
includesDEPENDENCY_BY_REGION_BIT
, then any dependency between framebuffer-space pipeline stages is framebuffer-local - otherwise it is framebuffer-global.Valid Usage
- If the geometry shaders feature is not enabled,
srcStageMask
must not containPIPELINE_STAGE_GEOMETRY_SHADER_BIT
- If the geometry shaders feature is not enabled,
dstStageMask
must not containPIPELINE_STAGE_GEOMETRY_SHADER_BIT
- If the tessellation shaders feature is not enabled,
srcStageMask
must not containPIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT
orPIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT
- If the tessellation shaders feature is not enabled,
dstStageMask
must not containPIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT
orPIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT
- If
vkCmdPipelineBarrier
is called within a render pass instance, the render pass must have been created with at least oneVkSubpassDependency
instance inVkRenderPassCreateInfo
::pDependencies
that expresses a dependency from the current subpass to itself, and for whichsrcStageMask
contains a subset of the bit values inVkSubpassDependency
::srcStageMask
,dstStageMask
contains a subset of the bit values inVkSubpassDependency
::dstStageMask
,dependencyFlags
is equal toVkSubpassDependency
::dependencyFlags
,srcAccessMask
member of each element ofpMemoryBarriers
andpImageMemoryBarriers
contains a subset of the bit values inVkSubpassDependency
::srcAccessMask
, anddstAccessMask
member of each element ofpMemoryBarriers
andpImageMemoryBarriers
contains a subset of the bit values inVkSubpassDependency
::dstAccessMask
- If
vkCmdPipelineBarrier
is called within a render pass instance,bufferMemoryBarrierCount
must be 0 - If
vkCmdPipelineBarrier
is called within a render pass instance, theimage
member of any element ofpImageMemoryBarriers
must be equal to one of the elements ofpAttachments
that the currentframebuffer
was created with, that is also referred to by one of the elements of thepColorAttachments
,pResolveAttachments
orpDepthStencilAttachment
members of theVkSubpassDescription
instance or by thepDepthStencilResolveAttachment
member of theVkSubpassDescriptionDepthStencilResolveKHR
structure that the current subpass was created with - If
vkCmdPipelineBarrier
is called within a render pass instance, theoldLayout
andnewLayout
members of any element ofpImageMemoryBarriers
must be equal to thelayout
member of an element of thepColorAttachments
,pResolveAttachments
orpDepthStencilAttachment
members of theVkSubpassDescription
instance or by thepDepthStencilResolveAttachment
member of theVkSubpassDescriptionDepthStencilResolveKHR
structure that the current subpass was created with, that refers to the sameimage
- If
vkCmdPipelineBarrier
is called within a render pass instance, theoldLayout
andnewLayout
members of an element ofpImageMemoryBarriers
must be equal - If
vkCmdPipelineBarrier
is called within a render pass instance, thesrcQueueFamilyIndex
anddstQueueFamilyIndex
members of any element ofpImageMemoryBarriers
must beQUEUE_FAMILY_IGNORED
- Any pipeline stage included in
srcStageMask
ordstStageMask
must be supported by the capabilities of the queue family specified by thequeueFamilyIndex
member of theVkCommandPoolCreateInfo
structure that was used to create theVkCommandPool
thatcommandBuffer
was allocated from, as specified in the table of supported pipeline stages. - Each element of
pMemoryBarriers
,pBufferMemoryBarriers
andpImageMemoryBarriers
must not have any access flag included in itssrcAccessMask
member if that bit is not supported by any of the pipeline stages insrcStageMask
, as specified in the table of supported access types. - Each element of
pMemoryBarriers
,pBufferMemoryBarriers
andpImageMemoryBarriers
must not have any access flag included in itsdstAccessMask
member if that bit is not supported by any of the pipeline stages indstStageMask
, as specified in the table of supported access types. - If
vkCmdPipelineBarrier
is called outside of a render pass instance,dependencyFlags
must not includeDEPENDENCY_VIEW_LOCAL_BIT
- If the mesh shaders feature is not enabled,
srcStageMask
must not containPIPELINE_STAGE_MESH_SHADER_BIT_NV
- If the task shaders feature is not enabled,
srcStageMask
must not containPIPELINE_STAGE_TASK_SHADER_BIT_NV
- If the mesh shaders feature is not enabled,
dstStageMask
must not containPIPELINE_STAGE_MESH_SHADER_BIT_NV
- If the task shaders feature is not enabled,
dstStageMask
must not containPIPELINE_STAGE_TASK_SHADER_BIT_NV
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlesrcStageMask
must be a valid combination ofVkPipelineStageFlagBits
valuessrcStageMask
must not be 0dstStageMask
must be a valid combination ofVkPipelineStageFlagBits
valuesdstStageMask
must not be 0dependencyFlags
must be a valid combination ofVkDependencyFlagBits
values- If
memoryBarrierCount
is not 0,pMemoryBarriers
must be a valid pointer to an array ofmemoryBarrierCount
validVkMemoryBarrier
structures - If
bufferMemoryBarrierCount
is not 0,pBufferMemoryBarriers
must be a valid pointer to an array ofbufferMemoryBarrierCount
validVkBufferMemoryBarrier
structures - If
imageMemoryBarrierCount
is not 0,pImageMemoryBarriers
must be a valid pointer to an array ofimageMemoryBarrierCount
validVkImageMemoryBarrier
structures commandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support transfer, graphics, or compute operations
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Transfer Graphics Compute See Also
VkBufferMemoryBarrier
,VkImageMemoryBarrier
,VkMemoryBarrier
- Parameters:
commandBuffer
- the command buffer into which the command is recorded.srcStageMask
- a bitmask ofVkPipelineStageFlagBits
specifying the source stage mask.dstStageMask
- a bitmask ofVkPipelineStageFlagBits
specifying the destination stage mask.dependencyFlags
- a bitmask ofVkDependencyFlagBits
specifying how execution and memory dependencies are formed.pMemoryBarriers
- a pointer to an array ofVkMemoryBarrier
structures.pBufferMemoryBarriers
- a pointer to an array ofVkBufferMemoryBarrier
structures.pImageMemoryBarriers
- a pointer to an array ofVkImageMemoryBarrier
structures.
- If the geometry shaders feature is not enabled,
-
vkCmdBeginQuery
public static void vkCmdBeginQuery(VkCommandBuffer commandBuffer, long queryPool, int query, int flags)
Begin a query.C Specification
To begin a query, call:
void vkCmdBeginQuery( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags);
Description
If the
queryType
of the pool isQUERY_TYPE_OCCLUSION
andflags
containsQUERY_CONTROL_PRECISE_BIT
, an implementation must return a result that matches the actual number of samples passed. This is described in more detail in Occlusion Queries.Calling
vkCmdBeginQuery
is equivalent to callingCmdBeginQueryIndexedEXT
with theindex
parameter set to zero.After beginning a query, that query is considered active within the command buffer it was called in until that same query is ended. Queries active in a primary command buffer when secondary command buffers are executed are considered active for those secondary command buffers.
Valid Usage
queryPool
must have been created with aqueryType
that differs from that of any queries that are active withincommandBuffer
- All queries used by the command must be unavailable
- If the precise occlusion queries feature is not enabled, or the
queryType
used to createqueryPool
was notQUERY_TYPE_OCCLUSION
,flags
must not containQUERY_CONTROL_PRECISE_BIT
query
must be less than the number of queries inqueryPool
- If the
queryType
used to createqueryPool
wasQUERY_TYPE_OCCLUSION
, theVkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - If the
queryType
used to createqueryPool
wasQUERY_TYPE_PIPELINE_STATISTICS
and any of thepipelineStatistics
indicate graphics operations, theVkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - If the
queryType
used to createqueryPool
wasQUERY_TYPE_PIPELINE_STATISTICS
and any of thepipelineStatistics
indicate compute operations, theVkCommandPool
thatcommandBuffer
was allocated from must support compute operations commandBuffer
must not be a protected command buffer- If called within a render pass instance, the sum of
query
and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries inqueryPool
- If the
queryType
used to createqueryPool
wasQUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT
theVkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - If the
queryType
used to createqueryPool
wasQUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT
thenVkPhysicalDeviceTransformFeedbackPropertiesEXT
::transformFeedbackQueries
must be supported
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlequeryPool
must be a validVkQueryPool
handleflags
must be a valid combination ofVkQueryControlFlagBits
valuescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations - Both of
commandBuffer
, andqueryPool
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics Compute - Parameters:
commandBuffer
- the command buffer into which this command will be recorded.queryPool
- the query pool that will manage the results of the query.query
- the query index within the query pool that will contain the results.flags
- a bitmask ofVkQueryControlFlagBits
specifying constraints on the types of queries that can be performed.
-
vkCmdEndQuery
public static void vkCmdEndQuery(VkCommandBuffer commandBuffer, long queryPool, int query)
Ends a query.C Specification
To end a query after the set of desired draw or dispatch commands is executed, call:
void vkCmdEndQuery( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query);
Description
Calling
vkCmdEndQuery
is equivalent to callingCmdEndQueryIndexedEXT
with theindex
parameter set to zero.As queries operate asynchronously, ending a query does not immediately set the query's status to available. A query is considered finished when the final results of the query are ready to be retrieved by
GetQueryPoolResults
andCmdCopyQueryPoolResults
, and this is when the query's status is set to available.Once a query is ended the query must finish in finite time, unless the state of the query is changed using other commands, e.g. by issuing a reset of the query.
Valid Usage
- All queries used by the command must be active
query
must be less than the number of queries inqueryPool
commandBuffer
must not be a protected command buffer- If
vkCmdEndQuery
is called within a render pass instance, the sum ofquery
and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries inqueryPool
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlequeryPool
must be a validVkQueryPool
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations - Both of
commandBuffer
, andqueryPool
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics Compute - Parameters:
commandBuffer
- the command buffer into which this command will be recorded.queryPool
- the query pool that is managing the results of the query.query
- the query index within the query pool where the result is stored.
-
vkCmdResetQueryPool
public static void vkCmdResetQueryPool(VkCommandBuffer commandBuffer, long queryPool, int firstQuery, int queryCount)
Reset queries in a query pool.C Specification
To reset a range of queries in a query pool on a queue, call:
void vkCmdResetQueryPool( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount);
Description
When executed on a queue, this command sets the status of query indices
[firstQuery, firstQuery + queryCount - 1]
to unavailable.Valid Usage
firstQuery
must be less than the number of queries inqueryPool
- The sum of
firstQuery
andqueryCount
must be less than or equal to the number of queries inqueryPool
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlequeryPool
must be a validVkQueryPool
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations - This command must only be called outside of a render pass instance
- Both of
commandBuffer
, andqueryPool
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Graphics Compute - Parameters:
commandBuffer
- the command buffer into which this command will be recorded.queryPool
- the handle of the query pool managing the queries being reset.firstQuery
- the initial query index to reset.queryCount
- the number of queries to reset.
-
vkCmdWriteTimestamp
public static void vkCmdWriteTimestamp(VkCommandBuffer commandBuffer, int pipelineStage, long queryPool, int query)
Write a device timestamp into a query object.C Specification
To request a timestamp, call:
void vkCmdWriteTimestamp( VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query);
Description
vkCmdWriteTimestamp
latches the value of the timer when all previous commands have completed executing as far as the specified pipeline stage, and writes the timestamp value to memory. When the timestamp value is written, the availability status of the query is set to available.Note
If an implementation is unable to detect completion and latch the timer at any specific stage of the pipeline, it may instead do so at any logically later stage.
CmdCopyQueryPoolResults
can then be called to copy the timestamp value from the query pool into buffer memory, with ordering and synchronization behavior equivalent to how other queries operate. Timestamp values can also be retrieved from the query pool usingGetQueryPoolResults
. As with other queries, the query must be reset usingCmdResetQueryPool
orResetQueryPoolEXT
before requesting the timestamp value be written to it.While
vkCmdWriteTimestamp
can be called inside or outside of a render pass instance,CmdCopyQueryPoolResults
must only be called outside of a render pass instance.Timestamps may only be meaningfully compared if they are written by commands submitted to the same queue.
Note
An example of such a comparison is determining the execution time of a sequence of commands.
If
vkCmdWriteTimestamp
is called while executing a render pass instance that has multiview enabled, the timestamp usesN
consecutive query indices in the query pool (starting atquery
) whereN
is the number of bits set in the view mask of the subpass the command is executed in. The resulting query values are determined by an implementation-dependent choice of one of the following behaviors:- The first query is a timestamp value and (if more than one bit is set in the view mask) zero is written to the remaining queries. If two timestamps are written in the same subpass, the sum of the execution time of all views between those commands is the difference between the first query written by each command.
- All
N
queries are timestamp values. If two timestamps are written in the same subpass, the sum of the execution time of all views between those commands is the sum of the difference between corresponding queries written by each command. The difference between corresponding queries may be the execution time of a single view.
In either case, the application can sum the differences between all
N
queries to determine the total execution time.Valid Usage
queryPool
must have been created with aqueryType
ofQUERY_TYPE_TIMESTAMP
- The query identified by
queryPool
andquery
must be unavailable - The command pool’s queue family must support a non-zero
timestampValidBits
- All queries used by the command must be unavailable
- If
vkCmdWriteTimestamp
is called within a render pass instance, the sum ofquery
and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries inqueryPool
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlepipelineStage
must be a validVkPipelineStageFlagBits
valuequeryPool
must be a validVkQueryPool
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support transfer, graphics, or compute operations - Both of
commandBuffer
, andqueryPool
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Transfer Graphics Compute Transfer - Parameters:
commandBuffer
- the command buffer into which the command will be recorded.pipelineStage
- one of theVkPipelineStageFlagBits
, specifying a stage of the pipeline.queryPool
- the query pool that will manage the timestamp.query
- the query within the query pool that will contain the timestamp.
-
vkCmdCopyQueryPoolResults
public static void vkCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, long queryPool, int firstQuery, int queryCount, long dstBuffer, long dstOffset, long stride, int flags)
Copy the results of queries in a query pool to a buffer object.C Specification
To copy query statuses and numerical results directly to buffer memory, call:
void vkCmdCopyQueryPoolResults( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags);
Description
vkCmdCopyQueryPoolResults
is guaranteed to see the effect of previous uses ofvkCmdResetQueryPool
in the same queue, without any additional synchronization. Thus, the results will always reflect the most recent use of the query.flags
has the same possible values described above for theflags
parameter ofGetQueryPoolResults
, but the different style of execution causes some subtle behavioral differences. BecausevkCmdCopyQueryPoolResults
executes in order with respect to other query commands, there is less ambiguity about which use of a query is being requested.If no bits are set in
flags
, results for all requested queries in the available state are written as 32-bit unsigned integer values, and nothing is written for queries in the unavailable state.If
QUERY_RESULT_64_BIT
is set, the results are written as an array of 64-bit unsigned integer values as described forGetQueryPoolResults
.If
QUERY_RESULT_WAIT_BIT
is set, the implementation will wait for each query's status to be in the available state before retrieving the numerical results for that query. This is guaranteed to reflect the most recent use of the query on the same queue, assuming that the query is not being simultaneously used by other queues. If the query does not become available in a finite amount of time (e.g. due to not issuing a query since the last reset), aERROR_DEVICE_LOST
error may occur.Similarly, if
QUERY_RESULT_WITH_AVAILABILITY_BIT
is set andQUERY_RESULT_WAIT_BIT
is not set, the availability is guaranteed to reflect the most recent use of the query on the same queue, assuming that the query is not being simultaneously used by other queues. As withvkGetQueryPoolResults
, implementations must guarantee that if they return a non-zero availability value, then the numerical results are valid.If
QUERY_RESULT_PARTIAL_BIT
is set,QUERY_RESULT_WAIT_BIT
is not set, and the query's status is unavailable, an intermediate result value between zero and the final result value is written for that query.QUERY_RESULT_PARTIAL_BIT
must not be used if the pool'squeryType
isQUERY_TYPE_TIMESTAMP
.vkCmdCopyQueryPoolResults
is considered to be a transfer operation, and its writes to buffer memory must be synchronized usingPIPELINE_STAGE_TRANSFER_BIT
andACCESS_TRANSFER_WRITE_BIT
before using the results.Valid Usage
dstOffset
must be less than the size ofdstBuffer
firstQuery
must be less than the number of queries inqueryPool
- The sum of
firstQuery
andqueryCount
must be less than or equal to the number of queries inqueryPool
- If
QUERY_RESULT_64_BIT
is not set inflags
thendstOffset
andstride
must be multiples of 4 - If
QUERY_RESULT_64_BIT
is set inflags
thendstOffset
andstride
must be multiples of 8 dstBuffer
must have enough storage, fromdstOffset
, to contain the result of each query, as described heredstBuffer
must have been created withBUFFER_USAGE_TRANSFER_DST_BIT
usage flag- If
dstBuffer
is non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemory
object - If the
queryType
used to createqueryPool
wasQUERY_TYPE_TIMESTAMP
,flags
must not containQUERY_RESULT_PARTIAL_BIT
CmdCopyQueryPoolResults
must not be called if thequeryType
used to createqueryPool
wasQUERY_TYPE_PERFORMANCE_QUERY_INTEL
.
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlequeryPool
must be a validVkQueryPool
handledstBuffer
must be a validVkBuffer
handleflags
must be a valid combination ofVkQueryResultFlagBits
valuescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations - This command must only be called outside of a render pass instance
- Each of
commandBuffer
,dstBuffer
, andqueryPool
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Outside Graphics Compute Transfer - Parameters:
commandBuffer
- the command buffer into which this command will be recorded.queryPool
- the query pool managing the queries containing the desired results.firstQuery
- the initial query index.queryCount
- the number of queries.firstQuery
andqueryCount
together define a range of queries.dstBuffer
- aVkBuffer
object that will receive the results of the copy command.dstOffset
- an offset intodstBuffer
.stride
- the stride in bytes between results for individual queries withindstBuffer
. The required size of the backing memory fordstBuffer
is determined as described above forGetQueryPoolResults
.flags
- a bitmask ofVkQueryResultFlagBits
specifying how and when results are returned.
-
nvkCmdPushConstants
public static void nvkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, int size, long pValues)
Unsafe version of:CmdPushConstants
- Parameters:
size
- the size of the push constant range to update, in units of bytes.
-
vkCmdPushConstants
public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, java.nio.ByteBuffer pValues) public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, java.nio.ShortBuffer pValues) public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, java.nio.IntBuffer pValues) public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, java.nio.LongBuffer pValues) public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, java.nio.FloatBuffer pValues) public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, java.nio.DoubleBuffer pValues)
Update the values of push constants.C Specification
To update push constants, call:
void vkCmdPushConstants( VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues);
Description
Note
As
stageFlags
needs to include all flags the relevant push constant ranges were created with, any flags that are not supported by the queue family that theVkCommandPool
used to allocatecommandBuffer
was created on are ignored.Valid Usage
- For each byte in the range specified by
offset
andsize
and for each shader stage instageFlags
, there must be a push constant range inlayout
that includes that byte and that stage - For each byte in the range specified by
offset
andsize
and for each push constant range that overlaps that byte,stageFlags
must include all stages in that push constant range’sVkPushConstantRange
::stageFlags
offset
must be a multiple of 4size
must be a multiple of 4offset
must be less thanVkPhysicalDeviceLimits
::maxPushConstantsSize
size
must be less than or equal toVkPhysicalDeviceLimits
::maxPushConstantsSize
minusoffset
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlelayout
must be a validVkPipelineLayout
handlestageFlags
must be a valid combination ofVkShaderStageFlagBits
valuesstageFlags
must not be 0pValues
must be a valid pointer to an array ofsize
bytescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations size
must be greater than 0- Both of
commandBuffer
, andlayout
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Both Graphics Compute - Parameters:
commandBuffer
- the command buffer in which the push constant update will be recorded.layout
- the pipeline layout used to program the push constant updates.stageFlags
- a bitmask ofVkShaderStageFlagBits
specifying the shader stages that will use the push constants in the updated range.offset
- the start offset of the push constant range to update, in units of bytes.pValues
- an array ofsize
bytes containing the new push constant values.
- For each byte in the range specified by
-
nvkCmdBeginRenderPass
public static void nvkCmdBeginRenderPass(VkCommandBuffer commandBuffer, long pRenderPassBegin, int contents)
Unsafe version of:CmdBeginRenderPass
-
vkCmdBeginRenderPass
public static void vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, VkRenderPassBeginInfo pRenderPassBegin, int contents)
Begin a new render pass.C Specification
To begin a render pass instance, call:
void vkCmdBeginRenderPass( VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents);
Description
After beginning a render pass instance, the command buffer is ready to record the commands for the first subpass of that render pass.
Valid Usage
- If any of the
initialLayout
orfinalLayout
member of theVkAttachmentDescription
structures or thelayout
member of theVkAttachmentReference
structures specified when creating the render pass specified in therenderPass
member ofpRenderPassBegin
isIMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
then the corresponding attachment image view of the framebuffer specified in theframebuffer
member ofpRenderPassBegin
must have been created with ausage
value includingIMAGE_USAGE_COLOR_ATTACHMENT_BIT
- If any of the
initialLayout
orfinalLayout
member of theVkAttachmentDescription
structures or thelayout
member of theVkAttachmentReference
structures specified when creating the render pass specified in therenderPass
member ofpRenderPassBegin
isIMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL
,IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL
,IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL
, orIMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
then the corresponding attachment image view of the framebuffer specified in theframebuffer
member ofpRenderPassBegin
must have been created with ausage
value includingIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
- If any of the
initialLayout
orfinalLayout
member of theVkAttachmentDescription
structures or thelayout
member of theVkAttachmentReference
structures specified when creating the render pass specified in therenderPass
member ofpRenderPassBegin
isIMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
then the corresponding attachment image view of the framebuffer specified in theframebuffer
member ofpRenderPassBegin
must have been created with ausage
value includingIMAGE_USAGE_SAMPLED_BIT
orIMAGE_USAGE_INPUT_ATTACHMENT_BIT
- If any of the
initialLayout
orfinalLayout
member of theVkAttachmentDescription
structures or thelayout
member of theVkAttachmentReference
structures specified when creating the render pass specified in therenderPass
member ofpRenderPassBegin
isIMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL
then the corresponding attachment image view of the framebuffer specified in theframebuffer
member ofpRenderPassBegin
must have been created with ausage
value includingIMAGE_USAGE_TRANSFER_SRC_BIT
- If any of the
initialLayout
orfinalLayout
member of theVkAttachmentDescription
structures or thelayout
member of theVkAttachmentReference
structures specified when creating the render pass specified in therenderPass
member ofpRenderPassBegin
isIMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
then the corresponding attachment image view of the framebuffer specified in theframebuffer
member ofpRenderPassBegin
must have been created with ausage
value includingIMAGE_USAGE_TRANSFER_DST_BIT
- If any of the
initialLayout
members of theVkAttachmentDescription
structures specified when creating the render pass specified in therenderPass
member ofpRenderPassBegin
is notIMAGE_LAYOUT_UNDEFINED
, then each suchinitialLayout
must be equal to the current layout of the corresponding attachment image subresource of the framebuffer specified in theframebuffer
member ofpRenderPassBegin
- The
srcStageMask
anddstStageMask
members of any element of thepDependencies
member ofVkRenderPassCreateInfo
used to createrenderPass
must be supported by the capabilities of the queue family identified by thequeueFamilyIndex
member of theVkCommandPoolCreateInfo
used to create the command pool whichcommandBuffer
was allocated from - For any attachment in
framebuffer
that is used byrenderPass
and is bound to memory locations that are also bound to another attachment used byrenderPass
, and if at least one of those uses causes either attachment to be written to, both attachments must have had theATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT
set
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlepRenderPassBegin
must be a valid pointer to a validVkRenderPassBeginInfo
structurecontents
must be a validVkSubpassContents
valuecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called outside of a render pass instance
commandBuffer
must be a primaryVkCommandBuffer
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Outside Graphics Graphics See Also
- Parameters:
commandBuffer
- the command buffer in which to record the command.pRenderPassBegin
- a pointer to aVkRenderPassBeginInfo
structure (defined below) which specifies the render pass to begin an instance of, and the framebuffer the instance uses.contents
- aVkSubpassContents
value specifying how the commands in the first subpass will be provided.
- If any of the
-
vkCmdNextSubpass
public static void vkCmdNextSubpass(VkCommandBuffer commandBuffer, int contents)
Transition to the next subpass of a render pass.C Specification
To transition to the next subpass in the render pass instance after recording the commands for a subpass, call:
void vkCmdNextSubpass( VkCommandBuffer commandBuffer, VkSubpassContents contents);
Description
The subpass index for a render pass begins at zero when
vkCmdBeginRenderPass
is recorded, and increments each timevkCmdNextSubpass
is recorded.Moving to the next subpass automatically performs any multisample resolve operations in the subpass being ended. End-of-subpass multisample resolves are treated as color attachment writes for the purposes of synchronization. This applies to resolve operations for both color and depth/stencil attachments. That is, they are considered to execute in the
PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT
pipeline stage and their writes are synchronized withACCESS_COLOR_ATTACHMENT_WRITE_BIT
. Synchronization between rendering within a subpass and any resolve operations at the end of the subpass occurs automatically, without need for explicit dependencies or pipeline barriers. However, if the resolve attachment is also used in a different subpass, an explicit dependency is needed.After transitioning to the next subpass, the application can record the commands for that subpass.
Valid Usage
- The current subpass index must be less than the number of subpasses in the render pass minus one
- This command must not be recorded when transform feedback is active
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlecontents
must be a validVkSubpassContents
valuecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called inside of a render pass instance
commandBuffer
must be a primaryVkCommandBuffer
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Inside Graphics Graphics - Parameters:
commandBuffer
- the command buffer in which to record the command.contents
- specifies how the commands in the next subpass will be provided, in the same fashion as the corresponding parameter ofCmdBeginRenderPass
.
-
vkCmdEndRenderPass
public static void vkCmdEndRenderPass(VkCommandBuffer commandBuffer)
End the current render pass.C Specification
To record a command to end a render pass instance after recording the commands for the last subpass, call:
void vkCmdEndRenderPass( VkCommandBuffer commandBuffer);
Description
Ending a render pass instance performs any multisample resolve operations on the final subpass.
Valid Usage
- The current subpass index must be equal to the number of subpasses in the render pass minus one
- This command must not be recorded when transform feedback is active
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics operations - This command must only be called inside of a render pass instance
commandBuffer
must be a primaryVkCommandBuffer
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Inside Graphics Graphics - Parameters:
commandBuffer
- the command buffer in which to end the current render pass instance.
-
nvkCmdExecuteCommands
public static void nvkCmdExecuteCommands(VkCommandBuffer commandBuffer, int commandBufferCount, long pCommandBuffers)
Unsafe version of:CmdExecuteCommands
- Parameters:
commandBufferCount
- the length of thepCommandBuffers
array.
-
vkCmdExecuteCommands
public static void vkCmdExecuteCommands(VkCommandBuffer commandBuffer, org.lwjgl.PointerBuffer pCommandBuffers)
Execute a secondary command buffer from a primary command buffer.C Specification
A secondary command buffer must not be directly submitted to a queue. Instead, secondary command buffers are recorded to execute as part of a primary command buffer with the command:
void vkCmdExecuteCommands( VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers);
Description
If any element of
pCommandBuffers
was not recorded with theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
flag, and it was recorded into any other primary command buffer which is currently in the executable or recording state, that primary command buffer becomes invalid.Valid Usage
commandBuffer
must have been allocated with alevel
ofCOMMAND_BUFFER_LEVEL_PRIMARY
- Each element of
pCommandBuffers
must have been allocated with alevel
ofCOMMAND_BUFFER_LEVEL_SECONDARY
- Each element of
pCommandBuffers
must be in the pending or executable state. - If any element of
pCommandBuffers
was not recorded with theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
flag, and it was recorded into any other primary command buffer, that primary command buffer must not be in the pending state - If any element of
pCommandBuffers
was not recorded with theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
flag, it must not be in the pending state. - If any element of
pCommandBuffers
was not recorded with theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
flag, it must not have already been recorded tocommandBuffer
. - If any element of
pCommandBuffers
was not recorded with theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
flag, it must not appear more than once inpCommandBuffers
. - Each element of
pCommandBuffers
must have been allocated from aVkCommandPool
that was created for the same queue family as theVkCommandPool
from whichcommandBuffer
was allocated - If
vkCmdExecuteCommands
is being called within a render pass instance, that render pass instance must have been begun with thecontents
parameter ofvkCmdBeginRenderPass
set toSUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS
- If
vkCmdExecuteCommands
is being called within a render pass instance, each element ofpCommandBuffers
must have been recorded with theCOMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT
- If
vkCmdExecuteCommands
is being called within a render pass instance, each element ofpCommandBuffers
must have been recorded withVkCommandBufferInheritanceInfo
::subpass
set to the index of the subpass which the given command buffer will be executed in - If
vkCmdExecuteCommands
is being called within a render pass instance, the render passes specified in thepBeginInfo
::pInheritanceInfo
::renderPass
members of theBeginCommandBuffer
commands used to begin recording each element ofpCommandBuffers
must be compatible with the current render pass. - If
vkCmdExecuteCommands
is being called within a render pass instance, and any element ofpCommandBuffers
was recorded withVkCommandBufferInheritanceInfo
::framebuffer
not equal toNULL_HANDLE
, thatVkFramebuffer
must match theVkFramebuffer
used in the current render pass instance - If
vkCmdExecuteCommands
is not being called within a render pass instance, each element ofpCommandBuffers
must not have been recorded with theCOMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT
- If the inherited queries feature is not enabled,
commandBuffer
must not have any queries active - If
commandBuffer
has aQUERY_TYPE_OCCLUSION
query active, then each element ofpCommandBuffers
must have been recorded withVkCommandBufferInheritanceInfo
::occlusionQueryEnable
set toTRUE
- If
commandBuffer
has aQUERY_TYPE_OCCLUSION
query active, then each element ofpCommandBuffers
must have been recorded withVkCommandBufferInheritanceInfo
::queryFlags
having all bits set that are set for the query - If
commandBuffer
has aQUERY_TYPE_PIPELINE_STATISTICS
query active, then each element ofpCommandBuffers
must have been recorded withVkCommandBufferInheritanceInfo
::pipelineStatistics
having all bits set that are set in theVkQueryPool
the query uses - Each element of
pCommandBuffers
must not begin any query types that are active incommandBuffer
- If
commandBuffer
is a protected command buffer, then each element ofpCommandBuffers
must be a protected command buffer. - If
commandBuffer
is an unprotected command buffer, then each element ofpCommandBuffers
must be an unprotected command buffer. - This command must not be recorded when transform feedback is active
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlepCommandBuffers
must be a valid pointer to an array ofcommandBufferCount
validVkCommandBuffer
handlescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support transfer, graphics, or compute operations commandBuffer
must be a primaryVkCommandBuffer
commandBufferCount
must be greater than 0- Both of
commandBuffer
, and the elements ofpCommandBuffers
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Both Transfer Graphics Compute - Parameters:
commandBuffer
- a handle to a primary command buffer that the secondary command buffers are executed in.pCommandBuffers
- an array of secondary command buffer handles, which are recorded to execute in the primary command buffer in the order they are listed in the array.
-
vkCmdExecuteCommands
public static void vkCmdExecuteCommands(VkCommandBuffer commandBuffer, VkCommandBuffer pCommandBuffer)
Execute a secondary command buffer from a primary command buffer.C Specification
A secondary command buffer must not be directly submitted to a queue. Instead, secondary command buffers are recorded to execute as part of a primary command buffer with the command:
void vkCmdExecuteCommands( VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers);
Description
If any element of
pCommandBuffers
was not recorded with theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
flag, and it was recorded into any other primary command buffer which is currently in the executable or recording state, that primary command buffer becomes invalid.Valid Usage
commandBuffer
must have been allocated with alevel
ofCOMMAND_BUFFER_LEVEL_PRIMARY
- Each element of
pCommandBuffers
must have been allocated with alevel
ofCOMMAND_BUFFER_LEVEL_SECONDARY
- Each element of
pCommandBuffers
must be in the pending or executable state. - If any element of
pCommandBuffers
was not recorded with theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
flag, and it was recorded into any other primary command buffer, that primary command buffer must not be in the pending state - If any element of
pCommandBuffers
was not recorded with theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
flag, it must not be in the pending state. - If any element of
pCommandBuffers
was not recorded with theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
flag, it must not have already been recorded tocommandBuffer
. - If any element of
pCommandBuffers
was not recorded with theCOMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT
flag, it must not appear more than once inpCommandBuffers
. - Each element of
pCommandBuffers
must have been allocated from aVkCommandPool
that was created for the same queue family as theVkCommandPool
from whichcommandBuffer
was allocated - If
vkCmdExecuteCommands
is being called within a render pass instance, that render pass instance must have been begun with thecontents
parameter ofvkCmdBeginRenderPass
set toSUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS
- If
vkCmdExecuteCommands
is being called within a render pass instance, each element ofpCommandBuffers
must have been recorded with theCOMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT
- If
vkCmdExecuteCommands
is being called within a render pass instance, each element ofpCommandBuffers
must have been recorded withVkCommandBufferInheritanceInfo
::subpass
set to the index of the subpass which the given command buffer will be executed in - If
vkCmdExecuteCommands
is being called within a render pass instance, the render passes specified in thepBeginInfo
::pInheritanceInfo
::renderPass
members of theBeginCommandBuffer
commands used to begin recording each element ofpCommandBuffers
must be compatible with the current render pass. - If
vkCmdExecuteCommands
is being called within a render pass instance, and any element ofpCommandBuffers
was recorded withVkCommandBufferInheritanceInfo
::framebuffer
not equal toNULL_HANDLE
, thatVkFramebuffer
must match theVkFramebuffer
used in the current render pass instance - If
vkCmdExecuteCommands
is not being called within a render pass instance, each element ofpCommandBuffers
must not have been recorded with theCOMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT
- If the inherited queries feature is not enabled,
commandBuffer
must not have any queries active - If
commandBuffer
has aQUERY_TYPE_OCCLUSION
query active, then each element ofpCommandBuffers
must have been recorded withVkCommandBufferInheritanceInfo
::occlusionQueryEnable
set toTRUE
- If
commandBuffer
has aQUERY_TYPE_OCCLUSION
query active, then each element ofpCommandBuffers
must have been recorded withVkCommandBufferInheritanceInfo
::queryFlags
having all bits set that are set for the query - If
commandBuffer
has aQUERY_TYPE_PIPELINE_STATISTICS
query active, then each element ofpCommandBuffers
must have been recorded withVkCommandBufferInheritanceInfo
::pipelineStatistics
having all bits set that are set in theVkQueryPool
the query uses - Each element of
pCommandBuffers
must not begin any query types that are active incommandBuffer
- If
commandBuffer
is a protected command buffer, then each element ofpCommandBuffers
must be a protected command buffer. - If
commandBuffer
is an unprotected command buffer, then each element ofpCommandBuffers
must be an unprotected command buffer. - This command must not be recorded when transform feedback is active
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlepCommandBuffers
must be a valid pointer to an array ofcommandBufferCount
validVkCommandBuffer
handlescommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support transfer, graphics, or compute operations commandBuffer
must be a primaryVkCommandBuffer
commandBufferCount
must be greater than 0- Both of
commandBuffer
, and the elements ofpCommandBuffers
must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Both Transfer Graphics Compute - Parameters:
commandBuffer
- a handle to a primary command buffer that the secondary command buffers are executed in.
-
VK_MAKE_VERSION
public static int VK_MAKE_VERSION(int major, int minor, int patch)
Constructs an API version number.This macro can be used when constructing the
VkApplicationInfo
::pname:apiVersion
parameter passed toCreateInstance
.- Parameters:
major
- the major version numberminor
- the minor version numberpatch
- the patch version number
-
VK_VERSION_MAJOR
public static int VK_VERSION_MAJOR(int version)
Extracts the API major version number from a packed version number.- Parameters:
version
- the Vulkan API version
-
VK_VERSION_MINOR
public static int VK_VERSION_MINOR(int version)
Extracts the API minor version number from a packed version number.- Parameters:
version
- the Vulkan API version
-
VK_VERSION_PATCH
public static int VK_VERSION_PATCH(int version)
Extracts the API patch version number from a packed version number.- Parameters:
version
- the Vulkan API version
-
vkEnumeratePhysicalDevices
public static int vkEnumeratePhysicalDevices(VkInstance instance, int[] pPhysicalDeviceCount, @Nullable org.lwjgl.PointerBuffer pPhysicalDevices)
Array version of:EnumeratePhysicalDevices
-
vkGetPhysicalDeviceQueueFamilyProperties
public static void vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, int[] pQueueFamilyPropertyCount, @Nullable VkQueueFamilyProperties.Buffer pQueueFamilyProperties)
Array version of:GetPhysicalDeviceQueueFamilyProperties
-
vkEnumerateInstanceExtensionProperties
public static int vkEnumerateInstanceExtensionProperties(@Nullable java.nio.ByteBuffer pLayerName, int[] pPropertyCount, @Nullable VkExtensionProperties.Buffer pProperties) public static int vkEnumerateInstanceExtensionProperties(@Nullable java.lang.CharSequence pLayerName, int[] pPropertyCount, @Nullable VkExtensionProperties.Buffer pProperties)
Array version of:EnumerateInstanceExtensionProperties
-
vkEnumerateDeviceExtensionProperties
public static int vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, @Nullable java.nio.ByteBuffer pLayerName, int[] pPropertyCount, @Nullable VkExtensionProperties.Buffer pProperties) public static int vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, @Nullable java.lang.CharSequence pLayerName, int[] pPropertyCount, @Nullable VkExtensionProperties.Buffer pProperties)
Array version of:EnumerateDeviceExtensionProperties
-
vkEnumerateInstanceLayerProperties
public static int vkEnumerateInstanceLayerProperties(int[] pPropertyCount, @Nullable VkLayerProperties.Buffer pProperties)
Array version of:EnumerateInstanceLayerProperties
-
vkEnumerateDeviceLayerProperties
public static int vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, int[] pPropertyCount, @Nullable VkLayerProperties.Buffer pProperties)
Array version of:EnumerateDeviceLayerProperties
-
vkAllocateMemory
public static int vkAllocateMemory(VkDevice device, VkMemoryAllocateInfo pAllocateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pMemory)
Array version of:AllocateMemory
-
vkGetDeviceMemoryCommitment
public static void vkGetDeviceMemoryCommitment(VkDevice device, long memory, long[] pCommittedMemoryInBytes)
Array version of:GetDeviceMemoryCommitment
-
vkGetImageSparseMemoryRequirements
public static void vkGetImageSparseMemoryRequirements(VkDevice device, long image, int[] pSparseMemoryRequirementCount, @Nullable VkSparseImageMemoryRequirements.Buffer pSparseMemoryRequirements)
Array version of:GetImageSparseMemoryRequirements
-
vkGetPhysicalDeviceSparseImageFormatProperties
public static void vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, int format, int type, int samples, int usage, int tiling, int[] pPropertyCount, @Nullable VkSparseImageFormatProperties.Buffer pProperties)
Array version of:GetPhysicalDeviceSparseImageFormatProperties
-
vkCreateFence
public static int vkCreateFence(VkDevice device, VkFenceCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pFence)
Array version of:CreateFence
-
vkResetFences
public static int vkResetFences(VkDevice device, long[] pFences)
Array version of:ResetFences
-
vkWaitForFences
public static int vkWaitForFences(VkDevice device, long[] pFences, boolean waitAll, long timeout)
Array version of:WaitForFences
-
vkCreateSemaphore
public static int vkCreateSemaphore(VkDevice device, VkSemaphoreCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pSemaphore)
Array version of:CreateSemaphore
-
vkCreateEvent
public static int vkCreateEvent(VkDevice device, VkEventCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pEvent)
Array version of:CreateEvent
-
vkCreateQueryPool
public static int vkCreateQueryPool(VkDevice device, VkQueryPoolCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pQueryPool)
Array version of:CreateQueryPool
-
vkGetQueryPoolResults
public static int vkGetQueryPoolResults(VkDevice device, long queryPool, int firstQuery, int queryCount, int[] pData, long stride, int flags) public static int vkGetQueryPoolResults(VkDevice device, long queryPool, int firstQuery, int queryCount, long[] pData, long stride, int flags)
Array version of:GetQueryPoolResults
-
vkCreateBuffer
public static int vkCreateBuffer(VkDevice device, VkBufferCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pBuffer)
Array version of:CreateBuffer
-
vkCreateBufferView
public static int vkCreateBufferView(VkDevice device, VkBufferViewCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pView)
Array version of:CreateBufferView
-
vkCreateImage
public static int vkCreateImage(VkDevice device, VkImageCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pImage)
Array version of:CreateImage
-
vkCreateImageView
public static int vkCreateImageView(VkDevice device, VkImageViewCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pView)
Array version of:CreateImageView
-
vkCreateShaderModule
public static int vkCreateShaderModule(VkDevice device, VkShaderModuleCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pShaderModule)
Array version of:CreateShaderModule
-
vkCreatePipelineCache
public static int vkCreatePipelineCache(VkDevice device, VkPipelineCacheCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pPipelineCache)
Array version of:CreatePipelineCache
-
vkMergePipelineCaches
public static int vkMergePipelineCaches(VkDevice device, long dstCache, long[] pSrcCaches)
Array version of:MergePipelineCaches
-
vkCreateGraphicsPipelines
public static int vkCreateGraphicsPipelines(VkDevice device, long pipelineCache, VkGraphicsPipelineCreateInfo.Buffer pCreateInfos, @Nullable VkAllocationCallbacks pAllocator, long[] pPipelines)
Array version of:CreateGraphicsPipelines
-
vkCreateComputePipelines
public static int vkCreateComputePipelines(VkDevice device, long pipelineCache, VkComputePipelineCreateInfo.Buffer pCreateInfos, @Nullable VkAllocationCallbacks pAllocator, long[] pPipelines)
Array version of:CreateComputePipelines
-
vkCreatePipelineLayout
public static int vkCreatePipelineLayout(VkDevice device, VkPipelineLayoutCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pPipelineLayout)
Array version of:CreatePipelineLayout
-
vkCreateSampler
public static int vkCreateSampler(VkDevice device, VkSamplerCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pSampler)
Array version of:CreateSampler
-
vkCreateDescriptorSetLayout
public static int vkCreateDescriptorSetLayout(VkDevice device, VkDescriptorSetLayoutCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pSetLayout)
Array version of:CreateDescriptorSetLayout
-
vkCreateDescriptorPool
public static int vkCreateDescriptorPool(VkDevice device, VkDescriptorPoolCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pDescriptorPool)
Array version of:CreateDescriptorPool
-
vkAllocateDescriptorSets
public static int vkAllocateDescriptorSets(VkDevice device, VkDescriptorSetAllocateInfo pAllocateInfo, long[] pDescriptorSets)
Array version of:AllocateDescriptorSets
-
vkFreeDescriptorSets
public static int vkFreeDescriptorSets(VkDevice device, long descriptorPool, long[] pDescriptorSets)
Array version of:FreeDescriptorSets
-
vkCreateFramebuffer
public static int vkCreateFramebuffer(VkDevice device, VkFramebufferCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pFramebuffer)
Array version of:CreateFramebuffer
-
vkCreateRenderPass
public static int vkCreateRenderPass(VkDevice device, VkRenderPassCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pRenderPass)
Array version of:CreateRenderPass
-
vkCreateCommandPool
public static int vkCreateCommandPool(VkDevice device, VkCommandPoolCreateInfo pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pCommandPool)
Array version of:CreateCommandPool
-
vkCmdSetBlendConstants
public static void vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, float[] blendConstants)
Array version of:CmdSetBlendConstants
-
vkCmdBindDescriptorSets
public static void vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, int pipelineBindPoint, long layout, int firstSet, long[] pDescriptorSets, @Nullable int[] pDynamicOffsets)
Array version of:CmdBindDescriptorSets
-
vkCmdBindVertexBuffers
public static void vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, int firstBinding, long[] pBuffers, long[] pOffsets)
Array version of:CmdBindVertexBuffers
-
vkCmdUpdateBuffer
public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, short[] pData) public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, int[] pData) public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, long[] pData) public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, float[] pData) public static void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, long dstBuffer, long dstOffset, double[] pData)
Array version of:CmdUpdateBuffer
-
vkCmdWaitEvents
public static void vkCmdWaitEvents(VkCommandBuffer commandBuffer, long[] pEvents, int srcStageMask, int dstStageMask, @Nullable VkMemoryBarrier.Buffer pMemoryBarriers, @Nullable VkBufferMemoryBarrier.Buffer pBufferMemoryBarriers, @Nullable VkImageMemoryBarrier.Buffer pImageMemoryBarriers)
Array version of:CmdWaitEvents
-
vkCmdPushConstants
public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, short[] pValues) public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, int[] pValues) public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, long[] pValues) public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, float[] pValues) public static void vkCmdPushConstants(VkCommandBuffer commandBuffer, long layout, int stageFlags, int offset, double[] pValues)
Array version of:CmdPushConstants
-
-