1 # Test that the gl_PrimitiveID input in the TES is correctly set up and starts
2 # at 0 for each instance in instanced draws.
6 GL_ARB_tessellation_shader
12 out int vs_tes_instance;
16 vs_tes_id = gl_VertexID;
17 vs_tes_instance = gl_InstanceID;
20 [tessellation evaluation shader]
22 #extension GL_ARB_tessellation_shader : require
24 layout(quads, equal_spacing) in;
27 in int vs_tes_instance[];
33 gl_Position = vec4(-1.0 + vs_tes_id[0] + gl_TessCoord.x,
34 -1.0 + vs_tes_instance[0] + gl_TessCoord.y,
37 color = vec4(0.0, 1.0, gl_PrimitiveID * 0.1, 1.0);
51 clear color 0.0 0.0 0.0 0.0
54 patch parameter default level inner 1 1
55 patch parameter default level outer 1 1 1 1
57 patch parameter vertices 1
58 draw arrays instanced GL_PATCHES 0 2 2
61 relative probe rect rgba (0.0, 0.0, 0.5, 0.5) (0.0, 1.0, 0.0, 1.0)
62 relative probe rect rgba (0.5, 0.0, 0.5, 0.5) (0.0, 1.0, 0.1, 1.0)
65 relative probe rect rgba (0.0, 0.5, 0.5, 0.5) (0.0, 1.0, 0.0, 1.0)
66 relative probe rect rgba (0.5, 0.5, 0.5, 0.5) (0.0, 1.0, 0.1, 1.0)