public class EXTTransformFeedback
extends java.lang.Object
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 | Method and Description |
|---|---|
static void |
nvkCmdBeginTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstCounterBuffer,
int counterBufferCount,
long pCounterBuffers,
long pCounterBufferOffsets)
Unsafe version of:
CmdBeginTransformFeedbackEXT |
static void |
nvkCmdBindTransformFeedbackBuffersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstBinding,
int bindingCount,
long pBuffers,
long pOffsets,
long pSizes)
Unsafe version of:
CmdBindTransformFeedbackBuffersEXT |
static void |
nvkCmdEndTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstCounterBuffer,
int counterBufferCount,
long pCounterBuffers,
long pCounterBufferOffsets)
Unsafe version of:
CmdEndTransformFeedbackEXT |
static void |
vkCmdBeginQueryIndexedEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long queryPool,
int query,
int flags,
int index)
Begin an indexed query.
|
static void |
vkCmdBeginTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstCounterBuffer,
long[] pCounterBuffers,
long[] pCounterBufferOffsets)
Array version of:
CmdBeginTransformFeedbackEXT |
static void |
vkCmdBeginTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstCounterBuffer,
java.nio.LongBuffer pCounterBuffers,
java.nio.LongBuffer pCounterBufferOffsets)
Make transform feedback active in the command buffer.
|
static void |
vkCmdBindTransformFeedbackBuffersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstBinding,
long[] pBuffers,
long[] pOffsets,
long[] pSizes)
Array version of:
CmdBindTransformFeedbackBuffersEXT |
static void |
vkCmdBindTransformFeedbackBuffersEXT(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 void |
vkCmdDrawIndirectByteCountEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int instanceCount,
int firstInstance,
long counterBuffer,
long counterBufferOffset,
int counterOffset,
int vertexStride)
Draw primitives where the vertex count is derived from the counter byte value in the counter buffer.
|
static void |
vkCmdEndQueryIndexedEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long queryPool,
int query,
int index)
Ends a query.
|
static void |
vkCmdEndTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstCounterBuffer,
long[] pCounterBuffers,
long[] pCounterBufferOffsets)
Array version of:
CmdEndTransformFeedbackEXT |
static void |
vkCmdEndTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstCounterBuffer,
java.nio.LongBuffer pCounterBuffers,
java.nio.LongBuffer pCounterBufferOffsets)
Make transform feedback inactive in the command buffer.
|
public static final int VK_EXT_TRANSFORM_FEEDBACK_SPEC_VERSION
public static final java.lang.String VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT
VkStructureType.
public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT
VkStructureType.
public static final int VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT
VkStructureType.
public static final int VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT
VkQueryType.public static final int VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT
VkBufferUsageFlagBits.
public static final int VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT
VkBufferUsageFlagBits.
public static final int VK_ACCESS_TRANSFORM_FEEDBACK_WRITE_BIT_EXT
VkAccessFlagBits.
public static final int VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT
VkAccessFlagBits.
public static final int VK_ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT
VkAccessFlagBits.
public static final int VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT
VkPipelineStageFlagBits.public static void nvkCmdBindTransformFeedbackBuffersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstBinding,
int bindingCount,
long pBuffers,
long pOffsets,
long pSizes)
CmdBindTransformFeedbackBuffersEXTbindingCount - the number of transform feedback bindings whose state is updated by the command.public static void vkCmdBindTransformFeedbackBuffersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstBinding,
java.nio.LongBuffer pBuffers,
java.nio.LongBuffer pOffsets,
@Nullable
java.nio.LongBuffer pSizes)
To bind transform feedback buffers to a command buffer for use in subsequent draw commands, call:
void vkCmdBindTransformFeedbackBuffersEXT(
VkCommandBuffer commandBuffer,
uint32_t firstBinding,
uint32_t bindingCount,
const VkBuffer* pBuffers,
const VkDeviceSize* pOffsets,
const VkDeviceSize* pSizes);
The values taken from elements i of pBuffers, pOffsets and pSizes replace the current state for the transform feedback binding firstBinding + i, for i in [0, bindingCount). The transform feedback binding is updated to start at the offset indicated by pOffsets[i] from the start of the buffer pBuffers[i].
VkPhysicalDeviceTransformFeedbackFeaturesEXT::transformFeedback must be enabledfirstBinding must be less than VkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBuffersfirstBinding and bindingCount must be less than or equal to VkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBufferspOffsets must be less than the size of the corresponding element in pBufferspOffsets must be a multiple of 4pBuffers must have been created with the BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT flagpSize array is specified, each element of pSizes must either be WHOLE_SIZE, or be less than or equal to VkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBufferSizepSizes must be less than or equal to the size of the corresponding buffer in pBufferspOffsets plus pSizes, where the pSizes, element is not WHOLE_SIZE, must be less than or equal to the size of the corresponding element in pBufferspBuffers that is non-sparse must be bound completely and contiguously to a single VkDeviceMemory objectvkCmdBindTransformFeedbackBuffersEXT command is recordedcommandBuffer must be a valid VkCommandBuffer handlepBuffers must be a valid pointer to an array of bindingCount valid VkBuffer handlespOffsets must be a valid pointer to an array of bindingCount VkDeviceSize valuespSizes is not NULL, pSizes must be a valid pointer to an array of bindingCount VkDeviceSize valuescommandBuffer must be in the recording stateVkCommandPool that commandBuffer was allocated from must support graphics operationspSizes is not NULL, bindingCount must be greater than 0commandBuffer, and the elements of pBuffers must have been created, allocated, or retrieved from the same VkDevicecommandBuffer must be externally synchronizedVkCommandPool that commandBuffer was allocated from must be externally synchronized| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
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 - an optional array of 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 bytes captured will be the size of the corresponding buffer minus the buffer offset.public static void nvkCmdBeginTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstCounterBuffer,
int counterBufferCount,
long pCounterBuffers,
long pCounterBufferOffsets)
CmdBeginTransformFeedbackEXTcounterBufferCount - the size of the pCounterBuffers and pCounterBufferOffsets arrays.public static void vkCmdBeginTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstCounterBuffer,
@Nullable
java.nio.LongBuffer pCounterBuffers,
@Nullable
java.nio.LongBuffer pCounterBufferOffsets)
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);
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.
VkPhysicalDeviceTransformFeedbackFeaturesEXT::transformFeedback must be enabledfirstCounterBuffer must be less than VkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBuffersfirstCounterBuffer and counterBufferCount must be less than or equal to VkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBufferscounterBufferCount is not 0, and pCounterBuffers is not NULL, pCounterBuffers must be a valid pointer to an array of counterBufferCount VkBuffer handles that are either valid or NULL_HANDLENULL_HANDLE it must reference a buffer large enough to hold 4 bytes at the corresponding offset from the pCounterBufferOffsets arraypCounterBuffer is NULL, then pCounterBufferOffsets must also be NULLpCounterBuffers array that is not NULL_HANDLE it must have been created with a usage value containing BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXTcommandBuffer must be a valid VkCommandBuffer handlecounterBufferCount is not 0, and pCounterBufferOffsets is not NULL, pCounterBufferOffsets must be a valid pointer to an array of counterBufferCount VkDeviceSize valuescommandBuffer must be in the recording stateVkCommandPool that commandBuffer was allocated from must support graphics operationscommandBuffer, and the elements of pCounterBuffers that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevicecommandBuffer must be externally synchronizedVkCommandPool that commandBuffer was allocated from must be externally synchronized| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Inside | Graphics |
commandBuffer - the command buffer into which the command is recorded.firstCounterBuffer - the index of the first transform feedback buffer corresponding to pCounterBuffers[0] and pCounterBufferOffsets[0].pCounterBuffers - an optional array of buffer handles to the counter buffers which contain 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.pCounterBufferOffsets - an optional array of 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.public static void nvkCmdEndTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstCounterBuffer,
int counterBufferCount,
long pCounterBuffers,
long pCounterBufferOffsets)
CmdEndTransformFeedbackEXTcounterBufferCount - the size of the pCounterBuffers and pCounterBufferOffsets arrays.public static void vkCmdEndTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstCounterBuffer,
@Nullable
java.nio.LongBuffer pCounterBuffers,
@Nullable
java.nio.LongBuffer pCounterBufferOffsets)
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);
VkPhysicalDeviceTransformFeedbackFeaturesEXT::transformFeedback must be enabledfirstCounterBuffer must be less than VkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBuffersfirstCounterBuffer and counterBufferCount must be less than or equal to VkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBufferscounterBufferCount is not 0, and pCounterBuffers is not NULL, pCounterBuffers must be a valid pointer to an array of counterBufferCount VkBuffer handles that are either valid or NULL_HANDLENULL_HANDLE it must reference a buffer large enough to hold 4 bytes at the corresponding offset from the pCounterBufferOffsets arraypCounterBuffer is NULL, then pCounterBufferOffsets must also be NULLpCounterBuffers array that is not NULL_HANDLE it must have been created with a usage value containing BUFFER_USAGE_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXTcommandBuffer must be a valid VkCommandBuffer handlecounterBufferCount is not 0, and pCounterBufferOffsets is not NULL, pCounterBufferOffsets must be a valid pointer to an array of counterBufferCount VkDeviceSize valuescommandBuffer must be in the recording stateVkCommandPool that commandBuffer was allocated from must support graphics operationscommandBuffer, and the elements of pCounterBuffers that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the same VkDevicecommandBuffer must be externally synchronizedVkCommandPool that commandBuffer was allocated from must be externally synchronized| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Inside | Graphics |
commandBuffer - the command buffer into which the command is recorded.firstCounterBuffer - the index of the first transform feedback buffer corresponding to pCounterBuffers[0] and pCounterBufferOffsets[0].pCounterBuffers - an optional array of buffer handles to the counter buffers 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.pCounterBufferOffsets - an optional array of 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.public static void vkCmdBeginQueryIndexedEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long queryPool,
int query,
int flags,
int index)
To begin an indexed query, call:
void vkCmdBeginQueryIndexedEXT(
VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t query,
VkQueryControlFlags flags,
uint32_t index);
The vkCmdBeginQueryIndexedEXT command operates the same as the CmdBeginQuery command, except that it also accepts a query type specific index parameter.
queryPool must have been created with a queryType that differs from that of any queries that are active within commandBufferqueryType used to create queryPool must not be QUERY_TYPE_TIMESTAMPqueryType used to create queryPool was not QUERY_TYPE_OCCLUSION, flags must not contain QUERY_CONTROL_PRECISE_BITquery must be less than the number of queries in queryPoolqueryType used to create queryPool was QUERY_TYPE_OCCLUSION, the VkCommandPool that commandBuffer was allocated from must support graphics operationsqueryType used to create queryPool was QUERY_TYPE_PIPELINE_STATISTICS and any of the pipelineStatistics indicate graphics operations, the VkCommandPool that commandBuffer was allocated from must support graphics operationsqueryType used to create queryPool was QUERY_TYPE_PIPELINE_STATISTICS and any of the pipelineStatistics indicate compute operations, the VkCommandPool that commandBuffer was allocated from must support compute operationscommandBuffer must not be a protected command bufferquery and the number of bits set in the current subpass’s view mask must be less than or equal to the number of queries in queryPoolqueryType used to create queryPool was QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT the VkCommandPool that commandBuffer was allocated from must support graphics operationsqueryType used to create queryPool was QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT the index parameter must be less than VkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackStreamsqueryType used to create queryPool was not QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT the index must be zeroqueryType used to create queryPool was QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT then VkPhysicalDeviceTransformFeedbackPropertiesEXT::transformFeedbackQueries must be supportedqueryPool was created with a queryType of QUERY_TYPE_PERFORMANCE_QUERY_KHR, the profiling lock must have been held before BeginCommandBuffer was called on commandBufferqueryPool was created with a queryType of QUERY_TYPE_PERFORMANCE_QUERY_KHR and one of the counters used to create queryPool was QUERY_SCOPE_COMMAND_BUFFER_KHR, the query begin must be the first recorded command in commandBufferqueryPool was created with a queryType of QUERY_TYPE_PERFORMANCE_QUERY_KHR and one of the counters used to create queryPool was QUERY_SCOPE_RENDER_PASS_KHR, the begin command must not be recorded within a render pass instancequeryPool was created with a queryType of QUERY_TYPE_PERFORMANCE_QUERY_KHR and another query pool with a queryType QUERY_TYPE_PERFORMANCE_QUERY_KHR has been used within commandBuffer, its parent primary command buffer or secondary command buffer recorded within the same parent primary command buffer as commandBuffer, the performanceCounterMultipleQueryPools feature must be enabledcommandBuffer must be a valid VkCommandBuffer handlequeryPool must be a valid VkQueryPool handleflags must be a valid combination of VkQueryControlFlagBits valuescommandBuffer must be in the recording stateVkCommandPool that commandBuffer was allocated from must support graphics, or compute operationscommandBuffer, and queryPool must have been created, allocated, or retrieved from the same VkDevicecommandBuffer must be externally synchronizedVkCommandPool that commandBuffer was allocated from must be externally synchronized| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics Compute |
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 of VkQueryControlFlagBits specifying constraints on the types of queries that can be performed.index - the query type specific index. When the query type is QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT the index represents the vertex stream.public static void vkCmdEndQueryIndexedEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
long queryPool,
int query,
int index)
To end an indexed query after the set of desired draw or dispatch commands is recorded, call:
void vkCmdEndQueryIndexedEXT(
VkCommandBuffer commandBuffer,
VkQueryPool queryPool,
uint32_t query,
uint32_t index);
The vkCmdEndQueryIndexedEXT command operates the same as the CmdEndQuery command, except that it also accepts a query type specific index parameter.
query must be less than the number of queries in queryPoolcommandBuffer must not be a protected command buffervkCmdEndQueryIndexedEXT is 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 in queryPoolqueryType used to create queryPool was QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT the index parameter must be less than VkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackStreamsqueryType used to create queryPool was not QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT the index must be zeroqueryType used to create queryPool was QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT index must equal the index used to begin the querycommandBuffer must be a valid VkCommandBuffer handlequeryPool must be a valid VkQueryPool handlecommandBuffer must be in the recording stateVkCommandPool that commandBuffer was allocated from must support graphics, or compute operationscommandBuffer, and queryPool must have been created, allocated, or retrieved from the same VkDevicecommandBuffer must be externally synchronizedVkCommandPool that commandBuffer was allocated from must be externally synchronized| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics Compute |
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.public static void vkCmdDrawIndirectByteCountEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int instanceCount,
int firstInstance,
long counterBuffer,
long counterBufferOffset,
int counterOffset,
int vertexStride)
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);
When the command is executed, primitives are assembled in the same way as done with CmdDraw except the vertexCount is calculated based on the byte count read from counterBuffer at offset counterBufferOffset. The assembled primitives execute the bound graphics pipeline.
The effective vertexCount is calculated as follows:
const uint32_t * counterBufferPtr = (const uint8_t *)counterBuffer.address + counterBufferOffset;
vertexCount = floor(max(0, (*counterBufferPtr - counterOffset)) / vertexStride);
The effective firstVertex is zero.
VkImageView is sampled with FILTER_LINEAR as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BITVkImageView is accessed using atomic operations as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BITVkImageView is sampled with FILTER_CUBIC_EXT as a result of this command, then the image view’s format features must contain FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXTVkImageView being sampled with FILTER_CUBIC_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubic returned by vkGetPhysicalDeviceImageFormatProperties2VkImageView being sampled with FILTER_CUBIC_EXT with a reduction mode of either SAMPLER_REDUCTION_MODE_MIN_EXT or SAMPLER_REDUCTION_MODE_MAX_EXT as a result of this command must have a VkImageViewType and format that supports cubic filtering together with minmax filtering, as specified by VkFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmax returned by vkGetPhysicalDeviceImageFormatProperties2VkImage created with a VkImageCreateInfo::flags containing IMAGE_CREATE_CORNER_SAMPLED_BIT_NV sampled as a result of this command must only be sampled using a VkSamplerAddressMode of SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE.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 a VkPipelineLayout that is compatible for set n, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout CompatibilityVkPipeline 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 a VkPipelineLayout that is compatible for push constants, with the VkPipelineLayout used to create the current VkPipeline, as described in Pipeline Layout CompatibilityvkCmdBindDescriptorSets, must be valid if they are statically used by the VkPipeline bound to the pipeline bind point used by this commandVkPipeline object bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set for commandBufferVkPipeline object bound to the pipeline bind point used by this command accesses a VkSampler object that uses unnormalized coordinates, that sampler must not be used to sample from any VkImage with a VkImageView of the type IMAGE_VIEW_TYPE_3D, IMAGE_VIEW_TYPE_CUBE, IMAGE_VIEW_TYPE_1D_ARRAY, IMAGE_VIEW_TYPE_2D_ARRAY or IMAGE_VIEW_TYPE_CUBE_ARRAY, in any shader stageVkPipeline object bound to the pipeline bind point used by this command accesses a VkSampler object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions with ImplicitLod, Dref or Proj in their name, in any shader stageVkPipeline object bound to the pipeline bind point used by this command accesses a VkSampler object that uses unnormalized coordinates, that sampler must not be used with any of the SPIR-V OpImageSample* or OpImageSparseSample* instructions that includes a LOD bias or any offset values, in any shader stageVkPipeline 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 pointVkPipeline 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 pointcommandBuffer is an unprotected command buffer, any resource accessed by the VkPipeline object bound to the pipeline bind point used by this command must not be a protected resourcerenderPass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline bound to PIPELINE_BIND_POINT_GRAPHICS.subpass member of the VkGraphicsPipelineCreateInfo structure specified when creating the VkPipeline bound to PIPELINE_BIND_POINT_GRAPHICS.VkPhysicalDeviceMultiviewProperties::maxMultiviewInstanceIndex.VkPipelineSampleLocationsStateCreateInfoEXT::sampleLocationsEnable set to TRUE and the current subpass has a depth/stencil attachment, then that attachment must have been created with the IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT bit setVkPhysicalDeviceTransformFeedbackFeaturesEXT::transformFeedback must be enabledVkPhysicalDeviceTransformFeedbackPropertiesEXT::transformFeedbackDrawvertexStride must be greater than 0 and less than or equal to VkPhysicalDeviceLimits::maxTransformFeedbackBufferDataStridecounterBuffer must have been created with the BUFFER_USAGE_INDIRECT_BUFFER_BIT bit setcommandBuffer must not be a protected command buffercommandBuffer must be a valid VkCommandBuffer handlecounterBuffer must be a valid VkBuffer handlecommandBuffer must be in the recording stateVkCommandPool that commandBuffer was allocated from must support graphics operationscommandBuffer, and counterBuffer must have been created, allocated, or retrieved from the same VkDevicecommandBuffer must be externally synchronizedVkCommandPool that commandBuffer was allocated from must be externally synchronized| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Inside | Graphics | Graphics |
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 the counterBuffer at the counterBufferOffsetvertexStride - 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.public static void vkCmdBindTransformFeedbackBuffersEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstBinding,
long[] pBuffers,
long[] pOffsets,
@Nullable
long[] pSizes)
CmdBindTransformFeedbackBuffersEXTpublic static void vkCmdBeginTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstCounterBuffer,
@Nullable
long[] pCounterBuffers,
@Nullable
long[] pCounterBufferOffsets)
CmdBeginTransformFeedbackEXTpublic static void vkCmdEndTransformFeedbackEXT(org.lwjgl.vulkan.VkCommandBuffer commandBuffer,
int firstCounterBuffer,
@Nullable
long[] pCounterBuffers,
@Nullable
long[] pCounterBufferOffsets)
CmdEndTransformFeedbackEXTCopyright LWJGL. All Rights Reserved. License terms.