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
|
# From the ARB_shader_group_vote spec:
#
# "... allInvocationsARB() is guaranteed to return false if
# <value> is false."
[require]
GL >= 3.2
GLSL >= 1.50
GL_ARB_shader_group_vote
[vertex shader]
#extension GL_ARB_shader_group_vote: enable
in vec4 piglit_vertex;
out vec4 color;
void main()
{
gl_Position = piglit_vertex;
if (!allInvocationsARB(false))
color = vec4(0.0, 1.0, 0.0, 1.0);
else
color = vec4(1.0, 0.0, 0.0, 1.0);
}
[fragment shader]
in vec4 color;
out vec4 frag_color;
void main()
{
frag_color = color;
}
[test]
draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 1.0
|