| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_EXT_transform_feedback
Description
Name
VK_EXT_transform_feedback - device extension
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
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
Description
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.
New Commands
cmdBeginTransformFeedbackEXTcmdBindTransformFeedbackBuffersEXTcmdDrawIndirectByteCountEXTcmdEndQueryIndexedEXTcmdEndTransformFeedbackEXT
New Structures
Extending
PhysicalDeviceProperties2:Extending
PipelineRasterizationStateCreateInfo:
New Bitmasks
New Enum Constants
EXT_TRANSFORM_FEEDBACK_SPEC_VERSIONExtending
AccessFlagBits:Extending
BufferUsageFlagBits:Extending
PipelineStageFlagBits:Extending
QueryType:Extending
StructureType:
Issues
1) Should we include pause/resume functionality?
RESOLVED: Yes, this is needed to ease layering other APIs which have
this functionality. To pause use cmdEndTransformFeedbackEXT and
provide valid buffer handles in the pCounterBuffers array and offsets
in the pCounterBufferOffsets array for the implementation to save the
resume points. Then to resume use cmdBeginTransformFeedbackEXT with
the previous pCounterBuffers and pCounterBufferOffsets values.
Between the pause and resume there needs to be a memory barrier for the
counter buffers with a source access of
ACCESS_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT
at pipeline stage
PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT
to a destination access of
ACCESS_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT
at pipeline stage
PIPELINE_STAGE_DRAW_INDIRECT_BIT.
2) How does this interact with multiview?
RESOLVED: Transform feedback cannot be made active in a render pass with multiview enabled.
3) How should queries be done?
RESOLVED: There is a new query type
QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT.
A query pool created with this type will capture 2 integers -
numPrimitivesWritten and numPrimitivesNeeded - for the specified vertex
stream output from the last vertex processing stage. The vertex stream
output queried is zero by default, but can be specified with the new
cmdBeginQueryIndexedEXT and cmdEndQueryIndexedEXT commands.
Version History
Revision 1, 2018-10-09 (Piers Daniell)
- Internal revisions
See Also
PhysicalDeviceTransformFeedbackFeaturesEXT,
PhysicalDeviceTransformFeedbackPropertiesEXT,
PipelineRasterizationStateStreamCreateFlagsEXT,
PipelineRasterizationStateStreamCreateInfoEXT,
cmdBeginQueryIndexedEXT, cmdBeginTransformFeedbackEXT,
cmdBindTransformFeedbackBuffersEXT, cmdDrawIndirectByteCountEXT,
cmdEndQueryIndexedEXT, cmdEndTransformFeedbackEXT
Document Notes
For more information, see the Vulkan Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- cmdBindTransformFeedbackBuffersEXT :: forall io. MonadIO io => CommandBuffer -> ("firstBinding" ::: Word32) -> ("buffers" ::: Vector Buffer) -> ("offsets" ::: Vector DeviceSize) -> ("sizes" ::: Vector DeviceSize) -> io ()
- cmdBeginTransformFeedbackEXT :: forall io. MonadIO io => CommandBuffer -> ("firstCounterBuffer" ::: Word32) -> ("counterBuffers" ::: Vector Buffer) -> ("counterBufferOffsets" ::: Vector DeviceSize) -> io ()
- cmdUseTransformFeedbackEXT :: forall io r. MonadIO io => CommandBuffer -> Word32 -> Vector Buffer -> Vector DeviceSize -> io r -> io r
- cmdEndTransformFeedbackEXT :: forall io. MonadIO io => CommandBuffer -> ("firstCounterBuffer" ::: Word32) -> ("counterBuffers" ::: Vector Buffer) -> ("counterBufferOffsets" ::: Vector DeviceSize) -> io ()
- cmdBeginQueryIndexedEXT :: forall io. MonadIO io => CommandBuffer -> QueryPool -> ("query" ::: Word32) -> QueryControlFlags -> ("index" ::: Word32) -> io ()
- cmdUseQueryIndexedEXT :: forall io r. MonadIO io => CommandBuffer -> QueryPool -> Word32 -> QueryControlFlags -> Word32 -> io r -> io r
- cmdEndQueryIndexedEXT :: forall io. MonadIO io => CommandBuffer -> QueryPool -> ("query" ::: Word32) -> ("index" ::: Word32) -> io ()
- cmdDrawIndirectByteCountEXT :: forall io. MonadIO io => CommandBuffer -> ("instanceCount" ::: Word32) -> ("firstInstance" ::: Word32) -> ("counterBuffer" ::: Buffer) -> ("counterBufferOffset" ::: DeviceSize) -> ("counterOffset" ::: Word32) -> ("vertexStride" ::: Word32) -> io ()
- data PhysicalDeviceTransformFeedbackFeaturesEXT = PhysicalDeviceTransformFeedbackFeaturesEXT {}
- data PhysicalDeviceTransformFeedbackPropertiesEXT = PhysicalDeviceTransformFeedbackPropertiesEXT {
- maxTransformFeedbackStreams :: Word32
- maxTransformFeedbackBuffers :: Word32
- maxTransformFeedbackBufferSize :: DeviceSize
- maxTransformFeedbackStreamDataSize :: Word32
- maxTransformFeedbackBufferDataSize :: Word32
- maxTransformFeedbackBufferDataStride :: Word32
- transformFeedbackQueries :: Bool
- transformFeedbackStreamsLinesTriangles :: Bool
- transformFeedbackRasterizationStreamSelect :: Bool
- transformFeedbackDraw :: Bool
- data PipelineRasterizationStateStreamCreateInfoEXT = PipelineRasterizationStateStreamCreateInfoEXT {}
- newtype PipelineRasterizationStateStreamCreateFlagsEXT = PipelineRasterizationStateStreamCreateFlagsEXT Flags
- type EXT_TRANSFORM_FEEDBACK_SPEC_VERSION = 1
- pattern EXT_TRANSFORM_FEEDBACK_SPEC_VERSION :: forall a. Integral a => a
- type EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME = "VK_EXT_transform_feedback"
- pattern EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
Documentation
cmdBindTransformFeedbackBuffersEXT Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> ("firstBinding" ::: Word32) |
|
| -> ("buffers" ::: Vector Buffer) |
|
| -> ("offsets" ::: Vector DeviceSize) |
|
| -> ("sizes" ::: Vector DeviceSize) |
|
| -> io () |
vkCmdBindTransformFeedbackBuffersEXT - Bind transform feedback buffers to a command buffer
Description
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].
Valid Usage
-
PhysicalDeviceTransformFeedbackFeaturesEXT::transformFeedbackmust be enabled
-
firstBindingmust be less thanPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBuffers - The
sum of
firstBindingandbindingCountmust be less than or equal toPhysicalDeviceTransformFeedbackPropertiesEXT::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 toPhysicalDeviceTransformFeedbackPropertiesEXT::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 singleDeviceMemoryobject - Transform
feedback must not be active when the
cmdBindTransformFeedbackBuffersEXTcommand is recorded
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pBuffersmust be a valid pointer to an array ofbindingCountvalidBufferhandles -
pOffsetsmust be a valid pointer to an array ofbindingCountDeviceSizevalues -
commandBuffermust be in the recording state -
The
CommandPoolthatcommandBufferwas allocated from must support graphics operations -
bindingCountmust be greater than0 - Both of
commandBuffer, and the elements ofpBuffersmust have been created, allocated, or retrieved from the sameDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics |
See Also
cmdBeginTransformFeedbackEXT Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> ("firstCounterBuffer" ::: Word32) |
|
| -> ("counterBuffers" ::: Vector Buffer) |
|
| -> ("counterBufferOffsets" ::: Vector DeviceSize) |
|
| -> io () |
vkCmdBeginTransformFeedbackEXT - Make transform feedback active in the command buffer
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.
Valid Usage
-
PhysicalDeviceTransformFeedbackFeaturesEXT::transformFeedbackmust be enabled
- Transform feedback must not be active
-
firstCounterBuffermust be less thanPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBuffers - The
sum of
firstCounterBufferandcounterBufferCountmust be less than or equal toPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBuffers - If
counterBufferCountis not0, andpCounterBuffersis notNULL,pCounterBuffersmust be a valid pointer to an array ofcounterBufferCountBufferhandles 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 - The last vertex
processing 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 validCommandBufferhandle
-
If
counterBufferCountis not0, andpCounterBufferOffsetsis notNULL,pCounterBufferOffsetsmust be a valid pointer to an array ofcounterBufferCountDeviceSizevalues -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas 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 sameDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Inside | Graphics |
See Also
cmdUseTransformFeedbackEXT :: forall io r. MonadIO io => CommandBuffer -> Word32 -> Vector Buffer -> Vector DeviceSize -> io r -> io r Source #
This function will call the supplied action between calls to
cmdBeginTransformFeedbackEXT and cmdEndTransformFeedbackEXT
Note that cmdEndTransformFeedbackEXT is *not* called if an exception
is thrown by the inner action.
cmdEndTransformFeedbackEXT Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> ("firstCounterBuffer" ::: Word32) |
|
| -> ("counterBuffers" ::: Vector Buffer) |
|
| -> ("counterBufferOffsets" ::: Vector DeviceSize) |
|
| -> io () |
vkCmdEndTransformFeedbackEXT - Make transform feedback inactive in the command buffer
Valid Usage
-
PhysicalDeviceTransformFeedbackFeaturesEXT::transformFeedbackmust be enabled
- Transform feedback must be active
-
firstCounterBuffermust be less thanPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBuffers - The sum
of
firstCounterBufferandcounterBufferCountmust be less than or equal toPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBuffers - If
counterBufferCountis not0, andpCounterBuffersis notNULL,pCounterBuffersmust be a valid pointer to an array ofcounterBufferCountBufferhandles 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 validCommandBufferhandle
-
If
counterBufferCountis not0, andpCounterBufferOffsetsis notNULL,pCounterBufferOffsetsmust be a valid pointer to an array ofcounterBufferCountDeviceSizevalues -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas 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 sameDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Inside | Graphics |
See Also
cmdBeginQueryIndexedEXT Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> QueryPool |
|
| -> ("query" ::: Word32) |
|
| -> QueryControlFlags |
|
| -> ("index" ::: Word32) |
|
| -> io () |
vkCmdBeginQueryIndexedEXT - Begin an indexed query
Description
The cmdBeginQueryIndexedEXT command operates the same as the
cmdBeginQuery command, except that
it also accepts a query type specific index parameter.
Valid Usage
-
queryPoolmust have been created with aqueryTypethat differs from that of any queries that are active withincommandBuffer
- All queries used by the command must be unavailable
- The
queryTypeused to createqueryPoolmust not beQUERY_TYPE_TIMESTAMP - 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, theCommandPoolthatcommandBufferwas allocated from must support graphics operations - If the
queryTypeused to createqueryPoolwasQUERY_TYPE_PIPELINE_STATISTICSand any of thepipelineStatisticsindicate graphics operations, theCommandPoolthatcommandBufferwas allocated from must support graphics operations - If the
queryTypeused to createqueryPoolwasQUERY_TYPE_PIPELINE_STATISTICSand any of thepipelineStatisticsindicate compute operations, theCommandPoolthatcommandBufferwas 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_TRANSFORM_FEEDBACK_STREAM_EXTtheCommandPoolthatcommandBufferwas allocated from must support graphics operations - If the
queryTypeused to createqueryPoolwasQUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXTtheindexparameter must be less thanPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackStreams - If the
queryTypeused to createqueryPoolwas notQUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXTtheindexmust be zero - If the
queryTypeused to createqueryPoolwasQUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXTthenPhysicalDeviceTransformFeedbackPropertiesEXT::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, the performanceCounterMultipleQueryPools feature 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 acmdResetQueryPoolcommand affecting the same query
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
queryPoolmust be a validQueryPoolhandle -
flagsmust be a valid combination ofQueryControlFlagBitsvalues -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations - Both of
commandBuffer, andqueryPoolmust have been created, allocated, or retrieved from the sameDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics Compute |
See Also
cmdUseQueryIndexedEXT :: forall io r. MonadIO io => CommandBuffer -> QueryPool -> Word32 -> QueryControlFlags -> Word32 -> io r -> io r Source #
This function will call the supplied action between calls to
cmdBeginQueryIndexedEXT and cmdEndQueryIndexedEXT
Note that cmdEndQueryIndexedEXT is *not* called if an exception is
thrown by the inner action.
cmdEndQueryIndexedEXT Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> QueryPool |
|
| -> ("query" ::: Word32) |
|
| -> ("index" ::: Word32) |
|
| -> io () |
vkCmdEndQueryIndexedEXT - Ends a query
Description
The cmdEndQueryIndexedEXT command operates the same as the
cmdEndQuery command, except that
it also accepts a query type specific index parameter.
Valid Usage
- All queries used by the command must be active
-
querymust be less than the number of queries inqueryPool -
commandBuffermust not be a protected command buffer - If
cmdEndQueryIndexedEXTis 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 thanPhysicalDeviceTransformFeedbackPropertiesEXT::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 validCommandBufferhandle
-
queryPoolmust be a validQueryPoolhandle -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations - Both of
commandBuffer, andqueryPoolmust have been created, allocated, or retrieved from the sameDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Both | Graphics Compute |
See Also
cmdDrawIndirectByteCountEXT Source #
Arguments
| :: forall io. MonadIO io | |
| => CommandBuffer |
|
| -> ("instanceCount" ::: Word32) |
|
| -> ("firstInstance" ::: Word32) |
|
| -> ("counterBuffer" ::: Buffer) |
|
| -> ("counterBufferOffset" ::: DeviceSize) |
|
| -> ("counterOffset" ::: Word32) |
|
| -> ("vertexStride" ::: Word32) |
|
| -> io () |
vkCmdDrawIndirectByteCountEXT - Draw primitives where the vertex count is derived from the counter byte value in the counter buffer
Description
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.
Valid Usage
- If a
Samplercreated withmagFilterorminFilterequal toFILTER_LINEARandcompareEnableequal toFALSEis used to sample aImageViewas a result of this command, then the image view’s format features must containFORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
- If a
ImageViewis 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
ImageViewis 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
ImageViewbeing sampled withFILTER_CUBIC_EXTas a result of this command must have aImageViewTypeand format that supports cubic filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT::filterCubicreturned bygetPhysicalDeviceImageFormatProperties2 - Any
ImageViewbeing sampled withFILTER_CUBIC_EXTwith a reduction mode of eitherSAMPLER_REDUCTION_MODE_MINorSAMPLER_REDUCTION_MODE_MAXas a result of this command must have aImageViewTypeand format that supports cubic filtering together with minmax filtering, as specified byFilterCubicImageViewImageFormatPropertiesEXT::filterCubicMinmaxreturned bygetPhysicalDeviceImageFormatProperties2 - Any
Imagecreated with aImageCreateInfo::flagscontainingIMAGE_CREATE_CORNER_SAMPLED_BIT_NVsampled as a result of this command must only be sampled using aSamplerAddressModeofSAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE - For each set n
that is statically used by the
Pipelinebound 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 aPipelineLayoutthat is compatible for set n, with thePipelineLayoutused to create the currentPipeline, as described in ??? - For each push
constant that is statically used by the
Pipelinebound to the pipeline bind point used by this command, a push constant value must have been set for the same pipeline bind point, with aPipelineLayoutthat is compatible for push constants, with thePipelineLayoutused to create the currentPipeline, as described in ??? - Descriptors in each
bound descriptor set, specified via
cmdBindDescriptorSets, must be valid if they are statically used by thePipelinebound 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
Pipelineobject bound to the pipeline bind point used by this command requires any dynamic state, that state must have been set 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
Pipelineobject bound to the pipeline bind point used by this command, since that pipeline was bound - If the
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerobject that uses unnormalized coordinates, that sampler must not be used to sample from anyImagewith aImageViewof 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
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerobject 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
Pipelineobject bound to the pipeline bind point used by this command accesses aSamplerobject 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
Pipelineobject 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
Pipelineobject 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, any resource accessed by thePipelineobject bound to the pipeline bind point used by this command must not be a protected resource - If a
ImageViewis 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
BufferViewis 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
ImageViewwith aFormatthat has a 64-bit channel width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64. - If a
ImageViewwith aFormatthat has a channel width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32. - If a
BufferViewwith aFormatthat has a 64-bit channel width is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 64. - If a
BufferViewwith aFormatthat has a channel width less than 64-bit is accessed as a result of this command, theSampledTypeof theOpTypeImageoperand of that instruction must have aWidthof 32. -
If the
sparseImageInt64Atomics
feature is not enabled,
Imageobjects created with theIMAGE_CREATE_SPARSE_RESIDENCY_BITflag must not be accessed by atomic instructions through anOpTypeImagewith aSampledTypewith aWidthof 64 by this command. -
If the
sparseImageInt64Atomics
feature is not enabled,
Bufferobjects 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 theGraphicsPipelineCreateInfostructure specified when creating thePipelinebound toPIPELINE_BIND_POINT_GRAPHICS - The subpass index
of the current render pass must be equal to the
subpassmember of theGraphicsPipelineCreateInfostructure specified when creating thePipelinebound toPIPELINE_BIND_POINT_GRAPHICS - Every input attachment used by the current subpass must be bound to the pipeline via a descriptor set
- Image subresources used as attachments in the current render pass must not be accessed in any way other than as an attachment by this command, except for cases involving read-only access to depth/stencil attachments as described in the Render Pass chapter
-
If the draw is recorded in a render pass instance with multiview
enabled, the maximum instance index must be less than or equal to
PhysicalDeviceMultiviewProperties::maxMultiviewInstanceIndex - If
the bound graphics pipeline was created with
PipelineSampleLocationsStateCreateInfoEXT::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_COUNT_EXTdynamic state enabled, but not theDYNAMIC_STATE_SCISSOR_WITH_COUNT_EXTdynamic state enabled, thencmdSetViewportWithCountEXTmust have been called in the current command buffer prior to this draw command, and theviewportCountparameter ofcmdSetViewportWithCountEXTmust match thePipelineViewportStateCreateInfo::scissorCountof the pipeline - If the bound
graphics pipeline state was created with the
DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXTdynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXTdynamic state enabled, thencmdSetScissorWithCountEXTmust have been called in the current command buffer prior to this draw command, and thescissorCountparameter ofcmdSetScissorWithCountEXTmust match thePipelineViewportStateCreateInfo::viewportCountof the pipeline - If the
bound graphics pipeline state was created with both the
DYNAMIC_STATE_SCISSOR_WITH_COUNT_EXTandDYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXTdynamic states enabled then bothcmdSetViewportWithCountEXTandcmdSetScissorWithCountEXTmust have been called in the current command buffer prior to this draw command, and theviewportCountparameter ofcmdSetViewportWithCountEXTmust match thescissorCountparameter ofcmdSetScissorWithCountEXT - If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXTdynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_W_SCALING_NVdynamic state enabled, then the bound graphics pipeline must have been created withPipelineViewportWScalingStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call tocmdSetViewportWithCountEXT - If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXTandDYNAMIC_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 tocmdSetViewportWithCountEXT - If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXTdynamic state enabled, but not theDYNAMIC_STATE_VIEWPORT_SHADING_RATE_PALETTE_NVdynamic state enabled, then the bound graphics pipeline must have been created withPipelineViewportShadingRateImageStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call tocmdSetViewportWithCountEXT - If the
bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXTandDYNAMIC_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 tocmdSetViewportWithCountEXT -
If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXTdynamic state enabled and an instance ofPipelineViewportSwizzleStateCreateInfoNVchained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created withPipelineViewportSwizzleStateCreateInfoNV::viewportCountgreater or equal to theviewportCountparameter in the last call tocmdSetViewportWithCountEXT -
If the bound graphics pipeline state was created with the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXTdynamic state enabled and an instance ofPipelineViewportExclusiveScissorStateCreateInfoNVchained fromVkPipelineVieportCreateInfo, then the bound graphics pipeline must have been created withPipelineViewportExclusiveScissorStateCreateInfoNV::exclusiveScissorCountgreater or equal to theviewportCountparameter in the last call tocmdSetViewportWithCountEXT - 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 draw command, and theprimitiveTopologyparameter ofcmdSetPrimitiveTopologyEXTmust be of the same topology class as the pipelinePipelineInputAssemblyStateCreateInfo::topologystate -
If the
primitiveFragmentShadingRateWithMultipleViewports
limit is not supported, the bound graphics pipeline was created with
the
DYNAMIC_STATE_VIEWPORT_WITH_COUNT_EXTdynamic state enabled, and any of the shader stages of the bound graphics pipeline write to thePrimitiveShadingRateKHRbuilt-in, thencmdSetViewportWithCountEXTmust have been called in the current command buffer prior to this draw command, and theviewportCountparameter ofcmdSetViewportWithCountEXTmust be1 - 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 ???
-
PhysicalDeviceTransformFeedbackFeaturesEXT::transformFeedbackmust be enabled - The
implementation must support
PhysicalDeviceTransformFeedbackPropertiesEXT::transformFeedbackDraw -
vertexStridemust be greater than 0 and less than or equal toPhysicalDeviceLimits::maxTransformFeedbackBufferDataStride - If
counterBufferis non-sparse then it must be bound completely and contiguously to a singleDeviceMemoryobject -
counterBuffermust have been created with theBUFFER_USAGE_INDIRECT_BUFFER_BITbit set -
counterBufferOffsetmust be a multiple of4 -
commandBuffermust not be a protected command buffer
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
counterBuffermust be a validBufferhandle -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas 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 sameDevice
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Supported Queue Types | Pipeline Type |
|---|---|---|---|
| Primary Secondary | Inside | Graphics | Graphics |
See Also
data PhysicalDeviceTransformFeedbackFeaturesEXT Source #
VkPhysicalDeviceTransformFeedbackFeaturesEXT - Structure describing transform feedback features that can be supported by an implementation
Members
The members of the PhysicalDeviceTransformFeedbackFeaturesEXT
structure describe the following features:
Description
If the PhysicalDeviceTransformFeedbackFeaturesEXT structure is
included in the pNext chain of
PhysicalDeviceFeatures2,
it is filled with values indicating whether each feature is supported.
PhysicalDeviceTransformFeedbackFeaturesEXT can also be included in
the pNext chain of DeviceCreateInfo to enable
features.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceTransformFeedbackFeaturesEXT | |
Fields | |
Instances
data PhysicalDeviceTransformFeedbackPropertiesEXT Source #
VkPhysicalDeviceTransformFeedbackPropertiesEXT - Structure describing transform feedback properties that can be supported by an implementation
Members
The members of the PhysicalDeviceTransformFeedbackPropertiesEXT
structure describe the following implementation-dependent limits:
Description
If the PhysicalDeviceTransformFeedbackPropertiesEXT structure is
included in the pNext chain of
PhysicalDeviceProperties2,
it is filled with the implementation-dependent limits and properties.
Valid Usage (Implicit)
See Also
Constructors
| PhysicalDeviceTransformFeedbackPropertiesEXT | |
Fields
| |
Instances
data PipelineRasterizationStateStreamCreateInfoEXT Source #
VkPipelineRasterizationStateStreamCreateInfoEXT - Structure defining the geometry stream used for rasterization
Description
If this structure is not present, rasterizationStream is assumed to be
zero.
Valid Usage (Implicit)
See Also
PipelineRasterizationStateStreamCreateFlagsEXT,
StructureType
Constructors
| PipelineRasterizationStateStreamCreateInfoEXT | |
Fields
| |
Instances
newtype PipelineRasterizationStateStreamCreateFlagsEXT Source #
VkPipelineRasterizationStateStreamCreateFlagsEXT - Reserved for future use
Description
PipelineRasterizationStateStreamCreateFlagsEXT is a bitmask type for
setting a mask, but is currently reserved for future use.
See Also
Constructors
| PipelineRasterizationStateStreamCreateFlagsEXT Flags |
Instances
type EXT_TRANSFORM_FEEDBACK_SPEC_VERSION = 1 Source #
pattern EXT_TRANSFORM_FEEDBACK_SPEC_VERSION :: forall a. Integral a => a Source #
type EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME = "VK_EXT_transform_feedback" Source #
pattern EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #