blob: d6e398d19a281ceacfe54e473abee7e13dd4ddcd [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 122
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "injectionSwitch"
OpName %x_8 "x_8"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %BinarySearchObject "BinarySearchObject"
OpMemberName %BinarySearchObject 0 "prime_numbers"
OpName %binarySearch_struct_BinarySearchObject_i1_10_1_ "binarySearch_struct_BinarySearchObject_i1_10_1_"
OpName %obj "obj"
OpName %m "m"
OpName %main_1 "main_1"
OpName %i "i"
OpName %obj_1 "obj_1"
OpName %param "param"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %tint_symbol "tint_symbol"
OpName %main "main"
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 0
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %BinarySearchObject 0 Offset 0
OpDecorate %_arr_int_uint_10 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_8 = OpVariable %_ptr_Uniform_buf0 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%9 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %9
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %9
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_10 = OpConstant %uint 10
%_arr_int_uint_10 = OpTypeArray %int %uint_10
%BinarySearchObject = OpTypeStruct %_arr_int_uint_10
%_ptr_Function_BinarySearchObject = OpTypePointer Function %BinarySearchObject
%12 = OpTypeFunction %int %_ptr_Function_BinarySearchObject
%_ptr_Function_int = OpTypePointer Function %int
%24 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_1 = OpConstant %float 1
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%void = OpTypeVoid
%50 = OpTypeFunction %void
%56 = OpConstantNull %BinarySearchObject
%int_0 = OpConstant %int 0
%int_10 = OpConstant %int 10
%int_3 = OpConstant %int 3
%int_4 = OpConstant %int 4
%int_11 = OpConstant %int 11
%int_6 = OpConstant %int 6
%int_17 = OpConstant %int 17
%uint_1 = OpConstant %uint 1
%float_0 = OpConstant %float 0
%109 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
%110 = OpTypeFunction %void %main_out
%binarySearch_struct_BinarySearchObject_i1_10_1_ = OpFunction %int None %12
%obj = OpFunctionParameter %_ptr_Function_BinarySearchObject
%21 = OpLabel
%m = OpVariable %_ptr_Function_int Function %24
OpBranch %25
%25 = OpLabel
OpLoopMerge %26 %27 None
OpBranch %28
%28 = OpLabel
%31 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_0
%32 = OpLoad %float %31
%34 = OpFOrdGreaterThan %bool %32 %float_1
OpSelectionMerge %36 None
OpBranchConditional %34 %37 %38
%37 = OpLabel
OpBranch %36
%38 = OpLabel
OpBranch %26
%36 = OpLabel
%39 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_0
%40 = OpLoad %float %39
%41 = OpConvertFToS %int %40
OpStore %m %41
%42 = OpLoad %int %m
%44 = OpAccessChain %_ptr_Function_int %obj %uint_0 %42
%45 = OpLoad %int %44
%47 = OpIEqual %bool %45 %int_1
OpSelectionMerge %48 None
OpBranchConditional %47 %49 %48
%49 = OpLabel
OpReturnValue %int_1
%48 = OpLabel
OpBranch %27
%27 = OpLabel
OpBranch %25
%26 = OpLabel
OpReturnValue %int_1
OpFunctionEnd
%main_1 = OpFunction %void None %50
%53 = OpLabel
%i = OpVariable %_ptr_Function_int Function %24
%obj_1 = OpVariable %_ptr_Function_BinarySearchObject Function %56
%param = OpVariable %_ptr_Function_BinarySearchObject Function %56
OpStore %i %int_0
OpBranch %59
%59 = OpLabel
OpLoopMerge %60 %61 None
OpBranch %62
%62 = OpLabel
%63 = OpLoad %int %i
%65 = OpSLessThan %bool %63 %int_10
OpSelectionMerge %66 None
OpBranchConditional %65 %67 %68
%67 = OpLabel
OpBranch %66
%68 = OpLabel
OpBranch %60
%66 = OpLabel
%69 = OpLoad %int %i
%71 = OpINotEqual %bool %69 %int_3
OpSelectionMerge %72 None
OpBranchConditional %71 %73 %72
%73 = OpLabel
%74 = OpLoad %int %i
%75 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_0
%76 = OpLoad %float %75
%77 = OpConvertFToS %int %76
%78 = OpISub %int %74 %77
%80 = OpIEqual %bool %78 %int_4
OpSelectionMerge %81 None
OpBranchConditional %80 %82 %83
%82 = OpLabel
%84 = OpLoad %int %i
%85 = OpAccessChain %_ptr_Function_int %obj_1 %uint_0 %84
OpStore %85 %int_11
OpBranch %81
%83 = OpLabel
%87 = OpLoad %int %i
%89 = OpIEqual %bool %87 %int_6
OpSelectionMerge %90 None
OpBranchConditional %89 %91 %90
%91 = OpLabel
%92 = OpLoad %int %i
%93 = OpAccessChain %_ptr_Function_int %obj_1 %uint_0 %92
OpStore %93 %int_17
OpBranch %90
%90 = OpLabel
OpBranch %61
%81 = OpLabel
OpBranch %72
%72 = OpLabel
OpBranch %95
%95 = OpLabel
OpLoopMerge %96 %97 None
OpBranch %98
%98 = OpLabel
OpBranch %97
%97 = OpLabel
%100 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %uint_1
%101 = OpLoad %float %100
%103 = OpFOrdGreaterThan %bool %float_0 %101
OpBranchConditional %103 %95 %96
%96 = OpLabel
OpBranch %61
%61 = OpLabel
%104 = OpLoad %int %i
%105 = OpIAdd %int %104 %int_1
OpStore %i %105
OpBranch %59
%60 = OpLabel
%106 = OpLoad %BinarySearchObject %obj_1
OpStore %param %106
%107 = OpFunctionCall %int %binarySearch_struct_BinarySearchObject_i1_10_1_ %param
OpStore %x_GLF_color %109
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %110
%tint_symbol = OpFunctionParameter %main_out
%114 = OpLabel
%115 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %115
OpReturn
OpFunctionEnd
%main = OpFunction %void None %50
%117 = OpLabel
%118 = OpFunctionCall %void %main_1
%120 = OpLoad %v4float %x_GLF_color
%121 = OpCompositeConstruct %main_out %120
%119 = OpFunctionCall %void %tint_symbol_2 %121
OpReturn
OpFunctionEnd