SPIRV-Cross/reference/opt/shaders-msl/frag/for-loop-init.frag

85 lines
1.6 KiB
GLSL
Raw Normal View History

2017-11-22 11:08:06 +00:00
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
2018-03-24 03:16:18 +00:00
constant int2 _184 = {};
constant int _199 = {};
2017-11-22 11:08:06 +00:00
struct main0_out
{
int FragColor [[color(0)]];
};
fragment main0_out main0()
{
main0_out out = {};
out.FragColor = 16;
2018-03-24 03:16:18 +00:00
for (int _168 = 0; _168 < 25; )
2017-11-22 11:08:06 +00:00
{
out.FragColor += 10;
2018-03-24 03:16:18 +00:00
_168++;
continue;
2017-11-22 11:08:06 +00:00
}
2018-03-24 03:16:18 +00:00
for (int _169 = 1; _169 < 30; )
2017-11-22 11:08:06 +00:00
{
out.FragColor += 11;
2018-03-24 03:16:18 +00:00
_169++;
continue;
2017-11-22 11:08:06 +00:00
}
2018-03-24 03:16:18 +00:00
int _170;
_170 = 0;
for (; _170 < 20; )
2017-11-22 11:08:06 +00:00
{
out.FragColor += 12;
2018-03-24 03:16:18 +00:00
_170++;
continue;
2017-11-22 11:08:06 +00:00
}
2018-03-24 03:16:18 +00:00
int _62 = _170 + 3;
2017-11-22 11:08:06 +00:00
out.FragColor += _62;
2018-03-24 03:16:18 +00:00
bool _68 = _62 == 40;
if (_68)
2017-11-22 11:08:06 +00:00
{
2018-03-24 03:16:18 +00:00
for (int _171 = 0; _171 < 40; )
2017-11-22 11:08:06 +00:00
{
out.FragColor += 13;
2018-03-24 03:16:18 +00:00
_171++;
continue;
2017-11-22 11:08:06 +00:00
}
}
2018-03-24 03:16:18 +00:00
else
2017-11-22 11:08:06 +00:00
{
2018-03-24 03:16:18 +00:00
out.FragColor += _62;
2017-11-22 11:08:06 +00:00
}
2018-03-24 03:16:18 +00:00
bool2 _211 = bool2(_68);
int2 _212 = int2(_211.x ? _184.x : _184.x, _211.y ? _184.y : _184.y);
bool _213 = _68 ? true : false;
bool2 _214 = bool2(_213);
if (!_213)
2017-11-22 11:08:06 +00:00
{
2018-03-24 03:16:18 +00:00
int2 _177;
_177 = int2(_214.x ? _212.x : int2(0).x, _214.y ? _212.y : int2(0).y);
for (; _177.x < 10; )
{
out.FragColor += _177.y;
int2 _167 = _177;
_167.x = _177.x + 4;
_177 = _167;
continue;
}
}
int _216 = _213 ? (_68 ? _199 : _199) : _62;
if (!_213)
{
for (int _191 = _216; _191 < 40; )
{
out.FragColor += _191;
_191++;
continue;
}
out.FragColor += _216;
2017-11-22 11:08:06 +00:00
}
return out;
}