[{"data":1,"prerenderedAt":447},["ShallowReactive",2],{"$ffIp0TF_zdaP-i4GD2C7NAotgsh0WC7Cj97qGh8q7t_o":3},{"title":4,"description":5,"parent":6,"cmd_buf_level":7,"render_pass_scope":10,"supported_queue_types":11,"tasks":13,"type":15,"xrefs":16,"body":17,"_type":446,"_id":4},"vkCmdSetPrimitiveRestartIndexEXT","Set primitive assembly restart index dynamically for a command buffer","VK_EXT_primitive_restart_index",[8,9],"primary","secondary","both",[12],"VK_QUEUE_GRAPHICS_BIT",[14],"state","protos",[],{"type":18,"children":19,"toc":444},"root",[20,37,210,251,256,289,393,438],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25,28,35],{"type":26,"value":27},"text","To ",{"type":21,"tag":29,"props":30,"children":32},"a",{"href":31},"/chapters/pipelines#pipelines-dynamic-state",[33],{"type":26,"value":34},"dynamically control",{"type":26,"value":36}," which special vertex\nindex value is treated as restarting the assembly of primitives, call:",{"type":21,"tag":38,"props":39,"children":40},"code-group",{},[41,117],{"type":21,"tag":42,"props":43,"children":49},"pre",{"className":44,"code":45,"filename":46,"language":47,"meta":48,"style":48},"language-c shiki shiki-themes github-light-default github-dark-default","void vkCmdSetPrimitiveRestartIndexEXT(\n VkCommandBuffer commandBuffer,\n uint32_t primitiveRestartIndex);\n","C","c","",[50],{"type":21,"tag":51,"props":52,"children":53},"code",{"__ignoreMap":48},[54,78,98],{"type":21,"tag":55,"props":56,"children":59},"span",{"class":57,"line":58},"line",1,[60,66,72],{"type":21,"tag":55,"props":61,"children":63},{"style":62},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[64],{"type":26,"value":65},"void",{"type":21,"tag":55,"props":67,"children":69},{"style":68},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[70],{"type":26,"value":71}," vkCmdSetPrimitiveRestartIndexEXT",{"type":21,"tag":55,"props":73,"children":75},{"style":74},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[76],{"type":26,"value":77},"(\n",{"type":21,"tag":55,"props":79,"children":81},{"class":57,"line":80},2,[82,87,93],{"type":21,"tag":55,"props":83,"children":84},{"style":74},[85],{"type":26,"value":86}," VkCommandBuffer ",{"type":21,"tag":55,"props":88,"children":90},{"style":89},"--shiki-default:#953800;--shiki-dark:#FFA657",[91],{"type":26,"value":92},"commandBuffer",{"type":21,"tag":55,"props":94,"children":95},{"style":74},[96],{"type":26,"value":97},",\n",{"type":21,"tag":55,"props":99,"children":101},{"class":57,"line":100},3,[102,107,112],{"type":21,"tag":55,"props":103,"children":104},{"style":62},[105],{"type":26,"value":106}," uint32_t",{"type":21,"tag":55,"props":108,"children":109},{"style":89},[110],{"type":26,"value":111}," primitiveRestartIndex",{"type":21,"tag":55,"props":113,"children":114},{"style":74},[115],{"type":26,"value":116},");\n",{"type":21,"tag":42,"props":118,"children":123},{"className":119,"code":120,"filename":121,"language":122,"meta":48,"style":48},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn cmd_set_primitive_restart_index_ext(\n command_buffer: vk::CommandBuffer,\n primitive_restart_index: u32,\n);\n","Rust","rs",[124],{"type":21,"tag":51,"props":125,"children":126},{"__ignoreMap":48},[127,149,181,202],{"type":21,"tag":55,"props":128,"children":129},{"class":57,"line":58},[130,135,140,145],{"type":21,"tag":55,"props":131,"children":132},{"style":62},[133],{"type":26,"value":134},"pub",{"type":21,"tag":55,"props":136,"children":137},{"style":62},[138],{"type":26,"value":139}," fn",{"type":21,"tag":55,"props":141,"children":142},{"style":68},[143],{"type":26,"value":144}," cmd_set_primitive_restart_index_ext",{"type":21,"tag":55,"props":146,"children":147},{"style":74},[148],{"type":26,"value":77},{"type":21,"tag":55,"props":150,"children":151},{"class":57,"line":80},[152,157,162,167,172,177],{"type":21,"tag":55,"props":153,"children":154},{"style":74},[155],{"type":26,"value":156}," command_buffer",{"type":21,"tag":55,"props":158,"children":159},{"style":62},[160],{"type":26,"value":161},":",{"type":21,"tag":55,"props":163,"children":164},{"style":89},[165],{"type":26,"value":166}," vk",{"type":21,"tag":55,"props":168,"children":169},{"style":62},[170],{"type":26,"value":171},"::",{"type":21,"tag":55,"props":173,"children":174},{"style":89},[175],{"type":26,"value":176},"CommandBuffer",{"type":21,"tag":55,"props":178,"children":179},{"style":74},[180],{"type":26,"value":97},{"type":21,"tag":55,"props":182,"children":183},{"class":57,"line":100},[184,189,193,198],{"type":21,"tag":55,"props":185,"children":186},{"style":74},[187],{"type":26,"value":188}," primitive_restart_index",{"type":21,"tag":55,"props":190,"children":191},{"style":62},[192],{"type":26,"value":161},{"type":21,"tag":55,"props":194,"children":195},{"style":89},[196],{"type":26,"value":197}," u32",{"type":21,"tag":55,"props":199,"children":200},{"style":74},[201],{"type":26,"value":97},{"type":21,"tag":55,"props":203,"children":205},{"class":57,"line":204},4,[206],{"type":21,"tag":55,"props":207,"children":208},{"style":74},[209],{"type":26,"value":116},{"type":21,"tag":211,"props":212,"children":213},"ul",{},[214,225],{"type":21,"tag":215,"props":216,"children":217},"li",{},[218,223],{"type":21,"tag":51,"props":219,"children":221},{"className":220},[],[222],{"type":26,"value":92},{"type":26,"value":224}," is the command buffer into which the command will be\nrecorded.",{"type":21,"tag":215,"props":226,"children":227},{},[228,234,236,242,243,249],{"type":21,"tag":51,"props":229,"children":231},{"className":230},[],[232],{"type":26,"value":233},"primitiveRestartIndex",{"type":26,"value":235}," controls which special vertex index value is\ntreated as restarting the assembly of primitives.\nThis overrides the default values specified in\n",{"type":21,"tag":29,"props":237,"children":239},{"href":238},"/man/VkPipelineInputAssemblyStateCreateInfo",[240],{"type":26,"value":241},"VkPipelineInputAssemblyStateCreateInfo",{"type":26,"value":171},{"type":21,"tag":51,"props":244,"children":246},{"className":245},[],[247],{"type":26,"value":248},"primitiveRestartEnable",{"type":26,"value":250},".",{"type":21,"tag":22,"props":252,"children":253},{},[254],{"type":26,"value":255},"This command sets a custom primitive restart index for subsequent drawing\ncommands.\nBinding an index buffer invalidates the custom index value.",{"type":21,"tag":257,"props":258,"children":260},"validity-group",{"name":259},"Valid Usage",[261],{"type":21,"tag":262,"props":263,"children":265},"validity-field",{"name":264},"VUID-vkCmdSetPrimitiveRestartIndexEXT-primitiveRestartIndex-12395",[266],{"type":21,"tag":22,"props":267,"children":268},{},[269,271,280,282,287],{"type":26,"value":270},"The ",{"type":21,"tag":29,"props":272,"children":274},{"href":273},"/man/VkPhysicalDevicePrimitiveRestartIndexFeaturesEXT#features-primitiveRestartIndex",[275],{"type":21,"tag":51,"props":276,"children":278},{"className":277},[],[279],{"type":26,"value":233},{"type":26,"value":281},"\nfeature ",{"type":21,"tag":283,"props":284,"children":286},"normative",{"type":285},"must",[],{"type":26,"value":288}," be enabled",{"type":21,"tag":257,"props":290,"children":292},{"name":291},"Valid Usage (Implicit)",[293,320,344,379],{"type":21,"tag":262,"props":294,"children":296},{"name":295},"VUID-vkCmdSetPrimitiveRestartIndexEXT-commandBuffer-parameter",[297],{"type":21,"tag":22,"props":298,"children":299},{},[300,305,307,310,312,318],{"type":21,"tag":51,"props":301,"children":303},{"className":302},[],[304],{"type":26,"value":92},{"type":26,"value":306}," ",{"type":21,"tag":283,"props":308,"children":309},{"type":285},[],{"type":26,"value":311}," be a valid ",{"type":21,"tag":29,"props":313,"children":315},{"href":314},"/man/VkCommandBuffer",[316],{"type":26,"value":317},"VkCommandBuffer",{"type":26,"value":319}," handle",{"type":21,"tag":262,"props":321,"children":323},{"name":322},"VUID-vkCmdSetPrimitiveRestartIndexEXT-commandBuffer-recording",[324],{"type":21,"tag":22,"props":325,"children":326},{},[327,332,333,336,338],{"type":21,"tag":51,"props":328,"children":330},{"className":329},[],[331],{"type":26,"value":92},{"type":26,"value":306},{"type":21,"tag":283,"props":334,"children":335},{"type":285},[],{"type":26,"value":337}," be in the ",{"type":21,"tag":29,"props":339,"children":341},{"href":340},"/chapters/commandbuffers#commandbuffers-lifecycle",[342],{"type":26,"value":343},"recording state",{"type":21,"tag":262,"props":345,"children":347},{"name":346},"VUID-vkCmdSetPrimitiveRestartIndexEXT-commandBuffer-cmdpool",[348],{"type":21,"tag":22,"props":349,"children":350},{},[351,352,358,360,365,367,370,372,377],{"type":26,"value":270},{"type":21,"tag":51,"props":353,"children":355},{"className":354},[],[356],{"type":26,"value":357},"VkCommandPool",{"type":26,"value":359}," that ",{"type":21,"tag":51,"props":361,"children":363},{"className":362},[],[364],{"type":26,"value":92},{"type":26,"value":366}," was allocated from ",{"type":21,"tag":283,"props":368,"children":369},{"type":285},[],{"type":26,"value":371}," support ",{"type":21,"tag":51,"props":373,"children":375},{"className":374},[],[376],{"type":26,"value":12},{"type":26,"value":378}," operations",{"type":21,"tag":262,"props":380,"children":382},{"name":381},"VUID-vkCmdSetPrimitiveRestartIndexEXT-videocoding",[383],{"type":21,"tag":22,"props":384,"children":385},{},[386,388,391],{"type":26,"value":387},"This command ",{"type":21,"tag":283,"props":389,"children":390},{"type":285},[],{"type":26,"value":392}," only be called outside of a video coding scope",{"type":21,"tag":394,"props":395,"children":397},"validity-box",{"name":396},"Host Synchronization",[398],{"type":21,"tag":211,"props":399,"children":400},{},[401,417],{"type":21,"tag":215,"props":402,"children":403},{},[404,406,411,412,415],{"type":26,"value":405},"Host access to ",{"type":21,"tag":51,"props":407,"children":409},{"className":408},[],[410],{"type":26,"value":92},{"type":26,"value":306},{"type":21,"tag":283,"props":413,"children":414},{"type":285},[],{"type":26,"value":416}," be externally synchronized",{"type":21,"tag":215,"props":418,"children":419},{},[420,422,427,428,433,434,437],{"type":26,"value":421},"Host access to the ",{"type":21,"tag":51,"props":423,"children":425},{"className":424},[],[426],{"type":26,"value":357},{"type":26,"value":359},{"type":21,"tag":51,"props":429,"children":431},{"className":430},[],[432],{"type":26,"value":92},{"type":26,"value":366},{"type":21,"tag":283,"props":435,"children":436},{"type":285},[],{"type":26,"value":416},{"type":21,"tag":439,"props":440,"children":441},"style",{},[442],{"type":26,"value":443},"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":48,"searchDepth":80,"depth":80,"links":445},[],"markdown",1775207580264]