summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/tex2dlod-outES3Metal.txt
blob: bbe17239838f6720558f749ea50b6047e99611d6 (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
#include <metal_stdlib>
using namespace metal;
struct xlatMtlShaderInput {
  float4 uvHi;
  half4 uvMed;
};
struct xlatMtlShaderOutput {
  half4 _fragColor [[color(0)]];
};
struct xlatMtlShaderUniform {
};
;
fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]]
  ,   texture2d<half> tex [[texture(0)]], sampler _mtlsmp_tex [[sampler(0)]])
{
  xlatMtlShaderOutput _mtl_o;
  half4 tmpvar_1;
  half4 tmpvar_2;
  tmpvar_2 = tex.sample(_mtlsmp_tex, (float2)(_mtl_i.uvHi.xy), level(0.0));
  tmpvar_1 = tmpvar_2;
  half4 tmpvar_3;
  tmpvar_3 = tex.sample(_mtlsmp_tex, (float2)(_mtl_i.uvMed.xy), level(_mtl_i.uvMed.z));
  _mtl_o._fragColor = (tmpvar_1 + tmpvar_3);
  return _mtl_o;
}


// stats: 1 alu 2 tex 0 flow
// inputs: 2
//  #0: uvHi (high float) 4x1 [-1]
//  #1: uvMed (medium float) 4x1 [-1]
// textures: 1
//  #0: tex (low 2d) 0x0 [-1] loc 0