clearbuffer-display-lists: GL_BACK_is not allowed as drawbuffer

Only 0 to MAX_DRAW_BUFFERS-1 is allowed. If you want to clear GL_BACK,
call glDrawBuffers(GL_BACK) and then glClearBuffer(GL_COLOR, 0, ..).

Reviewed-by: Brian Paul <brianp@vmware.com>
gl30basic: test glClearBuffer(GL_COLOR), use piglit API

This adds testing of GL_FRONT, GL_BACK, and GL_FRONT_AND_BACK.

Reviewed-by: Brian Paul <brianp@vmware.com>
clearbuffer-mixed-format: actually test with multiple draw buffers

This test was REALLY BAD.

Even though it created a FBO with multiple color attachments, the resulting
framebuffer had only one attachment, so it didn't actually test mixed formats.
You could have just created a separate FBO for each renderbuffer and
the behavior would be exactly the same.

That's not all. If you do e.g. glDrawBuffer(GL_COLOR_ATTACHMENT3), you should
clear it with glClearBuffer(GL_COLOR, 0), because it's GL_DRAW_BUFFER0.
Clearing any other drawbuffer should be a no-op, which proves Mesa is
incorrect too.

Reviewed-by: Brian Paul <brianp@vmware.com>
Fix piglit syle in GL_ARB_sync/sync-initialize.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fix spurious failures in GL_ARB_sync/sync-initialize.

You can't just fire off some rendering and assert that it won't be
done by the time you get around to executing your query.  Plus the
rendering was broken and throwing INVALID_OPERATION when the test was
executed in core mode, anyway, since there was no shader bound.

Reviewed-by: Matt Turner <mattst88@gmail.com>
glsl-1.20: Negative test redeclaration of gl_TexCoord

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl-1.20: Test sizing an array by initialization after the array has been accessed

The "big-enough" test verifies that the compiler accepts an initializer
used to size an array after an access (to the previously implicitly
sized array) has been seen when the access would have been in-bounds in
the sized array.

The "too-small" test verifies that the compiler rejects an initializer
used to size an array after an access (to the previously implicitly
sized array) has been seen when the access would have been out-of-bounds
in the sized array.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au>
Use piglit_vertex to properly interface with piglit_draw_rect()

Also, use piglit_link_simple_program(). It ensures that
piglit_vertex gets assigned to the proper attribute slot.
This patch fixes these tests currently failing on mesa.

V2: Use piglit_build_simple_program().
    Also, make similar changes to builtin-sample_id and
    builtin-sample-mask tests.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Add variable color_format to configure non-multisample fbo

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Use integer texture to simplify the test

Also, move non-multisample color buffer test case inside shader program.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Add testing for fbo with renderbuffer attachment

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Rename Fbo to piglit_fbo and FboConfig to piglit_fbo_config

These name changes follow the naming convention used in other
shared piglit variables, functions and classes.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Rename shared test pattern classes and functions

Name changes in this patch follows the naming convention used in other
shared piglit variables, functions and classes.
Changes:
ManifestProgram to piglit_manifest_program
ManifestStencil to piglit_manifest_stencil
ManifestDepth to piglit_manifest_depth

TestPattern to piglit_test_pattern
Points to piglit_points
Lines to piglit_lines
Triangles to piglit_triangles
InterpolationTestPattern to piglit_interpolation_test_pattern

Sunburst to piglit_sunburst
StencilSunburst to piglit_stencil_sunburst
DepthSunburst to piglit_depth_sunburst
ColorGradientSunburst to piglit_color_gradient_sunburst

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>