Class NVXDeviceGeneratedCommands
- java.lang.Object
-
- org.lwjgl.vulkan.NVXDeviceGeneratedCommands
-
public class NVXDeviceGeneratedCommands extends java.lang.ObjectThis extension allows the device to generate a number of critical commands for command buffers.When rendering a large number of objects, the device can be leveraged to implement a number of critical functions, like updating matrices, or implementing occlusion culling, frustum culling, front to back sorting, etc. Implementing those on the device does not require any special extension, since an application is free to define its own data structure, and just process them using shaders.
However, if the application desires to quickly kick off the rendering of the final stream of objects, then unextended Vulkan forces the application to read back the processed stream and issue graphics command from the host. For very large scenes, the synchronization overhead, and cost to generate the command buffer can become the bottleneck. This extension allows an application to generate a device side stream of state changes and commands, and convert it efficiently into a command buffer without having to read it back on the host.
Furthermore, it allows incremental changes to such command buffers by manipulating only partial sections of a command stream -- for example pipeline bindings. Unextended Vulkan requires re-creation of entire command buffers in such scenario, or updates synchronized on the host.
The intended usage for this extension is for the application to:
- create its objects as in unextended Vulkan
- create a
VkObjectTableNVX, and register the various Vulkan objects that are needed to evaluate the input parameters. - create a
VkIndirectCommandsLayoutNVX, which lists theVkIndirectCommandsTokenTypeNVXit wants to dynamically change as atomic command sequence. This step likely involves some internal device code compilation, since the intent is for the GPU to generate the command buffer in the pipeline. - fill the input buffers with the data for each of the inputs it needs. Each input is an array that will be filled with an index in the object table, instead of using CPU pointers.
- set up a target secondary command buffer
- reserve command buffer space via
CmdReserveSpaceForCommandsNVXin a target command buffer at the position you want the generated commands to be executed. - call
CmdProcessCommandsNVXto create the actual device commands for all sequences based on the array contents into a provided target command buffer. - execute the target command buffer like a regular secondary command buffer
For each draw/dispatch, the following can be specified:
- a different pipeline state object
- a number of descriptor sets, with dynamic offsets
- a number of vertex buffer bindings, with an optional dynamic offset
- a different index buffer, with an optional dynamic offset
Applications should register a small number of objects, and use dynamic offsets whenever possible.
While the GPU can be faster than a CPU to generate the commands, it may not happen asynchronously, therefore the primary use-case is generating "
less" total work (occlusion culling, classification to use specialized shaders, etc.).Example Code
Open-Source samples illustrating the usage of the extension can be found at the following locations:
https://github.com/nvpro-samples/gl_vk_threaded_cadscene/blob/master/doc/vulkan_nvxdevicegenerated.md
https://github.com/NVIDIAGameWorks/GraphicsSamples/tree/master/samples/vk10-kepler/BasicDeviceGeneratedCommandsVk
// setup secondary command buffer vkBeginCommandBuffer(generatedCmdBuffer, &beginInfo); ... setup its state as usual // insert the reservation (there can only be one per command buffer) // where the generated calls should be filled into VkCmdReserveSpaceForCommandsInfoNVX reserveInfo = { VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX }; reserveInfo.objectTable = objectTable; reserveInfo.indirectCommandsLayout = deviceGeneratedLayout; reserveInfo.maxSequencesCount = myCount; vkCmdReserveSpaceForCommandsNVX(generatedCmdBuffer, &reserveInfo); vkEndCommandBuffer(generatedCmdBuffer); // trigger the generation at some point in another primary command buffer VkCmdProcessCommandsInfoNVX processInfo = { VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX }; processInfo.objectTable = objectTable; processInfo.indirectCommandsLayout = deviceGeneratedLayout; processInfo.maxSequencesCount = myCount; // set the target of the generation (if null we would directly execute with mainCmd) processInfo.targetCommandBuffer = generatedCmdBuffer; // provide input data processInfo.indirectCommandsTokenCount = 3; processInfo.pIndirectCommandsTokens = myTokens; // If you modify the input buffer data referenced by VkCmdProcessCommandsInfoNVX, // ensure you have added the appropriate barriers prior generation process. // When regenerating the content of the same reserved space, ensure prior operations have completed VkMemoryBarrier memoryBarrier = { VK_STRUCTURE_TYPE_MEMORY_BARRIER }; memoryBarrier.srcAccessMask = ...; memoryBarrier.dstAccessMask = VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX; vkCmdPipelineBarrier(mainCmd, // srcStageMaskVK_PIPELINE_STAGE_ALL_COMMANDS_BIT, // dstStageMaskVK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX, // dependencyFlags0, // memoryBarrierCount1, // pMemoryBarriers&memoryBarrier, ...); vkCmdProcessCommandsNVX(mainCmd, &processInfo); ... // execute the secondary command buffer and ensure the processing that modifies command-buffer content // has completed memoryBarrier.srcAccessMask = VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX; memoryBarrier.dstAccessMask = VK_ACCESS_INDIRECT_COMMAND_READ_BIT; vkCmdPipelineBarrier(mainCmd, // srcStageMaskVK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX, // dstStageMaskVK_PIPELINE_STAGE_DRAW_INDIRECT_BIT, // dependencyFlags0, // memoryBarrierCount1, // pMemoryBarriers&memoryBarrier, ...) vkCmdExecuteCommands(mainCmd, 1, &generatedCmdBuffer);- Name String
VK_NVX_device_generated_commands- Extension Type
- Device extension
- Registered Extension Number
- 87
- Revision
- 3
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Contact
- Christoph Kubisch pixeljetstream
- Last Modified Date
- 2017-07-25
- Contributors
- Pierre Boudier, NVIDIA
- Christoph Kubisch, NVIDIA
- Mathias Schott, NVIDIA
- Jeff Bolz, NVIDIA
- Eric Werness, NVIDIA
- Detlef Roettger, NVIDIA
- Daniel Koch, NVIDIA
- Chris Hebert, NVIDIA
-
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidnvkCmdProcessCommandsNVX(VkCommandBuffer commandBuffer, long pProcessCommandsInfo)Unsafe version of:CmdProcessCommandsNVXstatic voidnvkCmdReserveSpaceForCommandsNVX(VkCommandBuffer commandBuffer, long pReserveSpaceInfo)Unsafe version of:CmdReserveSpaceForCommandsNVXstatic intnvkCreateIndirectCommandsLayoutNVX(VkDevice device, long pCreateInfo, long pAllocator, long pIndirectCommandsLayout)Unsafe version of:CreateIndirectCommandsLayoutNVXstatic intnvkCreateObjectTableNVX(VkDevice device, long pCreateInfo, long pAllocator, long pObjectTable)Unsafe version of:CreateObjectTableNVXstatic voidnvkDestroyIndirectCommandsLayoutNVX(VkDevice device, long indirectCommandsLayout, long pAllocator)Unsafe version of:DestroyIndirectCommandsLayoutNVXstatic voidnvkDestroyObjectTableNVX(VkDevice device, long objectTable, long pAllocator)Unsafe version of:DestroyObjectTableNVXstatic voidnvkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(VkPhysicalDevice physicalDevice, long pFeatures, long pLimits)Unsafe version of:GetPhysicalDeviceGeneratedCommandsPropertiesNVXstatic intnvkRegisterObjectsNVX(VkDevice device, long objectTable, int objectCount, long ppObjectTableEntries, long pObjectIndices)Unsafe version of:RegisterObjectsNVXstatic intnvkUnregisterObjectsNVX(VkDevice device, long objectTable, int objectCount, long pObjectEntryTypes, long pObjectIndices)Unsafe version of:UnregisterObjectsNVXstatic voidvkCmdProcessCommandsNVX(VkCommandBuffer commandBuffer, VkCmdProcessCommandsInfoNVX pProcessCommandsInfo)Performs the generation of commands on the device.static voidvkCmdReserveSpaceForCommandsNVX(VkCommandBuffer commandBuffer, VkCmdReserveSpaceForCommandsInfoNVX pReserveSpaceInfo)Perform a reservation of command buffer space.static intvkCreateIndirectCommandsLayoutNVX(VkDevice device, VkIndirectCommandsLayoutCreateInfoNVX pCreateInfo, VkAllocationCallbacks pAllocator, long[] pIndirectCommandsLayout)Array version of:CreateIndirectCommandsLayoutNVXstatic intvkCreateIndirectCommandsLayoutNVX(VkDevice device, VkIndirectCommandsLayoutCreateInfoNVX pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pIndirectCommandsLayout)Create an indirect command layout object.static intvkCreateObjectTableNVX(VkDevice device, VkObjectTableCreateInfoNVX pCreateInfo, VkAllocationCallbacks pAllocator, long[] pObjectTable)Array version of:CreateObjectTableNVXstatic intvkCreateObjectTableNVX(VkDevice device, VkObjectTableCreateInfoNVX pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pObjectTable)Create an object table.static voidvkDestroyIndirectCommandsLayoutNVX(VkDevice device, long indirectCommandsLayout, VkAllocationCallbacks pAllocator)Destroy an object table.static voidvkDestroyObjectTableNVX(VkDevice device, long objectTable, VkAllocationCallbacks pAllocator)Destroy an object table.static voidvkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(VkPhysicalDevice physicalDevice, VkDeviceGeneratedCommandsFeaturesNVX pFeatures, VkDeviceGeneratedCommandsLimitsNVX pLimits)Returns device-generated commands related properties of a physical device.static intvkRegisterObjectsNVX(VkDevice device, long objectTable, org.lwjgl.PointerBuffer ppObjectTableEntries, int[] pObjectIndices)Array version of:RegisterObjectsNVXstatic intvkRegisterObjectsNVX(VkDevice device, long objectTable, org.lwjgl.PointerBuffer ppObjectTableEntries, java.nio.IntBuffer pObjectIndices)Register resource bindings in an object table.static intvkUnregisterObjectsNVX(VkDevice device, long objectTable, int[] pObjectEntryTypes, int[] pObjectIndices)Array version of:UnregisterObjectsNVXstatic intvkUnregisterObjectsNVX(VkDevice device, long objectTable, java.nio.IntBuffer pObjectEntryTypes, java.nio.IntBuffer pObjectIndices)Unregister resource bindings in an object table.
-
-
-
Field Detail
-
VK_NVX_DEVICE_GENERATED_COMMANDS_SPEC_VERSION
The extension specification version.
-
VK_NVX_DEVICE_GENERATED_COMMANDS_EXTENSION_NAME
The extension name.
-
VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX, VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX, VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX, VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX, VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX, VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX
ExtendsVkStructureType.Enum values:
STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVXSTRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVXSTRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVXSTRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVXSTRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVXSTRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX
-
VK_PIPELINE_STAGE_COMMAND_PROCESS_BIT_NVX
ExtendsVkPipelineStageFlagBits.
-
VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX, VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX
ExtendsVkAccessFlagBits.Enum values:
-
VK_OBJECT_TYPE_OBJECT_TABLE_NVX, VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX
ExtendsVkObjectType.Enum values:
-
VK_INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX, VK_INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVX, VK_INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX, VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX
VkIndirectCommandsLayoutUsageFlagBitsNVX - Bitmask specifying allowed usage of an indirect commands layoutDescription
INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVXspecifies that the processing of sequences can happen at an implementation-dependent order, which is not guaranteed to be coherent across multiple invocations.INDIRECT_COMMANDS_LAYOUT_USAGE_SPARSE_SEQUENCES_BIT_NVXspecifies that there is likely a high difference between allocated number of sequences and actually used.INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVXspecifies that there are likely many draw or dispatch calls that are zero-sized (zero grid dimension, no primitives to render).INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVXspecifies that the input data for the sequences is not implicitly indexed from 0..sequencesUsed but a user providedVkBufferencoding the index is provided.
See Also
VkIndirectCommandsLayoutUsageFlagsNVX
-
VK_OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVX, VK_OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX
VkObjectEntryUsageFlagBitsNVX - Bitmask specifying allowed usage of an object entryDescription
OBJECT_ENTRY_USAGE_GRAPHICS_BIT_NVXspecifies that the resource is bound toPIPELINE_BIND_POINT_GRAPHICSOBJECT_ENTRY_USAGE_COMPUTE_BIT_NVXspecifies that the resource is bound toPIPELINE_BIND_POINT_COMPUTE
See Also
VkObjectEntryUsageFlagsNVX
-
VK_INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVX, VK_INDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVX
VkIndirectCommandsTokenTypeNVX - Enum specifyingDescription
Supported indirect command tokens
Token type Equivalent command INDIRECT_COMMANDS_TOKEN_TYPE_PIPELINE_NVXvkCmdBindPipelineINDIRECT_COMMANDS_TOKEN_TYPE_DESCRIPTOR_SET_NVXvkCmdBindDescriptorSetsINDIRECT_COMMANDS_TOKEN_TYPE_INDEX_BUFFER_NVXvkCmdBindIndexBufferINDIRECT_COMMANDS_TOKEN_TYPE_VERTEX_BUFFER_NVXvkCmdBindVertexBuffersINDIRECT_COMMANDS_TOKEN_TYPE_PUSH_CONSTANT_NVXvkCmdPushConstantsINDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_NVXvkCmdDrawIndexedIndirectINDIRECT_COMMANDS_TOKEN_TYPE_DRAW_NVXvkCmdDrawIndirectINDIRECT_COMMANDS_TOKEN_TYPE_DISPATCH_NVXvkCmdDispatchIndirectSee Also
VkIndirectCommandsLayoutTokenNVX,VkIndirectCommandsTokenNVX
-
VK_OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVX, VK_OBJECT_ENTRY_TYPE_PIPELINE_NVX, VK_OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX, VK_OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX, VK_OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX
VkObjectEntryTypeNVX - Enum specifying object table entry typeDescription
OBJECT_ENTRY_TYPE_DESCRIPTOR_SET_NVXspecifies aVkDescriptorSetresource entry that is registered viaVkObjectTableDescriptorSetEntryNVX.OBJECT_ENTRY_TYPE_PIPELINE_NVXspecifies aVkPipelineresource entry that is registered viaVkObjectTablePipelineEntryNVX.OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVXspecifies aVkBufferresource entry that is registered viaVkObjectTableIndexBufferEntryNVX.OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVXspecifies aVkBufferresource entry that is registered viaVkObjectTableVertexBufferEntryNVX.OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVXspecifies the resource entry is registered viaVkObjectTablePushConstantEntryNVX.
See Also
VkObjectTableCreateInfoNVX,VkObjectTableDescriptorSetEntryNVX,VkObjectTableEntryNVX,VkObjectTableIndexBufferEntryNVX,VkObjectTablePipelineEntryNVX,VkObjectTablePushConstantEntryNVX,VkObjectTableVertexBufferEntryNVX,UnregisterObjectsNVX
-
-
Method Detail
-
nvkCmdProcessCommandsNVX
public static void nvkCmdProcessCommandsNVX(VkCommandBuffer commandBuffer, long pProcessCommandsInfo)
Unsafe version of:CmdProcessCommandsNVX
-
vkCmdProcessCommandsNVX
public static void vkCmdProcessCommandsNVX(VkCommandBuffer commandBuffer, VkCmdProcessCommandsInfoNVX pProcessCommandsInfo)
Performs the generation of commands on the device.C Specification
The actual generation on the device is handled with:
void vkCmdProcessCommandsNVX( VkCommandBuffer commandBuffer, const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo);Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepProcessCommandsInfomust be a valid pointer to a validVkCmdProcessCommandsInfoNVXstructurecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations - This command must only be called inside of a render pass instance
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Primary Secondary Inside Graphics Compute See Also
- Parameters:
commandBuffer- the primary command buffer in which the generation process takes space.pProcessCommandsInfo- a pointer to an instance of theVkCmdProcessCommandsInfoNVXstructure containing parameters affecting the processing of commands.
-
nvkCmdReserveSpaceForCommandsNVX
public static void nvkCmdReserveSpaceForCommandsNVX(VkCommandBuffer commandBuffer, long pReserveSpaceInfo)
Unsafe version of:CmdReserveSpaceForCommandsNVX
-
vkCmdReserveSpaceForCommandsNVX
public static void vkCmdReserveSpaceForCommandsNVX(VkCommandBuffer commandBuffer, VkCmdReserveSpaceForCommandsInfoNVX pReserveSpaceInfo)
Perform a reservation of command buffer space.C Specification
Command space for generated commands recorded into a secondary command buffer must be reserved by calling:
void vkCmdReserveSpaceForCommandsNVX( VkCommandBuffer commandBuffer, const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo);Valid Usage
- The provided
commandBuffermust not have had a prior space reservation since its creation or the last reset. - The state of the
commandBuffermust be legal to execute all commands within the sequence provided by theindirectCommandsLayoutmember ofpProcessCommandsInfo.
Valid Usage (Implicit)
commandBuffermust be a validVkCommandBufferhandlepReserveSpaceInfomust be a valid pointer to a validVkCmdReserveSpaceForCommandsInfoNVXstructurecommandBuffermust be in the recording state- The
VkCommandPoolthatcommandBufferwas allocated from must support graphics, or compute operations - This command must only be called inside of a render pass instance
commandBuffermust be a secondaryVkCommandBuffer
Host Synchronization
- Host access to
commandBuffermust be externally synchronized - Host access to the
VkCommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
Command Buffer Levels Render Pass Scope Supported Queue Types Pipeline Type Secondary Inside Graphics Compute See Also
- Parameters:
commandBuffer- the secondary command buffer in which the space for device-generated commands is reserved.
- The provided
-
nvkCreateIndirectCommandsLayoutNVX
public static int nvkCreateIndirectCommandsLayoutNVX(VkDevice device, long pCreateInfo, long pAllocator, long pIndirectCommandsLayout)
Unsafe version of:CreateIndirectCommandsLayoutNVX
-
vkCreateIndirectCommandsLayoutNVX
public static int vkCreateIndirectCommandsLayoutNVX(VkDevice device, VkIndirectCommandsLayoutCreateInfoNVX pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pIndirectCommandsLayout)
Create an indirect command layout object.C Specification
Indirect command layouts are created by:
VkResult vkCreateIndirectCommandsLayoutNVX( VkDevice device, const VkIndirectCommandsLayoutCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout);Valid Usage (Implicit)
devicemust be a validVkDevicehandlepCreateInfomust be a valid pointer to a validVkIndirectCommandsLayoutCreateInfoNVXstructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure pIndirectCommandsLayoutmust be a valid pointer to aVkIndirectCommandsLayoutNVXhandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
VkAllocationCallbacks,VkIndirectCommandsLayoutCreateInfoNVX- Parameters:
device- the logical device that creates the indirect command layout.pCreateInfo- a pointer to an instance of theVkIndirectCommandsLayoutCreateInfoNVXstructure containing parameters affecting creation of the indirect command layout.pAllocator- controls host memory allocation as described in the Memory Allocation chapter.pIndirectCommandsLayout- points to aVkIndirectCommandsLayoutNVXhandle in which the resulting indirect command layout is returned.
-
nvkDestroyIndirectCommandsLayoutNVX
public static void nvkDestroyIndirectCommandsLayoutNVX(VkDevice device, long indirectCommandsLayout, long pAllocator)
Unsafe version of:DestroyIndirectCommandsLayoutNVX
-
vkDestroyIndirectCommandsLayoutNVX
public static void vkDestroyIndirectCommandsLayoutNVX(VkDevice device, long indirectCommandsLayout, @Nullable VkAllocationCallbacks pAllocator)
Destroy an object table.C Specification
Indirect command layouts are destroyed by:
void vkDestroyIndirectCommandsLayoutNVX( VkDevice device, VkIndirectCommandsLayoutNVX indirectCommandsLayout, const VkAllocationCallbacks* pAllocator);Valid Usage
- All submitted commands that refer to
indirectCommandsLayoutmust have completed execution - If
VkAllocationCallbackswere provided whenobjectTablewas created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbackswere provided whenobjectTablewas created,pAllocatormust beNULL
Valid Usage (Implicit)
devicemust be a validVkDevicehandleindirectCommandsLayoutmust be a validVkIndirectCommandsLayoutNVXhandle- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure indirectCommandsLayoutmust have been created, allocated, or retrieved fromdevice
See Also
- Parameters:
device- the logical device that destroys the layout.indirectCommandsLayout- the table to destroy.pAllocator- controls host memory allocation as described in the Memory Allocation chapter.
- All submitted commands that refer to
-
nvkCreateObjectTableNVX
public static int nvkCreateObjectTableNVX(VkDevice device, long pCreateInfo, long pAllocator, long pObjectTable)
Unsafe version of:CreateObjectTableNVX
-
vkCreateObjectTableNVX
public static int vkCreateObjectTableNVX(VkDevice device, VkObjectTableCreateInfoNVX pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, java.nio.LongBuffer pObjectTable)
Create an object table.C Specification
To create object tables, call:
VkResult vkCreateObjectTableNVX( VkDevice device, const VkObjectTableCreateInfoNVX* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkObjectTableNVX* pObjectTable);Valid Usage (Implicit)
devicemust be a validVkDevicehandlepCreateInfomust be a valid pointer to a validVkObjectTableCreateInfoNVXstructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure pObjectTablemust be a valid pointer to aVkObjectTableNVXhandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the logical device that creates the object table.pCreateInfo- a pointer to an instance of theVkObjectTableCreateInfoNVXstructure containing parameters affecting creation of the table.pAllocator- controls host memory allocation as described in the Memory Allocation chapter.pObjectTable- points to aVkObjectTableNVXhandle in which the resulting object table is returned.
-
nvkDestroyObjectTableNVX
public static void nvkDestroyObjectTableNVX(VkDevice device, long objectTable, long pAllocator)
Unsafe version of:DestroyObjectTableNVX
-
vkDestroyObjectTableNVX
public static void vkDestroyObjectTableNVX(VkDevice device, long objectTable, @Nullable VkAllocationCallbacks pAllocator)
Destroy an object table.C Specification
To destroy an object table, call:
void vkDestroyObjectTableNVX( VkDevice device, VkObjectTableNVX objectTable, const VkAllocationCallbacks* pAllocator);Valid Usage
- All submitted commands that refer to
objectTablemust have completed execution. - If
VkAllocationCallbackswere provided whenobjectTablewas created, a compatible set of callbacks must be provided here. - If no
VkAllocationCallbackswere provided whenobjectTablewas created,pAllocatormust beNULL.
Valid Usage (Implicit)
devicemust be a validVkDevicehandleobjectTablemust be a validVkObjectTableNVXhandle- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure objectTablemust have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
objectTablemust be externally synchronized
See Also
- Parameters:
device- the logical device that destroys the table.objectTable- the table to destroy.pAllocator- controls host memory allocation as described in the Memory Allocation chapter.
- All submitted commands that refer to
-
nvkRegisterObjectsNVX
public static int nvkRegisterObjectsNVX(VkDevice device, long objectTable, int objectCount, long ppObjectTableEntries, long pObjectIndices)
Unsafe version of:RegisterObjectsNVX- Parameters:
objectCount- the number of resources to register.
-
vkRegisterObjectsNVX
public static int vkRegisterObjectsNVX(VkDevice device, long objectTable, org.lwjgl.PointerBuffer ppObjectTableEntries, java.nio.IntBuffer pObjectIndices)
Register resource bindings in an object table.C Specification
Resource bindings of Vulkan objects are registered at an arbitrary
uint32_tindex within an object table. As long as the object table references such objects, they must not be deleted.VkResult vkRegisterObjectsNVX( VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectTableEntryNVX* const* ppObjectTableEntries, const uint32_t* pObjectIndices);Valid Usage
- The contents of
pObjectTableEntrymust yield plausible bindings supported by the device. - At any
pObjectIndicesthere must not be a registered resource already. - Any value inside
pObjectIndicesmust be below the appropriateVkObjectTableCreateInfoNVX::pObjectEntryCountslimits provided atobjectTablecreation time.
Valid Usage (Implicit)
devicemust be a validVkDevicehandleobjectTablemust be a validVkObjectTableNVXhandleppObjectTableEntriesmust be a valid pointer to an array ofobjectCountvalidVkObjectTableEntryNVXstructurespObjectIndicesmust be a valid pointer to an array ofobjectCountuint32_tvaluesobjectCountmust be greater than 0objectTablemust have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
objectTablemust be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
device- the logical device that creates the object table.objectTable- the table for which the resources are registered.ppObjectTableEntries- provides an array for detailed binding informations, each array element is a pointer to a struct of typeVkObjectTablePipelineEntryNVX,VkObjectTableDescriptorSetEntryNVX,VkObjectTableVertexBufferEntryNVX,VkObjectTableIndexBufferEntryNVXorVkObjectTablePushConstantEntryNVX(see below for details).pObjectIndices- are the indices at which each resource is registered.
- The contents of
-
nvkUnregisterObjectsNVX
public static int nvkUnregisterObjectsNVX(VkDevice device, long objectTable, int objectCount, long pObjectEntryTypes, long pObjectIndices)
Unsafe version of:UnregisterObjectsNVX- Parameters:
objectCount- the number of resources being removed from the object table.
-
vkUnregisterObjectsNVX
public static int vkUnregisterObjectsNVX(VkDevice device, long objectTable, java.nio.IntBuffer pObjectEntryTypes, java.nio.IntBuffer pObjectIndices)
Unregister resource bindings in an object table.C Specification
Use the following command to unregister resources from an object table:
VkResult vkUnregisterObjectsNVX( VkDevice device, VkObjectTableNVX objectTable, uint32_t objectCount, const VkObjectEntryTypeNVX* pObjectEntryTypes, const uint32_t* pObjectIndices);Valid Usage
- At any
pObjectIndicesthere must be a registered resource already. - The
pObjectEntryTypesof the resource atpObjectIndicesmust match. - All operations on the device using the registered resource must have been completed.
Valid Usage (Implicit)
devicemust be a validVkDevicehandleobjectTablemust be a validVkObjectTableNVXhandlepObjectEntryTypesmust be a valid pointer to an array ofobjectCountvalidVkObjectEntryTypeNVXvaluespObjectIndicesmust be a valid pointer to an array ofobjectCountuint32_tvaluesobjectCountmust be greater than 0objectTablemust have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
objectTablemust be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
- Parameters:
device- the logical device that creates the object table.objectTable- the table from which the resources are unregistered.pObjectIndices- provides the array of object indices to be removed.
- At any
-
nvkGetPhysicalDeviceGeneratedCommandsPropertiesNVX
public static void nvkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(VkPhysicalDevice physicalDevice, long pFeatures, long pLimits)
Unsafe version of:GetPhysicalDeviceGeneratedCommandsPropertiesNVX
-
vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX
public static void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(VkPhysicalDevice physicalDevice, VkDeviceGeneratedCommandsFeaturesNVX pFeatures, VkDeviceGeneratedCommandsLimitsNVX pLimits)
Returns device-generated commands related properties of a physical device.C Specification
To query the support of related features and limitations, call:
void vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX( VkPhysicalDevice physicalDevice, VkDeviceGeneratedCommandsFeaturesNVX* pFeatures, VkDeviceGeneratedCommandsLimitsNVX* pLimits);Valid Usage (Implicit)
physicalDevicemust be a validVkPhysicalDevicehandlepFeaturesmust be a valid pointer to aVkDeviceGeneratedCommandsFeaturesNVXstructurepLimitsmust be a valid pointer to aVkDeviceGeneratedCommandsLimitsNVXstructure
See Also
VkDeviceGeneratedCommandsFeaturesNVX,VkDeviceGeneratedCommandsLimitsNVX- Parameters:
physicalDevice- the handle to the physical device whose properties will be queried.pFeatures- points to an instance of theVkDeviceGeneratedCommandsFeaturesNVXstructure, that will be filled with returned information.pLimits- points to an instance of theVkDeviceGeneratedCommandsLimitsNVXstructure, that will be filled with returned information.
-
vkCreateIndirectCommandsLayoutNVX
public static int vkCreateIndirectCommandsLayoutNVX(VkDevice device, VkIndirectCommandsLayoutCreateInfoNVX pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pIndirectCommandsLayout)
Array version of:CreateIndirectCommandsLayoutNVX
-
vkCreateObjectTableNVX
public static int vkCreateObjectTableNVX(VkDevice device, VkObjectTableCreateInfoNVX pCreateInfo, @Nullable VkAllocationCallbacks pAllocator, long[] pObjectTable)
Array version of:CreateObjectTableNVX
-
vkRegisterObjectsNVX
public static int vkRegisterObjectsNVX(VkDevice device, long objectTable, org.lwjgl.PointerBuffer ppObjectTableEntries, int[] pObjectIndices)
Array version of:RegisterObjectsNVX
-
vkUnregisterObjectsNVX
public static int vkUnregisterObjectsNVX(VkDevice device, long objectTable, int[] pObjectEntryTypes, int[] pObjectIndices)
Array version of:UnregisterObjectsNVX
-
-