[{"data":1,"prerenderedAt":303},["ShallowReactive",2],{"rcnNOQoMX6":3},{"title":4,"description":5,"type":6,"xrefs":7,"body":8,"_type":302,"_id":4},"ViewportMaskNV","Mask of the viewports used","builtins",[],{"type":9,"children":10,"toc":298},"root",[11,24,37,49,84,137,167],{"type":12,"tag":13,"props":14,"children":16},"element","h6",{"id":15},"viewportmasknv",[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],{"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 decoration will\nmake that variable contain the viewport mask.",{"type":12,"tag":25,"props":38,"children":39},{},[40,42,47],{"type":23,"value":41},"In a\nmesh,\nvertex, tessellation evaluation, or geometry shader, the variable decorated\nwith ",{"type":12,"tag":18,"props":43,"children":45},{"className":44},[],[46],{"type":23,"value":4},{"type":23,"value":48}," can be written to with the mask of which viewports\nthe primitive produced by that shader will directed.",{"type":12,"tag":25,"props":50,"children":51},{},[52,54,59,61,66,68,74,76,82],{"type":23,"value":53},"The ",{"type":12,"tag":18,"props":55,"children":57},{"className":56},[],[58],{"type":23,"value":4},{"type":23,"value":60}," variable ",{"type":12,"tag":62,"props":63,"children":65},"normative",{"type":64},"must",[],{"type":23,"value":67}," be an array that has\n⌈(",{"type":12,"tag":18,"props":69,"children":71},{"className":70},[],[72],{"type":23,"value":73},"VkPhysicalDeviceLimits",{"type":23,"value":75},"::",{"type":12,"tag":18,"props":77,"children":79},{"className":78},[],[80],{"type":23,"value":81},"maxViewports",{"type":23,"value":83}," / 32)⌉\nelements.\nWhen a shader writes to this variable, bit B of element M controls whether a\nprimitive is emitted to viewport 32 × M + B.\nThe viewports indicated by the mask are used to select the\nviewport transform, scissor rectangle, and exclusive\nscissor rectangle that a primitive will be transformed by.",{"type":12,"tag":25,"props":85,"children":86},{},[87,89,100,102,107,109,114,116,121,123,127,129,135],{"type":23,"value":88},"The last active\n",{"type":12,"tag":90,"props":91,"children":92},"em",{},[93],{"type":12,"tag":94,"props":95,"children":97},"a",{"href":96},"/man/VkGraphicsPipelineCreateInfo#pipelines-graphics-subsets-pre-rasterization",[98],{"type":23,"value":99},"pre-rasterization shader\nstage",{"type":23,"value":101}," (in pipeline order) controls the ",{"type":12,"tag":18,"props":103,"children":105},{"className":104},[],[106],{"type":23,"value":4},{"type":23,"value":108}," that is used.\nOutputs in previous shader stages are not used, even if the last stage fails\nto write the ",{"type":12,"tag":18,"props":110,"children":112},{"className":111},[],[113],{"type":23,"value":4},{"type":23,"value":115},".\nWhen ",{"type":12,"tag":18,"props":117,"children":119},{"className":118},[],[120],{"type":23,"value":4},{"type":23,"value":122}," is written by the final\n",{"type":12,"tag":94,"props":124,"children":125},{"href":96},[126],{"type":23,"value":99},{"type":23,"value":128},", any variable decorated with ",{"type":12,"tag":18,"props":130,"children":132},{"className":131},[],[133],{"type":23,"value":134},"ViewportIndex",{"type":23,"value":136}," in the fragment\nshader will have the index of the viewport that was used in generating that\nfragment.",{"type":12,"tag":25,"props":138,"children":139},{},[140,142,146,148,153,155,158,160,165],{"type":23,"value":141},"If a ",{"type":12,"tag":94,"props":143,"children":144},{"href":96},[145],{"type":23,"value":99},{"type":23,"value":147}," shader entry point’s interface includes a variable decorated with\n",{"type":12,"tag":18,"props":149,"children":151},{"className":150},[],[152],{"type":23,"value":4},{"type":23,"value":154},", it ",{"type":12,"tag":62,"props":156,"children":157},{"type":64},[],{"type":23,"value":159}," write the same value to ",{"type":12,"tag":18,"props":161,"children":163},{"className":162},[],[164],{"type":23,"value":4},{"type":23,"value":166},"\nfor all output vertices of a given primitive.",{"type":12,"tag":168,"props":169,"children":171},"validity-group",{"name":170},"Valid Usage",[172,239,279],{"type":12,"tag":173,"props":174,"children":176},"validity-field",{"name":175},"VUID-ViewportMaskNV-ViewportMaskNV-04409",[177,222],{"type":12,"tag":25,"props":178,"children":179},{},[180,181,186,188,191,193,199,201,207,208,214,216],{"type":23,"value":53},{"type":12,"tag":18,"props":182,"children":184},{"className":183},[],[185],{"type":23,"value":4},{"type":23,"value":187}," decoration ",{"type":12,"tag":62,"props":189,"children":190},{"type":64},[],{"type":23,"value":192}," be used only within the\n",{"type":12,"tag":18,"props":194,"children":196},{"className":195},[],[197],{"type":23,"value":198},"Vertex",{"type":23,"value":200},", ",{"type":12,"tag":18,"props":202,"children":204},{"className":203},[],[205],{"type":23,"value":206},"MeshNV",{"type":23,"value":200},{"type":12,"tag":18,"props":209,"children":211},{"className":210},[],[212],{"type":23,"value":213},"TessellationEvaluation",{"type":23,"value":215},", or ",{"type":12,"tag":18,"props":217,"children":219},{"className":218},[],[220],{"type":23,"value":221},"Geometry",{"type":12,"tag":25,"props":223,"children":224},{},[225,231,233],{"type":12,"tag":18,"props":226,"children":228},{"className":227},[],[229],{"type":23,"value":230},"Execution",{"type":23,"value":232}," ",{"type":12,"tag":18,"props":234,"children":236},{"className":235},[],[237],{"type":23,"value":238},"Model",{"type":12,"tag":173,"props":240,"children":242},{"name":241},"VUID-ViewportMaskNV-ViewportMaskNV-04410",[243],{"type":12,"tag":25,"props":244,"children":245},{},[246,248,253,254,257,259,265,266,272,273],{"type":23,"value":247},"The variable decorated with ",{"type":12,"tag":18,"props":249,"children":251},{"className":250},[],[252],{"type":23,"value":4},{"type":23,"value":232},{"type":12,"tag":62,"props":255,"children":256},{"type":64},[],{"type":23,"value":258}," be declared using\nthe ",{"type":12,"tag":18,"props":260,"children":262},{"className":261},[],[263],{"type":23,"value":264},"Output",{"type":23,"value":232},{"type":12,"tag":18,"props":267,"children":269},{"className":268},[],[270],{"type":23,"value":271},"Storage",{"type":23,"value":232},{"type":12,"tag":18,"props":274,"children":276},{"className":275},[],[277],{"type":23,"value":278},"Class",{"type":12,"tag":173,"props":280,"children":282},{"name":281},"VUID-ViewportMaskNV-ViewportMaskNV-04411",[283],{"type":12,"tag":25,"props":284,"children":285},{},[286,287,292,293,296],{"type":23,"value":247},{"type":12,"tag":18,"props":288,"children":290},{"className":289},[],[291],{"type":23,"value":4},{"type":23,"value":232},{"type":12,"tag":62,"props":294,"children":295},{"type":64},[],{"type":23,"value":297}," be declared as an\narray of 32-bit integer values",{"title":299,"searchDepth":300,"depth":300,"links":301},"",2,[],"markdown",1729612430701]