blob: 6931be9471027cb7bd2f12f03559142975977f10 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 210
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpMemberName %S 0 "scalar_f32"
OpMemberName %S 1 "scalar_i32"
OpMemberName %S 2 "scalar_u32"
OpMemberName %S 3 "vec2_f32"
OpMemberName %S 4 "vec2_i32"
OpMemberName %S 5 "vec2_u32"
OpMemberName %S 6 "vec3_f32"
OpMemberName %S 7 "vec3_i32"
OpMemberName %S 8 "vec3_u32"
OpMemberName %S 9 "vec4_f32"
OpMemberName %S 10 "vec4_i32"
OpMemberName %S 11 "vec4_u32"
OpMemberName %S 12 "mat2x2_f32"
OpMemberName %S 13 "mat2x3_f32"
OpMemberName %S 14 "mat2x4_f32"
OpMemberName %S 15 "mat3x2_f32"
OpMemberName %S 16 "mat3x3_f32"
OpMemberName %S 17 "mat3x4_f32"
OpMemberName %S 18 "mat4x2_f32"
OpMemberName %S 19 "mat4x3_f32"
OpMemberName %S 20 "mat4x4_f32"
OpMemberName %S 21 "arr2_vec3_f32"
OpMemberName %Inner 0 "scalar_i32"
OpMemberName %Inner 1 "scalar_f32"
OpName %Inner "Inner"
OpMemberName %S 22 "struct_inner"
OpMemberName %S 23 "array_struct_inner"
OpName %S "S"
OpMemberName %sb_block 0 "inner"
OpName %sb_block "sb_block"
OpMemberName %s_block 0 "inner"
OpName %s_block "s_block"
OpName %main "main"
OpName %scalar_f32 "scalar_f32"
OpName %scalar_i32 "scalar_i32"
OpName %scalar_u32 "scalar_u32"
OpName %vec2_f32 "vec2_f32"
OpName %vec2_i32 "vec2_i32"
OpName %vec2_u32 "vec2_u32"
OpName %vec3_f32 "vec3_f32"
OpName %vec3_i32 "vec3_i32"
OpName %vec3_u32 "vec3_u32"
OpName %vec4_f32 "vec4_f32"
OpName %vec4_i32 "vec4_i32"
OpName %vec4_u32 "vec4_u32"
OpName %mat2x2_f32 "mat2x2_f32"
OpName %mat2x3_f32 "mat2x3_f32"
OpName %mat2x4_f32 "mat2x4_f32"
OpName %mat3x2_f32 "mat3x2_f32"
OpName %mat3x3_f32 "mat3x3_f32"
OpName %mat3x4_f32 "mat3x4_f32"
OpName %mat4x2_f32 "mat4x2_f32"
OpName %mat4x3_f32 "mat4x3_f32"
OpName %mat4x4_f32 "mat4x4_f32"
OpName %arr2_vec3_f32 "arr2_vec3_f32"
OpName %struct_inner "struct_inner"
OpName %array_struct_inner "array_struct_inner"
OpName %tint_f32_to_i32 "tint_f32_to_i32"
OpName %value "value"
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 1 Offset 4
OpMemberDecorate %S 2 Offset 8
OpMemberDecorate %S 3 Offset 16
OpMemberDecorate %S 4 Offset 24
OpMemberDecorate %S 5 Offset 32
OpMemberDecorate %S 6 Offset 48
OpMemberDecorate %S 7 Offset 64
OpMemberDecorate %S 8 Offset 80
OpMemberDecorate %S 9 Offset 96
OpMemberDecorate %S 10 Offset 112
OpMemberDecorate %S 11 Offset 128
OpMemberDecorate %S 12 Offset 144
OpMemberDecorate %S 12 ColMajor
OpMemberDecorate %S 12 MatrixStride 8
OpMemberDecorate %S 13 Offset 160
OpMemberDecorate %S 13 ColMajor
OpMemberDecorate %S 13 MatrixStride 16
OpMemberDecorate %S 14 Offset 192
OpMemberDecorate %S 14 ColMajor
OpMemberDecorate %S 14 MatrixStride 16
OpMemberDecorate %S 15 Offset 224
OpMemberDecorate %S 15 ColMajor
OpMemberDecorate %S 15 MatrixStride 8
OpMemberDecorate %S 16 Offset 256
OpMemberDecorate %S 16 ColMajor
OpMemberDecorate %S 16 MatrixStride 16
OpMemberDecorate %S 17 Offset 304
OpMemberDecorate %S 17 ColMajor
OpMemberDecorate %S 17 MatrixStride 16
OpMemberDecorate %S 18 Offset 352
OpMemberDecorate %S 18 ColMajor
OpMemberDecorate %S 18 MatrixStride 8
OpMemberDecorate %S 19 Offset 384
OpMemberDecorate %S 19 ColMajor
OpMemberDecorate %S 19 MatrixStride 16
OpMemberDecorate %S 20 Offset 448
OpMemberDecorate %S 20 ColMajor
OpMemberDecorate %S 20 MatrixStride 16
OpDecorate %_arr_v3float_uint_2 ArrayStride 16
OpMemberDecorate %S 21 Offset 512
OpMemberDecorate %Inner 0 Offset 0
OpMemberDecorate %Inner 1 Offset 4
OpMemberDecorate %S 22 Offset 544
OpDecorate %_arr_Inner_uint_4 ArrayStride 8
OpMemberDecorate %S 23 Offset 552
OpMemberDecorate %sb_block 0 Offset 0
OpDecorate %sb_block Block
OpDecorate %1 DescriptorSet 0
OpDecorate %1 Binding 0
OpDecorate %1 NonWritable
OpMemberDecorate %s_block 0 Offset 0
OpDecorate %s_block Block
OpDecorate %31 DescriptorSet 0
OpDecorate %31 Binding 1
OpDecorate %31 Coherent
%float = OpTypeFloat 32
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%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 %int %float
%uint_4 = OpConstant %uint 4
%_arr_Inner_uint_4 = OpTypeArray %Inner %uint_4
%S = 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 %Inner %_arr_Inner_uint_4
%sb_block = OpTypeStruct %S
%_ptr_StorageBuffer_sb_block = OpTypePointer StorageBuffer %sb_block
%1 = OpVariable %_ptr_StorageBuffer_sb_block StorageBuffer
%s_block = OpTypeStruct %int
%_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block
%31 = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer
%void = OpTypeVoid
%36 = OpTypeFunction %void
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%uint_1 = OpConstant %uint 1
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%_ptr_StorageBuffer_v2float = OpTypePointer StorageBuffer %v2float
%uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_v2int = OpTypePointer StorageBuffer %v2int
%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
%uint_5 = OpConstant %uint 5
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
%uint_6 = OpConstant %uint 6
%_ptr_StorageBuffer_v3int = OpTypePointer StorageBuffer %v3int
%uint_7 = OpConstant %uint 7
%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
%uint_8 = OpConstant %uint 8
%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
%uint_9 = OpConstant %uint 9
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%uint_10 = OpConstant %uint 10
%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
%uint_11 = OpConstant %uint 11
%_ptr_StorageBuffer_mat2v2float = OpTypePointer StorageBuffer %mat2v2float
%uint_12 = OpConstant %uint 12
%_ptr_StorageBuffer_mat2v3float = OpTypePointer StorageBuffer %mat2v3float
%uint_13 = OpConstant %uint 13
%_ptr_StorageBuffer_mat2v4float = OpTypePointer StorageBuffer %mat2v4float
%uint_14 = OpConstant %uint 14
%_ptr_StorageBuffer_mat3v2float = OpTypePointer StorageBuffer %mat3v2float
%uint_15 = OpConstant %uint 15
%_ptr_StorageBuffer_mat3v3float = OpTypePointer StorageBuffer %mat3v3float
%uint_16 = OpConstant %uint 16
%_ptr_StorageBuffer_mat3v4float = OpTypePointer StorageBuffer %mat3v4float
%uint_17 = OpConstant %uint 17
%_ptr_StorageBuffer_mat4v2float = OpTypePointer StorageBuffer %mat4v2float
%uint_18 = OpConstant %uint 18
%_ptr_StorageBuffer_mat4v3float = OpTypePointer StorageBuffer %mat4v3float
%uint_19 = OpConstant %uint 19
%_ptr_StorageBuffer_mat4v4float = OpTypePointer StorageBuffer %mat4v4float
%uint_20 = OpConstant %uint 20
%_ptr_StorageBuffer__arr_v3float_uint_2 = OpTypePointer StorageBuffer %_arr_v3float_uint_2
%uint_21 = OpConstant %uint 21
%_ptr_StorageBuffer_Inner = OpTypePointer StorageBuffer %Inner
%uint_22 = OpConstant %uint 22
%_ptr_StorageBuffer__arr_Inner_uint_4 = OpTypePointer StorageBuffer %_arr_Inner_uint_4
%uint_23 = OpConstant %uint 23
%_ptr_StorageBuffer_int_0 = OpTypePointer StorageBuffer %int
%198 = OpTypeFunction %int %float
%float_n2_14748365e_09 = OpConstant %float -2.14748365e+09
%bool = OpTypeBool
%int_n2147483648 = OpConstant %int -2147483648
%float_2_14748352e_09 = OpConstant %float 2.14748352e+09
%int_2147483647 = OpConstant %int 2147483647
%main = OpFunction %void None %36
%37 = OpLabel
%38 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0 %uint_0
%scalar_f32 = OpLoad %float %38 None
%42 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0 %uint_1
%scalar_i32 = OpLoad %int %42 None
%46 = OpAccessChain %_ptr_StorageBuffer_uint %1 %uint_0 %uint_2
%scalar_u32 = OpLoad %uint %46 None
%49 = OpAccessChain %_ptr_StorageBuffer_v2float %1 %uint_0 %uint_3
%vec2_f32 = OpLoad %v2float %49 None
%53 = OpAccessChain %_ptr_StorageBuffer_v2int %1 %uint_0 %uint_4
%vec2_i32 = OpLoad %v2int %53 None
%56 = OpAccessChain %_ptr_StorageBuffer_v2uint %1 %uint_0 %uint_5
%vec2_u32 = OpLoad %v2uint %56 None
%60 = OpAccessChain %_ptr_StorageBuffer_v3float %1 %uint_0 %uint_6
%vec3_f32 = OpLoad %v3float %60 None
%64 = OpAccessChain %_ptr_StorageBuffer_v3int %1 %uint_0 %uint_7
%vec3_i32 = OpLoad %v3int %64 None
%68 = OpAccessChain %_ptr_StorageBuffer_v3uint %1 %uint_0 %uint_8
%vec3_u32 = OpLoad %v3uint %68 None
%72 = OpAccessChain %_ptr_StorageBuffer_v4float %1 %uint_0 %uint_9
%vec4_f32 = OpLoad %v4float %72 None
%76 = OpAccessChain %_ptr_StorageBuffer_v4int %1 %uint_0 %uint_10
%vec4_i32 = OpLoad %v4int %76 None
%80 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0 %uint_11
%vec4_u32 = OpLoad %v4uint %80 None
%84 = OpAccessChain %_ptr_StorageBuffer_mat2v2float %1 %uint_0 %uint_12
%mat2x2_f32 = OpLoad %mat2v2float %84 None
%88 = OpAccessChain %_ptr_StorageBuffer_mat2v3float %1 %uint_0 %uint_13
%mat2x3_f32 = OpLoad %mat2v3float %88 None
%92 = OpAccessChain %_ptr_StorageBuffer_mat2v4float %1 %uint_0 %uint_14
%mat2x4_f32 = OpLoad %mat2v4float %92 None
%96 = OpAccessChain %_ptr_StorageBuffer_mat3v2float %1 %uint_0 %uint_15
%mat3x2_f32 = OpLoad %mat3v2float %96 None
%100 = OpAccessChain %_ptr_StorageBuffer_mat3v3float %1 %uint_0 %uint_16
%mat3x3_f32 = OpLoad %mat3v3float %100 None
%104 = OpAccessChain %_ptr_StorageBuffer_mat3v4float %1 %uint_0 %uint_17
%mat3x4_f32 = OpLoad %mat3v4float %104 None
%108 = OpAccessChain %_ptr_StorageBuffer_mat4v2float %1 %uint_0 %uint_18
%mat4x2_f32 = OpLoad %mat4v2float %108 None
%112 = OpAccessChain %_ptr_StorageBuffer_mat4v3float %1 %uint_0 %uint_19
%mat4x3_f32 = OpLoad %mat4v3float %112 None
%116 = OpAccessChain %_ptr_StorageBuffer_mat4v4float %1 %uint_0 %uint_20
%mat4x4_f32 = OpLoad %mat4v4float %116 None
%120 = OpAccessChain %_ptr_StorageBuffer__arr_v3float_uint_2 %1 %uint_0 %uint_21
%arr2_vec3_f32 = OpLoad %_arr_v3float_uint_2 %120 None
%124 = OpAccessChain %_ptr_StorageBuffer_Inner %1 %uint_0 %uint_22
%struct_inner = OpLoad %Inner %124 None
%128 = OpAccessChain %_ptr_StorageBuffer__arr_Inner_uint_4 %1 %uint_0 %uint_23
%array_struct_inner = OpLoad %_arr_Inner_uint_4 %128 None
%132 = OpFunctionCall %int %tint_f32_to_i32 %scalar_f32
%134 = OpIAdd %int %132 %scalar_i32
%135 = OpBitcast %int %scalar_u32
%136 = OpIAdd %int %134 %135
%137 = OpCompositeExtract %float %vec2_f32 0
%138 = OpFunctionCall %int %tint_f32_to_i32 %137
%139 = OpIAdd %int %136 %138
%140 = OpCompositeExtract %int %vec2_i32 0
%141 = OpIAdd %int %139 %140
%142 = OpCompositeExtract %uint %vec2_u32 0
%143 = OpBitcast %int %142
%144 = OpIAdd %int %141 %143
%145 = OpCompositeExtract %float %vec3_f32 1
%146 = OpFunctionCall %int %tint_f32_to_i32 %145
%147 = OpIAdd %int %144 %146
%148 = OpCompositeExtract %int %vec3_i32 1
%149 = OpIAdd %int %147 %148
%150 = OpCompositeExtract %uint %vec3_u32 1
%151 = OpBitcast %int %150
%152 = OpIAdd %int %149 %151
%153 = OpCompositeExtract %float %vec4_f32 2
%154 = OpFunctionCall %int %tint_f32_to_i32 %153
%155 = OpIAdd %int %152 %154
%156 = OpCompositeExtract %int %vec4_i32 2
%157 = OpIAdd %int %155 %156
%158 = OpCompositeExtract %uint %vec4_u32 2
%159 = OpBitcast %int %158
%160 = OpIAdd %int %157 %159
%161 = OpCompositeExtract %float %mat2x2_f32 0 0
%162 = OpFunctionCall %int %tint_f32_to_i32 %161
%163 = OpIAdd %int %160 %162
%164 = OpCompositeExtract %float %mat2x3_f32 0 0
%165 = OpFunctionCall %int %tint_f32_to_i32 %164
%166 = OpIAdd %int %163 %165
%167 = OpCompositeExtract %float %mat2x4_f32 0 0
%168 = OpFunctionCall %int %tint_f32_to_i32 %167
%169 = OpIAdd %int %166 %168
%170 = OpCompositeExtract %float %mat3x2_f32 0 0
%171 = OpFunctionCall %int %tint_f32_to_i32 %170
%172 = OpIAdd %int %169 %171
%173 = OpCompositeExtract %float %mat3x3_f32 0 0
%174 = OpFunctionCall %int %tint_f32_to_i32 %173
%175 = OpIAdd %int %172 %174
%176 = OpCompositeExtract %float %mat3x4_f32 0 0
%177 = OpFunctionCall %int %tint_f32_to_i32 %176
%178 = OpIAdd %int %175 %177
%179 = OpCompositeExtract %float %mat4x2_f32 0 0
%180 = OpFunctionCall %int %tint_f32_to_i32 %179
%181 = OpIAdd %int %178 %180
%182 = OpCompositeExtract %float %mat4x3_f32 0 0
%183 = OpFunctionCall %int %tint_f32_to_i32 %182
%184 = OpIAdd %int %181 %183
%185 = OpCompositeExtract %float %mat4x4_f32 0 0
%186 = OpFunctionCall %int %tint_f32_to_i32 %185
%187 = OpIAdd %int %184 %186
%188 = OpCompositeExtract %float %arr2_vec3_f32 0 0
%189 = OpFunctionCall %int %tint_f32_to_i32 %188
%190 = OpIAdd %int %187 %189
%191 = OpCompositeExtract %int %struct_inner 0
%192 = OpIAdd %int %190 %191
%193 = OpCompositeExtract %int %array_struct_inner 0 0
%194 = OpIAdd %int %192 %193
%195 = OpAccessChain %_ptr_StorageBuffer_int_0 %31 %uint_0
OpStore %195 %194 None
OpReturn
OpFunctionEnd
%tint_f32_to_i32 = OpFunction %int None %198
%value = OpFunctionParameter %float
%199 = OpLabel
%200 = OpConvertFToS %int %value
%201 = OpFOrdGreaterThanEqual %bool %value %float_n2_14748365e_09
%204 = OpSelect %int %201 %200 %int_n2147483648
%206 = OpFOrdLessThanEqual %bool %value %float_2_14748352e_09
%208 = OpSelect %int %206 %204 %int_2147483647
OpReturnValue %208
OpFunctionEnd