[{"data":1,"prerenderedAt":775},["ShallowReactive",2],{"qeOMfb4tg4":3},{"title":4,"description":5,"parent":6,"cmd_buf_level":7,"render_pass_scope":9,"supported_queue_types":10,"tasks":13,"type":15,"xrefs":16,"body":17,"_type":774,"_id":4},"vkCmdInitializeGraphScratchMemoryAMDX","Initialize scratch memory for an execution graph","VK_AMDX_shader_enqueue",[8],"primary","both",[11,12],"graphics","compute",[14],"action","protos",[],{"type":18,"children":19,"toc":772},"root",[20,28,303,348,367,423,471,560,736,766],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25],{"type":26,"value":27},"text","To initialize scratch memory for a particular execution graph, call:",{"type":21,"tag":29,"props":30,"children":31},"code-group",{},[32,144],{"type":21,"tag":33,"props":34,"children":40},"pre",{"className":35,"code":36,"filename":37,"language":38,"meta":39,"style":39},"language-c shiki shiki-themes github-light-default github-dark-default","void vkCmdInitializeGraphScratchMemoryAMDX(\n VkCommandBuffer commandBuffer,\n VkPipeline executionGraph,\n VkDeviceAddress scratch,\n VkDeviceSize scratchSize);\n","C","c","",[41],{"type":21,"tag":42,"props":43,"children":44},"code",{"__ignoreMap":39},[45,69,89,107,125],{"type":21,"tag":46,"props":47,"children":50},"span",{"class":48,"line":49},"line",1,[51,57,63],{"type":21,"tag":46,"props":52,"children":54},{"style":53},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[55],{"type":26,"value":56},"void",{"type":21,"tag":46,"props":58,"children":60},{"style":59},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[61],{"type":26,"value":62}," vkCmdInitializeGraphScratchMemoryAMDX",{"type":21,"tag":46,"props":64,"children":66},{"style":65},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[67],{"type":26,"value":68},"(\n",{"type":21,"tag":46,"props":70,"children":72},{"class":48,"line":71},2,[73,78,84],{"type":21,"tag":46,"props":74,"children":75},{"style":65},[76],{"type":26,"value":77}," VkCommandBuffer ",{"type":21,"tag":46,"props":79,"children":81},{"style":80},"--shiki-default:#953800;--shiki-dark:#FFA657",[82],{"type":26,"value":83},"commandBuffer",{"type":21,"tag":46,"props":85,"children":86},{"style":65},[87],{"type":26,"value":88},",\n",{"type":21,"tag":46,"props":90,"children":92},{"class":48,"line":91},3,[93,98,103],{"type":21,"tag":46,"props":94,"children":95},{"style":65},[96],{"type":26,"value":97}," VkPipeline ",{"type":21,"tag":46,"props":99,"children":100},{"style":80},[101],{"type":26,"value":102},"executionGraph",{"type":21,"tag":46,"props":104,"children":105},{"style":65},[106],{"type":26,"value":88},{"type":21,"tag":46,"props":108,"children":110},{"class":48,"line":109},4,[111,116,121],{"type":21,"tag":46,"props":112,"children":113},{"style":65},[114],{"type":26,"value":115}," VkDeviceAddress ",{"type":21,"tag":46,"props":117,"children":118},{"style":80},[119],{"type":26,"value":120},"scratch",{"type":21,"tag":46,"props":122,"children":123},{"style":65},[124],{"type":26,"value":88},{"type":21,"tag":46,"props":126,"children":128},{"class":48,"line":127},5,[129,134,139],{"type":21,"tag":46,"props":130,"children":131},{"style":65},[132],{"type":26,"value":133}," VkDeviceSize ",{"type":21,"tag":46,"props":135,"children":136},{"style":80},[137],{"type":26,"value":138},"scratchSize",{"type":21,"tag":46,"props":140,"children":141},{"style":65},[142],{"type":26,"value":143},");\n",{"type":21,"tag":33,"props":145,"children":150},{"className":146,"code":147,"filename":148,"language":149,"meta":39,"style":39},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn cmd_initialize_graph_scratch_memory_amdx(\n command_buffer: vk::CommandBuffer,\n execution_graph: vk::Pipeline,\n scratch: vk::DeviceAddress,\n scratch_size: vk::DeviceSize,\n);\n","Rust","rs",[151],{"type":21,"tag":42,"props":152,"children":153},{"__ignoreMap":39},[154,176,208,237,266,295],{"type":21,"tag":46,"props":155,"children":156},{"class":48,"line":49},[157,162,167,172],{"type":21,"tag":46,"props":158,"children":159},{"style":53},[160],{"type":26,"value":161},"pub",{"type":21,"tag":46,"props":163,"children":164},{"style":53},[165],{"type":26,"value":166}," fn",{"type":21,"tag":46,"props":168,"children":169},{"style":59},[170],{"type":26,"value":171}," cmd_initialize_graph_scratch_memory_amdx",{"type":21,"tag":46,"props":173,"children":174},{"style":65},[175],{"type":26,"value":68},{"type":21,"tag":46,"props":177,"children":178},{"class":48,"line":71},[179,184,189,194,199,204],{"type":21,"tag":46,"props":180,"children":181},{"style":65},[182],{"type":26,"value":183}," command_buffer",{"type":21,"tag":46,"props":185,"children":186},{"style":53},[187],{"type":26,"value":188},":",{"type":21,"tag":46,"props":190,"children":191},{"style":80},[192],{"type":26,"value":193}," vk",{"type":21,"tag":46,"props":195,"children":196},{"style":53},[197],{"type":26,"value":198},"::",{"type":21,"tag":46,"props":200,"children":201},{"style":80},[202],{"type":26,"value":203},"CommandBuffer",{"type":21,"tag":46,"props":205,"children":206},{"style":65},[207],{"type":26,"value":88},{"type":21,"tag":46,"props":209,"children":210},{"class":48,"line":91},[211,216,220,224,228,233],{"type":21,"tag":46,"props":212,"children":213},{"style":65},[214],{"type":26,"value":215}," execution_graph",{"type":21,"tag":46,"props":217,"children":218},{"style":53},[219],{"type":26,"value":188},{"type":21,"tag":46,"props":221,"children":222},{"style":80},[223],{"type":26,"value":193},{"type":21,"tag":46,"props":225,"children":226},{"style":53},[227],{"type":26,"value":198},{"type":21,"tag":46,"props":229,"children":230},{"style":80},[231],{"type":26,"value":232},"Pipeline",{"type":21,"tag":46,"props":234,"children":235},{"style":65},[236],{"type":26,"value":88},{"type":21,"tag":46,"props":238,"children":239},{"class":48,"line":109},[240,245,249,253,257,262],{"type":21,"tag":46,"props":241,"children":242},{"style":65},[243],{"type":26,"value":244}," scratch",{"type":21,"tag":46,"props":246,"children":247},{"style":53},[248],{"type":26,"value":188},{"type":21,"tag":46,"props":250,"children":251},{"style":80},[252],{"type":26,"value":193},{"type":21,"tag":46,"props":254,"children":255},{"style":53},[256],{"type":26,"value":198},{"type":21,"tag":46,"props":258,"children":259},{"style":80},[260],{"type":26,"value":261},"DeviceAddress",{"type":21,"tag":46,"props":263,"children":264},{"style":65},[265],{"type":26,"value":88},{"type":21,"tag":46,"props":267,"children":268},{"class":48,"line":127},[269,274,278,282,286,291],{"type":21,"tag":46,"props":270,"children":271},{"style":65},[272],{"type":26,"value":273}," scratch_size",{"type":21,"tag":46,"props":275,"children":276},{"style":53},[277],{"type":26,"value":188},{"type":21,"tag":46,"props":279,"children":280},{"style":80},[281],{"type":26,"value":193},{"type":21,"tag":46,"props":283,"children":284},{"style":53},[285],{"type":26,"value":198},{"type":21,"tag":46,"props":287,"children":288},{"style":80},[289],{"type":26,"value":290},"DeviceSize",{"type":21,"tag":46,"props":292,"children":293},{"style":65},[294],{"type":26,"value":88},{"type":21,"tag":46,"props":296,"children":298},{"class":48,"line":297},6,[299],{"type":21,"tag":46,"props":300,"children":301},{"style":65},[302],{"type":26,"value":143},{"type":21,"tag":304,"props":305,"children":306},"ul",{},[307,318,328,338],{"type":21,"tag":308,"props":309,"children":310},"li",{},[311,316],{"type":21,"tag":42,"props":312,"children":314},{"className":313},[],[315],{"type":26,"value":83},{"type":26,"value":317}," is the command buffer into which the command will be\nrecorded.",{"type":21,"tag":308,"props":319,"children":320},{},[321,326],{"type":21,"tag":42,"props":322,"children":324},{"className":323},[],[325],{"type":26,"value":102},{"type":26,"value":327}," is the execution graph pipeline to initialize the\nscratch memory for.",{"type":21,"tag":308,"props":329,"children":330},{},[331,336],{"type":21,"tag":42,"props":332,"children":334},{"className":333},[],[335],{"type":26,"value":120},{"type":26,"value":337}," is the address of scratch memory to be initialized.",{"type":21,"tag":308,"props":339,"children":340},{},[341,346],{"type":21,"tag":42,"props":342,"children":344},{"className":343},[],[345],{"type":26,"value":138},{"type":26,"value":347}," is a range in bytes of scratch memory to be\ninitialized.",{"type":21,"tag":22,"props":349,"children":350},{},[351,353,358,360,365],{"type":26,"value":352},"This command ",{"type":21,"tag":354,"props":355,"children":357},"normative",{"type":356},"must",[],{"type":26,"value":359}," be called before using ",{"type":21,"tag":42,"props":361,"children":363},{"className":362},[],[364],{"type":26,"value":120},{"type":26,"value":366}," to dispatch the\ncurrently bound execution graph pipeline.",{"type":21,"tag":22,"props":368,"children":369},{},[370,372,376,378,383,385,390,392,397,399,405,407,413,415,421],{"type":26,"value":371},"Execution of this command ",{"type":21,"tag":354,"props":373,"children":375},{"type":374},"may",[],{"type":26,"value":377}," modify any memory locations in the range\n[",{"type":21,"tag":42,"props":379,"children":381},{"className":380},[],[382],{"type":26,"value":120},{"type":26,"value":384},",",{"type":21,"tag":42,"props":386,"children":388},{"className":387},[],[389],{"type":26,"value":120},{"type":26,"value":391}," + ",{"type":21,"tag":42,"props":393,"children":395},{"className":394},[],[396],{"type":26,"value":138},{"type":26,"value":398},").\nAccesses to this memory range are performed in the\n",{"type":21,"tag":42,"props":400,"children":402},{"className":401},[],[403],{"type":26,"value":404},"VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT",{"type":26,"value":406}," pipeline stage with the\n",{"type":21,"tag":42,"props":408,"children":410},{"className":409},[],[411],{"type":26,"value":412},"VK_ACCESS_2_SHADER_STORAGE_READ_BIT",{"type":26,"value":414}," and\n",{"type":21,"tag":42,"props":416,"children":418},{"className":417},[],[419],{"type":26,"value":420},"VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT",{"type":26,"value":422}," access flags.",{"type":21,"tag":22,"props":424,"children":425},{},[426,428,433,435,442,444,450,451,457,459,464,466,469],{"type":26,"value":427},"If any portion of ",{"type":21,"tag":42,"props":429,"children":431},{"className":430},[],[432],{"type":26,"value":120},{"type":26,"value":434}," is modified by any command other than\n",{"type":21,"tag":436,"props":437,"children":439},"a",{"href":438},"/man/vkCmdDispatchGraphAMDX",[440],{"type":26,"value":441},"vkCmdDispatchGraphAMDX",{"type":26,"value":443},", ",{"type":21,"tag":436,"props":445,"children":447},{"href":446},"/man/vkCmdDispatchGraphIndirectAMDX",[448],{"type":26,"value":449},"vkCmdDispatchGraphIndirectAMDX",{"type":26,"value":88},{"type":21,"tag":436,"props":452,"children":454},{"href":453},"/man/vkCmdDispatchGraphIndirectCountAMDX",[455],{"type":26,"value":456},"vkCmdDispatchGraphIndirectCountAMDX",{"type":26,"value":458},", or\n",{"type":21,"tag":436,"props":460,"children":462},{"href":461},"/man/vkCmdInitializeGraphScratchMemoryAMDX",[463],{"type":26,"value":4},{"type":26,"value":465}," with the same execution graph,\nit ",{"type":21,"tag":354,"props":467,"children":468},{"type":356},[],{"type":26,"value":470}," be reinitialized for the execution graph again before dispatching\nagainst it.",{"type":21,"tag":472,"props":473,"children":475},"validity-group",{"name":474},"Valid Usage",[476,501,542],{"type":21,"tag":477,"props":478,"children":480},"validity-field",{"name":479},"VUID-vkCmdInitializeGraphScratchMemoryAMDX-scratch-10185",[481],{"type":21,"tag":22,"props":482,"children":483},{},[484,489,491,494,496],{"type":21,"tag":42,"props":485,"children":487},{"className":486},[],[488],{"type":26,"value":120},{"type":26,"value":490}," ",{"type":21,"tag":354,"props":492,"children":493},{"type":356},[],{"type":26,"value":495}," be the device address of an allocated memory range\nat least as large as ",{"type":21,"tag":42,"props":497,"children":499},{"className":498},[],[500],{"type":26,"value":138},{"type":21,"tag":477,"props":502,"children":504},{"name":503},"VUID-vkCmdInitializeGraphScratchMemoryAMDX-scratchSize-10186",[505],{"type":21,"tag":22,"props":506,"children":507},{},[508,513,514,517,519,525,526,532,534,540],{"type":21,"tag":42,"props":509,"children":511},{"className":510},[],[512],{"type":26,"value":138},{"type":26,"value":490},{"type":21,"tag":354,"props":515,"children":516},{"type":356},[],{"type":26,"value":518}," be greater than or equal to\n",{"type":21,"tag":436,"props":520,"children":522},{"href":521},"/man/VkExecutionGraphPipelineScratchSizeAMDX",[523],{"type":26,"value":524},"VkExecutionGraphPipelineScratchSizeAMDX",{"type":26,"value":198},{"type":21,"tag":42,"props":527,"children":529},{"className":528},[],[530],{"type":26,"value":531},"minSize",{"type":26,"value":533}," returned by\n",{"type":21,"tag":436,"props":535,"children":537},{"href":536},"/man/vkGetExecutionGraphPipelineScratchSizeAMDX",[538],{"type":26,"value":539},"vkGetExecutionGraphPipelineScratchSizeAMDX",{"type":26,"value":541}," for the currently bound\nexecution graph pipeline",{"type":21,"tag":477,"props":543,"children":545},{"name":544},"VUID-vkCmdInitializeGraphScratchMemoryAMDX-scratch-09144",[546],{"type":21,"tag":22,"props":547,"children":548},{},[549,554,555,558],{"type":21,"tag":42,"props":550,"children":552},{"className":551},[],[553],{"type":26,"value":120},{"type":26,"value":490},{"type":21,"tag":354,"props":556,"children":557},{"type":356},[],{"type":26,"value":559}," be a multiple of 64",{"type":21,"tag":472,"props":561,"children":563},{"name":562},"Valid Usage (Implicit)",[564,590,614,638,667,680,703],{"type":21,"tag":477,"props":565,"children":567},{"name":566},"VUID-vkCmdInitializeGraphScratchMemoryAMDX-commandBuffer-parameter",[568],{"type":21,"tag":22,"props":569,"children":570},{},[571,576,577,580,582,588],{"type":21,"tag":42,"props":572,"children":574},{"className":573},[],[575],{"type":26,"value":83},{"type":26,"value":490},{"type":21,"tag":354,"props":578,"children":579},{"type":356},[],{"type":26,"value":581}," be a valid ",{"type":21,"tag":436,"props":583,"children":585},{"href":584},"/man/VkCommandBuffer",[586],{"type":26,"value":587},"VkCommandBuffer",{"type":26,"value":589}," handle",{"type":21,"tag":477,"props":591,"children":593},{"name":592},"VUID-vkCmdInitializeGraphScratchMemoryAMDX-executionGraph-parameter",[594],{"type":21,"tag":22,"props":595,"children":596},{},[597,602,603,606,607,613],{"type":21,"tag":42,"props":598,"children":600},{"className":599},[],[601],{"type":26,"value":102},{"type":26,"value":490},{"type":21,"tag":354,"props":604,"children":605},{"type":356},[],{"type":26,"value":581},{"type":21,"tag":436,"props":608,"children":610},{"href":609},"/man/VkPipeline",[611],{"type":26,"value":612},"VkPipeline",{"type":26,"value":589},{"type":21,"tag":477,"props":615,"children":617},{"name":616},"VUID-vkCmdInitializeGraphScratchMemoryAMDX-commandBuffer-recording",[618],{"type":21,"tag":22,"props":619,"children":620},{},[621,626,627,630,632],{"type":21,"tag":42,"props":622,"children":624},{"className":623},[],[625],{"type":26,"value":83},{"type":26,"value":490},{"type":21,"tag":354,"props":628,"children":629},{"type":356},[],{"type":26,"value":631}," be in the ",{"type":21,"tag":436,"props":633,"children":635},{"href":634},"/chapters/commandbuffers#commandbuffers-lifecycle",[636],{"type":26,"value":637},"recording state",{"type":21,"tag":477,"props":639,"children":641},{"name":640},"VUID-vkCmdInitializeGraphScratchMemoryAMDX-commandBuffer-cmdpool",[642],{"type":21,"tag":22,"props":643,"children":644},{},[645,647,653,655,660,662,665],{"type":26,"value":646},"The ",{"type":21,"tag":42,"props":648,"children":650},{"className":649},[],[651],{"type":26,"value":652},"VkCommandPool",{"type":26,"value":654}," that ",{"type":21,"tag":42,"props":656,"children":658},{"className":657},[],[659],{"type":26,"value":83},{"type":26,"value":661}," was allocated from ",{"type":21,"tag":354,"props":663,"children":664},{"type":356},[],{"type":26,"value":666}," support graphics, or compute operations",{"type":21,"tag":477,"props":668,"children":670},{"name":669},"VUID-vkCmdInitializeGraphScratchMemoryAMDX-videocoding",[671],{"type":21,"tag":22,"props":672,"children":673},{},[674,675,678],{"type":26,"value":352},{"type":21,"tag":354,"props":676,"children":677},{"type":356},[],{"type":26,"value":679}," only be called outside of a video coding scope",{"type":21,"tag":477,"props":681,"children":683},{"name":682},"VUID-vkCmdInitializeGraphScratchMemoryAMDX-bufferlevel",[684],{"type":21,"tag":22,"props":685,"children":686},{},[687,692,693,696,698],{"type":21,"tag":42,"props":688,"children":690},{"className":689},[],[691],{"type":26,"value":83},{"type":26,"value":490},{"type":21,"tag":354,"props":694,"children":695},{"type":356},[],{"type":26,"value":697}," be a primary ",{"type":21,"tag":42,"props":699,"children":701},{"className":700},[],[702],{"type":26,"value":587},{"type":21,"tag":477,"props":704,"children":706},{"name":705},"VUID-vkCmdInitializeGraphScratchMemoryAMDX-commonparent",[707],{"type":21,"tag":22,"props":708,"children":709},{},[710,712,717,719,724,725,728,730],{"type":26,"value":711},"Both of ",{"type":21,"tag":42,"props":713,"children":715},{"className":714},[],[716],{"type":26,"value":83},{"type":26,"value":718},", and ",{"type":21,"tag":42,"props":720,"children":722},{"className":721},[],[723],{"type":26,"value":102},{"type":26,"value":490},{"type":21,"tag":354,"props":726,"children":727},{"type":356},[],{"type":26,"value":729}," have been created, allocated, or retrieved from the same ",{"type":21,"tag":436,"props":731,"children":733},{"href":732},"/man/VkDevice",[734],{"type":26,"value":735},"VkDevice",{"type":21,"tag":737,"props":738,"children":740},"validity-box",{"name":739},"Host Synchronization",[741],{"type":21,"tag":304,"props":742,"children":743},{},[744],{"type":21,"tag":308,"props":745,"children":746},{},[747,749,754,755,760,761,764],{"type":26,"value":748},"Host access to the ",{"type":21,"tag":42,"props":750,"children":752},{"className":751},[],[753],{"type":26,"value":652},{"type":26,"value":654},{"type":21,"tag":42,"props":756,"children":758},{"className":757},[],[759],{"type":26,"value":83},{"type":26,"value":661},{"type":21,"tag":354,"props":762,"children":763},{"type":356},[],{"type":26,"value":765}," be externally synchronized\n::",{"type":21,"tag":767,"props":768,"children":769},"style",{},[770],{"type":26,"value":771},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":39,"searchDepth":71,"depth":71,"links":773},[],"markdown",1729612502124]