• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; SPIR-V
2; Version: 1.0
3; Generator: Khronos Glslang Reference Front End; 7
4; Bound: 132
5; Schema: 0
6               OpCapability Shader
7          %1 = OpExtInstImport "GLSL.std.450"
8               OpMemoryModel Logical GLSL450
9               OpEntryPoint Fragment %main "main" %A %B %FragColor
10               OpExecutionMode %main OriginUpperLeft
11               OpSource GLSL 450
12               OpName %main "main"
13               OpName %test_vector_ "test_vector("
14               OpName %test_scalar_ "test_scalar("
15               OpName %le "le"
16               OpName %A "A"
17               OpName %B "B"
18               OpName %leq "leq"
19               OpName %ge "ge"
20               OpName %geq "geq"
21               OpName %eq "eq"
22               OpName %neq "neq"
23               OpName %le_0 "le"
24               OpName %leq_0 "leq"
25               OpName %ge_0 "ge"
26               OpName %geq_0 "geq"
27               OpName %eq_0 "eq"
28               OpName %neq_0 "neq"
29               OpName %FragColor "FragColor"
30               OpDecorate %A Location 0
31               OpDecorate %B Location 1
32               OpDecorate %FragColor Location 0
33       %void = OpTypeVoid
34          %3 = OpTypeFunction %void
35      %float = OpTypeFloat 32
36    %v4float = OpTypeVector %float 4
37          %8 = OpTypeFunction %v4float
38         %11 = OpTypeFunction %float
39       %bool = OpTypeBool
40     %v4bool = OpTypeVector %bool 4
41%_ptr_Function_v4bool = OpTypePointer Function %v4bool
42%_ptr_Input_v4float = OpTypePointer Input %v4float
43          %A = OpVariable %_ptr_Input_v4float Input
44          %B = OpVariable %_ptr_Input_v4float Input
45    %float_0 = OpConstant %float 0
46    %float_1 = OpConstant %float 1
47         %47 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
48         %48 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
49%_ptr_Function_bool = OpTypePointer Function %bool
50       %uint = OpTypeInt 32 0
51     %uint_0 = OpConstant %uint 0
52%_ptr_Input_float = OpTypePointer Input %float
53%_ptr_Output_v4float = OpTypePointer Output %v4float
54  %FragColor = OpVariable %_ptr_Output_v4float Output
55       %main = OpFunction %void None %3
56          %5 = OpLabel
57        %128 = OpFunctionCall %v4float %test_vector_
58        %129 = OpFunctionCall %float %test_scalar_
59        %130 = OpCompositeConstruct %v4float %129 %129 %129 %129
60        %131 = OpFAdd %v4float %128 %130
61               OpStore %FragColor %131
62               OpReturn
63               OpFunctionEnd
64%test_vector_ = OpFunction %v4float None %8
65         %10 = OpLabel
66         %le = OpVariable %_ptr_Function_v4bool Function
67        %leq = OpVariable %_ptr_Function_v4bool Function
68         %ge = OpVariable %_ptr_Function_v4bool Function
69        %geq = OpVariable %_ptr_Function_v4bool Function
70         %eq = OpVariable %_ptr_Function_v4bool Function
71        %neq = OpVariable %_ptr_Function_v4bool Function
72         %20 = OpLoad %v4float %A
73         %22 = OpLoad %v4float %B
74         %23 = OpFUnordLessThan %v4bool %20 %22
75               OpStore %le %23
76         %25 = OpLoad %v4float %A
77         %26 = OpLoad %v4float %B
78         %27 = OpFUnordLessThanEqual %v4bool %25 %26
79               OpStore %leq %27
80         %29 = OpLoad %v4float %A
81         %30 = OpLoad %v4float %B
82         %31 = OpFUnordGreaterThan %v4bool %29 %30
83               OpStore %ge %31
84         %33 = OpLoad %v4float %A
85         %34 = OpLoad %v4float %B
86         %35 = OpFUnordGreaterThanEqual %v4bool %33 %34
87               OpStore %geq %35
88         %37 = OpLoad %v4float %A
89         %38 = OpLoad %v4float %B
90         %39 = OpFUnordEqual %v4bool %37 %38
91               OpStore %eq %39
92         %41 = OpLoad %v4float %A
93         %42 = OpLoad %v4float %B
94         %43 = OpFUnordNotEqual %v4bool %41 %42
95               OpStore %neq %43
96         %44 = OpLoad %v4bool %le
97         %49 = OpSelect %v4float %44 %48 %47
98         %50 = OpLoad %v4bool %leq
99         %51 = OpSelect %v4float %50 %48 %47
100         %52 = OpFAdd %v4float %49 %51
101         %53 = OpLoad %v4bool %ge
102         %54 = OpSelect %v4float %53 %48 %47
103         %55 = OpFAdd %v4float %52 %54
104         %56 = OpLoad %v4bool %geq
105         %57 = OpSelect %v4float %56 %48 %47
106         %58 = OpFAdd %v4float %55 %57
107         %59 = OpLoad %v4bool %eq
108         %60 = OpSelect %v4float %59 %48 %47
109         %61 = OpFAdd %v4float %58 %60
110         %62 = OpLoad %v4bool %neq
111         %63 = OpSelect %v4float %62 %48 %47
112         %64 = OpFAdd %v4float %61 %63
113               OpReturnValue %64
114               OpFunctionEnd
115%test_scalar_ = OpFunction %float None %11
116         %13 = OpLabel
117       %le_0 = OpVariable %_ptr_Function_bool Function
118      %leq_0 = OpVariable %_ptr_Function_bool Function
119       %ge_0 = OpVariable %_ptr_Function_bool Function
120      %geq_0 = OpVariable %_ptr_Function_bool Function
121       %eq_0 = OpVariable %_ptr_Function_bool Function
122      %neq_0 = OpVariable %_ptr_Function_bool Function
123         %72 = OpAccessChain %_ptr_Input_float %A %uint_0
124         %73 = OpLoad %float %72
125         %74 = OpAccessChain %_ptr_Input_float %B %uint_0
126         %75 = OpLoad %float %74
127         %76 = OpFUnordLessThan %bool %73 %75
128               OpStore %le_0 %76
129         %78 = OpAccessChain %_ptr_Input_float %A %uint_0
130         %79 = OpLoad %float %78
131         %80 = OpAccessChain %_ptr_Input_float %B %uint_0
132         %81 = OpLoad %float %80
133         %82 = OpFUnordLessThanEqual %bool %79 %81
134               OpStore %leq_0 %82
135         %84 = OpAccessChain %_ptr_Input_float %A %uint_0
136         %85 = OpLoad %float %84
137         %86 = OpAccessChain %_ptr_Input_float %B %uint_0
138         %87 = OpLoad %float %86
139         %88 = OpFUnordGreaterThan %bool %85 %87
140               OpStore %ge_0 %88
141         %90 = OpAccessChain %_ptr_Input_float %A %uint_0
142         %91 = OpLoad %float %90
143         %92 = OpAccessChain %_ptr_Input_float %B %uint_0
144         %93 = OpLoad %float %92
145         %94 = OpFUnordGreaterThanEqual %bool %91 %93
146               OpStore %geq_0 %94
147         %96 = OpAccessChain %_ptr_Input_float %A %uint_0
148         %97 = OpLoad %float %96
149         %98 = OpAccessChain %_ptr_Input_float %B %uint_0
150         %99 = OpLoad %float %98
151        %100 = OpFUnordEqual %bool %97 %99
152               OpStore %eq_0 %100
153        %102 = OpAccessChain %_ptr_Input_float %A %uint_0
154        %103 = OpLoad %float %102
155        %104 = OpAccessChain %_ptr_Input_float %B %uint_0
156        %105 = OpLoad %float %104
157        %106 = OpFUnordNotEqual %bool %103 %105
158               OpStore %neq_0 %106
159        %107 = OpLoad %bool %le_0
160        %108 = OpSelect %float %107 %float_1 %float_0
161        %109 = OpLoad %bool %leq_0
162        %110 = OpSelect %float %109 %float_1 %float_0
163        %111 = OpFAdd %float %108 %110
164        %112 = OpLoad %bool %ge_0
165        %113 = OpSelect %float %112 %float_1 %float_0
166        %114 = OpFAdd %float %111 %113
167        %115 = OpLoad %bool %geq_0
168        %116 = OpSelect %float %115 %float_1 %float_0
169        %117 = OpFAdd %float %114 %116
170        %118 = OpLoad %bool %eq_0
171        %119 = OpSelect %float %118 %float_1 %float_0
172        %120 = OpFAdd %float %117 %119
173        %121 = OpLoad %bool %neq_0
174        %122 = OpSelect %float %121 %float_1 %float_0
175        %123 = OpFAdd %float %120 %122
176               OpReturnValue %123
177               OpFunctionEnd
178