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

50 lines
843 B
Plaintext
Raw Normal View History

2016-03-02 17:09:16 +00:00
#version 310 es
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
2017-01-21 09:07:38 +00:00
layout(binding = 0, std430) readonly buffer SSBO
2016-03-02 17:09:16 +00:00
{
mat4 mvp;
vec4 in_data[];
} _24;
2017-01-21 09:07:38 +00:00
layout(binding = 1, std430) writeonly buffer SSBO2
2016-03-02 17:09:16 +00:00
{
vec4 out_data[];
} _89;
void main()
{
uint ident = gl_GlobalInvocationID.x;
vec4 idat = _24.in_data[ident];
int k = 0;
for (;;)
{
int _39 = k;
int _40 = _39 + 1;
2016-03-02 17:09:16 +00:00
k = _40;
if (_40 < 10)
2016-03-02 17:09:16 +00:00
{
idat *= 2.0;
k++;
2016-03-02 17:09:16 +00:00
continue;
}
else
{
break;
}
}
for (uint i = 0u; i < 16u; i++, k++)
2016-03-02 17:09:16 +00:00
{
for (uint j = 0u; j < 30u; j++)
2016-03-02 17:09:16 +00:00
{
idat = _24.mvp * idat;
2016-03-02 17:09:16 +00:00
}
}
do
2016-03-02 17:09:16 +00:00
{
k++;
} while (k > 10);
2016-03-02 17:09:16 +00:00
_89.out_data[ident] = idat;
}