blob: ee7bed9c525547e5bc8a1e8cd54a19bb99c6573a [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 184
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" %tint_symbol
OpExecutionMode %main LocalSize 1 1 1
OpName %gl_GlobalInvocationID "gl_GlobalInvocationID"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "injectionSwitch"
OpName %x_10 "x_10"
OpName %buf2 "buf2"
OpMemberName %buf2 0 "resolution"
OpName %x_13 "x_13"
OpName %doesNotMatter "doesNotMatter"
OpMemberName %doesNotMatter 0 "x_compute_data"
OpName %x_15 "x_15"
OpName %tint_symbol "tint_symbol"
OpName %main_1 "main_1"
OpName %A "A"
OpName %i "i"
OpName %value "value"
OpName %m "m"
OpName %l "l"
OpName %n "n"
OpName %main "main"
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %x_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 Binding 1
OpDecorate %buf2 Block
OpMemberDecorate %buf2 0 Offset 0
OpDecorate %x_13 NonWritable
OpDecorate %x_13 DescriptorSet 0
OpDecorate %x_13 Binding 2
OpDecorate %doesNotMatter Block
OpMemberDecorate %doesNotMatter 0 Offset 0
OpDecorate %_runtimearr_int ArrayStride 4
OpDecorate %x_15 DescriptorSet 0
OpDecorate %x_15 Binding 0
OpDecorate %tint_symbol BuiltIn GlobalInvocationId
OpDecorate %_arr_float_uint_1 ArrayStride 4
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
%_ptr_Private_v3uint = OpTypePointer Private %v3uint
%5 = OpConstantNull %v3uint
%gl_GlobalInvocationID = OpVariable %_ptr_Private_v3uint Private %5
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%buf1 = OpTypeStruct %v2float
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_10 = OpVariable %_ptr_Uniform_buf1 Uniform
%buf2 = OpTypeStruct %v2float
%_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2
%x_13 = OpVariable %_ptr_Uniform_buf2 Uniform
%int = OpTypeInt 32 1
%_runtimearr_int = OpTypeRuntimeArray %int
%doesNotMatter = OpTypeStruct %_runtimearr_int
%_ptr_StorageBuffer_doesNotMatter = OpTypePointer StorageBuffer %doesNotMatter
%x_15 = OpVariable %_ptr_StorageBuffer_doesNotMatter StorageBuffer
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
%tint_symbol = OpVariable %_ptr_Input_v3uint Input
%void = OpTypeVoid
%21 = OpTypeFunction %void
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%_ptr_Function__arr_float_uint_1 = OpTypePointer Function %_arr_float_uint_1
%29 = OpConstantNull %_arr_float_uint_1
%_ptr_Function_int = OpTypePointer Function %int
%32 = OpConstantNull %int
%v4float = OpTypeVector %float 4
%_ptr_Function_v4float = OpTypePointer Function %v4float
%36 = OpConstantNull %v4float
%int_0 = OpConstant %int 0
%_ptr_Function_float = OpTypePointer Function %float
%float_0 = OpConstant %float 0
%int_50 = OpConstant %int 50
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%uint_0 = OpConstant %uint 0
%_ptr_Private_uint = OpTypePointer Private %uint
%uint_100 = OpConstant %uint 100
%float_1 = OpConstant %float 1
%82 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%uint_2 = OpConstant %uint 2
%uint_264 = OpConstant %uint 264
%uint_120 = OpConstant %uint 120
%false = OpConstantFalse %bool
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%int_2 = OpConstant %int 2
%uint_3 = OpConstant %uint 3
%int_3 = OpConstant %int 3
%main_1 = OpFunction %void None %21
%24 = OpLabel
%A = OpVariable %_ptr_Function__arr_float_uint_1 Function %29
%i = OpVariable %_ptr_Function_int Function %32
%value = OpVariable %_ptr_Function_v4float Function %36
%m = OpVariable %_ptr_Function_int Function %32
%l = OpVariable %_ptr_Function_int Function %32
%n = OpVariable %_ptr_Function_int Function %32
%42 = OpAccessChain %_ptr_Function_float %A %int_0
OpStore %42 %float_0
OpStore %i %int_0
OpBranch %44
%44 = OpLabel
OpLoopMerge %45 %46 None
OpBranch %47
%47 = OpLabel
%48 = OpLoad %int %i
%50 = OpSLessThan %bool %48 %int_50
OpSelectionMerge %52 None
OpBranchConditional %50 %53 %54
%53 = OpLabel
OpBranch %52
%54 = OpLabel
OpBranch %45
%52 = OpLabel
%55 = OpLoad %int %i
%56 = OpSGreaterThan %bool %55 %int_0
OpSelectionMerge %57 None
OpBranchConditional %56 %58 %57
%58 = OpLabel
%59 = OpAccessChain %_ptr_Function_float %A %int_0
%60 = OpLoad %float %59
%61 = OpAccessChain %_ptr_Function_float %A %int_0
%62 = OpLoad %float %61
%63 = OpAccessChain %_ptr_Function_float %A %int_0
%64 = OpFAdd %float %62 %60
OpStore %63 %64
OpBranch %57
%57 = OpLabel
OpBranch %46
%46 = OpLabel
%65 = OpLoad %int %i
%67 = OpIAdd %int %65 %int_1
OpStore %i %67
OpBranch %44
%45 = OpLabel
OpBranch %68
%68 = OpLabel
OpLoopMerge %69 %70 None
OpBranch %71
%71 = OpLabel
%74 = OpAccessChain %_ptr_Private_uint %gl_GlobalInvocationID %uint_0
%75 = OpLoad %uint %74
%77 = OpULessThan %bool %75 %uint_100
OpSelectionMerge %78 None
OpBranchConditional %77 %79 %80
%79 = OpLabel
OpStore %value %82
OpStore %m %int_0
OpBranch %83
%83 = OpLabel
OpLoopMerge %84 %85 None
OpBranch %86
%86 = OpLabel
%87 = OpLoad %int %m
%88 = OpSLessThan %bool %87 %int_1
OpSelectionMerge %89 None
OpBranchConditional %88 %90 %91
%90 = OpLabel
OpBranch %89
%91 = OpLabel
OpBranch %84
%89 = OpLabel
OpStore %l %int_0
OpBranch %92
%92 = OpLabel
OpLoopMerge %93 %94 None
OpBranch %95
%95 = OpLabel
%96 = OpLoad %int %l
%97 = OpSLessThan %bool %96 %int_1
OpSelectionMerge %98 None
OpBranchConditional %97 %99 %100
%99 = OpLabel
OpBranch %98
%100 = OpLabel
OpBranch %93
%98 = OpLabel
%102 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0 %uint_0
%103 = OpLoad %float %102
%104 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0 %uint_1
%105 = OpLoad %float %104
%106 = OpFOrdGreaterThan %bool %103 %105
OpSelectionMerge %107 None
OpBranchConditional %106 %108 %107
%108 = OpLabel
OpReturn
%107 = OpLabel
OpBranch %94
%94 = OpLabel
%109 = OpLoad %int %l
%110 = OpIAdd %int %109 %int_1
OpStore %l %110
OpBranch %92
%93 = OpLabel
OpBranch %85
%85 = OpLabel
%111 = OpLoad %int %m
%112 = OpIAdd %int %111 %int_1
OpStore %m %112
OpBranch %83
%84 = OpLabel
OpStore %n %int_0
OpBranch %113
%113 = OpLabel
OpLoopMerge %114 %115 None
OpBranch %116
%116 = OpLabel
%117 = OpLoad %int %n
%118 = OpSLessThan %bool %117 %int_1
OpSelectionMerge %119 None
OpBranchConditional %118 %120 %121
%120 = OpLabel
OpBranch %119
%121 = OpLabel
OpBranch %114
%119 = OpLabel
%122 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0 %uint_0
%123 = OpLoad %float %122
%124 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0 %uint_1
%125 = OpLoad %float %124
%126 = OpFOrdGreaterThan %bool %123 %125
OpSelectionMerge %127 None
OpBranchConditional %126 %128 %127
%128 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
OpBranch %127
%127 = OpLabel
OpBranch %115
%115 = OpLabel
%132 = OpLoad %int %n
%133 = OpIAdd %int %132 %int_1
OpStore %n %133
OpBranch %113
%114 = OpLabel
OpBranch %78
%80 = OpLabel
%134 = OpAccessChain %_ptr_Private_uint %gl_GlobalInvocationID %uint_0
%135 = OpLoad %uint %134
%137 = OpULessThan %bool %135 %uint_120
OpSelectionMerge %138 None
OpBranchConditional %137 %139 %140
%139 = OpLabel
%141 = OpAccessChain %_ptr_Function_float %A %int_0
%142 = OpLoad %float %141
%143 = OpAccessChain %_ptr_Uniform_float %x_13 %uint_0 %uint_0
%144 = OpLoad %float %143
%145 = OpAccessChain %_ptr_Function_float %A %int_0
%146 = OpLoad %float %145
%147 = OpAccessChain %_ptr_Uniform_float %x_13 %uint_0 %uint_1
%148 = OpLoad %float %147
%149 = OpFDiv %float %142 %144
%150 = OpFDiv %float %146 %148
%151 = OpCompositeConstruct %v4float %149 %150 %float_0 %float_1
OpStore %value %151
OpBranch %138
%140 = OpLabel
%152 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0 %uint_0
%153 = OpLoad %float %152
%154 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0 %uint_1
%155 = OpLoad %float %154
%156 = OpFOrdGreaterThan %bool %153 %155
OpSelectionMerge %157 None
OpBranchConditional %156 %158 %157
%158 = OpLabel
OpBranch %70
%157 = OpLabel
OpBranch %138
%138 = OpLabel
OpBranch %78
%78 = OpLabel
OpBranch %70
%70 = OpLabel
OpBranchConditional %false %68 %69
%69 = OpLabel
%160 = OpAccessChain %_ptr_Function_float %value %uint_0
%161 = OpLoad %float %160
%163 = OpAccessChain %_ptr_StorageBuffer_int %x_15 %uint_0 %int_0
%164 = OpConvertFToS %int %161
OpStore %163 %164
%165 = OpAccessChain %_ptr_Function_float %value %uint_1
%166 = OpLoad %float %165
%167 = OpAccessChain %_ptr_StorageBuffer_int %x_15 %uint_0 %int_1
%168 = OpConvertFToS %int %166
OpStore %167 %168
%169 = OpAccessChain %_ptr_Function_float %value %uint_2
%170 = OpLoad %float %169
%172 = OpAccessChain %_ptr_StorageBuffer_int %x_15 %uint_0 %int_2
%173 = OpConvertFToS %int %170
OpStore %172 %173
%175 = OpAccessChain %_ptr_Function_float %value %uint_3
%176 = OpLoad %float %175
%178 = OpAccessChain %_ptr_StorageBuffer_int %x_15 %uint_0 %int_3
%179 = OpConvertFToS %int %176
OpStore %178 %179
OpReturn
OpFunctionEnd
%main = OpFunction %void None %21
%181 = OpLabel
%182 = OpLoad %v3uint %tint_symbol
OpStore %gl_GlobalInvocationID %182
%183 = OpFunctionCall %void %main_1
OpReturn
OpFunctionEnd