[{"data":1,"prerenderedAt":247},["ShallowReactive",2],{"q2W9BWeUas":3},{"title":4,"description":5,"type":6,"xrefs":7,"body":8,"_type":246,"_id":4},"DrawIndex","Index of the current draw","builtins",[],{"type":9,"children":10,"toc":242},"root",[11,24,98,103],{"type":12,"tag":13,"props":14,"children":16},"element","h6",{"id":15},"drawindex",[17],{"type":12,"tag":18,"props":19,"children":21},"code",{"className":20},[],[22],{"type":23,"value":4},"text",{"type":12,"tag":25,"props":26,"children":27},"p",{},[28,30,35,37,43,45,50,52,58,60,65,67,74,76,82,84,89,91,96],{"type":23,"value":29},"Decorating a variable with the ",{"type":12,"tag":18,"props":31,"children":33},{"className":32},[],[34],{"type":23,"value":4},{"type":23,"value":36}," built-in will make that\nvariable contain the integer value corresponding to the zero-based index of\nthe draw that invoked the current\ntask, mesh, or\nvertex shader invocation.\nFor ",{"type":12,"tag":38,"props":39,"children":40},"em",{},[41],{"type":23,"value":42},"indirect drawing commands",{"type":23,"value":44},", ",{"type":12,"tag":18,"props":46,"children":48},{"className":47},[],[49],{"type":23,"value":4},{"type":23,"value":51}," begins at zero and\nincrements by one for each draw executed.\nThe number of draws is given by the ",{"type":12,"tag":18,"props":53,"children":55},{"className":54},[],[56],{"type":23,"value":57},"drawCount",{"type":23,"value":59}," parameter.\nFor ",{"type":12,"tag":38,"props":61,"children":62},{},[63],{"type":23,"value":64},"direct drawing commands",{"type":23,"value":66},",\nif ",{"type":12,"tag":68,"props":69,"children":71},"a",{"href":70},"/man/vkCmdDrawMultiEXT",[72],{"type":23,"value":73},"vkCmdDrawMultiEXT",{"type":23,"value":75}," or ",{"type":12,"tag":68,"props":77,"children":79},{"href":78},"/man/vkCmdDrawMultiIndexedEXT",[80],{"type":23,"value":81},"vkCmdDrawMultiIndexedEXT",{"type":23,"value":83}," is used, this\nvariable contains the integer value corresponding to the zero-based index of\nthe draw.\nOtherwise\n",{"type":12,"tag":18,"props":85,"children":87},{"className":86},[],[88],{"type":23,"value":4},{"type":23,"value":90}," is always zero.\n",{"type":12,"tag":18,"props":92,"children":94},{"className":93},[],[95],{"type":23,"value":4},{"type":23,"value":97}," is dynamically uniform.",{"type":12,"tag":25,"props":99,"children":100},{},[101],{"type":23,"value":102},"When task or mesh shaders are used, only the first active stage will have\nproper access to the variable.\nThe value read by other stages is undefined:.",{"type":12,"tag":104,"props":105,"children":107},"validity-group",{"name":106},"Valid Usage",[108,183,223],{"type":12,"tag":109,"props":110,"children":112},"validity-field",{"name":111},"VUID-DrawIndex-DrawIndex-04207",[113],{"type":12,"tag":25,"props":114,"children":115},{},[116,118,123,125,130,132,138,140,146,147,153,154,160,162,168,170,176,177],{"type":23,"value":117},"The ",{"type":12,"tag":18,"props":119,"children":121},{"className":120},[],[122],{"type":23,"value":4},{"type":23,"value":124}," decoration ",{"type":12,"tag":126,"props":127,"children":129},"normative",{"type":128},"must",[],{"type":23,"value":131}," be used only within the ",{"type":12,"tag":18,"props":133,"children":135},{"className":134},[],[136],{"type":23,"value":137},"Vertex",{"type":23,"value":139},",\n",{"type":12,"tag":18,"props":141,"children":143},{"className":142},[],[144],{"type":23,"value":145},"MeshEXT",{"type":23,"value":44},{"type":12,"tag":18,"props":148,"children":150},{"className":149},[],[151],{"type":23,"value":152},"TaskEXT",{"type":23,"value":44},{"type":12,"tag":18,"props":155,"children":157},{"className":156},[],[158],{"type":23,"value":159},"MeshNV",{"type":23,"value":161},", or ",{"type":12,"tag":18,"props":163,"children":165},{"className":164},[],[166],{"type":23,"value":167},"TaskNV",{"type":23,"value":169}," ",{"type":12,"tag":18,"props":171,"children":173},{"className":172},[],[174],{"type":23,"value":175},"Execution",{"type":23,"value":169},{"type":12,"tag":18,"props":178,"children":180},{"className":179},[],[181],{"type":23,"value":182},"Model",{"type":12,"tag":109,"props":184,"children":186},{"name":185},"VUID-DrawIndex-DrawIndex-04208",[187],{"type":12,"tag":25,"props":188,"children":189},{},[190,192,197,198,201,203,209,210,216,217],{"type":23,"value":191},"The variable decorated with ",{"type":12,"tag":18,"props":193,"children":195},{"className":194},[],[196],{"type":23,"value":4},{"type":23,"value":169},{"type":12,"tag":126,"props":199,"children":200},{"type":128},[],{"type":23,"value":202}," be declared using the\n",{"type":12,"tag":18,"props":204,"children":206},{"className":205},[],[207],{"type":23,"value":208},"Input",{"type":23,"value":169},{"type":12,"tag":18,"props":211,"children":213},{"className":212},[],[214],{"type":23,"value":215},"Storage",{"type":23,"value":169},{"type":12,"tag":18,"props":218,"children":220},{"className":219},[],[221],{"type":23,"value":222},"Class",{"type":12,"tag":109,"props":224,"children":226},{"name":225},"VUID-DrawIndex-DrawIndex-04209",[227],{"type":12,"tag":25,"props":228,"children":229},{},[230,231,236,237,240],{"type":23,"value":191},{"type":12,"tag":18,"props":232,"children":234},{"className":233},[],[235],{"type":23,"value":4},{"type":23,"value":169},{"type":12,"tag":126,"props":238,"children":239},{"type":128},[],{"type":23,"value":241}," be declared as a scalar\n32-bit integer value",{"title":243,"searchDepth":244,"depth":244,"links":245},"",2,[],"markdown",1725732531065]