Class AMDDrawIndirectCount


  • public class AMDDrawIndirectCount
    extends java.lang.Object
    This extension allows an application to source the number of draw calls for indirect draw calls from a buffer. This enables applications to generate arbitrary amounts of draw commands and execute them without host intervention.
    Name String
    VK_AMD_draw_indirect_count
    Extension Type
    Device extension
    Registered Extension Number
    34
    Revision
    1
    Extension and Version Dependencies
    • Requires Vulkan 1.0
    Deprecation state
    Contact
    Last Modified Date
    2016-08-23
    IP Status
    No known IP claims.
    Contributors
    • Matthaeus G. Chajdas, AMD
    • Derrick Owens, AMD
    • Graham Sellers, AMD
    • Daniel Rakos, AMD
    • Dominik Witczak, AMD
    • Field Detail

      • VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION

        public static final int VK_AMD_DRAW_INDIRECT_COUNT_SPEC_VERSION
        The extension specification version.
        See Also:
        Constant Field Values
      • VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME

        public static final java.lang.String VK_AMD_DRAW_INDIRECT_COUNT_EXTENSION_NAME
        The extension name.
        See Also:
        Constant Field Values
    • Method Detail

      • vkCmdDrawIndirectCountAMD

        public static void vkCmdDrawIndirectCountAMD​(VkCommandBuffer commandBuffer,
                                                     long buffer,
                                                     long offset,
                                                     long countBuffer,
                                                     long countBufferOffset,
                                                     int maxDrawCount,
                                                     int stride)
        Perform an indirect draw with the draw count sourced from a buffer.
        C Specification

        To record a non-indexed draw call with a draw call count sourced from a buffer, call:

        
         void vkCmdDrawIndirectCountAMD(
             VkCommandBuffer                             commandBuffer,
             VkBuffer                                    buffer,
             VkDeviceSize                                offset,
             VkBuffer                                    countBuffer,
             VkDeviceSize                                countBufferOffset,
             uint32_t                                    maxDrawCount,
             uint32_t                                    stride);
        Description

        CmdDrawIndirectCountAMD behaves similarly to CmdDrawIndirect except that the draw count is read by the device from a buffer during execution. The command will read an unsigned 32-bit integer from countBuffer located at countBufferOffset and use this as the draw count.

        Valid Usage
        Valid Usage (Implicit)
        • commandBuffer must be a valid VkCommandBuffer handle
        • buffer must be a valid VkBuffer handle
        • countBuffer must be a valid VkBuffer handle
        • commandBuffer must be in the recording state
        • The VkCommandPool that commandBuffer was allocated from must support graphics operations
        • This command must only be called inside of a render pass instance
        • Each of buffer, commandBuffer, and countBuffer must have been created, allocated, or retrieved from the same VkDevice
        Host Synchronization
        • Host access to commandBuffer must be externally synchronized
        • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized
        Command Properties
        Command Buffer LevelsRender Pass ScopeSupported Queue TypesPipeline Type
        Primary SecondaryInsideGraphicsGraphics
        Parameters:
        commandBuffer - the command buffer into which the command is recorded.
        buffer - the buffer containing draw parameters.
        offset - the byte offset into buffer where parameters begin.
        countBuffer - the buffer containing the draw count.
        countBufferOffset - the byte offset into countBuffer where the draw count begins.
        maxDrawCount - specifies the maximum number of draws that will be executed. The actual number of executed draw calls is the minimum of the count specified in countBuffer and maxDrawCount.
        stride - the byte stride between successive sets of draw parameters.
      • vkCmdDrawIndexedIndirectCountAMD

        public static void vkCmdDrawIndexedIndirectCountAMD​(VkCommandBuffer commandBuffer,
                                                            long buffer,
                                                            long offset,
                                                            long countBuffer,
                                                            long countBufferOffset,
                                                            int maxDrawCount,
                                                            int stride)
        Perform an indexed indirect draw with the draw count sourced from a buffer.
        C Specification

        To record an indexed draw call with a draw call count sourced from a buffer, call:

        
         void vkCmdDrawIndexedIndirectCountAMD(
             VkCommandBuffer                             commandBuffer,
             VkBuffer                                    buffer,
             VkDeviceSize                                offset,
             VkBuffer                                    countBuffer,
             VkDeviceSize                                countBufferOffset,
             uint32_t                                    maxDrawCount,
             uint32_t                                    stride);
        Description

        CmdDrawIndexedIndirectCountAMD behaves similarly to CmdDrawIndexedIndirect except that the draw count is read by the device from a buffer during execution. The command will read an unsigned 32-bit integer from countBuffer located at countBufferOffset and use this as the draw count.

        Valid Usage
        Valid Usage (Implicit)
        • commandBuffer must be a valid VkCommandBuffer handle
        • buffer must be a valid VkBuffer handle
        • countBuffer must be a valid VkBuffer handle
        • commandBuffer must be in the recording state
        • The VkCommandPool that commandBuffer was allocated from must support graphics operations
        • This command must only be called inside of a render pass instance
        • Each of buffer, commandBuffer, and countBuffer must have been created, allocated, or retrieved from the same VkDevice
        Host Synchronization
        • Host access to commandBuffer must be externally synchronized
        • Host access to the VkCommandPool that commandBuffer was allocated from must be externally synchronized
        Command Properties
        Command Buffer LevelsRender Pass ScopeSupported Queue TypesPipeline Type
        Primary SecondaryInsideGraphicsGraphics
        Parameters:
        commandBuffer - the command buffer into which the command is recorded.
        buffer - the buffer containing draw parameters.
        offset - the byte offset into buffer where parameters begin.
        countBuffer - the buffer containing the draw count.
        countBufferOffset - the byte offset into countBuffer where the draw count begins.
        maxDrawCount - specifies the maximum number of draws that will be executed. The actual number of executed draw calls is the minimum of the count specified in countBuffer and maxDrawCount.
        stride - the byte stride between successive sets of draw parameters.