spec/ARB_copy_image: Add a simple ARB_copy_image test

This is a simple sanity test for the ARB_copy_image extension.  This tests
tests the different combinations of textures and renderbuffers for intputs
and outputs to glCopyTexSubImage.

v2: Incorperated comments from Brian Paul
v3: Also copy from the texture back onto itself to test yet another path

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
spec/ARB_copy_image: Add a test for testing different texture target combinations

This tests all of the possible different combinations of texture targets
such as GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_1D_ARRAY, etc.  The
only targets not tested are GL_TEXTURE_2D_MULTISAMPLE and
GL_TEXTURE_2D_MULTISAMPLE_ARRAY but those are special.

v2: Incorperated comments from Brian Paul and Dylan Baker

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
util: Add a function for uploading multisample textures

One of the greatest difficulties in properly testing multisample textures
is actually generating and working with reference images.  This adds a nice
little util function that allows you to upload a multisampled image as if
you were using glTexImage3D.

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
spec/ARB_copy_image: Test different combinations of texture formats

This tests glCopyTexSubImage on all of the allowed combinations of internal
texture formats.  This also tests multisample textures.

v2: Incorperated comments from Brian Paul and Dylan Baker
v3: Added multisample support and more formats
v4: Properly handle subtests that skip or warn instead of just pass/fail
v5: Test copying between different portions of the same image

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
spec/ARB_copy_image: Add an api_errors test
arb_texture_view: Fix bogus probe rects

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
arb_gpu_shader_fp64: test vector insert and extract operations

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
arb_gpu_shader_fp64: test constructor conversions with matrix

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
arb_explicit_uniform_location: test explicit location for a sampler

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82921
arb_tessellation_shader: Add tests covering handling of unsized arrays

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
run.py: Remove stray newlines

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
run.py: Split command parser out of run()

This change is necessary to be able to regression test the parser, which
has grown quite large and complicated. The unit testing of the parser is
necessitated by changes coming later in this series.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
python tests: Move helper from program_tests.py to utils.py

This class is useful in more than one module, so moving it to utils,
which is shared, is useful.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
program_tests.py: remove unused import

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
program_tests.py: fix bug reseting PIGILT_CONFIG

Currently the function that is supposed to reset core.PIGLIT_CONFIG
doesn't actually reset it, it does a comparison, which is meaningless.
This patch fixes that, and shows that there are actually two failures.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
programs_tests.py: Fix get_config() finds $HOME/.config/piglit.conf

This is a stupid bug, the test doesn't actually call the function to be
tested. Adding the function to actually test fixes the issue.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
core.py: Fix bug in get_config

A bug was introduced in 9e0c3ee1, this fixes it.

Because the get_config needs to find the piglit root, it has a hard
coded path to look for <current file>/../.. which worked when it was in
framework/programs/run.py, but in the mentioned commit the function was
moved to framework/core.py, a level down, so the hard coded path no
longer worked. This patch removes a '..', so the function now searches
for the right depth.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
program_tests.py: refactor into a single class

This is groundwork to allow some additional code sharing between the
tests.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
programs_tests.py: Remove duplicate teardown call

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
programs_tests.py: Move more code into a shared method

This adds a private method to TestGetConfig to allow more code sharing
between the tests.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>