Class NVXDeviceGeneratedCommands
- java.lang.Object
-
- org.lwjgl.vulkan.NVXDeviceGeneratedCommands
-
public class NVXDeviceGeneratedCommands extends java.lang.Object
This 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... 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 theVkIndirectCommandsTokenTypeNVX
it 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
CmdReserveSpaceForCommandsNVX
in a target command buffer at the position you want the generated commands to be executed. - call
CmdProcessCommandsNVX
to 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...).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 and Description static void
vkCmdProcessCommandsNVX(VkCommandBuffer commandBuffer, VkCmdProcessCommandsInfoNVX pProcessCommandsInfo)
Performs the generation of commands on the device.static void
vkCmdReserveSpaceForCommandsNVX(VkCommandBuffer commandBuffer, VkCmdReserveSpaceForCommandsInfoNVX pReserveSpaceInfo)
Perform a reservation of command buffer space.static int
vkCreateIndirectCommandsLayoutNVX(VkDevice device, VkIndirectCommandsLayoutCreateInfoNVX pCreateInfo, VkAllocationCallbacks pAllocator, long[] pIndirectCommandsLayout)
Array version of:CreateIndirectCommandsLayoutNVX
static int
vkCreateIndirectCommandsLayoutNVX(VkDevice device, VkIndirectCommandsLayoutCreateInfoNVX pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pIndirectCommandsLayout)
Create an indirect command layout object.static int
vkCreateObjectTableNVX(VkDevice device, VkObjectTableCreateInfoNVX pCreateInfo, VkAllocationCallbacks pAllocator, long[] pObjectTable)
Array version of:CreateObjectTableNVX
static int
vkCreateObjectTableNVX(VkDevice device, VkObjectTableCreateInfoNVX pCreateInfo, VkAllocationCallbacks pAllocator, java.nio.LongBuffer pObjectTable)
Create an object table.static void
vkDestroyIndirectCommandsLayoutNVX(VkDevice device, long indirectCommandsLayout, VkAllocationCallbacks pAllocator)
Destroy a object table.static void
vkDestroyObjectTableNVX(VkDevice device, long objectTable, VkAllocationCallbacks pAllocator)
Destroy a object table.static void
vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX(VkPhysicalDevice physicalDevice, VkDeviceGeneratedCommandsFeaturesNVX pFeatures, VkDeviceGeneratedCommandsLimitsNVX pLimits)
Returns device-generated commands related properties of a physical device.static int
vkRegisterObjectsNVX(VkDevice device, long objectTable, org.lwjgl.PointerBuffer ppObjectTableEntries, int[] pObjectIndices)
Array version of:RegisterObjectsNVX
static int
vkRegisterObjectsNVX(VkDevice device, long objectTable, org.lwjgl.PointerBuffer ppObjectTableEntries, java.nio.IntBuffer pObjectIndices)
Register resource bindings in an object table.static int
vkUnregisterObjectsNVX(VkDevice device, long objectTable, int[] pObjectEntryTypes, int[] pObjectIndices)
Array version of:UnregisterObjectsNVX
static int
vkUnregisterObjectsNVX(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_NVX
STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX
STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX
STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX
STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX
STRUCTURE_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 a indirect commands layoutDescription
INDIRECT_COMMANDS_LAYOUT_USAGE_UNORDERED_SEQUENCES_BIT_NVX
indicates 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_NVX
indicates that there is likely a high difference between allocated number of sequences and actually used.INDIRECT_COMMANDS_LAYOUT_USAGE_EMPTY_EXECUTIONS_BIT_NVX
indicates 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_NVX
indicates that the input data for the sequences is not implicitly indexed from 0..sequencesUsed but a user providedVkBuffer
encoding 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_NVX
indicates that the resource is bound toPIPELINE_BIND_POINT_GRAPHICS
OBJECT_ENTRY_USAGE_COMPUTE_BIT_NVX
indicates 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
See 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_NVX
indicates aVkDescriptorSet
resource entry that is registered viaVkObjectTableDescriptorSetEntryNVX
.OBJECT_ENTRY_TYPE_PIPELINE_NVX
indicates aVkPipeline
resource entry that is registered viaVkObjectTablePipelineEntryNVX
.OBJECT_ENTRY_TYPE_INDEX_BUFFER_NVX
indicates aVkBuffer
resource entry that is registered viaVkObjectTableIndexBufferEntryNVX
.OBJECT_ENTRY_TYPE_VERTEX_BUFFER_NVX
indicates aVkBuffer
resource entry that is registered viaVkObjectTableVertexBufferEntryNVX
.OBJECT_ENTRY_TYPE_PUSH_CONSTANT_NVX
indicates the resource entry is registered viaVkObjectTablePushConstantEntryNVX
.
See Also
VkObjectTableCreateInfoNVX
,VkObjectTableDescriptorSetEntryNVX
,VkObjectTableEntryNVX
,VkObjectTableIndexBufferEntryNVX
,VkObjectTablePipelineEntryNVX
,VkObjectTablePushConstantEntryNVX
,VkObjectTableVertexBufferEntryNVX
,UnregisterObjectsNVX
-
-
Method Detail
-
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)
commandBuffer
must be a validVkCommandBuffer
handlepProcessCommandsInfo
must be a valid pointer to a validVkCmdProcessCommandsInfoNVX
structurecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was 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
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was 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 theVkCmdProcessCommandsInfoNVX
structure containing parameters affecting the processing of commands.
-
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
commandBuffer
must not have had a prior space reservation since its creation or the last reset. - The state of the
commandBuffer
must be legal to execute all commands within the sequence provided by theindirectCommandsLayout
member ofpProcessCommandsInfo
.
Valid Usage (Implicit)
commandBuffer
must be a validVkCommandBuffer
handlepReserveSpaceInfo
must be a valid pointer to a validVkCmdReserveSpaceForCommandsInfoNVX
structurecommandBuffer
must be in the recording state- The
VkCommandPool
thatcommandBuffer
was allocated from must support graphics, or compute operations - This command must only be called inside of a render pass instance
commandBuffer
must be a secondaryVkCommandBuffer
Host Synchronization
- Host access to
commandBuffer
must be externally synchronized - Host access to the
VkCommandPool
thatcommandBuffer
was 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.pReserveSpaceInfo
-
- The provided
-
vkCreateIndirectCommandsLayoutNVX
public static int vkCreateIndirectCommandsLayoutNVX(VkDevice device, VkIndirectCommandsLayoutCreateInfoNVX pCreateInfo, 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)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkIndirectCommandsLayoutCreateInfoNVX
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pIndirectCommandsLayout
must be a valid pointer to aVkIndirectCommandsLayoutNVX
handle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
VkAllocationCallbacks
,VkIndirectCommandsLayoutCreateInfoNVX
- Parameters:
device
- the logical device that creates the object table.pCreateInfo
- a pointer to an instance of theVkObjectTableCreateInfoNVX
structure containing parameters affecting creation of the table.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pIndirectCommandsLayout
- points to aVkObjectTableNVX
handle in which the resulting object table is returned.
-
vkDestroyIndirectCommandsLayoutNVX
public static void vkDestroyIndirectCommandsLayoutNVX(VkDevice device, long indirectCommandsLayout, VkAllocationCallbacks pAllocator)
Destroy a 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
indirectCommandsLayout
must have completed execution - If
VkAllocationCallbacks
were provided whenobjectTable
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenobjectTable
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handleindirectCommandsLayout
must be a validVkIndirectCommandsLayoutNVX
handle- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure indirectCommandsLayout
must 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
-
vkCreateObjectTableNVX
public static int vkCreateObjectTableNVX(VkDevice device, VkObjectTableCreateInfoNVX pCreateInfo, 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)
device
must be a validVkDevice
handlepCreateInfo
must be a valid pointer to a validVkObjectTableCreateInfoNVX
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pObjectTable
must be a valid pointer to aVkObjectTableNVX
handle
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 theVkObjectTableCreateInfoNVX
structure containing parameters affecting creation of the table.pAllocator
- controls host memory allocation as described in the Memory Allocation chapter.pObjectTable
- points to aVkObjectTableNVX
handle in which the resulting object table is returned.
-
vkDestroyObjectTableNVX
public static void vkDestroyObjectTableNVX(VkDevice device, long objectTable, VkAllocationCallbacks pAllocator)
Destroy a 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
objectTable
must have completed execution. - If
VkAllocationCallbacks
were provided whenobjectTable
was created, a compatible set of callbacks must be provided here. - If no
VkAllocationCallbacks
were provided whenobjectTable
was created,pAllocator
must beNULL
.
Valid Usage (Implicit)
device
must be a validVkDevice
handleobjectTable
must be a validVkObjectTableNVX
handle- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure objectTable
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
objectTable
must 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
-
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 ftext:uint32_t index 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
pObjectTableEntry
must yield plausible bindings supported by the device. - At any
pObjectIndices
there must not be a registered resource already. - Any value inside
pObjectIndices
must be below the appropriateVkObjectTableCreateInfoNVX
::pObjectEntryCounts
limits provided atobjectTable
creation time.
Valid Usage (Implicit)
device
must be a validVkDevice
handleobjectTable
must be a validVkObjectTableNVX
handleppObjectTableEntries
must be a valid pointer to an array ofobjectCount
validVkObjectTableEntryNVX
structurespObjectIndices
must be a valid pointer to an array ofobjectCount
uint32_t
valuesobjectCount
must be greater than 0objectTable
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
objectTable
must 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
,VkObjectTableIndexBufferEntryNVX
orVkObjectTablePushConstantEntryNVX
(see below for details).pObjectIndices
- are the indices at which each resource is registered.
- The contents of
-
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
pObjectIndices
there must be a registered resource already. - The
pObjectEntryTypes
of the resource atpObjectIndices
must match. - All operations on the device using the registered resource must have been completed.
Valid Usage (Implicit)
device
must be a validVkDevice
handleobjectTable
must be a validVkObjectTableNVX
handlepObjectEntryTypes
must be a valid pointer to an array ofobjectCount
validVkObjectEntryTypeNVX
valuespObjectIndices
must be a valid pointer to an array ofobjectCount
uint32_t
valuesobjectCount
must be greater than 0objectTable
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
objectTable
must 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.pObjectEntryTypes
-pObjectIndices
- provides the array of object indices to be removed.
- At any
-
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)
physicalDevice
must be a validVkPhysicalDevice
handlepFeatures
must be a valid pointer to aVkDeviceGeneratedCommandsFeaturesNVX
structurepLimits
must be a valid pointer to aVkDeviceGeneratedCommandsLimitsNVX
structure
See Also
VkDeviceGeneratedCommandsFeaturesNVX
,VkDeviceGeneratedCommandsLimitsNVX
- Parameters:
physicalDevice
- the handle to the physical device whose properties will be queried.pFeatures
- points to an instance of theVkDeviceGeneratedCommandsFeaturesNVX
structure, that will be filled with returned information.pLimits
- points to an instance of theVkDeviceGeneratedCommandsLimitsNVX
structure, that will be filled with returned information.
-
vkCreateIndirectCommandsLayoutNVX
public static int vkCreateIndirectCommandsLayoutNVX(VkDevice device, VkIndirectCommandsLayoutCreateInfoNVX pCreateInfo, VkAllocationCallbacks pAllocator, long[] pIndirectCommandsLayout)
Array version of:CreateIndirectCommandsLayoutNVX
-
vkCreateObjectTableNVX
public static int vkCreateObjectTableNVX(VkDevice device, VkObjectTableCreateInfoNVX pCreateInfo, 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
-
-