SPIRV-Cross/reference/shaders/vulkan/frag/spec-constant-block-size.vk.frag.vk
Hans-Kristian Arntzen dd603eab58 Support spec constant array size in blocks.
Won't really be correct if the spec constant is changed outside
SPIRV-Cross, but nothing we can do about that, really.
2018-02-23 15:11:45 +01:00

20 lines
348 B
Plaintext

#version 310 es
precision mediump float;
precision highp int;
layout(constant_id = 10) const int Value = 2;
layout(set = 0, binding = 0, std140) uniform SpecConstArray
{
vec4 samples[Value];
} _15;
layout(location = 0) out vec4 FragColor;
layout(location = 0) flat in mediump int Index;
void main()
{
FragColor = _15.samples[Index];
}