// Copyright 2023-2024 The Khronos Group Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

// Common Valid Usage
// Common to all graph dispatch commands
include::{chapters}/commonvalidity/draw_dispatch_common.adoc[]
  * [[VUID-{refpage}-commandBuffer-09181]]
    pname:commandBuffer must: not be a protected command buffer
  * [[VUID-{refpage}-commandBuffer-09182]]
    pname:commandBuffer must: be a primary command buffer
  * [[VUID-{refpage}-scratch-09183]]
    pname:scratch must: be the device address of an allocated memory range
    at least as large as the value of
    slink:VkExecutionGraphPipelineScratchSizeAMDX::pname:size returned by
    slink:VkExecutionGraphPipelineScratchSizeAMDX for the currently bound
    execution graph pipeline
  * [[VUID-{refpage}-scratch-09184]]
    pname:scratch must: be a device address within a slink:VkBuffer created
    with the ename:VK_BUFFER_USAGE_EXECUTION_GRAPH_SCRATCH_BIT_AMDX
ifdef::VK_KHR_maintenance5[]
    or ename:VK_BUFFER_USAGE_2_EXECUTION_GRAPH_SCRATCH_BIT_AMDX
endif::VK_KHR_maintenance5[]
    flag
  * [[VUID-{refpage}-scratch-09185]]
    Device memory in the range [pname:scratch,pname:scratch +
    slink:VkExecutionGraphPipelineScratchSizeAMDX::pname:size) must: have
    been initialized with flink:vkCmdInitializeGraphScratchMemoryAMDX using
    the currently bound execution graph pipeline, and not modified after
    that by anything other than another execution graph dispatch command
  * [[VUID-{refpage}-maxComputeWorkGroupCount-09186]]
    Execution of this command must: not cause a node to be dispatched with a
    larger number of workgroups than that specified by either a
    code:MaxNumWorkgroupsAMDX decoration in the dispatched node or
    <<limits-maxComputeWorkGroupCount,pname:maxComputeWorkGroupCount>>
  * [[VUID-{refpage}-maxExecutionGraphShaderPayloadCount-09187]]
    Execution of this command must: not cause any shader to initialize more
    than <<limits-maxExecutionGraphShaderPayloadCount,
    pname:maxExecutionGraphShaderPayloadCount>> output payloads
  * [[VUID-{refpage}-NodeMaxPayloadsAMDX-09188]]
    Execution of this command must: not cause any shader that declares
    code:NodeMaxPayloadsAMDX to initialize more output payloads than
    specified by the max number of payloads for that decoration.
    This requirement applies to each code:NodeMaxPayloadsAMDX decoration
    separately
// Common Valid Usage
