diff options
Diffstat (limited to '3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/variables-initialization-outES3Metal.txt')
-rw-r--r-- | 3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/variables-initialization-outES3Metal.txt | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/variables-initialization-outES3Metal.txt b/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/variables-initialization-outES3Metal.txt new file mode 100644 index 00000000000..f613ea33045 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/tests/fragment/variables-initialization-outES3Metal.txt @@ -0,0 +1,42 @@ +#include <metal_stdlib> +#pragma clang diagnostic ignored "-Wparentheses-equality" +using namespace metal; +struct xlatMtlShaderInput { + half2 xlv_TEXCOORD0; +}; +struct xlatMtlShaderOutput { + half4 _glesFragData_0 [[color(0)]]; +}; +struct xlatMtlShaderUniform { +}; +fragment xlatMtlShaderOutput xlatMtlMain (xlatMtlShaderInput _mtl_i [[stage_in]], constant xlatMtlShaderUniform& _mtl_u [[buffer(0)]] + , texture2d<half> _MainTex [[texture(0)]], sampler _mtlsmp__MainTex [[sampler(0)]]) +{ + xlatMtlShaderOutput _mtl_o; + half4 xl_retval_1 = 0; + half4 col_2 = 0; + float4 mat_0_3 = 0; + bool bar_4 = false; + float4 foo_5 = 0; + half4 tmpvar_6 = 0; + tmpvar_6 = _MainTex.sample(_mtlsmp__MainTex, (float2)(_mtl_i.xlv_TEXCOORD0)); + col_2 = tmpvar_6; + float4 tmpvar_7 = 0; + if (bar_4) { + tmpvar_7 = foo_5; + } else { + tmpvar_7 = float4(0.5, 0.5, 0.5, 0.5); + }; + col_2 = (tmpvar_6 + (half4)(tmpvar_7)); + col_2 = (col_2 + (half4)(mat_0_3)); + xl_retval_1 = col_2; + _mtl_o._glesFragData_0 = xl_retval_1; + return _mtl_o; +} + + +// stats: 3 alu 1 tex 1 flow +// inputs: 1 +// #0: xlv_TEXCOORD0 (medium float) 2x1 [-1] +// textures: 1 +// #0: _MainTex (low 2d) 0x0 [-1] loc 0 |