SPIRV-Cross/reference/opt/shaders-msl/asm/frag/unreachable.asm.frag
Hans-Kristian Arntzen 7d223b8987 Fix CFG for forwarded temporaries.
Forwarded temporaries would never declare a temporary.
Figure out all result types ahead of time so we can deal with those
temporaries as well.
2018-01-18 12:11:33 +01:00

39 lines
568 B
GLSL

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
constant float4 _21 = {};
struct main0_in
{
int counter [[user(locn0)]];
};
struct main0_out
{
float4 FragColor [[color(0)]];
};
fragment main0_out main0(main0_in in [[stage_in]])
{
main0_out out = {};
float4 _33;
do
{
if (in.counter == 10)
{
_33 = float4(10.0);
break;
}
else
{
_33 = float4(30.0);
break;
}
} while (false);
out.FragColor = _33;
return out;
}