[{"data":1,"prerenderedAt":629},["ShallowReactive",2],{"$fEVQPMclhuVY6kQmeRSv_kuPmiPeiSCVhR23B07BPJMo":3},{"title":4,"description":5,"parent":6,"cmd_buf_level":7,"render_pass_scope":10,"supported_queue_types":11,"tasks":15,"type":18,"xrefs":19,"body":20,"_type":628,"_id":4},"vkCmdBeginShaderInstrumentationARM","Begin shader instrumentation","VK_ARM_shader_instrumentation",[8,9],"primary","secondary","both",[12,13,14],"VK_QUEUE_GRAPHICS_BIT","VK_QUEUE_COMPUTE_BIT","VK_QUEUE_DATA_GRAPH_BIT_ARM",[16,17],"action","state","protos",[],{"type":21,"children":22,"toc":626},"root",[23,31,212,237,242,255,276,297,317,330,374,561,620],{"type":24,"tag":25,"props":26,"children":27},"element","p",{},[28],{"type":29,"value":30},"text","To begin shader instrumentation, call:",{"type":24,"tag":32,"props":33,"children":34},"code-group",{},[35,111],{"type":24,"tag":36,"props":37,"children":43},"pre",{"className":38,"code":39,"filename":40,"language":41,"meta":42,"style":42},"language-c shiki shiki-themes github-light-default github-dark-default","void vkCmdBeginShaderInstrumentationARM(\n VkCommandBuffer commandBuffer,\n VkShaderInstrumentationARM instrumentation);\n","C","c","",[44],{"type":24,"tag":45,"props":46,"children":47},"code",{"__ignoreMap":42},[48,72,92],{"type":24,"tag":49,"props":50,"children":53},"span",{"class":51,"line":52},"line",1,[54,60,66],{"type":24,"tag":49,"props":55,"children":57},{"style":56},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[58],{"type":29,"value":59},"void",{"type":24,"tag":49,"props":61,"children":63},{"style":62},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[64],{"type":29,"value":65}," vkCmdBeginShaderInstrumentationARM",{"type":24,"tag":49,"props":67,"children":69},{"style":68},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[70],{"type":29,"value":71},"(\n",{"type":24,"tag":49,"props":73,"children":75},{"class":51,"line":74},2,[76,81,87],{"type":24,"tag":49,"props":77,"children":78},{"style":68},[79],{"type":29,"value":80}," VkCommandBuffer ",{"type":24,"tag":49,"props":82,"children":84},{"style":83},"--shiki-default:#953800;--shiki-dark:#FFA657",[85],{"type":29,"value":86},"commandBuffer",{"type":24,"tag":49,"props":88,"children":89},{"style":68},[90],{"type":29,"value":91},",\n",{"type":24,"tag":49,"props":93,"children":95},{"class":51,"line":94},3,[96,101,106],{"type":24,"tag":49,"props":97,"children":98},{"style":68},[99],{"type":29,"value":100}," VkShaderInstrumentationARM ",{"type":24,"tag":49,"props":102,"children":103},{"style":83},[104],{"type":29,"value":105},"instrumentation",{"type":24,"tag":49,"props":107,"children":108},{"style":68},[109],{"type":29,"value":110},");\n",{"type":24,"tag":36,"props":112,"children":117},{"className":113,"code":114,"filename":115,"language":116,"meta":42,"style":42},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn cmd_begin_shader_instrumentation_arm(\n command_buffer: vk::CommandBuffer,\n instrumentation: vk::ShaderInstrumentationARM,\n);\n","Rust","rs",[118],{"type":24,"tag":45,"props":119,"children":120},{"__ignoreMap":42},[121,143,175,204],{"type":24,"tag":49,"props":122,"children":123},{"class":51,"line":52},[124,129,134,139],{"type":24,"tag":49,"props":125,"children":126},{"style":56},[127],{"type":29,"value":128},"pub",{"type":24,"tag":49,"props":130,"children":131},{"style":56},[132],{"type":29,"value":133}," fn",{"type":24,"tag":49,"props":135,"children":136},{"style":62},[137],{"type":29,"value":138}," cmd_begin_shader_instrumentation_arm",{"type":24,"tag":49,"props":140,"children":141},{"style":68},[142],{"type":29,"value":71},{"type":24,"tag":49,"props":144,"children":145},{"class":51,"line":74},[146,151,156,161,166,171],{"type":24,"tag":49,"props":147,"children":148},{"style":68},[149],{"type":29,"value":150}," command_buffer",{"type":24,"tag":49,"props":152,"children":153},{"style":56},[154],{"type":29,"value":155},":",{"type":24,"tag":49,"props":157,"children":158},{"style":83},[159],{"type":29,"value":160}," vk",{"type":24,"tag":49,"props":162,"children":163},{"style":56},[164],{"type":29,"value":165},"::",{"type":24,"tag":49,"props":167,"children":168},{"style":83},[169],{"type":29,"value":170},"CommandBuffer",{"type":24,"tag":49,"props":172,"children":173},{"style":68},[174],{"type":29,"value":91},{"type":24,"tag":49,"props":176,"children":177},{"class":51,"line":94},[178,183,187,191,195,200],{"type":24,"tag":49,"props":179,"children":180},{"style":68},[181],{"type":29,"value":182}," instrumentation",{"type":24,"tag":49,"props":184,"children":185},{"style":56},[186],{"type":29,"value":155},{"type":24,"tag":49,"props":188,"children":189},{"style":83},[190],{"type":29,"value":160},{"type":24,"tag":49,"props":192,"children":193},{"style":56},[194],{"type":29,"value":165},{"type":24,"tag":49,"props":196,"children":197},{"style":83},[198],{"type":29,"value":199},"ShaderInstrumentationARM",{"type":24,"tag":49,"props":201,"children":202},{"style":68},[203],{"type":29,"value":91},{"type":24,"tag":49,"props":205,"children":207},{"class":51,"line":206},4,[208],{"type":24,"tag":49,"props":209,"children":210},{"style":68},[211],{"type":29,"value":110},{"type":24,"tag":213,"props":214,"children":215},"ul",{},[216,227],{"type":24,"tag":217,"props":218,"children":219},"li",{},[220,225],{"type":24,"tag":45,"props":221,"children":223},{"className":222},[],[224],{"type":29,"value":86},{"type":29,"value":226}," is the command buffer into which this command will\nbe recorded.",{"type":24,"tag":217,"props":228,"children":229},{},[230,235],{"type":24,"tag":45,"props":231,"children":233},{"className":232},[],[234],{"type":29,"value":105},{"type":29,"value":236}," is the handle of the shader instrumentation object\nthat will capture the metrics.",{"type":24,"tag":238,"props":239,"children":241},"anchor",{"id":240},"shaders-instrumentation-active",[],{"type":24,"tag":25,"props":243,"children":244},{},[245,247,253],{"type":29,"value":246},"After beginning shader instrumentation, shader instrumentation is considered\n",{"type":24,"tag":248,"props":249,"children":250},"em",{},[251],{"type":29,"value":252},"active",{"type":29,"value":254}," within the command buffer it was called in until shader\ninstrumentation is ended.",{"type":24,"tag":25,"props":256,"children":257},{},[258,260,266,268,274],{"type":29,"value":259},"The shader instrumentation object has an implicit result index where the\nper-shader metrics will be written.\nThe result index is set to 0 when the object is created by calling\n",{"type":24,"tag":45,"props":261,"children":263},{"className":262},[],[264],{"type":29,"value":265},"vkCreateShaderInstrumentationARM",{"type":29,"value":267},", and incremented by ",{"type":24,"tag":45,"props":269,"children":271},{"className":270},[],[272],{"type":29,"value":273},"1",{"type":29,"value":275}," for each\ndraw, dispatch, and ray tracing command recorded while the shader\ninstrumentation object is active.",{"type":24,"tag":25,"props":277,"children":278},{},[279,281,286,288,295],{"type":29,"value":280},"The result index is also incremented by ",{"type":24,"tag":45,"props":282,"children":284},{"className":283},[],[285],{"type":29,"value":273},{"type":29,"value":287}," when\n",{"type":24,"tag":289,"props":290,"children":292},"a",{"href":291},"/man/vkCmdExecuteGeneratedCommandsEXT",[293],{"type":29,"value":294},"vkCmdExecuteGeneratedCommandsEXT",{"type":29,"value":296}," is recorded.",{"type":24,"tag":25,"props":298,"children":299},{},[300,302,307,309,315],{"type":29,"value":301},"While shader instrumentation is active, instrumented shaders write to the\ninstrumentation object.\nThese writes ",{"type":24,"tag":303,"props":304,"children":306},"normative",{"type":305},"must",[],{"type":29,"value":308}," be synchronized using the instrumented shader’s stage\nwith access mask ",{"type":24,"tag":45,"props":310,"children":312},{"className":311},[],[313],{"type":29,"value":314},"VK_ACCESS_2_SHADER_WRITE_BIT",{"type":29,"value":316},".\nIf no instrumentation object is bound, writes are discarded.",{"type":24,"tag":25,"props":318,"children":319},{},[320,322,328],{"type":29,"value":321},"If a command buffer is submitted multiple times, the shader instrumented\nmetrics for all submissions will be aggregated in the instrumentation\nobject, unless the metrics are ",{"type":24,"tag":289,"props":323,"children":325},{"href":324},"/man/vkClearShaderInstrumentationMetricsARM#shaders-instrumentation-clear",[326],{"type":29,"value":327},"cleared",{"type":29,"value":329},"\nbetween submissions.",{"type":24,"tag":331,"props":332,"children":334},"validity-group",{"name":333},"Valid Usage",[335,355],{"type":24,"tag":336,"props":337,"children":339},"validity-field",{"name":338},"VUID-vkCmdBeginShaderInstrumentationARM-commandBuffer-12375",[340],{"type":24,"tag":25,"props":341,"children":342},{},[343,345,348,350],{"type":29,"value":344},"This command ",{"type":24,"tag":303,"props":346,"children":347},{"type":305},[],{"type":29,"value":349}," not be recorded while shader instrumentation is\nactive within ",{"type":24,"tag":45,"props":351,"children":353},{"className":352},[],[354],{"type":29,"value":86},{"type":24,"tag":336,"props":356,"children":358},{"name":357},"VUID-vkCmdBeginShaderInstrumentationARM-commandBuffer-12376",[359],{"type":24,"tag":25,"props":360,"children":361},{},[362,367,369,372],{"type":24,"tag":45,"props":363,"children":365},{"className":364},[],[366],{"type":29,"value":86},{"type":29,"value":368}," ",{"type":24,"tag":303,"props":370,"children":371},{"type":305},[],{"type":29,"value":373}," not be a protected command buffer",{"type":24,"tag":331,"props":375,"children":377},{"name":376},"Valid Usage (Implicit)",[378,404,428,452,502,515,528],{"type":24,"tag":336,"props":379,"children":381},{"name":380},"VUID-vkCmdBeginShaderInstrumentationARM-commandBuffer-parameter",[382],{"type":24,"tag":25,"props":383,"children":384},{},[385,390,391,394,396,402],{"type":24,"tag":45,"props":386,"children":388},{"className":387},[],[389],{"type":29,"value":86},{"type":29,"value":368},{"type":24,"tag":303,"props":392,"children":393},{"type":305},[],{"type":29,"value":395}," be a valid ",{"type":24,"tag":289,"props":397,"children":399},{"href":398},"/man/VkCommandBuffer",[400],{"type":29,"value":401},"VkCommandBuffer",{"type":29,"value":403}," handle",{"type":24,"tag":336,"props":405,"children":407},{"name":406},"VUID-vkCmdBeginShaderInstrumentationARM-instrumentation-parameter",[408],{"type":24,"tag":25,"props":409,"children":410},{},[411,416,417,420,421,427],{"type":24,"tag":45,"props":412,"children":414},{"className":413},[],[415],{"type":29,"value":105},{"type":29,"value":368},{"type":24,"tag":303,"props":418,"children":419},{"type":305},[],{"type":29,"value":395},{"type":24,"tag":289,"props":422,"children":424},{"href":423},"/man/VkShaderInstrumentationARM",[425],{"type":29,"value":426},"VkShaderInstrumentationARM",{"type":29,"value":403},{"type":24,"tag":336,"props":429,"children":431},{"name":430},"VUID-vkCmdBeginShaderInstrumentationARM-commandBuffer-recording",[432],{"type":24,"tag":25,"props":433,"children":434},{},[435,440,441,444,446],{"type":24,"tag":45,"props":436,"children":438},{"className":437},[],[439],{"type":29,"value":86},{"type":29,"value":368},{"type":24,"tag":303,"props":442,"children":443},{"type":305},[],{"type":29,"value":445}," be in the ",{"type":24,"tag":289,"props":447,"children":449},{"href":448},"/chapters/commandbuffers#commandbuffers-lifecycle",[450],{"type":29,"value":451},"recording state",{"type":24,"tag":336,"props":453,"children":455},{"name":454},"VUID-vkCmdBeginShaderInstrumentationARM-commandBuffer-cmdpool",[456],{"type":24,"tag":25,"props":457,"children":458},{},[459,461,467,469,474,476,479,481,486,488,493,495,500],{"type":29,"value":460},"The ",{"type":24,"tag":45,"props":462,"children":464},{"className":463},[],[465],{"type":29,"value":466},"VkCommandPool",{"type":29,"value":468}," that ",{"type":24,"tag":45,"props":470,"children":472},{"className":471},[],[473],{"type":29,"value":86},{"type":29,"value":475}," was allocated from ",{"type":24,"tag":303,"props":477,"children":478},{"type":305},[],{"type":29,"value":480}," support ",{"type":24,"tag":45,"props":482,"children":484},{"className":483},[],[485],{"type":29,"value":13},{"type":29,"value":487},", ",{"type":24,"tag":45,"props":489,"children":491},{"className":490},[],[492],{"type":29,"value":14},{"type":29,"value":494},", or ",{"type":24,"tag":45,"props":496,"children":498},{"className":497},[],[499],{"type":29,"value":12},{"type":29,"value":501}," operations",{"type":24,"tag":336,"props":503,"children":505},{"name":504},"VUID-vkCmdBeginShaderInstrumentationARM-suspended",[506],{"type":24,"tag":25,"props":507,"children":508},{},[509,510,513],{"type":29,"value":344},{"type":24,"tag":303,"props":511,"children":512},{"type":305},[],{"type":29,"value":514}," not be called between suspended render pass instances",{"type":24,"tag":336,"props":516,"children":518},{"name":517},"VUID-vkCmdBeginShaderInstrumentationARM-videocoding",[519],{"type":24,"tag":25,"props":520,"children":521},{},[522,523,526],{"type":29,"value":344},{"type":24,"tag":303,"props":524,"children":525},{"type":305},[],{"type":29,"value":527}," only be called outside of a video coding scope",{"type":24,"tag":336,"props":529,"children":531},{"name":530},"VUID-vkCmdBeginShaderInstrumentationARM-commonparent",[532],{"type":24,"tag":25,"props":533,"children":534},{},[535,537,542,544,549,550,553,555],{"type":29,"value":536},"Both of ",{"type":24,"tag":45,"props":538,"children":540},{"className":539},[],[541],{"type":29,"value":86},{"type":29,"value":543},", and ",{"type":24,"tag":45,"props":545,"children":547},{"className":546},[],[548],{"type":29,"value":105},{"type":29,"value":368},{"type":24,"tag":303,"props":551,"children":552},{"type":305},[],{"type":29,"value":554}," have been created, allocated, or retrieved from the same ",{"type":24,"tag":289,"props":556,"children":558},{"href":557},"/man/VkDevice",[559],{"type":29,"value":560},"VkDevice",{"type":24,"tag":562,"props":563,"children":565},"validity-box",{"name":564},"Host Synchronization",[566],{"type":24,"tag":213,"props":567,"children":568},{},[569,585,599],{"type":24,"tag":217,"props":570,"children":571},{},[572,574,579,580,583],{"type":29,"value":573},"Host access to ",{"type":24,"tag":45,"props":575,"children":577},{"className":576},[],[578],{"type":29,"value":86},{"type":29,"value":368},{"type":24,"tag":303,"props":581,"children":582},{"type":305},[],{"type":29,"value":584}," be externally synchronized",{"type":24,"tag":217,"props":586,"children":587},{},[588,589,594,595,598],{"type":29,"value":573},{"type":24,"tag":45,"props":590,"children":592},{"className":591},[],[593],{"type":29,"value":105},{"type":29,"value":368},{"type":24,"tag":303,"props":596,"children":597},{"type":305},[],{"type":29,"value":584},{"type":24,"tag":217,"props":600,"children":601},{},[602,604,609,610,615,616,619],{"type":29,"value":603},"Host access to the ",{"type":24,"tag":45,"props":605,"children":607},{"className":606},[],[608],{"type":29,"value":466},{"type":29,"value":468},{"type":24,"tag":45,"props":611,"children":613},{"className":612},[],[614],{"type":29,"value":86},{"type":29,"value":475},{"type":24,"tag":303,"props":617,"children":618},{"type":305},[],{"type":29,"value":584},{"type":24,"tag":621,"props":622,"children":623},"style",{},[624],{"type":29,"value":625},"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":42,"searchDepth":74,"depth":74,"links":627},[],"markdown",1773121624588]