layout(constant_id=auto) const int max_colors = 2; struct ColorInfo { vec4 color; }; uniform Colors { ColorInfo colors[max_colors]; }; #pragma MSP stage(vertex) layout(location=0) in vec4 position; void main() { gl_Position = position; } #pragma MSP stage(fragment) layout(location=0) out vec4 frag_color; void main() { frag_color = colors[0].color; } // Compile mode: module /* Expected error: :8: Reference to specialization constant 'max_colors' in a fixed constant expression :8: Reference to specialization constant 'max_colors' in a fixed constant expression */