summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/sampler-precision-outES3Metal.txt
blob: 82d78249c8b0bd0a0f348df594cd77aaba24692b (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
#include <metal_stdlib>
#pragma clang diagnostic ignored "-Wparentheses-equality"
using namespace metal;
struct xlatMtlShaderInput {
  float4 varUV;
};
struct xlatMtlShaderOutput {
  half4 _fragData [[color(0)]];
};
struct xlatMtlShaderUniform {
};
fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]]
  ,   texture2d<half> texlow [[texture(0)]], sampler _mtlsmp_texlow [[sampler(0)]]
  ,   texture2d<half> texmed [[texture(1)]], sampler _mtlsmp_texmed [[sampler(1)]]
  ,   texture2d<float> texhigh [[texture(2)]], sampler _mtlsmp_texhigh [[sampler(2)]]
  ,   texturecube<half> cubelow [[texture(3)]], sampler _mtlsmp_cubelow [[sampler(3)]]
  ,   texturecube<half> cubemed [[texture(4)]], sampler _mtlsmp_cubemed [[sampler(4)]]
  ,   texturecube<float> cubehigh [[texture(5)]], sampler _mtlsmp_cubehigh [[sampler(5)]])
{
  xlatMtlShaderOutput _mtl_o;
  half4 c_1;
  half4 tmpvar_2;
  tmpvar_2 = texlow.sample(_mtlsmp_texlow, (float2)(_mtl_i.varUV.xy));
  c_1 = tmpvar_2;
  c_1 = (c_1 + texmed.sample(_mtlsmp_texmed, (float2)(_mtl_i.varUV.xy)));
  float4 tmpvar_3;
  tmpvar_3 = texhigh.sample(_mtlsmp_texhigh, (float2)(_mtl_i.varUV.xy));
  c_1 = half4(((float4)c_1 + tmpvar_3));
  half4 tmpvar_4;
  tmpvar_4 = cubelow.sample(_mtlsmp_cubelow, (float3)(_mtl_i.varUV.xyz));
  c_1 = (c_1 + tmpvar_4);
  c_1 = (c_1 + cubemed.sample(_mtlsmp_cubemed, (float3)(_mtl_i.varUV.xyz)));
  float4 tmpvar_5;
  tmpvar_5 = cubehigh.sample(_mtlsmp_cubehigh, (float3)(_mtl_i.varUV.xyz));
  c_1 = half4(((float4)c_1 + tmpvar_5));
  _mtl_o._fragData = c_1;
  return _mtl_o;
}


// stats: 5 alu 6 tex 0 flow
// inputs: 1
//  #0: varUV (high float) 4x1 [-1]
// textures: 6
//  #0: texlow (low 2d) 0x0 [-1] loc 0
//  #1: texmed (medium 2d) 0x0 [-1] loc 1
//  #2: texhigh (high 2d) 0x0 [-1] loc 2
//  #3: cubelow (low cube) 0x0 [-1] loc 3
//  #4: cubemed (medium cube) 0x0 [-1] loc 4
//  #5: cubehigh (high cube) 0x0 [-1] loc 5