summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/ternary-vec4-outES3Metal.txt
blob: 4471023a756c048c0a77173b1eef44815bd3a3fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#include <metal_stdlib>
#pragma clang diagnostic ignored "-Wparentheses-equality"
using namespace metal;
struct xlatMtlShaderInput {
  float4 xlv_TEXCOORD0;
};
struct xlatMtlShaderOutput {
  half4 _fragData [[color(0)]];
};
struct xlatMtlShaderUniform {
};
fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]])
{
  xlatMtlShaderOutput _mtl_o;
  half4 tmpvar_1;
  float4 a_2;
  a_2 = float4(0.0, 0.0, 0.0, 0.0);
  bool4 tmpvar_3;
  tmpvar_3 = bool4((_mtl_i.xlv_TEXCOORD0 > float4(0.5, 0.5, 0.5, 0.5)));
  float tmpvar_4;
  if (tmpvar_3.x) {
    tmpvar_4 = 1.0;
  } else {
    tmpvar_4 = 5.0;
  };
  float tmpvar_5;
  if (tmpvar_3.y) {
    tmpvar_5 = 2.0;
  } else {
    tmpvar_5 = 6.0;
  };
  float tmpvar_6;
  if (tmpvar_3.z) {
    tmpvar_6 = 3.0;
  } else {
    tmpvar_6 = 7.0;
  };
  float tmpvar_7;
  if (tmpvar_3.w) {
    tmpvar_7 = 4.0;
  } else {
    tmpvar_7 = 8.0;
  };
  float4 tmpvar_8;
  tmpvar_8.x = tmpvar_4;
  tmpvar_8.y = tmpvar_5;
  tmpvar_8.z = tmpvar_6;
  tmpvar_8.w = tmpvar_7;
  a_2 = tmpvar_8;
  bool4 tmpvar_9;
  tmpvar_9 = bool4((_mtl_i.xlv_TEXCOORD0 > float4(0.5, 0.5, 0.5, 0.5)));
  float tmpvar_10;
  if (tmpvar_9.x) {
    tmpvar_10 = 1.0;
  } else {
    tmpvar_10 = 5.0;
  };
  float tmpvar_11;
  if (tmpvar_9.y) {
    tmpvar_11 = 2.0;
  } else {
    tmpvar_11 = 6.0;
  };
  float tmpvar_12;
  if (tmpvar_9.z) {
    tmpvar_12 = 3.0;
  } else {
    tmpvar_12 = 7.0;
  };
  float tmpvar_13;
  if (tmpvar_9.w) {
    tmpvar_13 = 4.0;
  } else {
    tmpvar_13 = 8.0;
  };
  float4 tmpvar_14;
  tmpvar_14.x = tmpvar_10;
  tmpvar_14.y = tmpvar_11;
  tmpvar_14.z = tmpvar_12;
  tmpvar_14.w = tmpvar_13;
  a_2 = (tmpvar_8 + tmpvar_14);
  bool4 tmpvar_15;
  tmpvar_15 = bool4((_mtl_i.xlv_TEXCOORD0 > float4(0.5, 0.5, 0.5, 0.5)));
  float tmpvar_16;
  if (tmpvar_15.x) {
    tmpvar_16 = 1.0;
  } else {
    tmpvar_16 = 2.0;
  };
  float tmpvar_17;
  if (tmpvar_15.y) {
    tmpvar_17 = 1.0;
  } else {
    tmpvar_17 = 2.0;
  };
  float tmpvar_18;
  if (tmpvar_15.z) {
    tmpvar_18 = 1.0;
  } else {
    tmpvar_18 = 2.0;
  };
  float tmpvar_19;
  if (tmpvar_15.w) {
    tmpvar_19 = 1.0;
  } else {
    tmpvar_19 = 2.0;
  };
  float4 tmpvar_20;
  tmpvar_20.x = tmpvar_16;
  tmpvar_20.y = tmpvar_17;
  tmpvar_20.z = tmpvar_18;
  tmpvar_20.w = tmpvar_19;
  a_2 = (a_2 + tmpvar_20);
  bool4 tmpvar_21;
  tmpvar_21 = bool4((_mtl_i.xlv_TEXCOORD0 > float4(0.5, 0.5, 0.5, 0.5)));
  float tmpvar_22;
  if (tmpvar_21.x) {
    tmpvar_22 = 1.0;
  } else {
    tmpvar_22 = 2.0;
  };
  float tmpvar_23;
  if (tmpvar_21.y) {
    tmpvar_23 = 1.0;
  } else {
    tmpvar_23 = 2.0;
  };
  float tmpvar_24;
  if (tmpvar_21.z) {
    tmpvar_24 = 1.0;
  } else {
    tmpvar_24 = 2.0;
  };
  float tmpvar_25;
  if (tmpvar_21.w) {
    tmpvar_25 = 1.0;
  } else {
    tmpvar_25 = 2.0;
  };
  float4 tmpvar_26;
  tmpvar_26.x = tmpvar_22;
  tmpvar_26.y = tmpvar_23;
  tmpvar_26.z = tmpvar_24;
  tmpvar_26.w = tmpvar_25;
  a_2 = (a_2 + tmpvar_26);
  bool4 tmpvar_27;
  tmpvar_27 = bool4(fract(_mtl_i.xlv_TEXCOORD0));
  float tmpvar_28;
  if (tmpvar_27.x) {
    tmpvar_28 = 1.0;
  } else {
    tmpvar_28 = 2.0;
  };
  float tmpvar_29;
  if (tmpvar_27.y) {
    tmpvar_29 = 1.0;
  } else {
    tmpvar_29 = 2.0;
  };
  float tmpvar_30;
  if (tmpvar_27.z) {
    tmpvar_30 = 1.0;
  } else {
    tmpvar_30 = 2.0;
  };
  float tmpvar_31;
  if (tmpvar_27.w) {
    tmpvar_31 = 1.0;
  } else {
    tmpvar_31 = 2.0;
  };
  float4 tmpvar_32;
  tmpvar_32.x = tmpvar_28;
  tmpvar_32.y = tmpvar_29;
  tmpvar_32.z = tmpvar_30;
  tmpvar_32.w = tmpvar_31;
  a_2 = (a_2 + tmpvar_32);
  tmpvar_1 = half4(a_2);
  _mtl_o._fragData = tmpvar_1;
  return _mtl_o;
}


// stats: 51 alu 0 tex 20 flow
// inputs: 1
//  #0: xlv_TEXCOORD0 (high float) 4x1 [-1]