SPIRV-Cross/reference/shaders-no-opt/asm/frag/switch-single-case-multiple-exit-cfg.asm.frag
Hans-Kristian Arntzen e3d4dddfec Fix variable scope when switch block exits multiple times.
Inner scope can still dominate here, so we need to be conservative when
we observe switch blocks specifically. Normal selection merges cannot
merge from multiple paths.
2019-08-26 10:05:43 +02:00

30 lines
493 B
GLSL

#version 310 es
precision mediump float;
precision highp int;
layout(location = 0) out highp vec4 _GLF_color;
vec2 _19;
void main()
{
highp vec2 _30;
switch (0)
{
default:
{
if (gl_FragCoord.x != gl_FragCoord.x)
{
_30 = _19;
break;
}
highp vec2 _29 = _19;
_29.y = _19.y;
_30 = _29;
break;
}
}
_GLF_color = vec4(_30, 1.0, 1.0);
}