2 # Test that partial writes of per-vertex outputs work in the control shader
7 GL_ARB_tessellation_shader
9 [vertex shader passthrough]
11 [tessellation control shader]
13 #extension GL_ARB_tessellation_shader : require
15 layout(vertices = 2) out;
21 gl_TessLevelInner[0] = 1.0;
22 gl_TessLevelInner[1] = 1.0;
24 gl_TessLevelOuter[0] = 1.0;
25 gl_TessLevelOuter[1] = 1.0;
26 gl_TessLevelOuter[2] = 1.0;
27 gl_TessLevelOuter[3] = 1.0;
29 c[gl_InvocationID] = vec4(1.0);
30 if (x == 0) { /* true, but the compiler cannot see it */
31 c[gl_InvocationID].xz = vec2(0);
35 [tessellation evaluation shader]
37 #extension GL_ARB_tessellation_shader : require
39 layout(quads, equal_spacing) in;
45 gl_Position = vec4(gl_TessCoord.xy * 2 - 1, 0, 1);
46 fs_c = 0.5 * (c[0] + c[1]);
60 clear color 0.1 0.1 0.1 0.1
62 patch parameter vertices 1
63 draw arrays GL_PATCHES 0 1
64 probe all rgba 0.0 1.0 0.0 1.0