1 # Test a single per-vertex input read in a TCS.
5 GL_ARB_tessellation_shader
10 out block { float v; };
18 [tessellation control shader]
20 #extension GL_ARB_tessellation_shader : require
22 in block { float v; } per_vertex[];
23 layout(vertices = 1) out;
27 if (per_vertex[0].v == 42.0) { /* constant index case */
28 gl_TessLevelInner[0] = 1.0;
29 gl_TessLevelInner[1] = 1.0;
31 gl_TessLevelOuter[0] = 1.0;
32 gl_TessLevelOuter[1] = 1.0;
33 gl_TessLevelOuter[2] = 1.0;
34 gl_TessLevelOuter[3] = 1.0;
36 gl_TessLevelInner[0] = 0.0;
37 gl_TessLevelInner[1] = 0.0;
39 gl_TessLevelOuter[0] = 0.0;
40 gl_TessLevelOuter[1] = 0.0;
41 gl_TessLevelOuter[2] = 0.0;
42 gl_TessLevelOuter[3] = 0.0;
46 [tessellation evaluation shader]
48 #extension GL_ARB_tessellation_shader : require
50 layout(quads, equal_spacing) in;
54 gl_Position = vec4(gl_TessCoord.xy * 2 - 1, 0, 1);
62 gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
66 patch parameter vertices 1
67 draw arrays GL_PATCHES 0 1
68 probe all rgba 0.0 1.0 0.0 1.0