gs: less demanding tests for triangle strips.

Commit 2ef33fd introduced some fairly demanding tests to verify that
for each possible input primitive type, vertices are delivered to the
geometry shader in the proper order.

Some hardware may not be able to satisfy all of OpenGL's ordering
requirements for GL_TRIANGLE_STRIP and GL_TRIANGLE_STRIP_ADJACENCY (in
particular, Intel Ivy Bridge requires some workarounds, and I haven't
yet determined whether those workarounds are possible in all
circumstances).

In case the implementation can't get the ordering exactly right, we
still want to make sure that (a) triangle orientation is correct, and
(b) with GL_TRIANGLE_STRIP_ADJACENCY, adjacent vertices are correctly
ordered relative to the primary triangle vertices.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Work around exception errors in oglconform.tests.

A couple of new tests don't have a category, so the code to split the
"category test-name" text failed.  For now, just skip those tests.
Test bad interaction with optimizer and a uniform array as a function argument.

These test that a uniform array used only as a function argument is not
improperly optimized out or has its length reduced.

v2: Use shader_tests to catch bug under non-debug builds.
Cc: Dominik Behr <dbehr@chromium.org>
Reported-by: Dominik Behr <dbehr@chromium.org>
Add a small test for gl_Fog.scale when fog start and end are equal.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
piglit-summary-html.py: Replace .read().split('\n') with .readlines()

This is equivalent but simpler.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
piglit-summary.py: rewrite parse_listfile

This makes the parse_listfile in piglit-summary.py the same as the one
in piglit-summary-html.py.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
core.py: Move parse_listfile to core.py

Replaces the two individual implementations of parse_listfile with a
single shared instance in core.py.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
arb_texture_cube_map_array: scale texcoords

The magnitude of the vector formed by the first three texcoords
should not affect the result.

This turns out to be a significant edge case in the i965 driver,
which normalizes the coords such that the largest component does not
exceed [-1..1], but currently bogusly multiplies the fourth coord
[the array index] as well.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
ARB_texture_gather: add initial execution test

This test exercises combinations of:
- Shader stage vs/fs
- Offsetting
- Component count, up to implementation-defined limit
- Swizzling
- Unsigned normalized, float, int, unsigned int component types
- 2D/2DArray/Cube/CubeArray samplers

The test works by numbering the texels, and ensuring that the four
texels sampled by textureGather*() are those we expect.

Not exercised yet:
- Other interesting internalformats [DEPTH_COMPONENT, etc]
- Addressing modes other than WRAP.
- Use in Geometry Shader. I'd like to pick this up later, as mesa's
  GS support matures.

V2: - Use textureSize rather than hardcoding size in shader;
    - Use piglit_build_simple_program
    - Whitespace tidyups
    - Convert swizzle to enum
    - More component types, for all gsampler2D variants.

V3: - More whitespace
V4: - allow explicit 'unorm' component type; rework usage
    - Support all required sampler types.
    - Refactor setup

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>