C Specification
To initialize scratch memory for a particular execution graph, call:
// Provided by VK_AMDX_shader_enqueue
void vkCmdInitializeGraphScratchMemoryAMDX(
VkCommandBuffer commandBuffer,
VkPipeline executionGraph,
VkDeviceAddress scratch,
VkDeviceSize scratchSize);
Parameters
-
commandBufferis the command buffer into which the command will be recorded. -
executionGraphis the execution graph pipeline to initialize the scratch memory for. -
scratchis the address of scratch memory to be initialized. -
scratchSizeis a range in bytes of scratch memory to be initialized.
Description
This command must be called before using scratch to dispatch the
bound execution graph pipeline.
Execution of this command may modify any memory locations in the range
[scratch,scratch + scratchSize).
Accesses to this memory range are performed in the
VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT pipeline stage with the
VK_ACCESS_2_SHADER_STORAGE_READ_BIT and
VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT access flags.
If any portion of scratch is modified by any command other than
vkCmdDispatchGraphAMDX, vkCmdDispatchGraphIndirectAMDX,
vkCmdDispatchGraphIndirectCountAMDX, or
vkCmdInitializeGraphScratchMemoryAMDX with the same execution graph,
it must be reinitialized for the execution graph again before dispatching
against it.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.