arb_texture_multisample: Avoiding C99-style struct initializers.

In order to fix the build on MSVC, which does not support them.
glsl-1.30: add basic test for testing textureOffset functionality.

This is pretty rough and doesn't really test all that much (just
textureOffsetLod, but there's other texturing functions with offsets),
doesn't test different wrap modes, NPOT sizes etc., but there's no
other test using "ordinary" texture opcodes and texel offsets, so
it's a start (and in fact it exposed a bug in the mesa state tracker).
Tested with llvmpipe (pass) and softpipe (fail) which is as expected -
hopefully the math is ok...
Inspired from fs-texelFetchOffset.

v2: some minor comment and code fixes

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
glx_arb_create_context: Add current-no-framebuffer test

Signed-off-by: Adam Jackson <ajax@redhat.com>
Enable etc2 tests on gl contexts that support GL_ARB_ES3_compatibility extension

V2: Enable the test to choose core/compat GL context at run time.
    Add GL version of test to all.tests.
    Use VAO to enable the test run on core context.

Reviewed-by: Matt Turner <mattst88@gmail.com>
oes_compressed_etc2_texture-miptree: Fix build.

Mimic others CMakeLists.gl.txt
Change --tests to --include-tests

Excluding tests already uses a similar syntax (--exclude-tests), so this
is more consistent.

V2: - Leaves --tests option, but marks it as deprecated

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
piglit-run.py: Replace Piglit's --concurent flag with --no-concurrency

Since piglit defaults to using concurrency, and since concurrency is
generally the desired behavior, it seems more appropriate to have a flag
that turns off concurrency than one that takes an argument to set it on
or off.

V2: - Leaves --concurrency option, but marks it as deprecated

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
piglit-run.py: Add --resume to the help menu

This option was implemented, however, it was not added to the help menu,
meaning that a user needed to know that it existed before they could
even attempt to use it.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
piglit-print-commands.py: Drop dead resume code

This program does not support resume, but has some code copied from
piglit-run.py for resuming interupted runs, so drop it.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Bumps python required version to 2.7

This change is in preparation for the next patch that replaces getopt
with argparse. Argparse is only available in python 2.7+ and 3.2+.

One concern with this change is the availability of Python 2.7 on
non-Linux platforms, however:
- OSX 10.8 ships with python 2.7.2
- OSX 10.7.4 ships with python 2.7.1
- 2.7.3 is available for windows

V2: - Splits this change from the next patch (Replaces getopt with
      argparse)

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Replaces getopt with argparse

This change gets us cleaner, more readable argument parsing code.
Another advantage of this approach is that it automatically generates
help menus, which means options will not be implemented without a help
entry (like --resume)

V2: - Does not remove deprecated options, only marks them as deprecated
V3: - Fixes deprecated warning for tests from V2 always being triggered

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Move re.compile for regex into Core

Move the re.compile into the core.Enivironment constructor, which
reduces code duplication. It also allows us to pass environment data on
initilization of the object, rather that having edit it's attributes
individually.

V2: - Does not remove deprecated options, only marks them as such
V3: - Fixes deperecated warning for tests from V2 always being triggered

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
framework: add a few more stderr strings to ignore
framework: document return value of ExecTest::run()
fbo-maxsize: minor test improvements

Clear the large FBO to a non-black color and probe for it in the
final test.

This uncovers a bug in Mesa's llvmpipe driver where we ran out of
bin commmand memory and skipped some tiles, leaving them black.

Setting the clear color to white (and actually clearing the FBO)
helps to detect that.
fbo-maxsize: use piglit_get_gl_enum_name()
Add a python generator for integer builtin function tests [v2]

Functions tested:
    abs, abs_diff, add_sat, hadd, rhadd, clz, clamp, mad_hi,
    mad_sat, max, min, mul_hi, rotate, sub_sat, upsample, mad24, mul24

Data Types tested:
   char, uchar, short, ushort, int, uint, long, ulong

Sizes tested:
   Scalar, Vector sizes 2/4/8/16

v2:
 - Move file into generated_tests and rename to generate-cl-int-builtins.py
 - Generate tests in cl/builtin/int (creating dir if necessary)
Plug the built-in test generator to the CL test list [v2]

v2:
 - Generate tests in the generated_tests directory tree at compile time
Eliminate code duplication in all.tests for depthstencil-render-miplevels

No functional change.

Reviewed-by: Eric Anholt <eric@anholt.net>
ext_framebuffer_multisample: skip negative-max-samples

If ARB_texture_multisample or ARB_internalformat_query are supported,
the limits and/or errors generated are different, so skip this test.

V2: - Emit a useful message when skipping.

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