3b5968bb26
Need some pretty hideous ladder variable system, but high level languages do not support breaking out of a loop. break in switch blocks and break in loops alias each other.
65 lines
1.3 KiB
Plaintext
65 lines
1.3 KiB
Plaintext
#version 450
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
|
|
layout(binding = 0, std430) buffer BUF
|
|
{
|
|
int a;
|
|
int b;
|
|
int d;
|
|
} o;
|
|
|
|
void main()
|
|
{
|
|
int c = o.a;
|
|
int a;
|
|
for (;;)
|
|
{
|
|
bool _22_ladder_break = false;
|
|
switch (c)
|
|
{
|
|
case 5:
|
|
{
|
|
for (;;)
|
|
{
|
|
bool _30_ladder_break = false;
|
|
switch (o.d)
|
|
{
|
|
case 10:
|
|
case 20:
|
|
{
|
|
c += c;
|
|
_30_ladder_break = true;
|
|
break;
|
|
}
|
|
default:
|
|
{
|
|
continue;
|
|
}
|
|
}
|
|
if (_30_ladder_break)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
case 1:
|
|
case 2:
|
|
case 3:
|
|
{
|
|
a = c;
|
|
_22_ladder_break = true;
|
|
break;
|
|
}
|
|
}
|
|
if (_22_ladder_break)
|
|
{
|
|
break;
|
|
}
|
|
c++;
|
|
continue;
|
|
}
|
|
o.b = a;
|
|
}
|
|
|