SPIRV-Cross/reference/shaders/asm/frag/do-while-statement-fallback.asm.frag
Hans-Kristian Arntzen 317144a59c Detect invalid DoWhileLoop early.
We had a bug where error conditions in DoWhileLoop emit path would not
detect that statements were being emitted due to the masking behavior
which happens when force_recompile is true. Fix this.

Also, refactor force_recompile into member functions so we can properly
break on any situation where this is set, without having to rely on
watchpoints in debuggers.
2019-04-05 12:19:32 +02:00

59 lines
744 B
JavaScript

#version 450
layout(location = 0) out float FragColor;
void main()
{
float foo = 1.0;
for (;;)
{
foo = 2.0;
if (false)
{
continue;
}
else
{
break;
}
}
for (;;)
{
foo = 3.0;
if (false)
{
continue;
}
else
{
break;
}
}
for (;;)
{
foo = 4.0;
if (false)
{
continue;
}
else
{
break;
}
}
for (;;)
{
foo = 5.0;
if (false)
{
continue;
}
else
{
break;
}
}
FragColor = foo;
}