• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint Fragment %main "main" %_GLF_color
5               OpExecutionMode %main OriginUpperLeft
6               OpSource ESSL 310
7               OpName %main "main"
8               OpName %BinarySearchObject "BinarySearchObject"
9               OpMemberName %BinarySearchObject 0 "prime_numbers"
10               OpName %binarySearch_struct_BinarySearchObject_i1_10_1_ "binarySearch(struct-BinarySearchObject-i1[10]1;"
11               OpName %obj "obj"
12               OpName %buf0 "buf0"
13               OpMemberName %buf0 0 "injectionSwitch"
14               OpName %_ ""
15               OpName %m "m"
16               OpName %i "i"
17               OpName %obj_0 "obj"
18               OpName %param "param"
19               OpName %_GLF_color "_GLF_color"
20               OpMemberDecorate %BinarySearchObject 0 RelaxedPrecision
21               OpDecorate %binarySearch_struct_BinarySearchObject_i1_10_1_ RelaxedPrecision
22               OpMemberDecorate %buf0 0 Offset 0
23               OpDecorate %buf0 Block
24               OpDecorate %_ DescriptorSet 0
25               OpDecorate %_ Binding 0
26               OpDecorate %m RelaxedPrecision
27               OpDecorate %13 RelaxedPrecision
28               OpDecorate %14 RelaxedPrecision
29               OpDecorate %15 RelaxedPrecision
30               OpDecorate %i RelaxedPrecision
31               OpDecorate %16 RelaxedPrecision
32               OpDecorate %17 RelaxedPrecision
33               OpDecorate %18 RelaxedPrecision
34               OpDecorate %19 RelaxedPrecision
35               OpDecorate %20 RelaxedPrecision
36               OpDecorate %21 RelaxedPrecision
37               OpDecorate %22 RelaxedPrecision
38               OpDecorate %23 RelaxedPrecision
39               OpDecorate %24 RelaxedPrecision
40               OpDecorate %25 RelaxedPrecision
41               OpDecorate %26 RelaxedPrecision
42               OpDecorate %_GLF_color Location 0
43       %void = OpTypeVoid
44         %28 = OpTypeFunction %void
45        %int = OpTypeInt 32 1
46       %uint = OpTypeInt 32 0
47    %uint_10 = OpConstant %uint 10
48%_arr_int_uint_10 = OpTypeArray %int %uint_10
49%BinarySearchObject = OpTypeStruct %_arr_int_uint_10
50%_ptr_Function_BinarySearchObject = OpTypePointer Function %BinarySearchObject
51         %34 = OpTypeFunction %int %_ptr_Function_BinarySearchObject
52      %float = OpTypeFloat 32
53    %v2float = OpTypeVector %float 2
54       %buf0 = OpTypeStruct %v2float
55%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
56          %_ = OpVariable %_ptr_Uniform_buf0 Uniform
57      %int_0 = OpConstant %int 0
58     %uint_0 = OpConstant %uint 0
59%_ptr_Uniform_float = OpTypePointer Uniform %float
60    %float_1 = OpConstant %float 1
61       %bool = OpTypeBool
62%_ptr_Function_int = OpTypePointer Function %int
63      %int_1 = OpConstant %int 1
64     %int_10 = OpConstant %int 10
65      %int_3 = OpConstant %int 3
66      %int_4 = OpConstant %int 4
67     %int_11 = OpConstant %int 11
68      %int_6 = OpConstant %int 6
69     %int_17 = OpConstant %int 17
70    %float_0 = OpConstant %float 0
71     %uint_1 = OpConstant %uint 1
72    %v4float = OpTypeVector %float 4
73%_ptr_Output_v4float = OpTypePointer Output %v4float
74 %_GLF_color = OpVariable %_ptr_Output_v4float Output
75         %55 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
76       %main = OpFunction %void None %28
77         %56 = OpLabel
78          %i = OpVariable %_ptr_Function_int Function
79      %obj_0 = OpVariable %_ptr_Function_BinarySearchObject Function
80      %param = OpVariable %_ptr_Function_BinarySearchObject Function
81               OpStore %i %int_0
82               OpBranch %57
83         %57 = OpLabel
84               OpLoopMerge %58 %59 None
85               OpBranch %60
86         %60 = OpLabel
87         %16 = OpLoad %int %i
88         %61 = OpSLessThan %bool %16 %int_10
89               OpBranchConditional %61 %62 %58
90         %62 = OpLabel
91         %17 = OpLoad %int %i
92         %63 = OpINotEqual %bool %17 %int_3
93               OpSelectionMerge %64 None
94               OpBranchConditional %63 %65 %64
95         %65 = OpLabel
96         %18 = OpLoad %int %i
97         %66 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %uint_0
98         %67 = OpLoad %float %66
99         %19 = OpConvertFToS %int %67
100         %20 = OpISub %int %18 %19
101         %68 = OpIEqual %bool %20 %int_4
102               OpSelectionMerge %69 None
103               OpBranchConditional %68 %70 %71
104         %70 = OpLabel
105         %21 = OpLoad %int %i
106         %72 = OpAccessChain %_ptr_Function_int %obj_0 %int_0 %21
107               OpStore %72 %int_11
108               OpBranch %69
109         %71 = OpLabel
110         %22 = OpLoad %int %i
111         %73 = OpIEqual %bool %22 %int_6
112               OpSelectionMerge %74 None
113               OpBranchConditional %73 %75 %74
114         %75 = OpLabel
115         %23 = OpLoad %int %i
116         %76 = OpAccessChain %_ptr_Function_int %obj_0 %int_0 %23
117               OpStore %76 %int_17
118               OpBranch %74
119         %74 = OpLabel
120               OpBranch %59
121         %69 = OpLabel
122               OpBranch %64
123         %64 = OpLabel
124               OpBranch %77
125         %77 = OpLabel
126               OpLoopMerge %78 %79 None
127               OpBranch %80
128         %80 = OpLabel
129               OpBranch %79
130         %79 = OpLabel
131         %81 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %uint_1
132         %82 = OpLoad %float %81
133         %83 = OpFOrdGreaterThan %bool %float_0 %82
134               OpBranchConditional %83 %77 %78
135         %78 = OpLabel
136               OpBranch %59
137         %59 = OpLabel
138         %24 = OpLoad %int %i
139         %25 = OpIAdd %int %24 %int_1
140               OpStore %i %25
141               OpBranch %57
142         %58 = OpLabel
143         %84 = OpLoad %BinarySearchObject %obj_0
144               OpStore %param %84
145         %26 = OpFunctionCall %int %binarySearch_struct_BinarySearchObject_i1_10_1_ %param
146               OpStore %_GLF_color %55
147               OpReturn
148               OpFunctionEnd
149%binarySearch_struct_BinarySearchObject_i1_10_1_ = OpFunction %int None %34
150        %obj = OpFunctionParameter %_ptr_Function_BinarySearchObject
151         %85 = OpLabel
152          %m = OpVariable %_ptr_Function_int Function
153               OpBranch %86
154         %86 = OpLabel
155               OpLoopMerge %87 %88 None
156               OpBranch %89
157         %89 = OpLabel
158         %90 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %uint_0
159         %91 = OpLoad %float %90
160         %92 = OpFOrdGreaterThan %bool %91 %float_1
161               OpBranchConditional %92 %93 %87
162         %93 = OpLabel
163         %94 = OpAccessChain %_ptr_Uniform_float %_ %int_0 %uint_0
164         %95 = OpLoad %float %94
165         %13 = OpConvertFToS %int %95
166               OpStore %m %13
167         %14 = OpLoad %int %m
168         %96 = OpAccessChain %_ptr_Function_int %obj %int_0 %14
169         %15 = OpLoad %int %96
170         %97 = OpIEqual %bool %15 %int_1
171               OpSelectionMerge %98 None
172               OpBranchConditional %97 %99 %98
173         %99 = OpLabel
174               OpReturnValue %int_1
175         %98 = OpLabel
176               OpBranch %88
177         %88 = OpLabel
178               OpBranch %86
179         %87 = OpLabel
180               OpReturnValue %int_1
181               OpFunctionEnd
182