SPIRV-Cross/reference/shaders-msl-no-opt/asm/frag/private-initializer-direct-store.asm.frag
Hans-Kristian Arntzen f8592ecdfc MSL: Deal correctly with initializers on Private variables.
Do not attempt to defer declaration. It would happen to work in most
cases, but the edge case is where the first thing that happens to a
variable is being OpStore'd into.
2020-04-21 11:20:49 +02:00

20 lines
262 B
GLSL

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct main0_out
{
float FragColor [[color(0)]];
};
fragment main0_out main0()
{
main0_out out = {};
float b = 10.0;
b = 20.0;
out.FragColor = b + b;
return out;
}