fbo-blit-scaled-linear: Require GLSL 1.30.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
glsl-1.10: test that redeclaring a variable with a different type is illegal

This passes w/ Mesa but crashes NVIDIA's driver.
fbo-drawbuffers-maxtargets: use different colors for different buffers

Before, the test always drew green rects for all the target buffers.
Now we draw a different color into each buffer to be more thorough.

Plus, replace 16 with MAX_TARGETS, add some comments, etc.

Note: the test now fails with Mesa's swrast because swrast errantly
writes the same color to all render targets.
ARB_viewport_array: Validity test for viewport index/first/count params

Tests GL_ARB_viewport_array regarding the validity for the indices.
Use both valid and invalid parameters (index, first, count) for these new
API entry points:
  glViewportArrayv, glViewportIndexedf, glViewportIndexedfv, glGetFloati_v.

Also test that writing to an invalid viewport index for Viewport, DepthRange,
Scissor Box, Scissor Test does not modify any of the state for the valid
range of indices.

Tested on Nvidia Quadro 600 all tests pass.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
ARB_viewport_array: Validity test for depth range index/first/count params

Tests GL_ARB_viewport_array  validity for indices. Use both valid and
invalid parameters (index, first, count) for all these new API entry points:
 glDepthRangeArrayv, glDepthRangeIndexed, glGetDoublei_v.

Tested on Nvidia Quadro 600 all tests pass.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
ARB_viewport_array: Validity test for scissor index related params

Tests GL_ARB_viewport_array  validity for indices. Use both valid and
invalid parameters (index, first, count) for these new API entry points:
  glScissorArrayv, glScissorIndexed, glScissorIndexedv.
Also test SCISSOR_TEST indices with glEnablei and others.

Tested on Nvidia Quadro 600 all test cases pass except for invalid
indices with glIsEnabledi(GL_SCISSOR_TEST,...).

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
ARB_viewport_array: Test validity of bounds for viewport, depthRange, scissor

Tests for the validity  of Viewport bounds, Depth Range bounds  and
Scissor Box bounds  with viewport arrays (0 to GL_MAX_VIEWPORTS-1).
"Bounds" refer to the bounding rectangle or range (eg x, y, width, height).

Tested with Nvidia Quadro 600.  All tests pass except  Scissor Box  with a
negative height fails to return a gl error.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
ARB_viewport_array: Test validity for glGetFloati_v and glGetDoublei_v

Test valid  and invalid queries using glGetFLoati_v and glGetDoublei_v.
Also test correct queries of GL_SCISSOR_TEST default value and settable values.

Tested on Nvidia Quadro 600 and all tests pass.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
ARB_viewport_array: Test min/max values for new implementation constants

Tested GLenums are GL_MAX_VIEWPORT_DIMS, GL_MAX_VIEWPORTS,
GL_VIEWPORT_SUBPIXEL_BITS, GL_VIEWPORT_BOUNDS_RANGE, GL_LAYER_PROVOKING_VERTEX,
GL_VIEWPORT_INDEX_PROVOKING_VERTEX.

Tested on Nvidia Quadro 600, test passes.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
ARB_viewport_array: Rendering test with multiple viewports

Tests rendering into a single framebuffer surface with multiple viewports
via a geometry shader.  Confirm that each area of the surface delineated by
a viewport renders the correct color. Use multiple draw calls to replicate
geometry rather than the geometry shader.

Tested on Nvidia Quadro 600, test passes.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
ARB_viewport_array: Rendering test with multiple depthranges

Draws quads into a single framebuffer surface with multiple viewports
via a geometry shader.  Each different viewport has a different DepthRange.
The fragment shader outputs a color based on the depthRange, z, and viewport
index. Confirm that each quad has the correct color and therefore has
the correct depthRange for that viewport index.

Tested on Nvidia Quadro 600, test passes.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
ARB_viewport_array: Rendering test with multiple scissor rectangles/enables

Tests rendering into a single framebuffer surface with multiple viewports
via a geometry shader.  Scissoring is used to restrict quads to a smaller
area on the surface.  Confirm that each area of the surface delineated by
a scissor rectangle for viewport index renders the correct color. Both
indexed scissor tests and indexed scissor enables  are used. Geometry
shader is used to expand a single rectangle primitve to N rectangles.

Tested on Nvidia Quadro 600, test passes.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
ARB_viewport_array: rename 'near' and 'far' vars for Windows
Add a "slow_cc" option to EXT_framebuffer_multisample/alpha-blending.

When fast color clears are added to i965, there is a danger that they
may cause this test to stop reproducing bug 53077.  To avoid that, add
a command-line option which causes the test to use a clear color that
isn't fast color clearable.

As a result of this patch, a new piglit test is added:
"spec/EXT_framebuffer_multisample/alpha-blending slow_cc".  As of Mesa
commit fd05ede, this test is known to fail on Ivy Bridge and Haswell.
These failures are already covered by bug 53077.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Test intrastage interface block array matching rules.

Note: as of Mesa 5cb80f0, test "intrastage-interface-unnamed-array" is
known to fail.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Rename and clarify interface-blocks-vs-gs-array-size-mismatch.shader_test.

The test was correct, but not for the reasons stated in the comment.
The reason a sized VS output interface array should fail to match an
unsized GS input interface array is because geometry shader inputs
require an extra level of array indexing to match corresponding vertex
shader outputs.

This patch renames the test, and updates the comment, to reflect
what's actually being tested.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Check that transform feedback size/type comes from gs, not vs.

When the current program has both a geometry shader and a vertex
shader, transform feedback needs to link with the geometry shader.
This test verifies that the type and size of the varyings captured by
transform feedback match their declarations in the geometry shader,
even if there are vertex shader outputs with the same names and
different types.

The test exercises one built-in shader output (gl_ClipDistance) and
one user-defined shader output.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Test interpolation qualifiers inside of interface blocks.

Validated using the NVIDIA proprietary driver for Linux (version
313.18).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Test the "centroid" qualifier inside of interface blocks.

Validated using the NVIDIA proprietary driver for Linux (version
313.18).

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
gs: Test that gl_MaxGeometryInputComponents can actually be achieved.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>