On Fri, Jan 31, 2014 at 4:10 PM, Jordan Justen <[email protected]> wrote: > > Signed-off-by: Jordan Justen <[email protected]> > --- > .../invocation-id-in-separate-gs.shader_test | 62 > ++++++++++++++++++++++ > 1 file changed, 62 insertions(+) > create mode 100644 > tests/spec/arb_gpu_shader5/execution/invocation-id-in-separate-gs.shader_test > > diff --git > a/tests/spec/arb_gpu_shader5/execution/invocation-id-in-separate-gs.shader_test > > b/tests/spec/arb_gpu_shader5/execution/invocation-id-in-separate-gs.shader_test > new file mode 100644 > index 0000000..9d0523a > --- /dev/null > +++ > b/tests/spec/arb_gpu_shader5/execution/invocation-id-in-separate-gs.shader_test > @@ -0,0 +1,62 @@ > +[require] > +GLSL >= 1.50 > +GL_ARB_gpu_shader5 > + > +[vertex shader] > +#version 150 > + > +void main() > +{ > +} > + > +[geometry shader] > +#version 150 > +#extension GL_ARB_gpu_shader5 : enable > + > +// Note: invocations = 4 is set in a separate GS (below) > +layout(points) in; > +layout(triangle_strip, max_vertices = 4) out; > + > +void emit(vec2 v2) > +{ > + gl_Position.xy = v2; > + gl_Position.zw = vec2(0, 1); > + EmitVertex(); > +} > + > +void main() > +{ > + int i = gl_InvocationID; > + > + vec2 v; > + v.x = -1.0 + float(i & 1); > + v.y = -1.0 + float((i & 2) / 2); > + > + if (i >= 0 && i < 4) { > + emit(v); > + emit(v + vec2(1, 0)); > + emit(v + vec2(0, 1)); > + emit(v + vec2(1, 1)); > + EndPrimitive(); > + } > +} > + > +[geometry shader] > +#version 150 > +#extension GL_ARB_gpu_shader5 : enable > + > +layout(invocations = 4) in; > + > +[fragment shader] > +#version 150 > + > +void main() > +{ > + gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0); > +} > + > +[test] > +clear color 0.0 0.0 0.0 0.0 > +clear > +draw arrays GL_POINTS 0 1 > +probe all rgba 0.0 1.0 0.0 1.0 > -- > 1.8.5.3 > > _______________________________________________ > Piglit mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/piglit
Reviewed-by: Anuj Phogat <[email protected]> _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
