Top Description Fields Constructors Methods
org.lwjgl.vulkan

public Class EXTTransformFeedback

extends Object
Class Inheritance
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

This extension adds transform feedback to the Vulkan API by exposing the SPIR-V 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_feedback
Name String
VK_EXT_transform_feedback
Extension Type
Device extension
Registered Extension Number
29
Revision
1
Extension and Version Dependencies
VK_KHR_get_physical_device_properties2
Special Uses
Contact
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
  • Faith 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

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final String
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 VkPipelineStageFlagBits.

public static final int
public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
nvkCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, int firstCounterBuffer, int
the size of the pCounterBuffers and pCounterBufferOffsets arrays.
counterBufferCount
,
long pCounterBuffers, long pCounterBufferOffsets)

Unsafe version of: CmdBeginTransformFeedbackEXT

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: CmdBindTransformFeedbackBuffersEXT

public static void
nvkCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, int firstCounterBuffer, int
the size of the pCounterBuffers and pCounterBufferOffsets arrays.
counterBufferCount
,
long pCounterBuffers, long pCounterBufferOffsets)

Unsafe version of: CmdEndTransformFeedbackEXT

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 VkQueryControlFlagBits specifying constraints on the types of queries that can be performed.
flags
,
int
the query type specific index. When the query type is QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT or QUERY_TYPE_PRIMITIVES_GENERATED_EXT, the index represents the vertex stream.
index
)

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 pCounterBuffers[0] and pCounterBufferOffsets[0].
firstCounterBuffer
,
LongBuffer
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.
pCounterBuffers
,
LongBuffer
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.
pCounterBufferOffsets
)

Make transform feedback active in the command buffer.

public static void
vkCmdBeginTransformFeedbackEXT(VkCommandBuffer commandBuffer, int firstCounterBuffer, long[] pCounterBuffers, long[] pCounterBufferOffsets)

Array version of: CmdBeginTransformFeedbackEXT

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.
pSizes
)

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: CmdBindTransformFeedbackBuffersEXT

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 counterBuffer at the counterBufferOffset
counterOffset
,
int
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 the XfbStride.
vertexStride
)

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 pCounterBuffers[0] and pCounterBufferOffsets[0].
firstCounterBuffer
,
LongBuffer
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.
pCounterBuffers
,
LongBuffer
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.
pCounterBufferOffsets
)

Make transform feedback inactive in the command buffer.

public static void
vkCmdEndTransformFeedbackEXT(VkCommandBuffer commandBuffer, int firstCounterBuffer, long[] pCounterBuffers, long[] pCounterBufferOffsets)

Array version of: CmdEndTransformFeedbackEXT

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait