summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/ast-outES3Metal.txt
blob: 0069dadf46a5ab978bfdc2c76b1fcebe372fe81d (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
#include <metal_stdlib>
using namespace metal;
struct xlatMtlShaderInput {
  float4 gl_FragCoord [[position]];
};
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;
  float a_2;
  if ((_mtl_i.gl_FragCoord.x == 1.0)) {
    discard_fragment();
  };
  a_2 = 4.0;
  for (int i_1 = 0; i_1 < 10; i_1++) {
    a_2 += 1.0;
  };
  while (true) {
    a_2 += 2.0;
    break;
  };
  a_2 += 1.0;
  a_2 = (a_2 * a_2);
  a_2 = -(a_2);
  a_2 = (a_2 - 1.0);
  a_2 = rsqrt(a_2);
  _mtl_o._fragData = half4(float4(a_2));
  return _mtl_o;
}


// stats: 12 alu 1 tex 4 flow
// inputs: 1
//  #0: gl_FragCoord (high float) 4x1 [-1] loc 0