mirror of
https://github.com/status-im/Vulkan-Docs.git
synced 2025-01-23 20:59:02 +00:00
b557dd2167
* Update release number to 96. Public Issues: * Fix typo in `vk.xml` for `structextends` attribute of slink:VkPhysicalDeviceShadingRateImagePropertiesNV (public PR 870). * Fix links in optimized PDF output (public PR 879). Internal Issues: * Add a link to GitHub contributors in the <<credits, Other Credits>> section (internal issue 808). * Clarify the behavior of command aliases described in the <<versions,Core Revisions>> and <<initialization-functionpointers, Command Function Pointers>> sections and the registry schema document with respect to whether they are or are not the same entry point, and what the behaviour of the ftext:vkGet*ProcAddr commands is for each alias (internal issue 1462). * Update slink:VkPipelineShaderStageCreateInfo valid usage statements for writing to code:Layer and code:viewportIndex to apply to any vertex processing stage (internal issue 1475). * Make sparse image creation optional for Y'C~B~C~R~ formats in the <<features-required-format-support, Required Format Support>> section and the <<features-formats-requiring-sampler-ycbcr-conversion, Formats requiring sampler Y'C~B~C~R~ conversion for ename:VK_IMAGE_ASPECT_COLOR_BIT image views>> table (internal issue 1476). * Modify the valid usage statement for flink:vkCmdDrawIndirectByteCountEXT::pname:vertexStride to use the pname:maxTransformFeedbackBufferDataStride limit rather than the pname:maxVertexInputBindingStride limit, which is a better match for transform feedback related operations (internal issue 1487). * Changed all members of slink:VkPhysicalDevicePCIBusInfoPropertiesEXT to have the `uint32_t` type. This is an imcompatible change to an EXT that's very recently released; although this is against usual Vulkan WG policy, we discussed and consider this an acceptable risk, but have polled the mesa-dev list in case there are use cases we missed (internal issue 1492). * Set spec vetsion to 1 for `VK_GOOGLE_hlsl_functionality1` and `VK_GOOGLE_decorate_string` in `vk.xml` (internal MR 2948). * Remove redundant valid usage statement `VkImageCreateInfo-pNext-02395` (internal MR 2950). * Add `check_spec_links.py` script, use it in Gitlab CI, and fix many minor markup issues discovered by the script (internal MR 2955). * Update `BUILD.md` to the current Ruby version (2.5.3), and make some corresponding updates to per-platform build instructions (internal MR 2956). * Fix binding numbers and other details in flink:vkUpdateDescriptorSetWithTemplate.txt example code blocks (internal MR 2960). * Remove some nautovalidity="true" in `vk.xml` for NV extensions where it's clearly wrong (internal MR 2970).
195 lines
8.6 KiB
Plaintext
195 lines
8.6 KiB
Plaintext
== Indirect Commands Generation
|
|
|
|
[open,refpage='vkCmdReserveSpaceForCommandsNVX',desc='Perform a reservation of command buffer space',type='protos']
|
|
--
|
|
|
|
Command space for generated commands recorded into a secondary command
|
|
buffer must: be reserved by calling:
|
|
|
|
include::../../api/protos/vkCmdReserveSpaceForCommandsNVX.txt[]
|
|
|
|
* pname:commandBuffer is the secondary command buffer in which the space
|
|
for device-generated commands is reserved.
|
|
* pname:pProcessCommandsInfo is a pointer to an instance of the
|
|
slink:VkCmdReserveSpaceForCommandsInfoNVX structure containing
|
|
parameters affecting the reservation of command buffer space.
|
|
|
|
.Valid Usage
|
|
****
|
|
* [[VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-01329]]
|
|
The provided pname:commandBuffer must: not have had a prior space
|
|
reservation since its creation or the last reset.
|
|
* [[VUID-vkCmdReserveSpaceForCommandsNVX-commandBuffer-01330]]
|
|
The state of the pname:commandBuffer must: be legal to execute all
|
|
commands within the sequence provided by the
|
|
pname:indirectCommandsLayout member of pname:pProcessCommandsInfo.
|
|
****
|
|
|
|
include::../../validity/protos/vkCmdReserveSpaceForCommandsNVX.txt[]
|
|
--
|
|
|
|
[open,refpage='VkCmdReserveSpaceForCommandsInfoNVX',desc='Structure specifying parameters for the reservation of command buffer space',type='structs']
|
|
--
|
|
|
|
include::../../api/structs/VkCmdReserveSpaceForCommandsInfoNVX.txt[]
|
|
|
|
* pname:sType is the type of this structure.
|
|
* pname:pNext is `NULL` or a pointer to an extension-specific structure.
|
|
* pname:objectTable is the slink:VkObjectTableNVX to be used for the
|
|
generation process.
|
|
Only registered objects at the time
|
|
flink:vkCmdReserveSpaceForCommandsNVX is called, will be taken into
|
|
account for the reservation.
|
|
* pname:indirectCommandsLayout is the slink:VkIndirectCommandsLayoutNVX
|
|
that must: also be used at generation time.
|
|
* pname:maxSequencesCount is the maximum number of sequences for which
|
|
command buffer space will be reserved.
|
|
|
|
include::../../validity/structs/VkCmdReserveSpaceForCommandsInfoNVX.txt[]
|
|
--
|
|
|
|
The generated commands will behave as if they were recorded within the call
|
|
to fname:vkCmdReserveSpaceForCommandsNVX, that means they can inherit state
|
|
defined in the command buffer prior this call.
|
|
However, given the stateless nature of the generated sequences, they will
|
|
not affect commands after the reserved space.
|
|
Treat the state that can: be affected by the provided
|
|
sname:VkIndirectCommandsLayoutNVX as undefined:.
|
|
|
|
[open,refpage='vkCmdProcessCommandsNVX',desc='Performs the generation of commands on the device',type='protos']
|
|
--
|
|
|
|
The actual generation on the device is handled with:
|
|
|
|
include::../../api/protos/vkCmdProcessCommandsNVX.txt[]
|
|
|
|
* pname:commandBuffer is the primary command buffer in which the
|
|
generation process takes space.
|
|
* pname:pProcessCommandsInfo is a pointer to an instance of the
|
|
slink:VkCmdProcessCommandsInfoNVX structure containing parameters
|
|
affecting the processing of commands.
|
|
|
|
include::../../validity/protos/vkCmdProcessCommandsNVX.txt[]
|
|
--
|
|
|
|
[open,refpage='VkCmdProcessCommandsInfoNVX',desc='Structure specifying parameters for the generation of commands',type='structs']
|
|
--
|
|
|
|
include::../../api/structs/VkCmdProcessCommandsInfoNVX.txt[]
|
|
|
|
* pname:sType is the type of this structure.
|
|
* pname:pNext is `NULL` or a pointer to an extension-specific structure.
|
|
* pname:objectTable is the slink:VkObjectTableNVX to be used for the
|
|
generation process.
|
|
Only registered objects at the time
|
|
flink:vkCmdReserveSpaceForCommandsNVX is called, will be taken into
|
|
account for the reservation.
|
|
* pname:indirectCommandsLayout is the slink:VkIndirectCommandsLayoutNVX
|
|
that provides the command sequence to generate.
|
|
* pname:indirectCommandsTokenCount defines the number of input tokens
|
|
used.
|
|
* pname:pIndirectCommandsTokens provides an array of
|
|
slink:VkIndirectCommandsTokenNVX that reference the input data for each
|
|
token command.
|
|
* pname:maxSequencesCount is the maximum number of sequences for which
|
|
command buffer space will be reserved.
|
|
If pname:sequencesCountBuffer is dlink:VK_NULL_HANDLE, this is also the
|
|
actual number of sequences generated.
|
|
* pname:targetCommandBuffer can: be the secondary slink:VkCommandBuffer in
|
|
which the commands should be recorded.
|
|
If pname:targetCommandBuffer is `NULL` an implicit reservation as well
|
|
as execution takes place on the processing sname:VkCommandBuffer.
|
|
* pname:sequencesCountBuffer can: be slink:VkBuffer from which the actual
|
|
amount of sequences is sourced from as code:uint32_t value.
|
|
* pname:sequencesCountOffset is the byte offset into
|
|
pname:sequencesCountBuffer where the count value is stored.
|
|
* pname:sequencesIndexBuffer must: be set if
|
|
pname:indirectCommandsLayout's
|
|
ename:VK_INDIRECT_COMMANDS_LAYOUT_USAGE_INDEXED_SEQUENCES_BIT_NVX is set
|
|
and provides the used sequence indices as code:uint32_t array.
|
|
Otherwise it must: be dlink:VK_NULL_HANDLE.
|
|
* pname:sequencesIndexOffset is the byte offset into
|
|
pname:sequencesIndexBuffer where the index values start.
|
|
|
|
|
|
.Valid Usage
|
|
****
|
|
* [[VUID-VkCmdProcessCommandsInfoNVX-objectTable-01331]]
|
|
The provided pname:objectTable must: include all objects referenced by
|
|
the generation process.
|
|
* [[VUID-VkCmdProcessCommandsInfoNVX-indirectCommandsTokenCount-01332]]
|
|
pname:indirectCommandsTokenCount must: match the
|
|
pname:indirectCommandsLayout's pname:tokenCount.
|
|
* [[VUID-VkCmdProcessCommandsInfoNVX-tokenType-01333]]
|
|
The pname:tokenType member of each entry in the
|
|
pname:pIndirectCommandsTokens array must: match the values used at
|
|
creation time of pname:indirectCommandsLayout
|
|
* [[VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01334]]
|
|
If pname:targetCommandBuffer is provided, it must: have reserved command
|
|
space.
|
|
* [[VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01335]]
|
|
If pname:targetCommandBuffer is provided, the pname:objectTable must:
|
|
match the reservation's objectTable and must: have had all referenced
|
|
objects registered at reservation time.
|
|
* [[VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01336]]
|
|
If pname:targetCommandBuffer is provided, the
|
|
pname:indirectCommandsLayout must: match the reservation's
|
|
indirectCommandsLayout.
|
|
* [[VUID-VkCmdProcessCommandsInfoNVX-targetCommandBuffer-01337]]
|
|
If pname:targetCommandBuffer is provided, the pname:maxSequencesCount
|
|
must: not exceed the reservation's maxSequencesCount.
|
|
* [[VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01338]]
|
|
If pname:sequencesCountBuffer is used, its usage flag must: have
|
|
ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set.
|
|
* [[VUID-VkCmdProcessCommandsInfoNVX-sequencesCountBuffer-01339]]
|
|
If pname:sequencesCountBuffer is used, pname:sequencesCountOffset must:
|
|
be aligned to
|
|
sname:VkDeviceGeneratedCommandsLimitsNVX::pname:minSequenceCountBufferOffsetAlignment.
|
|
* [[VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01340]]
|
|
If pname:sequencesIndexBuffer is used, its usage flag must: have
|
|
ename:VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT bit set.
|
|
* [[VUID-VkCmdProcessCommandsInfoNVX-sequencesIndexBuffer-01341]]
|
|
If pname:sequencesIndexBuffer is used, pname:sequencesIndexOffset must:
|
|
be aligned to
|
|
sname:VkDeviceGeneratedCommandsLimitsNVX::pname:minSequenceIndexBufferOffsetAlignment.
|
|
****
|
|
|
|
include::../../validity/structs/VkCmdProcessCommandsInfoNVX.txt[]
|
|
--
|
|
|
|
Referencing the functions defined in <<indirectmdslayout>>,
|
|
fname:vkCmdProcessCommandsNVX behaves as:
|
|
|
|
[source,c]
|
|
---------------------------------------------------
|
|
// For targetCommandBuffers the existing reservedSpace is reset & overwritten.
|
|
|
|
VkCommandBuffer cmd = targetCommandBuffer ?
|
|
targetCommandBuffer.reservedSpace :
|
|
commandBuffer;
|
|
|
|
uint32_t sequencesCount = sequencesCountBuffer ?
|
|
min(maxSequencesCount, sequencesCountBuffer.load_uint32(sequencesCountOffset) :
|
|
maxSequencesCount;
|
|
|
|
|
|
cmdProcessAllSequences(cmd, objectTable,
|
|
indirectCommandsLayout, pIndirectCommandsTokens,
|
|
sequencesCount,
|
|
sequencesIndexBuffer, sequencesIndexOffset);
|
|
|
|
// The stateful commands within indirectCommandsLayout will not
|
|
// affect the state of subsequent commands in the target
|
|
// command buffer (cmd)
|
|
---------------------------------------------------
|
|
|
|
[NOTE]
|
|
.Note
|
|
====
|
|
It is important to note that the state that may be affected through
|
|
generated commands must: be considered undefined: for the commands following
|
|
them.
|
|
It is not possible to setup generated state and provoking work that uses
|
|
this state outside of the generated sequence.
|
|
====
|