d08ce828f4
HLSL is very fussy about fallthrough in switch blocks, so promote Unreachable blocks to breaks if they are inside a switch construct. Some false positives are possible in weird multi-break scenarios, but this is benign.
46 lines
871 B
GLSL
46 lines
871 B
GLSL
#version 100
|
|
|
|
struct UBO
|
|
{
|
|
int func_arg;
|
|
int inner_func_arg;
|
|
};
|
|
|
|
uniform UBO _34;
|
|
|
|
void main()
|
|
{
|
|
vec4 _102;
|
|
for (int spvDummy30 = 0; spvDummy30 < 1; spvDummy30++)
|
|
{
|
|
if (_34.func_arg != 0)
|
|
{
|
|
vec4 _101;
|
|
for (int spvDummy45 = 0; spvDummy45 < 1; spvDummy45++)
|
|
{
|
|
if (_34.inner_func_arg != 0)
|
|
{
|
|
_101 = vec4(1.0);
|
|
break;
|
|
}
|
|
else
|
|
{
|
|
_101 = vec4(0.0);
|
|
break;
|
|
}
|
|
break; // unreachable workaround
|
|
}
|
|
_102 = _101;
|
|
break;
|
|
}
|
|
else
|
|
{
|
|
_102 = vec4(0.0);
|
|
break;
|
|
}
|
|
break; // unreachable workaround
|
|
}
|
|
gl_Position = _102;
|
|
}
|
|
|