1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
// From the ARB_separate_shader_objects spec v.25:
//
// "To use any built-in input or output in the gl_PerVertex and
// gl_PerFragment blocks in separable program objects, shader code
// must redeclare those blocks prior to use. A separable program
// will fail to link if:
//
// * it contains multiple shaders of a single type with different
// redeclarations of these built-in input and output blocks; or
//
// * any shader uses a built-in block member not found in the
// redeclaration of that block."
[require]
GLSL >= 1.50
GL_ARB_separate_shader_objects
GL_ARB_tessellation_shader
SEPARABLE PROGRAM ENABLED
[vertex shader]
#version 150
void main()
{
}
[tessellation control shader]
#version 150
#extension GL_ARB_tessellation_shader: require
layout(vertices = 3) out;
void main() {
gl_out[gl_InvocationID].gl_PointSize = float(1.0);
gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 1.0);
gl_TessLevelInner = float[2](1.0, 1.0);
}
[tessellation evaluation shader]
#version 150
#extension GL_ARB_tessellation_shader: require
layout(triangles) in;
out vec4 tes_color;
void main()
{
tes_color = vec4(gl_in[0].gl_PointSize);
}
[fragment shader]
#version 150
in vec4 tes_color;
out vec4 color;
void main()
{
color = tes_color;
}
[test]
link error
|