• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (c) 2019-2020 NVIDIA Corporation
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5[[device-generated-commands]]
6= Device-Generated Commands
7
8This chapter discusses the generation of command buffer content on the
9device, for which these principle steps are to be taken:
10
11  * Define via sname:VkIndirectCommandsLayoutNV the sequence of commands
12    which should be generated.
13  * Optionally make use of <<graphics-shadergroups, device-bindable Shader
14    Groups>>.
15  * Retrieve device addresses by flink:vkGetBufferDeviceAddressEXT for
16    setting buffers on the device.
17  * Fill one or more sname:VkBuffer with the appropriate content that gets
18    interpreted by sname:VkIndirectCommandsLayoutNV.
19  * Create a `preprocess` sname:VkBuffer using the allocation information
20    from flink:vkGetGeneratedCommandsMemoryRequirementsNV.
21  * Optionally preprocess the input data using
22    flink:vkCmdPreprocessGeneratedCommandsNV in a separate action.
23  * Generate and execute the actual commands via
24    flink:vkCmdExecuteGeneratedCommandsNV passing all required data.
25
26flink:vkCmdPreprocessGeneratedCommandsNV executes in a separate logical
27pipeline from either graphics or compute.
28When preprocessing commands in a separate step they must: be explicitly
29synchronized against the command execution.
30When not preprocessing, the preprocessing is automatically synchronized
31against the command execution.
32
33include::{chapters}/VK_NV_device_generated_commands/indirectcommands.txt[]
34
35include::{chapters}/VK_NV_device_generated_commands/generation.txt[]
36