TransformFeedback and GeometryStreams capabilities 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_feedbackVK_KHR_get_physical_device_properties2| Modifier and Type | Field and Description |
|---|---|
| public static final int | VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT
Extends |
| public static final int | VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT
Extends |
| public static final int | VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT
Extends |
| public static final int | VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT
Extends |
| public static final int | VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT
Extends |
| public static final String | VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME
The extension name. |
| public static final int | VK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSION
The extension specification version. |
| public static final int | VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT
Extends |
| public static final int | VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT
Extends |
| public static final int | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT
Extends |
| public static final int | VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT
Extends |
| public static final int | VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT
Extends |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static void | nvkCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, int firstCounterBuffer, int
the size of the counterBufferCount, long pCounterBuffers, long pCounterBufferOffsets)pCounterBuffers and pCounterBufferOffsets arrays.Unsafe version of: |
| public static void | nvkCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, int firstBinding, int
the number of transform feedback bindings whose state is updated by the command. bindingCount, long pBuffers, long pOffsets, long pSizes)Unsafe version of: |
| public static void | nvkCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, int firstCounterBuffer, int
the size of the counterBufferCount, long pCounterBuffers, long pCounterBufferOffsets)pCounterBuffers and pCounterBufferOffsets arrays.Unsafe version of: |
| public static void | vkCmdBeginQueryIndexedEXT(VkCommandBuffer
the command buffer into which this command will be recorded. commandBuffer, long the query pool that will manage the results of the query. queryPool, int the query index within the query pool that will contain the results. query, int a bitmask of flags, int VkQueryControlFlagBits specifying constraints on the types of queries that can be performed.the query type specific index. When the query type is index)QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT or QUERY_TYPE_PRIMITIVES_GENERATED_EXT, the index represents the vertex stream.Begin an indexed query. |
| public static void | vkCmdBeginTransformFeedbackEXT(VkCommandBuffer
the command buffer into which the command is recorded. commandBuffer, int the index of the first transform feedback buffer corresponding to firstCounterBuffer, LongBuffer pCounterBuffers[0] and pCounterBufferOffsets[0].NULL or a pointer to an array of VkBuffer handles 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 using CmdEndTransformFeedbackEXT it can be used to resume transform feedback from the previous location. If pCounterBuffers is NULL, then transform feedback will start capturing vertex data to byte offset zero in all bound transform feedback buffers. For each element of pCounterBuffers that is NULL_HANDLE, transform feedback will start capturing vertex data to byte zero in the corresponding bound transform feedback buffer.NULL or a pointer to an array of VkDeviceSize values specifying offsets within each of the pCounterBuffers where 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. If pCounterBufferOffsets is NULL, then it is assumed the offsets are zero.Make transform feedback active in the command buffer. |
| public static void | vkCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, int firstCounterBuffer, long[] pCounterBuffers, long[] pCounterBufferOffsets)
Array version of: |
| public static void | vkCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer
the command buffer into which the command is recorded. commandBuffer, int the index of the first transform feedback binding whose state is updated by the command. firstBinding, LongBuffer a pointer to an array of buffer handles. pBuffers, LongBuffer a pointer to an array of buffer offsets. pOffsets, LongBuffer NULL or a pointer to an array of VkDeviceSize buffer sizes, specifying the maximum number of bytes to capture to the corresponding transform feedback buffer. If pSizes is NULL, or the value of the pSizes array element is WHOLE_SIZE, then the maximum number of bytes captured will be the size of the corresponding buffer minus the buffer offset.Bind transform feedback buffers to a command buffer. |
| public static void | vkCmdBindTransformFeedbackBuffersEXT(VkCommandBuffer commandBuffer, int firstBinding, long[] pBuffers, long[] pOffsets, long[] pSizes)
Array version of: |
| public static void | vkCmdDrawIndirectByteCountEXT(VkCommandBuffer
the command buffer into which the command is recorded. commandBuffer, int the number of instances to draw. instanceCount, int the instance ID of the first instance to draw. firstInstance, long the buffer handle from where the byte count is read. counterBuffer, long the offset into the buffer used to read the byte count, which is used to calculate the vertex count for this draw call. counterBufferOffset, int subtracted from the byte count read from the counterOffset, int counterBuffer at the counterBufferOffsetthe 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 the vertexStride)XfbStride.Draw primitives with indirect parameters where the vertex count is derived from the counter byte value in the counter buffer. |
| public static void | vkCmdEndQueryIndexedEXT(VkCommandBuffer
the command buffer into which this command will be recorded. commandBuffer, long the query pool that is managing the results of the query. queryPool, int the query index within the query pool where the result is stored. query, int the query type specific index. index)Ends a query. |
| public static void | vkCmdEndTransformFeedbackEXT(VkCommandBuffer
the command buffer into which the command is recorded. commandBuffer, int the index of the first transform feedback buffer corresponding to firstCounterBuffer, LongBuffer pCounterBuffers[0] and pCounterBufferOffsets[0].NULL or a pointer to an array of VkBuffer handles 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 subsequent CmdBeginTransformFeedbackEXT call to resume transform feedback capture from this position. It can also be used by CmdDrawIndirectByteCountEXT to determine the vertex count of the draw call.NULL or a pointer to an array of VkDeviceSize values specifying offsets within each of the pCounterBuffers where 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. If pCounterBufferOffsets is NULL, then it is assumed the offsets are zero.Make transform feedback inactive in the command buffer. |
| public static void | vkCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, int firstCounterBuffer, long[] pCounterBuffers, long[] pCounterBufferOffsets)
Array version of: |