SPIRV-Cross/shaders-msl/frag/for-loop-continue-control-flow.frag
Hans-Kristian Arntzen 50342966c0 Fall back to complex loop if non-trivial continue block is found.
There is a case where we can deduce a for/while loop, but the continue
block is actually very painful to deal with, so handle that case as
well. Removes an exceptional case.
2019-07-08 11:54:29 +02:00

12 lines
185 B
GLSL

#version 450
layout(location = 0) out vec4 FragColor;
void main()
{
FragColor = vec4(0.0);
for (int i = 0; i < 3; (0 > 1) ? 1 : i ++)
{
int a = i;
FragColor[a] += float(i);
}
}