C Specification
Transform feedback for specific transform feedback buffers is made active by calling:
// Provided by VK_EXT_transform_feedback
void vkCmdBeginTransformFeedbackEXT(
VkCommandBuffer commandBuffer,
uint32_t firstCounterBuffer,
uint32_t counterBufferCount,
const VkBuffer* pCounterBuffers,
const VkDeviceSize* pCounterBufferOffsets);
Parameters
-
commandBuffer
is the command buffer into which the command is recorded. -
firstCounterBuffer
is the index of the first transform feedback buffer corresponding topCounterBuffers
[0] andpCounterBufferOffsets
[0]. -
counterBufferCount
is the size of thepCounterBuffers
andpCounterBufferOffsets
arrays. -
pCounterBuffers
isNULL
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 vkCmdEndTransformFeedbackEXT it can be used to resume transform feedback from the previous location. IfpCounterBuffers
isNULL
, then transform feedback will start capturing vertex data to byte offset zero in all bound transform feedback buffers. For each element ofpCounterBuffers
that is VK_NULL_HANDLE, transform feedback will start capturing vertex data to byte zero in the corresponding bound transform feedback buffer. -
pCounterBufferOffsets
isNULL
or a pointer to an array of VkDeviceSize values specifying offsets within each of thepCounterBuffers
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. IfpCounterBufferOffsets
isNULL
, then it is assumed the offsets are zero.
Description
The active transform feedback buffers will capture primitives emitted from
the corresponding XfbBuffer
in the bound graphics pipeline.
Any XfbBuffer
emitted that does not output to an active transform
feedback buffer will not be captured.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.