SPIRV-Cross/shaders-no-opt/comp/loop-break-merge-after-inner-continue.comp
Hans-Kristian Arntzen 46e4b5a3c8 Fix control flow bug where we missed continue;
Case which caused failure:

if (cond)
{
    continue;
}
break;

Only allow tracing from inner selections if the outer header never
merges execution.
2022-06-07 15:04:01 +02:00

22 lines
290 B
Plaintext

#version 450
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout (binding = 0) buffer STO
{
uint data[];
} ssbo;
void main()
{
while(true)
{
ssbo.data[0] += 1;
if (bool(ssbo.data[2]))
{
ssbo.data[5] += 1;
continue;
}
break;
}
}