blob: d512bec2d5d9406eb558deb9a01d8078e46576a4 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 215
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" %idx_1
OpExecutionMode %main LocalSize 1 1 1
OpName %idx_1 "idx_1"
OpName %S "S"
OpMemberName %S 0 "arr"
OpName %Inner "Inner"
OpMemberName %Inner 0 "scalar_f32"
OpMemberName %Inner 1 "scalar_i32"
OpMemberName %Inner 2 "scalar_u32"
OpMemberName %Inner 3 "vec2_f32"
OpMemberName %Inner 4 "vec2_i32"
OpMemberName %Inner 5 "vec2_u32"
OpMemberName %Inner 6 "vec3_f32"
OpMemberName %Inner 7 "vec3_i32"
OpMemberName %Inner 8 "vec3_u32"
OpMemberName %Inner 9 "vec4_f32"
OpMemberName %Inner 10 "vec4_i32"
OpMemberName %Inner 11 "vec4_u32"
OpMemberName %Inner 12 "mat2x2_f32"
OpMemberName %Inner 13 "mat2x3_f32"
OpMemberName %Inner 14 "mat2x4_f32"
OpMemberName %Inner 15 "mat3x2_f32"
OpMemberName %Inner 16 "mat3x3_f32"
OpMemberName %Inner 17 "mat3x4_f32"
OpMemberName %Inner 18 "mat4x2_f32"
OpMemberName %Inner 19 "mat4x3_f32"
OpMemberName %Inner 20 "mat4x4_f32"
OpMemberName %Inner 21 "arr2_vec3_f32"
OpName %sb "sb"
OpName %s_block "s_block"
OpMemberName %s_block 0 "inner"
OpName %s "s"
OpName %tint_ftoi "tint_ftoi"
OpName %v "v"
OpName %main_inner "main_inner"
OpName %idx "idx"
OpName %main "main"
OpDecorate %idx_1 BuiltIn LocalInvocationIndex
OpDecorate %S Block
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %Inner 0 Offset 0
OpMemberDecorate %Inner 1 Offset 4
OpMemberDecorate %Inner 2 Offset 8
OpMemberDecorate %Inner 3 Offset 16
OpMemberDecorate %Inner 4 Offset 24
OpMemberDecorate %Inner 5 Offset 32
OpMemberDecorate %Inner 6 Offset 48
OpMemberDecorate %Inner 7 Offset 64
OpMemberDecorate %Inner 8 Offset 80
OpMemberDecorate %Inner 9 Offset 96
OpMemberDecorate %Inner 10 Offset 112
OpMemberDecorate %Inner 11 Offset 128
OpMemberDecorate %Inner 12 Offset 144
OpMemberDecorate %Inner 12 ColMajor
OpMemberDecorate %Inner 12 MatrixStride 8
OpMemberDecorate %Inner 13 Offset 160
OpMemberDecorate %Inner 13 ColMajor
OpMemberDecorate %Inner 13 MatrixStride 16
OpMemberDecorate %Inner 14 Offset 192
OpMemberDecorate %Inner 14 ColMajor
OpMemberDecorate %Inner 14 MatrixStride 16
OpMemberDecorate %Inner 15 Offset 224
OpMemberDecorate %Inner 15 ColMajor
OpMemberDecorate %Inner 15 MatrixStride 8
OpMemberDecorate %Inner 16 Offset 256
OpMemberDecorate %Inner 16 ColMajor
OpMemberDecorate %Inner 16 MatrixStride 16
OpMemberDecorate %Inner 17 Offset 304
OpMemberDecorate %Inner 17 ColMajor
OpMemberDecorate %Inner 17 MatrixStride 16
OpMemberDecorate %Inner 18 Offset 352
OpMemberDecorate %Inner 18 ColMajor
OpMemberDecorate %Inner 18 MatrixStride 8
OpMemberDecorate %Inner 19 Offset 384
OpMemberDecorate %Inner 19 ColMajor
OpMemberDecorate %Inner 19 MatrixStride 16
OpMemberDecorate %Inner 20 Offset 448
OpMemberDecorate %Inner 20 ColMajor
OpMemberDecorate %Inner 20 MatrixStride 16
OpMemberDecorate %Inner 21 Offset 512
OpDecorate %_arr_v3float_uint_2 ArrayStride 16
OpDecorate %_runtimearr_Inner ArrayStride 544
OpDecorate %sb NonWritable
OpDecorate %sb Binding 0
OpDecorate %sb DescriptorSet 0
OpDecorate %s_block Block
OpMemberDecorate %s_block 0 Offset 0
OpDecorate %s DescriptorSet 0
OpDecorate %s Binding 1
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%idx_1 = OpVariable %_ptr_Input_uint Input
%float = OpTypeFloat 32
%int = OpTypeInt 32 1
%v2float = OpTypeVector %float 2
%v2int = OpTypeVector %int 2
%v2uint = OpTypeVector %uint 2
%v3float = OpTypeVector %float 3
%v3int = OpTypeVector %int 3
%v3uint = OpTypeVector %uint 3
%v4float = OpTypeVector %float 4
%v4int = OpTypeVector %int 4
%v4uint = OpTypeVector %uint 4
%mat2v2float = OpTypeMatrix %v2float 2
%mat2v3float = OpTypeMatrix %v3float 2
%mat2v4float = OpTypeMatrix %v4float 2
%mat3v2float = OpTypeMatrix %v2float 3
%mat3v3float = OpTypeMatrix %v3float 3
%mat3v4float = OpTypeMatrix %v4float 3
%mat4v2float = OpTypeMatrix %v2float 4
%mat4v3float = OpTypeMatrix %v3float 4
%mat4v4float = OpTypeMatrix %v4float 4
%uint_2 = OpConstant %uint 2
%_arr_v3float_uint_2 = OpTypeArray %v3float %uint_2
%Inner = OpTypeStruct %float %int %uint %v2float %v2int %v2uint %v3float %v3int %v3uint %v4float %v4int %v4uint %mat2v2float %mat2v3float %mat2v4float %mat3v2float %mat3v3float %mat3v4float %mat4v2float %mat4v3float %mat4v4float %_arr_v3float_uint_2
%_runtimearr_Inner = OpTypeRuntimeArray %Inner
%S = OpTypeStruct %_runtimearr_Inner
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%sb = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%s_block = OpTypeStruct %int
%_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block
%s = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer
%34 = OpTypeFunction %int %float
%float_2_14748352e_09 = OpConstant %float 2.14748352e+09
%bool = OpTypeBool
%float_n2_14748365e_09 = OpConstant %float -2.14748365e+09
%int_n2147483648 = OpConstant %int -2147483648
%int_2147483647 = OpConstant %int 2147483647
%void = OpTypeVoid
%48 = OpTypeFunction %void %uint
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%uint_1 = OpConstant %uint 1
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
%uint_4 = OpConstant %uint 4
%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
%uint_5 = OpConstant %uint 5
%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
%uint_6 = OpConstant %uint 6
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
%uint_7 = OpConstant %uint 7
%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
%uint_8 = OpConstant %uint 8
%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%uint_9 = OpConstant %uint 9
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%uint_10 = OpConstant %uint 10
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%uint_11 = OpConstant %uint 11
%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
%uint_12 = OpConstant %uint 12
%_ptr_StorageBuffer_mat2v2float = OpTypePointer StorageBuffer %mat2v2float
%uint_13 = OpConstant %uint 13
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float
%uint_14 = OpConstant %uint 14
%_ptr_StorageBuffer_mat2v4float = OpTypePointer StorageBuffer %mat2v4float
%uint_15 = OpConstant %uint 15
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float
%uint_16 = OpConstant %uint 16
%_ptr_StorageBuffer_mat3v3float = OpTypePointer StorageBuffer %mat3v3float
%uint_17 = OpConstant %uint 17
%_ptr_StorageBuffer_mat3v4float = OpTypePointer StorageBuffer %mat3v4float
%uint_18 = OpConstant %uint 18
%_ptr_StorageBuffer_mat4v2float = OpTypePointer StorageBuffer %mat4v2float
%uint_19 = OpConstant %uint 19
%_ptr_StorageBuffer_mat4v3float = OpTypePointer StorageBuffer %mat4v3float
%uint_20 = OpConstant %uint 20
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%uint_21 = OpConstant %uint 21
%_ptr_StorageBuffer__arr_v3float_uint_2 = OpTypePointer StorageBuffer %_arr_v3float_uint_2
%170 = OpConstantNull %int
%210 = OpTypeFunction %void
%tint_ftoi = OpFunction %int None %34
%v = OpFunctionParameter %float
%37 = OpLabel
%40 = OpFOrdLessThan %bool %v %float_2_14748352e_09
%44 = OpFOrdLessThan %bool %v %float_n2_14748365e_09
%46 = OpConvertFToS %int %v
%42 = OpSelect %int %44 %int_n2147483648 %46
%38 = OpSelect %int %40 %42 %int_2147483647
OpReturnValue %38
OpFunctionEnd
%main_inner = OpFunction %void None %48
%idx = OpFunctionParameter %uint
%52 = OpLabel
%55 = OpAccessChain %_ptr_StorageBuffer_float %sb %uint_0 %idx %uint_0
%56 = OpLoad %float %55
%59 = OpAccessChain %_ptr_StorageBuffer_int %sb %uint_0 %idx %uint_1
%60 = OpLoad %int %59
%62 = OpAccessChain %_ptr_StorageBuffer_uint %sb %uint_0 %idx %uint_2
%63 = OpLoad %uint %62
%66 = OpAccessChain %_ptr_StorageBuffer_v2float %sb %uint_0 %idx %uint_3
%67 = OpLoad %v2float %66
%70 = OpAccessChain %_ptr_StorageBuffer_v2int %sb %uint_0 %idx %uint_4
%71 = OpLoad %v2int %70
%74 = OpAccessChain %_ptr_StorageBuffer_v2uint %sb %uint_0 %idx %uint_5
%75 = OpLoad %v2uint %74
%78 = OpAccessChain %_ptr_StorageBuffer_v3float %sb %uint_0 %idx %uint_6
%79 = OpLoad %v3float %78
%82 = OpAccessChain %_ptr_StorageBuffer_v3int %sb %uint_0 %idx %uint_7
%83 = OpLoad %v3int %82
%86 = OpAccessChain %_ptr_StorageBuffer_v3uint %sb %uint_0 %idx %uint_8
%87 = OpLoad %v3uint %86
%90 = OpAccessChain %_ptr_StorageBuffer_v4float %sb %uint_0 %idx %uint_9
%91 = OpLoad %v4float %90
%94 = OpAccessChain %_ptr_StorageBuffer_v4int %sb %uint_0 %idx %uint_10
%95 = OpLoad %v4int %94
%98 = OpAccessChain %_ptr_StorageBuffer_v4uint %sb %uint_0 %idx %uint_11
%99 = OpLoad %v4uint %98
%102 = OpAccessChain %_ptr_StorageBuffer_mat2v2float %sb %uint_0 %idx %uint_12
%103 = OpLoad %mat2v2float %102
%106 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %sb %uint_0 %idx %uint_13
%107 = OpLoad %mat2v3float %106
%110 = OpAccessChain %_ptr_StorageBuffer_mat2v4float %sb %uint_0 %idx %uint_14
%111 = OpLoad %mat2v4float %110
%114 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %sb %uint_0 %idx %uint_15
%115 = OpLoad %mat3v2float %114
%118 = OpAccessChain %_ptr_StorageBuffer_mat3v3float %sb %uint_0 %idx %uint_16
%119 = OpLoad %mat3v3float %118
%122 = OpAccessChain %_ptr_StorageBuffer_mat3v4float %sb %uint_0 %idx %uint_17
%123 = OpLoad %mat3v4float %122
%126 = OpAccessChain %_ptr_StorageBuffer_mat4v2float %sb %uint_0 %idx %uint_18
%127 = OpLoad %mat4v2float %126
%130 = OpAccessChain %_ptr_StorageBuffer_mat4v3float %sb %uint_0 %idx %uint_19
%131 = OpLoad %mat4v3float %130
%134 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %sb %uint_0 %idx %uint_20
%135 = OpLoad %mat4v4float %134
%138 = OpAccessChain %_ptr_StorageBuffer__arr_v3float_uint_2 %sb %uint_0 %idx %uint_21
%139 = OpLoad %_arr_v3float_uint_2 %138
%140 = OpAccessChain %_ptr_StorageBuffer_int %s %uint_0
%141 = OpFunctionCall %int %tint_ftoi %56
%142 = OpIAdd %int %141 %60
%143 = OpBitcast %int %63
%144 = OpIAdd %int %142 %143
%146 = OpCompositeExtract %float %67 0
%145 = OpFunctionCall %int %tint_ftoi %146
%147 = OpIAdd %int %144 %145
%148 = OpCompositeExtract %int %71 0
%149 = OpIAdd %int %147 %148
%151 = OpCompositeExtract %uint %75 0
%150 = OpBitcast %int %151
%152 = OpIAdd %int %149 %150
%154 = OpCompositeExtract %float %79 1
%153 = OpFunctionCall %int %tint_ftoi %154
%155 = OpIAdd %int %152 %153
%156 = OpCompositeExtract %int %83 1
%157 = OpIAdd %int %155 %156
%159 = OpCompositeExtract %uint %87 1
%158 = OpBitcast %int %159
%160 = OpIAdd %int %157 %158
%162 = OpCompositeExtract %float %91 2
%161 = OpFunctionCall %int %tint_ftoi %162
%163 = OpIAdd %int %160 %161
%164 = OpCompositeExtract %int %95 2
%165 = OpIAdd %int %163 %164
%167 = OpCompositeExtract %uint %99 2
%166 = OpBitcast %int %167
%168 = OpIAdd %int %165 %166
%171 = OpCompositeExtract %v2float %103 0
%172 = OpCompositeExtract %float %171 0
%169 = OpFunctionCall %int %tint_ftoi %172
%173 = OpIAdd %int %168 %169
%175 = OpCompositeExtract %v3float %107 0
%176 = OpCompositeExtract %float %175 0
%174 = OpFunctionCall %int %tint_ftoi %176
%177 = OpIAdd %int %173 %174
%179 = OpCompositeExtract %v4float %111 0
%180 = OpCompositeExtract %float %179 0
%178 = OpFunctionCall %int %tint_ftoi %180
%181 = OpIAdd %int %177 %178
%183 = OpCompositeExtract %v2float %115 0
%184 = OpCompositeExtract %float %183 0
%182 = OpFunctionCall %int %tint_ftoi %184
%185 = OpIAdd %int %181 %182
%187 = OpCompositeExtract %v3float %119 0
%188 = OpCompositeExtract %float %187 0
%186 = OpFunctionCall %int %tint_ftoi %188
%189 = OpIAdd %int %185 %186
%191 = OpCompositeExtract %v4float %123 0
%192 = OpCompositeExtract %float %191 0
%190 = OpFunctionCall %int %tint_ftoi %192
%193 = OpIAdd %int %189 %190
%195 = OpCompositeExtract %v2float %127 0
%196 = OpCompositeExtract %float %195 0
%194 = OpFunctionCall %int %tint_ftoi %196
%197 = OpIAdd %int %193 %194
%199 = OpCompositeExtract %v3float %131 0
%200 = OpCompositeExtract %float %199 0
%198 = OpFunctionCall %int %tint_ftoi %200
%201 = OpIAdd %int %197 %198
%203 = OpCompositeExtract %v4float %135 0
%204 = OpCompositeExtract %float %203 0
%202 = OpFunctionCall %int %tint_ftoi %204
%205 = OpIAdd %int %201 %202
%207 = OpCompositeExtract %v3float %139 0
%208 = OpCompositeExtract %float %207 0
%206 = OpFunctionCall %int %tint_ftoi %208
%209 = OpIAdd %int %205 %206
OpStore %140 %209
OpReturn
OpFunctionEnd
%main = OpFunction %void None %210
%212 = OpLabel
%214 = OpLoad %uint %idx_1
%213 = OpFunctionCall %void %main_inner %214
OpReturn
OpFunctionEnd