[{"data":1,"prerenderedAt":315},["ShallowReactive",2],{"wBHKaFqbgB":3},{"title":4,"description":5,"type":6,"xrefs":7,"body":8,"_type":314,"_id":4},"SubgroupSize","Size of a subgroup","builtins",[],{"type":9,"children":10,"toc":310},"root",[11,24,53,153,192,240,245],{"type":12,"tag":13,"props":14,"children":16},"element","h6",{"id":15},"subgroupsize",[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,44,46,51],{"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}," builtin decoration will\nmake that variable contain the implementation-dependent\n",{"type":12,"tag":38,"props":39,"children":41},"a",{"href":40},"/man/VkPhysicalDeviceSubgroupProperties#limits-subgroupSize",[42],{"type":23,"value":43},"number of invocations in a subgroup",{"type":23,"value":45},".\nThis value ",{"type":12,"tag":47,"props":48,"children":50},"normative",{"type":49},"must",[],{"type":23,"value":52}," be a power-of-two integer.",{"type":12,"tag":25,"props":54,"children":55},{},[56,58,64,66,72,74,79,81,84,86,96,98,108,109,112,114,120,122,126,128,131,133,138,140,143,145,151],{"type":23,"value":57},"If the pipeline was created with the\n",{"type":12,"tag":18,"props":59,"children":61},{"className":60},[],[62],{"type":23,"value":63},"VK_PIPELINE_SHADER_STAGE_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT",{"type":23,"value":65}," flag\nset,\nor the shader object was created with the\n",{"type":12,"tag":18,"props":67,"children":69},{"className":68},[],[70],{"type":23,"value":71},"VK_SHADER_CREATE_ALLOW_VARYING_SUBGROUP_SIZE_BIT_EXT",{"type":23,"value":73}," flag set,\nthe ",{"type":12,"tag":18,"props":75,"children":77},{"className":76},[],[78],{"type":23,"value":4},{"type":23,"value":80}," decorated variable will contain the subgroup size for\neach subgroup that gets dispatched.\nThis value ",{"type":12,"tag":47,"props":82,"children":83},{"type":49},[],{"type":23,"value":85}," be between ",{"type":12,"tag":38,"props":87,"children":89},{"href":88},"/man/VkPhysicalDeviceSubgroupSizeControlProperties#limits-minSubgroupSize",[90],{"type":12,"tag":18,"props":91,"children":93},{"className":92},[],[94],{"type":23,"value":95},"minSubgroupSize",{"type":23,"value":97}," and ",{"type":12,"tag":38,"props":99,"children":101},{"href":100},"/man/VkPhysicalDeviceSubgroupSizeControlProperties#limits-maxSubgroupSize",[102],{"type":12,"tag":18,"props":103,"children":105},{"className":104},[],[106],{"type":23,"value":107},"maxSubgroupSize",{"type":23,"value":97},{"type":12,"tag":47,"props":110,"children":111},{"type":49},[],{"type":23,"value":113}," be uniform with ",{"type":12,"tag":38,"props":115,"children":117},{"href":116},"/404#shaders-scope-subgroup",[118],{"type":23,"value":119},"subgroup scope",{"type":23,"value":121},".\nThe value ",{"type":12,"tag":47,"props":123,"children":125},{"type":124},"may",[],{"type":23,"value":127}," vary across a single draw call, and for fragment shaders ",{"type":12,"tag":47,"props":129,"children":130},{"type":124},[],{"type":23,"value":132},"\nvary across a single primitive.\nIn compute dispatches, ",{"type":12,"tag":18,"props":134,"children":136},{"className":135},[],[137],{"type":23,"value":4},{"type":23,"value":139}," ",{"type":12,"tag":47,"props":141,"children":142},{"type":49},[],{"type":23,"value":144}," be uniform with\n",{"type":12,"tag":38,"props":146,"children":148},{"href":147},"/chapters/shaders#shaders-scope-command",[149],{"type":23,"value":150},"command scope",{"type":23,"value":152},".",{"type":12,"tag":25,"props":154,"children":155},{},[156,158,164,166,172,174,179,181,191],{"type":23,"value":157},"If the pipeline was created with a chained\n",{"type":12,"tag":38,"props":159,"children":161},{"href":160},"/man/VkPipelineShaderStageRequiredSubgroupSizeCreateInfo",[162],{"type":23,"value":163},"VkPipelineShaderStageRequiredSubgroupSizeCreateInfo",{"type":23,"value":165}," structure,\nor the shader object was created with a chained\n",{"type":12,"tag":38,"props":167,"children":169},{"href":168},"/man/VkShaderRequiredSubgroupSizeCreateInfoEXT",[170],{"type":23,"value":171},"VkShaderRequiredSubgroupSizeCreateInfoEXT",{"type":23,"value":173}," structure,\nthe ",{"type":12,"tag":18,"props":175,"children":177},{"className":176},[],[178],{"type":23,"value":4},{"type":23,"value":180}," decorated variable will match\n",{"type":12,"tag":38,"props":182,"children":184},{"href":183},"/man/VkPipelineShaderStageRequiredSubgroupSizeCreateInfo#pipelines-required-subgroup-size",[185],{"type":12,"tag":18,"props":186,"children":188},{"className":187},[],[189],{"type":23,"value":190},"requiredSubgroupSize",{"type":23,"value":152},{"type":12,"tag":25,"props":193,"children":194},{},[195,197,202,204,208,210,215,217,221,223,228,230,239],{"type":23,"value":196},"If\nthe pipeline was not created with the\n",{"type":12,"tag":18,"props":198,"children":200},{"className":199},[],[201],{"type":23,"value":63},{"type":23,"value":203}," flag\nset and no ",{"type":12,"tag":38,"props":205,"children":206},{"href":160},[207],{"type":23,"value":163},{"type":23,"value":209},"\nstructure was chained,\nand the shader was not created with the\n",{"type":12,"tag":18,"props":211,"children":213},{"className":212},[],[214],{"type":23,"value":71},{"type":23,"value":216}," flag set and no\n",{"type":12,"tag":38,"props":218,"children":219},{"href":168},[220],{"type":23,"value":171},{"type":23,"value":222}," structure was chained,\nthe\nvariable decorated with ",{"type":12,"tag":18,"props":224,"children":226},{"className":225},[],[227],{"type":23,"value":4},{"type":23,"value":229}," will match ",{"type":12,"tag":38,"props":231,"children":232},{"href":40},[233],{"type":12,"tag":18,"props":234,"children":236},{"className":235},[],[237],{"type":23,"value":238},"subgroupSize",{"type":23,"value":152},{"type":12,"tag":25,"props":241,"children":242},{},[243],{"type":23,"value":244},"The maximum number of invocations that an implementation can support per\nsubgroup is 128.",{"type":12,"tag":246,"props":247,"children":249},"validity-group",{"name":248},"Valid Usage",[250,291],{"type":12,"tag":251,"props":252,"children":254},"validity-field",{"name":253},"VUID-SubgroupSize-SubgroupSize-04382",[255],{"type":12,"tag":25,"props":256,"children":257},{},[258,260,265,266,269,271,277,278,284,285],{"type":23,"value":259},"The variable decorated with ",{"type":12,"tag":18,"props":261,"children":263},{"className":262},[],[264],{"type":23,"value":4},{"type":23,"value":139},{"type":12,"tag":47,"props":267,"children":268},{"type":49},[],{"type":23,"value":270}," be declared using\nthe ",{"type":12,"tag":18,"props":272,"children":274},{"className":273},[],[275],{"type":23,"value":276},"Input",{"type":23,"value":139},{"type":12,"tag":18,"props":279,"children":281},{"className":280},[],[282],{"type":23,"value":283},"Storage",{"type":23,"value":139},{"type":12,"tag":18,"props":286,"children":288},{"className":287},[],[289],{"type":23,"value":290},"Class",{"type":12,"tag":251,"props":292,"children":294},{"name":293},"VUID-SubgroupSize-SubgroupSize-04383",[295],{"type":12,"tag":25,"props":296,"children":297},{},[298,299,304,305,308],{"type":23,"value":259},{"type":12,"tag":18,"props":300,"children":302},{"className":301},[],[303],{"type":23,"value":4},{"type":23,"value":139},{"type":12,"tag":47,"props":306,"children":307},{"type":49},[],{"type":23,"value":309}," be declared as a\nscalar 32-bit integer value",{"title":311,"searchDepth":312,"depth":312,"links":313},"",2,[],"markdown",1729612428293]