1spv.ext.meshShaderBuiltins.mesh 2// Module Version 10400 3// Generated by (magic number): 8000b 4// Id's are bound by 158 5 6 Capability ClipDistance 7 Capability CullDistance 8 Capability FragmentShadingRateKHR 9 Capability DrawParameters 10 Capability MultiView 11 Capability MeshShadingEXT 12 Extension "SPV_EXT_mesh_shader" 13 Extension "SPV_KHR_fragment_shading_rate" 14 1: ExtInstImport "GLSL.std.450" 15 MemoryModel Logical GLSL450 16 EntryPoint MeshEXT 4 "main" 13 19 24 41 93 134 152 155 17 ExecutionMode 4 LocalSize 32 1 1 18 ExecutionMode 4 OutputVertices 81 19 ExecutionMode 4 OutputPrimitivesNV 32 20 ExecutionMode 4 OutputTrianglesNV 21 Source GLSL 460 22 SourceExtension "GL_ARB_shader_draw_parameters" 23 SourceExtension "GL_EXT_mesh_shader" 24 SourceExtension "GL_EXT_multiview" 25 Name 4 "main" 26 Name 6 "testAdditionalBuiltins(" 27 Name 10 "iid" 28 Name 13 "gl_LocalInvocationID" 29 Name 18 "gid" 30 Name 19 "gl_WorkGroupID" 31 Name 23 "numWorkGrous" 32 Name 24 "gl_NumWorkGroups" 33 Name 26 "vertexCount" 34 Name 28 "primitiveCount" 35 Name 38 "gl_MeshPerVertexEXT" 36 MemberName 38(gl_MeshPerVertexEXT) 0 "gl_Position" 37 MemberName 38(gl_MeshPerVertexEXT) 1 "gl_PointSize" 38 MemberName 38(gl_MeshPerVertexEXT) 2 "gl_ClipDistance" 39 MemberName 38(gl_MeshPerVertexEXT) 3 "gl_CullDistance" 40 Name 41 "gl_MeshVerticesEXT" 41 Name 90 "gl_MeshPerPrimitiveEXT" 42 MemberName 90(gl_MeshPerPrimitiveEXT) 0 "gl_PrimitiveID" 43 MemberName 90(gl_MeshPerPrimitiveEXT) 1 "gl_Layer" 44 MemberName 90(gl_MeshPerPrimitiveEXT) 2 "gl_ViewportIndex" 45 MemberName 90(gl_MeshPerPrimitiveEXT) 3 "gl_CullPrimitiveEXT" 46 MemberName 90(gl_MeshPerPrimitiveEXT) 4 "gl_PrimitiveShadingRateEXT" 47 Name 93 "gl_MeshPrimitivesEXT" 48 Name 134 "gl_PrimitiveTriangleIndicesEXT" 49 Name 150 "id" 50 Name 152 "gl_DrawIDARB" 51 Name 154 "viewIdx" 52 Name 155 "gl_ViewIndex" 53 Decorate 13(gl_LocalInvocationID) BuiltIn LocalInvocationId 54 Decorate 19(gl_WorkGroupID) BuiltIn WorkgroupId 55 Decorate 24(gl_NumWorkGroups) BuiltIn NumWorkgroups 56 MemberDecorate 38(gl_MeshPerVertexEXT) 0 BuiltIn Position 57 MemberDecorate 38(gl_MeshPerVertexEXT) 1 BuiltIn PointSize 58 MemberDecorate 38(gl_MeshPerVertexEXT) 2 BuiltIn ClipDistance 59 MemberDecorate 38(gl_MeshPerVertexEXT) 3 BuiltIn CullDistance 60 Decorate 38(gl_MeshPerVertexEXT) Block 61 MemberDecorate 90(gl_MeshPerPrimitiveEXT) 0 PerPrimitiveNV 62 MemberDecorate 90(gl_MeshPerPrimitiveEXT) 0 BuiltIn PrimitiveId 63 MemberDecorate 90(gl_MeshPerPrimitiveEXT) 1 PerPrimitiveNV 64 MemberDecorate 90(gl_MeshPerPrimitiveEXT) 1 BuiltIn Layer 65 MemberDecorate 90(gl_MeshPerPrimitiveEXT) 2 PerPrimitiveNV 66 MemberDecorate 90(gl_MeshPerPrimitiveEXT) 2 BuiltIn ViewportIndex 67 MemberDecorate 90(gl_MeshPerPrimitiveEXT) 3 PerPrimitiveNV 68 MemberDecorate 90(gl_MeshPerPrimitiveEXT) 3 BuiltIn CullPrimitiveEXT 69 MemberDecorate 90(gl_MeshPerPrimitiveEXT) 4 PerPrimitiveNV 70 MemberDecorate 90(gl_MeshPerPrimitiveEXT) 4 BuiltIn PrimitiveShadingRateKHR 71 Decorate 90(gl_MeshPerPrimitiveEXT) Block 72 Decorate 134(gl_PrimitiveTriangleIndicesEXT) BuiltIn PrimitiveTriangleIndicesEXT 73 Decorate 152(gl_DrawIDARB) BuiltIn DrawIndex 74 Decorate 155(gl_ViewIndex) BuiltIn ViewIndex 75 Decorate 157 BuiltIn WorkgroupSize 76 2: TypeVoid 77 3: TypeFunction 2 78 8: TypeInt 32 0 79 9: TypePointer Function 8(int) 80 11: TypeVector 8(int) 3 81 12: TypePointer Input 11(ivec3) 8213(gl_LocalInvocationID): 12(ptr) Variable Input 83 14: 8(int) Constant 0 84 15: TypePointer Input 8(int) 8519(gl_WorkGroupID): 12(ptr) Variable Input 86 22: TypePointer Function 11(ivec3) 8724(gl_NumWorkGroups): 12(ptr) Variable Input 88 27: 8(int) Constant 81 89 29: 8(int) Constant 32 90 32: TypeFloat 32 91 33: TypeVector 32(float) 4 92 34: 8(int) Constant 4 93 35: TypeArray 32(float) 34 94 36: 8(int) Constant 3 95 37: TypeArray 32(float) 36 9638(gl_MeshPerVertexEXT): TypeStruct 33(fvec4) 32(float) 35 37 97 39: TypeArray 38(gl_MeshPerVertexEXT) 27 98 40: TypePointer Output 39 9941(gl_MeshVerticesEXT): 40(ptr) Variable Output 100 43: TypeInt 32 1 101 44: 43(int) Constant 0 102 45: 32(float) Constant 1065353216 103 46: 33(fvec4) ConstantComposite 45 45 45 45 104 47: TypePointer Output 33(fvec4) 105 50: 43(int) Constant 1 106 51: 32(float) Constant 1073741824 107 52: TypePointer Output 32(float) 108 55: 43(int) Constant 2 109 56: 43(int) Constant 3 110 57: 32(float) Constant 1077936128 111 60: 32(float) Constant 1082130432 112 62: 8(int) Constant 1 113 63: 8(int) Constant 264 114 64: 8(int) Constant 2 115 89: TypeBool 11690(gl_MeshPerPrimitiveEXT): TypeStruct 43(int) 43(int) 43(int) 89(bool) 43(int) 117 91: TypeArray 90(gl_MeshPerPrimitiveEXT) 29 118 92: TypePointer Output 91 11993(gl_MeshPrimitivesEXT): 92(ptr) Variable Output 120 95: 43(int) Constant 6 121 96: TypePointer Output 43(int) 122 99: 43(int) Constant 7 123 102: 43(int) Constant 8 124 105: 89(bool) ConstantFalse 125 106: TypePointer Output 89(bool) 126 132: TypeArray 11(ivec3) 29 127 133: TypePointer Output 132 128134(gl_PrimitiveTriangleIndicesEXT): 133(ptr) Variable Output 129 135: 8(int) Constant 257 130 136: 11(ivec3) ConstantComposite 135 135 135 131 137: TypePointer Output 11(ivec3) 132 141: 11(ivec3) ConstantComposite 64 64 64 133 149: TypePointer Function 43(int) 134 151: TypePointer Input 43(int) 135152(gl_DrawIDARB): 151(ptr) Variable Input 136155(gl_ViewIndex): 151(ptr) Variable Input 137 157: 11(ivec3) ConstantComposite 29 62 62 138 4(main): 2 Function None 3 139 5: Label 140 10(iid): 9(ptr) Variable Function 141 18(gid): 9(ptr) Variable Function 14223(numWorkGrous): 22(ptr) Variable Function 143 26(vertexCount): 9(ptr) Variable Function 14428(primitiveCount): 9(ptr) Variable Function 145 16: 15(ptr) AccessChain 13(gl_LocalInvocationID) 14 146 17: 8(int) Load 16 147 Store 10(iid) 17 148 20: 15(ptr) AccessChain 19(gl_WorkGroupID) 14 149 21: 8(int) Load 20 150 Store 18(gid) 21 151 25: 11(ivec3) Load 24(gl_NumWorkGroups) 152 Store 23(numWorkGrous) 25 153 Store 26(vertexCount) 27 154 Store 28(primitiveCount) 29 155 30: 8(int) Load 26(vertexCount) 156 31: 8(int) Load 28(primitiveCount) 157 SetMeshOutputsEXT 30 31 158 42: 8(int) Load 10(iid) 159 48: 47(ptr) AccessChain 41(gl_MeshVerticesEXT) 42 44 160 Store 48 46 161 49: 8(int) Load 10(iid) 162 53: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 49 50 163 Store 53 51 164 54: 8(int) Load 10(iid) 165 58: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 54 55 56 166 Store 58 57 167 59: 8(int) Load 10(iid) 168 61: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 59 56 55 169 Store 61 60 170 MemoryBarrier 62 63 171 ControlBarrier 64 64 63 172 65: 8(int) Load 10(iid) 173 66: 8(int) IAdd 65 62 174 67: 8(int) Load 10(iid) 175 68: 47(ptr) AccessChain 41(gl_MeshVerticesEXT) 67 44 176 69: 33(fvec4) Load 68 177 70: 47(ptr) AccessChain 41(gl_MeshVerticesEXT) 66 44 178 Store 70 69 179 71: 8(int) Load 10(iid) 180 72: 8(int) IAdd 71 62 181 73: 8(int) Load 10(iid) 182 74: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 73 50 183 75: 32(float) Load 74 184 76: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 72 50 185 Store 76 75 186 77: 8(int) Load 10(iid) 187 78: 8(int) IAdd 77 62 188 79: 8(int) Load 10(iid) 189 80: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 79 55 56 190 81: 32(float) Load 80 191 82: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 78 55 56 192 Store 82 81 193 83: 8(int) Load 10(iid) 194 84: 8(int) IAdd 83 62 195 85: 8(int) Load 10(iid) 196 86: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 85 56 55 197 87: 32(float) Load 86 198 88: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 84 56 55 199 Store 88 87 200 MemoryBarrier 62 63 201 ControlBarrier 64 64 63 202 94: 8(int) Load 10(iid) 203 97: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 94 44 204 Store 97 95 205 98: 8(int) Load 10(iid) 206 100: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 98 50 207 Store 100 99 208 101: 8(int) Load 10(iid) 209 103: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 101 55 210 Store 103 102 211 104: 8(int) Load 10(iid) 212 107: 106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 104 56 213 Store 107 105 214 MemoryBarrier 62 63 215 ControlBarrier 64 64 63 216 108: 8(int) Load 10(iid) 217 109: 8(int) IAdd 108 62 218 110: 8(int) Load 10(iid) 219 111: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 110 44 220 112: 43(int) Load 111 221 113: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 109 44 222 Store 113 112 223 114: 8(int) Load 10(iid) 224 115: 8(int) IAdd 114 62 225 116: 8(int) Load 10(iid) 226 117: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 116 50 227 118: 43(int) Load 117 228 119: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 115 50 229 Store 119 118 230 120: 8(int) Load 10(iid) 231 121: 8(int) IAdd 120 62 232 122: 8(int) Load 10(iid) 233 123: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 122 55 234 124: 43(int) Load 123 235 125: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 121 55 236 Store 125 124 237 126: 8(int) Load 10(iid) 238 127: 8(int) IAdd 126 62 239 128: 8(int) Load 10(iid) 240 129: 106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 128 56 241 130: 89(bool) Load 129 242 131: 106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 127 56 243 Store 131 130 244 MemoryBarrier 62 63 245 ControlBarrier 64 64 63 246 138: 137(ptr) AccessChain 134(gl_PrimitiveTriangleIndicesEXT) 44 247 Store 138 136 248 139: 8(int) Load 28(primitiveCount) 249 140: 8(int) ISub 139 62 250 142: 137(ptr) AccessChain 134(gl_PrimitiveTriangleIndicesEXT) 140 251 Store 142 141 252 143: 8(int) Load 18(gid) 253 144: 8(int) Load 18(gid) 254 145: 8(int) ISub 144 62 255 146: 137(ptr) AccessChain 134(gl_PrimitiveTriangleIndicesEXT) 145 256 147: 11(ivec3) Load 146 257 148: 137(ptr) AccessChain 134(gl_PrimitiveTriangleIndicesEXT) 143 258 Store 148 147 259 MemoryBarrier 62 63 260 ControlBarrier 64 64 63 261 Return 262 FunctionEnd 2636(testAdditionalBuiltins(): 2 Function None 3 264 7: Label 265 150(id): 149(ptr) Variable Function 266 154(viewIdx): 149(ptr) Variable Function 267 153: 43(int) Load 152(gl_DrawIDARB) 268 Store 150(id) 153 269 156: 43(int) Load 155(gl_ViewIndex) 270 Store 154(viewIdx) 156 271 Return 272 FunctionEnd 273