1 # Test a single per-vertex input read in a TCS.
5 GL_ARB_tessellation_shader
10 out block { vec4 v[2]; };
19 [tessellation control shader]
21 #extension GL_ARB_tessellation_shader : require
24 in block { vec4 v[2]; } per_vertex[];
25 layout(vertices = 1) out;
29 if (per_vertex[0].v[1].x == 42.0) { /* constant index case */
30 gl_TessLevelInner[0] = 1.0;
31 gl_TessLevelInner[1] = 1.0;
33 gl_TessLevelOuter[0] = 1.0;
34 gl_TessLevelOuter[1] = 1.0;
35 gl_TessLevelOuter[2] = 1.0;
36 gl_TessLevelOuter[3] = 1.0;
38 gl_TessLevelInner[0] = 0.0;
39 gl_TessLevelInner[1] = 0.0;
41 gl_TessLevelOuter[0] = 0.0;
42 gl_TessLevelOuter[1] = 0.0;
43 gl_TessLevelOuter[2] = 0.0;
44 gl_TessLevelOuter[3] = 0.0;
48 [tessellation evaluation shader]
50 #extension GL_ARB_tessellation_shader : require
52 layout(quads, equal_spacing) in;
56 gl_Position = vec4(gl_TessCoord.xy * 2 - 1, 0, 1);
64 gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
68 patch parameter vertices 1
69 draw arrays GL_PATCHES 0 1
70 probe all rgba 0.0 1.0 0.0 1.0