SPIRV-Cross/reference/opt/shaders-msl/comp/torture-loop.comp

87 lines
1.5 KiB
Plaintext
Raw Normal View History

2017-11-22 11:08:06 +00:00
#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct SSBO
{
float4x4 mvp;
float4 in_data[1];
};
struct SSBO2
{
float4 out_data[1];
};
constant uint _98 = uint(0);
kernel void main0(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], device SSBO& _24 [[buffer(0)]], device SSBO2& _89 [[buffer(1)]])
{
float4 _30;
float4 _46;
int _33;
int _48;
int _40;
int _77;
uint _12;
uint _75;
uint _98;
float4 _71;
uint _73;
int _83;
_30 = _24.in_data[gl_GlobalInvocationID.x];
int _94;
float4 _93;
_93 = _30;
_94 = 0;
for (;;)
{
_40 = _94 + 1;
if (_40 < 10)
{
_46 = _93 * 2.0;
_48 = _40 + 1;
_93 = _46;
_94 = _48;
continue;
}
else
{
break;
}
}
float4 _95;
int _96;
_95 = _93;
_96 = _40;
uint _101;
float4 _100;
for (uint _97 = 0u, _99 = _98; _97 < 16u; _75 = _97 + uint(1), _77 = _96 + 1, _95 = _100, _96 = _77, _97 = _75, _99 = _101)
{
_100 = _95;
_101 = 0u;
for (; _101 < 30u; _73 = _101 + uint(1), _100 = _71, _101 = _73)
{
_71 = _24.mvp * _100;
}
}
int _102;
_102 = _96;
for (;;)
{
_83 = _102 + 1;
if (_83 > 10)
{
_102 = _83;
continue;
}
else
{
break;
}
}
_89.out_data[gl_GlobalInvocationID.x] = _95;
}