arb_texture_storage: add some cube map error tests

Test error checking for width != height and depth % 6 != 0 for cube arrays.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
CL: Add global memory read/write and barrier tests

Based on local-memory tests.

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Test that in/out qualifiers are required when redeclaring gl_ClipDistance.

Although it is not explicitly stated in the GLSL spec, all examples of
redeclaring built-in in/out variables (such as gl_ClipDistance)
include the "in" or "out" qualifier, so it seems like failure to do so
should cause a compile error.

At present:

- Mesa (as of commit a50c5f8) does not generate an error.

- The NVIDIA proprietary driver for Linux (version 313.18) does not
  generate an error; however, if gl_ClipDistance is redeclared in the
  fragment shader without specifying the "in" keyword, it fails to
  work properly.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
util/x11: Propagate window resize events to piglit_width/height

When I switched Piglit from GLUT to Waffle, I broke detection of X11
window resizes. When the user resized the window, Piglit called
piglit_display() but neglected to update piglit_width/height.

This patch ensures that Piglit updates piglit_width/height correctly.

(It's amazing that it took this long for anyone to fix it. People must
rarely resize Piglit windows).

Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cmake: Detect if system has POSIX MONOTONIC clocks

Set CMake cache var PIGLIT_HAS_POSIX_CLOCK_MONOTONIC if
clock_gettime() is available with CLOCK_MONOTONIC.

Tests that need to measure time, such as GL_ARB_sync tests, will use
Posix clocks.

v2: (jordan.l.justen@intel.com)
 * PIGLIT_HAS_POSIX_CLOCKS => PIGLIT_HAS_POSIX_CLOCK_MONOTONIC
 * Link with librt. On older systems, clocks_gettime may be in
   librt rather than glibc.

CC: Nicholas Mack <nichmack@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Cc: Chad Versace <chad.versace@linux.intel.com>
Cc: Ian Romanick <idr@freedesktop.org>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
piglit-util: add piglit_get_microseconds

v2:
 * Use Chad's cmake detection
 * return value is signed, and a negative indicates an error

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
shader_runner: support SIZE in requirement section of a shader_test

If a test requires a certain size, it adds 'SIZE Width Height' to
the requirements section. Width and Height must be unsigned
integers.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
glsl-1.50: add size requirements to 3 shader_test tests

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
arb_seamless_cube_map: Fix a spurious test fail on non-GLSL-130 drivers.

Reviewed-by: Matt Turner <mattst88@gmail.com>
depthstencil-render-miplevels: Fix stencil drawing for width % 4 != 0.

It didn't affect test results, since we don't probe this data and it's
only in manual mode, but it did cause buffer overflow.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
summary.py: Remove unused modules

There were two modules being imported but not used: string, and json.
This patch removes them.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: Replace ``import from'' syntax with import

Don't clutter the namespace needlessly, just import the full module and
use it.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: Replace try/except with a list comprehension

This is equivalent but simpler.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: Replace Result class with load_result function

This is groundwork for getting us down to one loader for results.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
TestrunResult: Merge parseFile into the constructor

This adds an optional argument to the constructor for a results file.
This fixes a race condition where a TestrunResult is created, some
entries are added, and then parseFile is called, which overwrites the
contents of the TestrunResult.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Combine summary.load_results into core.loadTestResults

This reduces code duplication, since these two functions were very
similar to begin with.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
rename core.loadTestResults to core.load_results

This is in keeping with PEP8 sytle guidelines for function names:
"Function names should be lowercase, with words separated by underscores
as necessary to improve readability."

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: minor style changes

This changes some camelCase variables to lowercase underscore separated
variables per PEP8, and a few other minor style nits. There are no
functional changes.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: rename generate* methods

Fix style issues with camel case method names.

v2: - lowercase HTML to html

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: Use with open(...) as syntax

This is the commonly excepted "right way" in python.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>