shaders: test linking similar unnamed types

GLSL allows unnamed structure types in variable declarations. This
test verifies that the GLSL linker recognizes similar unnamed structure
types declared across multiple shader stages.

Reviewed-by: Matt Turner <mattst88@gmail.com>
shader_runner: always enable VAO for gl >= 31

This fixes attributeless rendering on nvidia.

For example:
 * tests/spec/glsl-1.50/execution/geometry/point-size-out.shader_test

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
arb_gpu_shader5: add invocation-id-basic.shader_test

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
all.tests: add fs-textureOffset-2D

Texture offsets are somewhat commonly used and should always be tested.

v2: allow concurrency
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
all.tests: make fs-texelFetch* concurrent

Reviewed-by: Matt Turner <mattst88@gmail.com>
framework/summary.py: add assert to Summary.__init__()

Normally piglit doesn't generate test names with leading slashes, and
the code has no way to deal with them. In fact, a leading slash will
cause a loop in Summary.__init__ to run infinitely.  The simplest
solution is an assertion, which means the program will assert before it
ever gets to the loop.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/summary.py: fix memory consumption issue

running piglit-summary.py on any decent sized results would result in
the total consumption of all memory, followed by the total consumption
of all swap (totalling 16GB), followed by oom killing on my system.
Replacing the list generating dict.values() with the dict.itervalues()
iterators keeps memory consumption under 1%.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/core.py: Add a config parser

The config parser will read options from a file called piglit.conf
in the root of piglit's source directory or from a file specified
by the -f option to piglit-run.py

Tom Stellard:
  - Added command-line option

Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
cl: Add support for OpenCV unit tests v3

This enables piglit to run and interpret the results from OpenCV's
gtest based opencv_test_ocl program.

You can enable the OpenCV tests by adding the path to the
opencv_test_ocl program to your piglit.conf file.

You can also optionally specify the path to OpenCV's work
directory if you buid OpenCV in a non-standard way.  For example:

[opencv]
opencv_test_ocl_bindir=/home/user/opencv/build/bin
opencv_workdir=/home/user/opencv/samples/c/

v2:
  - Python code cleanups

v3:
  - More cleanups
  - Move opencv.py into framework
  - Use ConfigParser

Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
cl: Add quick_cl.py test profile

all_cl.py will now run each OpenCV sub-test individually, and quick_cl.py
will run only the OpenCV parent tests.  Both profiles run the exact same
tests, but all_cl.py gives finer-grained results and also takes longer
due to the overhead of running each sub-test individually.

For example:

./piglit-run.py tests/all_cl.py -t Lut results/lut
[Wed Jan 15 12:08:05 2014] ::  running :: opencv/Arithm/Lut/Mat/2
[Wed Jan 15 12:08:06 2014] ::     pass :: opencv/Arithm/Lut/Mat/2
[Wed Jan 15 12:08:06 2014] ::  running :: opencv/Arithm/Lut/Mat/0
[Wed Jan 15 12:08:06 2014] ::     pass :: opencv/Arithm/Lut/Mat/0
[Wed Jan 15 12:08:06 2014] ::  running :: opencv/Arithm/Lut/Mat/1
[Wed Jan 15 12:08:08 2014] ::     pass :: opencv/Arithm/Lut/Mat/1

./piglit-run.py tests/quick_cl.py -t Lut results/lut-quick
[Wed Jan 15 12:08:14 2014] ::  running :: opencv/Arithm/Lut
[Wed Jan 15 12:08:16 2014] ::     pass :: opencv/Arithm/Lut

Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
CMakeLists: remove redundant waffle version check

This block was accidentally left in place when patch [0] was applied.

[0] fc007bc7c6729c2d4ad61fe8360c43c973404ce5
cmake: indent spaces -> tabs

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
glapi: Rename ARB_compute_shader "LOCAL" -> "WORK_GROUP".

The piglit glapi files, which are derived from files published on
www.opengl.org, contained nonstandard names for two enums:
COMPUTE_LOCAL_WORK_SIZE and MAX_COMPUTE_LOCAL_INVOCATIONS.

The ARB_compute_shader spec, the OpenGL specs, and the OpenGL wiki all
agree that these should be called COMPUTE_WORK_GROUP_SIZE and
MAX_COMPUTE_WORK_GROUP_INVOCATIONS.  So rename them in piglit to be
consistent.
util: Add ARB_compute_shader support to piglit_get_gl_enum_name().
Add minmax test for ARB_compute_shader.
Test compilation rules related to compute shader layout qualifiers.
Test that compute shader work group sizes are properly bounds checked.
Test ARB_compute_shader built-in constant gl_WorkGroupSize.
Test ARB_compute_shader built-in constant gl_MaxComputeWorkGroupCount.
Test ARB_compute_shader built-in constant gl_MaxComputeWorkGroupSize.
Test that compute shaders may not have user-defined ins/outs.