Class EXTTransformFeedback
- java.lang.Object
-
- org.lwjgl.vulkan.EXTTransformFeedback
-
public class EXTTransformFeedback extends java.lang.ObjectThis extension adds transform feedback to the Vulkan API by exposing the SPIR-VTransformFeedbackandGeometryStreamscapabilities to capture vertex, tessellation or geometry shader outputs to one or more buffers. It adds API functionality to bind transform feedback buffers to capture the primitives emitted by the graphics pipeline from SPIR-V outputs decorated for transform feedback. The transform feedback capture can be paused and resumed by way of storing and retrieving a byte counter. The captured data can be drawn again where the vertex count is derived from the byte counter without CPU intervention. If the implementation is capable, a vertex stream other than zero can be rasterized.All these features are designed to match the full capabilities of OpenGL core transform feedback functionality and beyond. Many of the features are optional to allow base OpenGL ES GPUs to also implement this extension.
The primary purpose of the functionality exposed by this extension is to support translation layers from other 3D APIs. This functionality is not considered forward looking, and is not expected to be promoted to a KHR extension or to core Vulkan. Unless this is needed for translation, it is recommended that developers use alternative techniques of using the GPU to process and capture vertex data.
VK_EXT_transform_feedback
- Name String
VK_EXT_transform_feedback- Extension Type
- Device extension
- Registered Extension Number
- 29
- Revision
- 1
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Requires
VK_KHR_get_physical_device_properties2
- Special Uses
- Contact
- Piers Daniell pdaniell-nv
Other Extension Metadata
- Last Modified Date
- 2018-10-09
- Contributors
- Baldur Karlsson, Valve
- Boris Zanin, Mobica
- Daniel Rakos, AMD
- Donald Scorgie, Imagination
- Henri Verbeet, CodeWeavers
- Jan-Harald Fredriksen, Arm
- Jason Ekstrand, Intel
- Jeff Bolz, NVIDIA
- Jesse Barker, Unity
- Jesse Hall, Google
- Pierre-Loup Griffais, Valve
- Philip Rebohle, DXVK
- Ruihao Zhang, Qualcomm
- Samuel Pitoiset, Valve
- Slawomir Grajewski, Intel
- Stu Smith, Imagination Technologies
-
-
Field Summary
Fields Modifier and Type Field Description static intVK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT
VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT
VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXTExtendsVkAccessFlagBits.static intVK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT
VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXTExtendsVkBufferUsageFlagBits.static java.lang.StringVK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAMEThe extension name.static intVK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSIONThe extension specification version.static intVK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXTExtendsVkPipelineStageFlagBits.static intVK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXTExtendsVkQueryType.static intVK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXTExtendsVkStructureType.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidnvkCmdBeginTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstCounterBuffer, int counterBufferCount, long pCounterBuffers, long pCounterBufferOffsets)Unsafe version of:CmdBeginTransformFeedbackEXTstatic voidnvkCmdBindTransformFeedbackBuffersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstBinding, int bindingCount, long pBuffers, long pOffsets, long pSizes)Unsafe version of:CmdBindTransformFeedbackBuffersEXTstatic voidnvkCmdEndTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstCounterBuffer, int counterBufferCount, long pCounterBuffers, long pCounterBufferOffsets)Unsafe version of:CmdEndTransformFeedbackEXTstatic voidvkCmdBeginQueryIndexedEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long queryPool, int query, int flags, int index)Begin an indexed query.static voidvkCmdBeginTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstCounterBuffer, long[] pCounterBuffers, long[] pCounterBufferOffsets)Array version of:CmdBeginTransformFeedbackEXTstatic voidvkCmdBeginTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstCounterBuffer, java.nio.LongBuffer pCounterBuffers, java.nio.LongBuffer pCounterBufferOffsets)Make transform feedback active in the command buffer.static voidvkCmdBindTransformFeedbackBuffersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstBinding, long[] pBuffers, long[] pOffsets, long[] pSizes)Array version of:CmdBindTransformFeedbackBuffersEXTstatic voidvkCmdBindTransformFeedbackBuffersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstBinding, java.nio.LongBuffer pBuffers, java.nio.LongBuffer pOffsets, java.nio.LongBuffer pSizes)Bind transform feedback buffers to a command buffer.static voidvkCmdDrawIndirectByteCountEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int instanceCount, int firstInstance, long counterBuffer, long counterBufferOffset, int counterOffset, int vertexStride)Draw primitives with indirect parameters where the vertex count is derived from the counter byte value in the counter buffer.static voidvkCmdEndQueryIndexedEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long queryPool, int query, int index)Ends a query.static voidvkCmdEndTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstCounterBuffer, long[] pCounterBuffers, long[] pCounterBufferOffsets)Array version of:CmdEndTransformFeedbackEXTstatic voidvkCmdEndTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstCounterBuffer, java.nio.LongBuffer pCounterBuffers, java.nio.LongBuffer pCounterBufferOffsets)Make transform feedback inactive in the command buffer.
-
-
-
Field Detail
-
VK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSION
The extension specification version.
-
VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME
The extension name.
-
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT
-
VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT
ExtendsVkQueryType.
-
VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT, VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT
ExtendsVkBufferUsageFlagBits.Enum values:
-
VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT, VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT, VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT
ExtendsVkAccessFlagBits.Enum values:
-
VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT
ExtendsVkPipelineStageFlagBits.
-
-
Method Detail
-
nvkCmdBindTransformFeedbackBuffersEXT
public static void nvkCmdBindTransformFeedbackBuffersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstBinding, int bindingCount, long pBuffers, long pOffsets, long pSizes)Unsafe version of:CmdBindTransformFeedbackBuffersEXT- Parameters:
bindingCount- the number of transform feedback bindings whose state is updated by the command.
-
vkCmdBindTransformFeedbackBuffersEXT
public static void vkCmdBindTransformFeedbackBuffersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstBinding, java.nio.LongBuffer pBuffers, java.nio.LongBuffer pOffsets, @Nullable java.nio.LongBuffer pSizes)Bind transform feedback buffers to a command buffer.C Specification
To bind transform feedback buffers to a command buffer for use in subsequent drawing commands, call:
void vkCmdBindTransformFeedbackBuffersEXT( VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets, const VkDeviceSize* pSizes);Description
The values taken from elements
iofpBuffers,pOffsetsandpSizesreplace the current state for the transform feedback bindingfirstBinding + i, foriin[0, bindingCount). The transform feedback binding is updated to start at the offset indicated bypOffsets[i] from the start of the bufferpBuffers[i].Valid Usage
VkPhysicalDeviceTransformFeedbackFeaturesEXT::transformFeedbackmust be enabledfirstBindingmust be less thanVkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBuffers- The sum of
firstBindingandbindingCountmust be less than or equal toVkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBuffers - All elements of
pOffsetsmust be less than the size of the corresponding element inpBuffers - All elements of
pOffsetsmust be a multiple of 4 - All elements of
pBuffersmust have been created with theBUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXTflag - If the optional
pSizearray is specified, each element ofpSizesmust either beWHOLE_SIZE, or be less than or equal toVkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBufferSize - All elements of
pSizesmust be eitherWHOLE_SIZE, or less than or equal to the size of the corresponding buffer inpBuffers - All elements of
pOffsetspluspSizes, where thepSizes, element is notWHOLE_SIZE, must be less than or equal to the size of the corresponding buffer inpBuffers - Each element of
pBuffersthat is non-sparse must be bound completely and contiguously to a singleVkDeviceMemoryobject - Transform feedback must not be active when the
vkCmdBindTransformFeedbackBuffersEXTcommand is recorded
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepBuffersmust be a valid pointer to an array ofbindingCountvalidVkBufferhandlespOffsetsmust be a valid pointer to an array ofbindingCountVkDeviceSizevaluescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations bindingCountmust be greater than 0- Both of
commandBuffer, and the elements ofpBuffersmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Primary Secondary Both Graphics - Parameters:
commandBuffer- the command buffer into which the command is recorded.firstBinding- the index of the first transform feedback 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.pSizes-NULLor a pointer to an array ofVkDeviceSizebuffer sizes, specifying the maximum number of bytes to capture to the corresponding transform feedback buffer. IfpSizesisNULL, or the value of thepSizesarray element isWHOLE_SIZE, then the maximum number of bytes captured will be the size of the corresponding buffer minus the buffer offset.
-
nvkCmdBeginTransformFeedbackEXT
public static void nvkCmdBeginTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstCounterBuffer, int counterBufferCount, long pCounterBuffers, long pCounterBufferOffsets)Unsafe version of:CmdBeginTransformFeedbackEXT- Parameters:
counterBufferCount- the size of thepCounterBuffersandpCounterBufferOffsetsarrays.
-
vkCmdBeginTransformFeedbackEXT
public static void vkCmdBeginTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstCounterBuffer, @Nullable java.nio.LongBuffer pCounterBuffers, @Nullable java.nio.LongBuffer pCounterBufferOffsets)Make transform feedback active in the command buffer.C Specification
Transform feedback for specific transform feedback buffers is made active by calling:
void vkCmdBeginTransformFeedbackEXT( VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets);Description
The active transform feedback buffers will capture primitives emitted from the corresponding
XfbBufferin the bound graphics pipeline. AnyXfbBufferemitted that does not output to an active transform feedback buffer will not be captured.Valid Usage
VkPhysicalDeviceTransformFeedbackFeaturesEXT::transformFeedbackmust be enabled- Transform feedback must not be active
firstCounterBuffermust be less thanVkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBuffers- The sum of
firstCounterBufferandcounterBufferCountmust be less than or equal toVkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBuffers - If
counterBufferCountis not 0, andpCounterBuffersis notNULL,pCounterBuffersmust be a valid pointer to an array ofcounterBufferCountVkBufferhandles that are either valid orNULL_HANDLE - For each buffer handle in the array, if it is not
NULL_HANDLEit must reference a buffer large enough to hold 4 bytes at the corresponding offset from thepCounterBufferOffsetsarray - If
pCounterBufferisNULL, thenpCounterBufferOffsetsmust also beNULL - For each buffer handle in the
pCounterBuffersarray that is notNULL_HANDLEit must have been created with ausagevalue containingBUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT - A valid graphics pipeline must be bound to
PIPELINE_BIND_POINT_GRAPHICS - The last pre-rasterization shader stage of the bound graphics pipeline must have been declared with the
Xfbexecution mode - Transform feedback must not be made active in a render pass instance with multiview enabled
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle- If
counterBufferCountis not 0, andpCounterBufferOffsetsis notNULL,pCounterBufferOffsetsmust be a valid pointer to an array ofcounterBufferCountVkDeviceSizevalues commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
- Both of
commandBuffer, and the elements ofpCounterBuffersthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Primary Secondary Inside Graphics - Parameters:
commandBuffer- the command buffer into which the command is recorded.firstCounterBuffer- the index of the first transform feedback buffer corresponding topCounterBuffers[0] andpCounterBufferOffsets[0].pCounterBuffers-NULLor a pointer to an array ofVkBufferhandles to counter buffers. Each buffer contains a 4 byte integer value representing the byte offset from the start of the corresponding transform feedback buffer from where to start capturing vertex data. If the byte offset stored to the counter buffer location was done usingCmdEndTransformFeedbackEXTit can be used to resume transform feedback from the previous location. IfpCounterBuffersisNULL, then transform feedback will start capturing vertex data to byte offset zero in all bound transform feedback buffers. For each element ofpCounterBuffersthat isNULL_HANDLE, transform feedback will start capturing vertex data to byte zero in the corresponding bound transform feedback buffer.pCounterBufferOffsets-NULLor a pointer to an array ofVkDeviceSizevalues specifying offsets within each of thepCounterBufferswhere the counter values were previously written. The location in each counter buffer at these offsets must be large enough to contain 4 bytes of data. This data is the number of bytes captured by the previous transform feedback to this buffer. IfpCounterBufferOffsetsisNULL, then it is assumed the offsets are zero.
-
nvkCmdEndTransformFeedbackEXT
public static void nvkCmdEndTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstCounterBuffer, int counterBufferCount, long pCounterBuffers, long pCounterBufferOffsets)Unsafe version of:CmdEndTransformFeedbackEXT- Parameters:
counterBufferCount- the size of thepCounterBuffersandpCounterBufferOffsetsarrays.
-
vkCmdEndTransformFeedbackEXT
public static void vkCmdEndTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstCounterBuffer, @Nullable java.nio.LongBuffer pCounterBuffers, @Nullable java.nio.LongBuffer pCounterBufferOffsets)Make transform feedback inactive in the command buffer.C Specification
Transform feedback for specific transform feedback buffers is made inactive by calling:
void vkCmdEndTransformFeedbackEXT( VkCommandBuffer commandBuffer, uint32_t firstCounterBuffer, uint32_t counterBufferCount, const VkBuffer* pCounterBuffers, const VkDeviceSize* pCounterBufferOffsets);Valid Usage
VkPhysicalDeviceTransformFeedbackFeaturesEXT::transformFeedbackmust be enabled- Transform feedback must be active
firstCounterBuffermust be less thanVkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBuffers- The sum of
firstCounterBufferandcounterBufferCountmust be less than or equal toVkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBuffers - If
counterBufferCountis not 0, andpCounterBuffersis notNULL,pCounterBuffersmust be a valid pointer to an array ofcounterBufferCountVkBufferhandles that are either valid orNULL_HANDLE - For each buffer handle in the array, if it is not
NULL_HANDLEit must reference a buffer large enough to hold 4 bytes at the corresponding offset from thepCounterBufferOffsetsarray - If
pCounterBufferisNULL, thenpCounterBufferOffsetsmust also beNULL - For each buffer handle in the
pCounterBuffersarray that is notNULL_HANDLEit must have been created with ausagevalue containingBUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandle- If
counterBufferCountis not 0, andpCounterBufferOffsetsis notNULL,pCounterBufferOffsetsmust be a valid pointer to an array ofcounterBufferCountVkDeviceSizevalues commandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
- Both of
commandBuffer, and the elements ofpCounterBuffersthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Primary Secondary Inside Graphics - Parameters:
commandBuffer- the command buffer into which the command is recorded.firstCounterBuffer- the index of the first transform feedback buffer corresponding topCounterBuffers[0] andpCounterBufferOffsets[0].pCounterBuffers-NULLor a pointer to an array ofVkBufferhandles to counter buffers. The counter buffers are used to record the current byte positions of each transform feedback buffer where the next vertex output data would be captured. This can be used by a subsequentCmdBeginTransformFeedbackEXTcall to resume transform feedback capture from this position. It can also be used byCmdDrawIndirectByteCountEXTto determine the vertex count of the draw call.pCounterBufferOffsets-NULLor a pointer to an array ofVkDeviceSizevalues specifying offsets within each of thepCounterBufferswhere the counter values can be written. The location in each counter buffer at these offsets must be large enough to contain 4 bytes of data. The data stored at this location is the byte offset from the start of the transform feedback buffer binding where the next vertex data would be written. IfpCounterBufferOffsetsisNULL, then it is assumed the offsets are zero.
-
vkCmdBeginQueryIndexedEXT
public static void vkCmdBeginQueryIndexedEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long queryPool, int query, int flags, int index)Begin an indexed query.C Specification
To begin an indexed query, call:
void vkCmdBeginQueryIndexedEXT( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags, uint32_t index);Description
The
vkCmdBeginQueryIndexedEXTcommand operates the same as theCmdBeginQuerycommand, except that it also accepts a query type specificindexparameter.Valid Usage
- All queries used by the command must be unavailable
- The
queryTypeused to createqueryPoolmust not beQUERY_TYPE_TIMESTAMP - The
queryTypeused to createqueryPoolmust not beQUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHRorQUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR - The
queryTypeused to createqueryPoolmust not beQUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV - If the precise occlusion queries feature is not enabled, or the
queryTypeused to createqueryPoolwas notQUERY_TYPE_OCCLUSION,flagsmust not containQUERY_CONTROL_PRECISE_BIT querymust be less than the number of queries inqueryPool- If the
queryTypeused to createqueryPoolwasQUERY_TYPE_OCCLUSION, theVkCommandPoolthatcommandBufferwas allocated from must support graphics operations - If the
queryTypeused to createqueryPoolwasQUERY_TYPE_PIPELINE_STATISTICSand any of thepipelineStatisticsindicate graphics operations, theVkCommandPoolthatcommandBufferwas allocated from must support graphics operations - If the
queryTypeused to createqueryPoolwasQUERY_TYPE_PIPELINE_STATISTICSand any of thepipelineStatisticsindicate compute operations, theVkCommandPoolthatcommandBufferwas allocated from must support compute operations commandBuffermust not be a protected command buffer- If called within a render pass instance, the sum of
queryand 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
queryTypeused to createqueryPoolwasQUERY_TYPE_VIDEO_ENCODE_BITSTREAM_BUFFER_RANGE_KHRtheVkCommandPoolthatcommandBufferwas allocated from must support video encode operations - If the
queryPoolwas created with the samequeryTypeas that of another active query withincommandBuffer, thenindexmust not match the index used for the active query - If the
queryTypeused to createqueryPoolwasQUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXTtheVkCommandPoolthatcommandBufferwas allocated from must support graphics operations - If the
queryTypeused to createqueryPoolwasQUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXTtheindexparameter must be less thanVkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackStreams - If the
queryTypeused to createqueryPoolwas notQUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXTtheindexmust be zero - If the
queryTypeused to createqueryPoolwasQUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXTthenVkPhysicalDeviceTransformFeedbackPropertiesEXT::transformFeedbackQueriesmust be supported
- If
queryPoolwas created with aqueryTypeofQUERY_TYPE_PERFORMANCE_QUERY_KHR, the profiling lock must have been held beforeBeginCommandBufferwas called oncommandBuffer - If
queryPoolwas created with aqueryTypeofQUERY_TYPE_PERFORMANCE_QUERY_KHRand one of the counters used to createqueryPoolwasPERFORMANCE_COUNTER_SCOPE_COMMAND_BUFFER_KHR, the query begin must be the first recorded command incommandBuffer - If
queryPoolwas created with aqueryTypeofQUERY_TYPE_PERFORMANCE_QUERY_KHRand one of the counters used to createqueryPoolwasPERFORMANCE_COUNTER_SCOPE_RENDER_PASS_KHR, the begin command must not be recorded within a render pass instance - If
queryPoolwas created with aqueryTypeofQUERY_TYPE_PERFORMANCE_QUERY_KHRand another query pool with aqueryTypeQUERY_TYPE_PERFORMANCE_QUERY_KHRhas been used withincommandBuffer, its parent primary command buffer or secondary command buffer recorded within the same parent primary command buffer ascommandBuffer, theperformanceCounterMultipleQueryPoolsfeature must be enabled - If
queryPoolwas created with aqueryTypeofQUERY_TYPE_PERFORMANCE_QUERY_KHR, this command must not be recorded in a command buffer that, either directly or through secondary command buffers, also contains avkCmdResetQueryPoolcommand affecting the same query
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlequeryPoolmust be a validVkQueryPoolhandleflagsmust be a valid combination ofVkQueryControlFlagBitsvaluescommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations - Both of
commandBuffer, andqueryPoolmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types 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 ofVkQueryControlFlagBitsspecifying constraints on the types of queries that can be performed.index- the query type specific index. When the query type isQUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXTthe index represents the vertex stream.
-
vkCmdEndQueryIndexedEXT
public static void vkCmdEndQueryIndexedEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, long queryPool, int query, int index)Ends a query.C Specification
To end an indexed query after the set of desired drawing or dispatching commands is recorded, call:
void vkCmdEndQueryIndexedEXT( VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, uint32_t index);Description
The
vkCmdEndQueryIndexedEXTcommand operates the same as theCmdEndQuerycommand, except that it also accepts a query type specificindexparameter.Valid Usage
- All queries used by the command must be active
querymust be less than the number of queries inqueryPoolcommandBuffermust not be a protected command buffer- If
vkCmdEndQueryIndexedEXTis called within a render pass instance, the sum ofqueryand 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
queryTypeused to createqueryPoolwasQUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXTtheindexparameter must be less thanVkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackStreams - If the
queryTypeused to createqueryPoolwas notQUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXTtheindexmust be zero - If the
queryTypeused to createqueryPoolwasQUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXTindexmust equal theindexused to begin the query
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlequeryPoolmust be a validVkQueryPoolhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations - Both of
commandBuffer, andqueryPoolmust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types 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.index- the query type specific index.
-
vkCmdDrawIndirectByteCountEXT
public static void vkCmdDrawIndirectByteCountEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int instanceCount, int firstInstance, long counterBuffer, long counterBufferOffset, int counterOffset, int vertexStride)Draw primitives with indirect parameters where the vertex count is derived from the counter byte value in the counter buffer.C Specification
To record a non-indexed draw call, where the vertex count is based on a byte count read from a buffer and the passed in vertex stride parameter, call:
void vkCmdDrawIndirectByteCountEXT( VkCommandBuffer commandBuffer, uint32_t instanceCount, uint32_t firstInstance, VkBuffer counterBuffer, VkDeviceSize counterBufferOffset, uint32_t counterOffset, uint32_t vertexStride);Description
When the command is executed, primitives are assembled in the same way as done with
CmdDrawexcept thevertexCountis calculated based on the byte count read fromcounterBufferat offsetcounterBufferOffset. The assembled primitives execute the bound graphics pipeline.The effective
vertexCountis calculated as follows:const uint32_t * counterBufferPtr = (const uint8_t *)counterBuffer.address + counterBufferOffset; vertexCount = floor(max(0, (*counterBufferPtr - counterOffset)) / vertexStride);The effective
firstVertexis zero.Valid Usage
- If a
VkSamplercreated withmagFilterorminFilterequal toFILTER_LINEARandcompareEnableequal toFALSEis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
VkSamplercreated withmipmapModeequal toSAMPLER_MIPMAP_MODE_LINEARandcompareEnableequal toFALSEis used to sample aVkImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT - If a
VkImageViewis sampled with depth comparison, the image view’s format features must containFORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT - If a
VkImageViewis 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
VkImageViewis sampled withFILTER_CUBIC_EXTas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT - Any
VkImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must have aVkImageViewTypeand format that supports cubic filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned byvkGetPhysicalDeviceImageFormatProperties2 - Any
VkImageViewbeing sampled withFILTER_CUBIC_EXTwith a reduction mode of eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXas a result of this command must have aVkImageViewTypeand format that supports cubic filtering together with minmax filtering, as specified byVkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned byvkGetPhysicalDeviceImageFormatProperties2 - Any
VkImagecreated with aVkImageCreateInfo::flagscontainingIMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using aVkSamplerAddressModeofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE - Any
VkImageVieworVkBufferViewbeing written as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containFORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT - Any
VkImageVieworVkBufferViewbeing read as a storage image or storage texel buffer where the image format field of theOpTypeImageisUnknownthen the view’s format feature must containFORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT - For each set n that is statically used by the
VkPipelinebound 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 aVkPipelineLayoutthat is compatible for set n, with theVkPipelineLayoutused to create the currentVkPipeline, as described in Pipeline Layout Compatibility - If the
maintenance4feature is not enabled, then for each push constant that is statically used by theVkPipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aVkPipelineLayoutthat is compatible for push constants, with theVkPipelineLayoutused 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 theVkPipelinebound 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
VkPipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set or inherited (if theVK_NV_inherited_viewport_scissorextension is enabled) forcommandBuffer, and done so after any previously bound pipeline with the corresponding state not specified as dynamic - There must not have been any calls to dynamic state setting commands for any state not specified as dynamic in the
VkPipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyVkImagewith aVkImageViewof the typeIMAGE_VIEW_TYPE_3D,IMAGE_VIEW_TYPE_CUBE,IMAGE_VIEW_TYPE_1D_ARRAY,IMAGE_VIEW_TYPE_2D_ARRAYorIMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stage - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-VOpImageSample*orOpImageSparseSample*instructions withImplicitLod,DreforProjin their name, in any shader stage - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerobject 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
VkPipelineobject 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
VkPipelineobject 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
commandBufferis an unprotected command buffer andprotectedNoFaultis not supported, any resource accessed by theVkPipelineobject bound to the pipeline bind point used by this command must not be a protected resource - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must only be used withOpImageSample*orOpImageSparseSample*instructions - If the
VkPipelineobject bound to the pipeline bind point used by this command accesses aVkSamplerorVkImageViewobject that enables sampler Y′CBCR conversion, that object must not use theConstOffsetandOffsetoperands - If a
VkImageViewis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the image view’s format - If a
VkBufferViewis accessed usingOpImageWriteas a result of this command, then theTypeof theTexeloperand of that instruction must have at least as many components as the buffer view’s format - If a
VkImageViewwith aVkFormatthat has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 - If a
VkImageViewwith aVkFormatthat has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 - If a
VkBufferViewwith aVkFormatthat has a 64-bit component width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64 - If a
VkBufferViewwith aVkFormatthat has a component width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32 - If the
sparseImageInt64Atomicsfeature is not enabled,VkImageobjects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - If the
sparseImageInt64Atomicsfeature is not enabled,VkBufferobjects created with theBUFFER_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command - The current render pass must be compatible with the
renderPassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toPIPELINE_BIND_POINT_GRAPHICS - The subpass index of the current render pass must be equal to the
subpassmember of theVkGraphicsPipelineCreateInfostructure specified when creating theVkPipelinebound toPIPELINE_BIND_POINT_GRAPHICS - Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
- Memory backing image subresources used as attachments in the current render pass must not be written in any way other than as an attachment by this command
- If any recorded command in the current subpass will write to an image subresource as an attachment, this command must not read from the memory backing that image subresource in any other way than as an attachment
- If any recorded command in the current subpass will read from an image subresource used as an attachment in any way other than as an attachment, this command must not write to that image subresource as an attachment
- 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::sampleLocationsEnableset toTRUEand the current subpass has a depth/stencil attachment, then that attachment must have been created with theIMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTbit set - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, thenCmdSetViewportWithCountmust have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match theVkPipelineViewportStateCreateInfo::scissorCountof the pipeline - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_SCISSOR_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, thenCmdSetScissorWithCountmust have been called in the current command buffer prior to this drawing command, and thescissorCountparameter ofvkCmdSetScissorWithCountmust match theVkPipelineViewportStateCreateInfo::viewportCountof the pipeline - If the bound graphics pipeline state was created with both the
DYNAMIC_STATE_SCISSOR_WITH_COUNTandDYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic states enabled then bothCmdSetViewportWithCountandCmdSetScissorWithCountmust have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust match thescissorCountparameter ofvkCmdSetScissorWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created withVkPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTandDYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic states enabled then theviewportCountparameter in the last call toCmdSetViewportWScalingNVmust be greater than or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created withVkPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTandDYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic states enabled then theviewportCountparameter in the last call toCmdSetViewportShadingRatePaletteNVmust be greater than or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and aVkPipelineViewportSwizzleStateCreateInfoNVstructure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created withVkPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled and aVkPipelineViewportExclusiveScissorStateCreateInfoNVstructure chained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created withVkPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call toCmdSetViewportWithCount - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLEdynamic state enabled thenCmdSetRasterizerDiscardEnablemust have been called in the current command buffer prior to this drawing command - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_DEPTH_BIAS_ENABLEdynamic state enabled thenCmdSetDepthBiasEnablemust have been called in the current command buffer prior to this drawing command - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_LOGIC_OP_EXTdynamic state enabled thenCmdSetLogicOpEXTmust have been called in the current command buffer prior to this drawing command and thelogicOpmust be a validVkLogicOpvalue - If the
primitiveFragmentShadingRateWithMultipleViewportslimit is not supported, the bound graphics pipeline was created with theDYNAMIC_STATE_VIEWPORT_WITH_COUNTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, thenCmdSetViewportWithCountmust have been called in the current command buffer prior to this drawing command, and theviewportCountparameter ofvkCmdSetViewportWithCountmust be 1 - If rasterization is not disabled in the bound graphics pipeline, then for each color attachment in the subpass, if the corresponding image view’s format features do not contain
FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT, then theblendEnablemember of the corresponding element of thepAttachmentsmember ofpColorBlendStatemust beFALSE - If rasterization is not disabled in the bound graphics pipeline, and neither the
VK_AMD_mixed_attachment_samplesnor theVK_NV_framebuffer_mixed_samplesextensions are enabled, thenVkPipelineMultisampleStateCreateInfo::rasterizationSamplesmust be the same as the current subpass color and/or depth/stencil attachments - If the current render pass instance was begun with
CmdBeginRendering, theimageViewmember ofpDepthAttachmentis notNULL_HANDLE, and thelayoutmember ofpDepthAttachmentisIMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment - If the current render pass instance was begun with
CmdBeginRendering, theimageViewmember ofpStencilAttachmentis notNULL_HANDLE, and thelayoutmember ofpStencilAttachmentisIMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment - If the current render pass instance was begun with
CmdBeginRendering, theimageViewmember ofpDepthAttachmentis notNULL_HANDLE, and thelayoutmember ofpDepthAttachmentisIMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, this command must not write any values to the depth attachment - If the current render pass instance was begun with
CmdBeginRendering, theimageViewmember ofpStencilAttachmentis notNULL_HANDLE, and thelayoutmember ofpStencilAttachmentisIMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment - If the current render pass instance was begun with
CmdBeginRendering, theimageViewmember ofpDepthAttachmentis notNULL_HANDLE, and thelayoutmember ofpDepthAttachmentisIMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, this command must not write any values to the depth attachment - If the current render pass instance was begun with
CmdBeginRendering, theimageViewmember ofpStencilAttachmentis notNULL_HANDLE, and thelayoutmember ofpStencilAttachmentisIMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL, this command must not write any values to the stencil attachment - If the current render pass instance was begun with
CmdBeginRendering, the currently bound graphics pipeline must have been created with aVkPipelineRenderingCreateInfo::viewMaskequal toVkRenderingInfo::viewMask - If the current render pass instance was begun with
CmdBeginRendering, the currently bound graphics pipeline must have been created with aVkPipelineRenderingCreateInfo::colorAttachmentCountequal toVkRenderingInfo::colorAttachmentCount - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingInfo::colorAttachmentCountgreater than 0, then each element of theVkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with aVkFormatequal to the corresponding element ofVkPipelineRenderingCreateInfo::pColorAttachmentFormatsused to create the currently bound graphics pipeline - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingInfo::pDepthAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineRenderingCreateInfo::depthAttachmentFormatused to create the currently bound graphics pipeline must be equal to theVkFormatused to createVkRenderingInfo::pDepthAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingInfo::pStencilAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineRenderingCreateInfo::stencilAttachmentFormatused to create the currently bound graphics pipeline must be equal to theVkFormatused to createVkRenderingInfo::pStencilAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingFragmentShadingRateAttachmentInfoKHR::imageViewwas notNULL_HANDLE, the currently bound graphics pipeline must have been created withPIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR - If the current render pass instance was begun with
CmdBeginRenderingandVkRenderingFragmentDensityMapAttachmentInfoEXT::imageViewwas notNULL_HANDLE, the currently bound graphics pipeline must have been created withPIPELINE_CREATE_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT - If the currently bound pipeline was created with a
VkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, and the current render pass instance was begun withCmdBeginRenderingwith aVkRenderingInfo::colorAttachmentCountparameter greater than 0, then each element of theVkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with a sample count equal to the corresponding element of thepColorAttachmentSamplesmember ofVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created with aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pDepthAttachment\u2192pname:imageView was notNULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember ofVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pDepthAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created with aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pStencilAttachment\u2192pname:imageView was notNULL_HANDLE, the value of thedepthStencilAttachmentSamplesmember ofVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pStencilAttachment\u2192pname:imageView - If the currently bound pipeline was created without a
VkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, and the current render pass instance was begun withCmdBeginRenderingwith aVkRenderingInfo::colorAttachmentCountparameter greater than 0, then each element of theVkRenderingInfo::pColorAttachmentsarray with aimageViewnot equal toNULL_HANDLEmust have been created with a sample count equal to the value ofVkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created without aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pDepthAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pDepthAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline was created without aVkAttachmentSampleCountInfoAMDorVkAttachmentSampleCountInfoNVstructure, andVkRenderingInfo::pStencilAttachment\u2192pname:imageView was notNULL_HANDLE, the value ofVkPipelineMultisampleStateCreateInfo::rasterizationSamplesused to create the currently bound graphics pipeline must be equal to the sample count used to createVkRenderingInfo::pStencilAttachment\u2192pname:imageView - If the current render pass instance was begun with
CmdBeginRendering, the currently bound pipeline must have been created with aVkGraphicsPipelineCreateInfo::renderPassequal toNULL_HANDLE
- All vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must have either valid or
NULL_HANDLEbuffers bound - If the nullDescriptor feature is not enabled, all vertex input bindings accessed via vertex input variables declared in the vertex shader entry point’s interface must not be
NULL_HANDLE - 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 the bound graphics pipeline state was created with the
DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXTdynamic state enabled thenCmdSetPrimitiveTopologyEXTmust have been called in the current command buffer prior to this drawing command, and theprimitiveTopologyparameter ofvkCmdSetPrimitiveTopologyEXTmust be of the same topology class as the pipelineVkPipelineInputAssemblyStateCreateInfo::topologystate - If the bound graphics pipeline was created with both the
DYNAMIC_STATE_VERTEX_INPUT_EXTandDYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic states enabled, thenCmdSetVertexInputEXTmust have been called in the current command buffer prior to this draw command - If the bound graphics pipeline was created with the
DYNAMIC_STATE_VERTEX_INPUT_BINDING_STRIDE_EXTdynamic state enabled, but not theDYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, thenCmdBindVertexBuffers2EXTmust have been called in the current command buffer prior to this draw command, and thepStridesparameter ofCmdBindVertexBuffers2EXTmust not beNULL - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, thenCmdSetVertexInputEXTmust have been called in the current command buffer prior to this draw command - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXTdynamic state enabled thenCmdSetPatchControlPointsEXTmust have been called in the current command buffer prior to this drawing command - If the bound graphics pipeline state was created with the
DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXTdynamic state enabled thenCmdSetPrimitiveRestartEnableEXTmust have been called in the current command buffer prior to this drawing command - The bound graphics pipeline must not have been created with the
VkPipelineShaderStageCreateInfo::stagemember of an element ofVkGraphicsPipelineCreateInfo::pStagesset toSHADER_STAGE_TASK_BIT_NVorSHADER_STAGE_MESH_BIT_NV VkPhysicalDeviceTransformFeedbackFeaturesEXT::transformFeedbackmust be enabled- The implementation must support
VkPhysicalDeviceTransformFeedbackPropertiesEXT::transformFeedbackDraw vertexStridemust be greater than 0 and less than or equal toVkPhysicalDeviceLimits::maxTransformFeedbackBufferDataStride- If
counterBufferis non-sparse then it must be bound completely and contiguously to a singleVkDeviceMemoryobject counterBuffermust have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BITbit setcounterBufferOffsetmust be a multiple of 4commandBuffermust not be a protected command buffer
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlecounterBuffermust be a validVkBufferhandlecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics operations - This command must only be called inside of a render pass instance
- Both of
commandBuffer, andcounterBuffermust have been created, allocated, or retrieved from the sameVkDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Primary Secondary Inside Graphics - Parameters:
commandBuffer- the command buffer into which the command is recorded.instanceCount- the number of instances to draw.firstInstance- the instance ID of the first instance to draw.counterBuffer- the buffer handle from where the byte count is read.counterBufferOffset- the offset into the buffer used to read the byte count, which is used to calculate the vertex count for this draw call.counterOffset- subtracted from the byte count read from thecounterBufferat thecounterBufferOffsetvertexStride- the stride in bytes between each element of the vertex data that is used to calculate the vertex count from the counter value. This value is typically the same value that was used in the graphics pipeline state when the transform feedback was captured as theXfbStride.
- If a
-
vkCmdBindTransformFeedbackBuffersEXT
public static void vkCmdBindTransformFeedbackBuffersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstBinding, long[] pBuffers, long[] pOffsets, @Nullable long[] pSizes)Array version of:CmdBindTransformFeedbackBuffersEXT
-
vkCmdBeginTransformFeedbackEXT
public static void vkCmdBeginTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstCounterBuffer, @Nullable long[] pCounterBuffers, @Nullable long[] pCounterBufferOffsets)Array version of:CmdBeginTransformFeedbackEXT
-
vkCmdEndTransformFeedbackEXT
public static void vkCmdEndTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer, int firstCounterBuffer, @Nullable long[] pCounterBuffers, @Nullable long[] pCounterBufferOffsets)Array version of:CmdEndTransformFeedbackEXT
-
-