SPIRV-Cross/reference/opt/shaders/frag/constant-composites.frag
Hans-Kristian Arntzen af75ef005f Update glslang and SPIRV-Tools.
A lot of changes in spirv-opt output.
Some new invalid SPIR-V was found but most of them were not significant
for SPIRV-Cross, so just marked them as invalid.
2018-09-27 11:10:22 +02:00

23 lines
411 B
GLSL

#version 310 es
precision mediump float;
precision highp int;
const float _16[4] = float[](1.0, 4.0, 3.0, 2.0);
struct Foo
{
float a;
float b;
};
layout(location = 0) out vec4 FragColor;
layout(location = 0) flat in mediump int line;
void main()
{
Foo foos[2] = Foo[](Foo(10.0, 20.0), Foo(30.0, 40.0));
FragColor = vec4(_16[line]);
FragColor += vec4(foos[line].a * foos[1 - line].a);
}