arb_tessellation_shader: add compiler tests for barrier()

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
arb_tessellation_shader: add execution test for barrier

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
arb_tessellation_shader: add simple data passing tests

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
piglit-fbo: Move color buffer initialization code in to separate functions

This refactoring will make it easier to add the code for initializing
multiple renderbuffers / textures in following patches.

No functional changes in this patch.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
piglit-fbo: Add new variables to track multiple color attachments

New variables added here stay unused. They'll be used by the
following patches in this series.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
piglit-fbo: Enable the tests to create FBO with multiple color attachments

and replace the usage of 'attach_texture' in piglit tests with new method
of specifying color attachments.

Old method:
config.attach_texture = true;

New method:
config.num_rb_attachments = 0;
config.num_tex_attachments = 1;

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Add test to verify blitting to multiple render targets

Blitting is expected to happen in to all the draw buffers set
using glDrawBuffers().

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Add test to verify transform feedback values of few builtin variables

Builtin variables tested are gl_Layer and gl_ViewportIndex. The test
case verifies a bug fix in Intel's i965 drivers. It can be later
extended to add testing for more builtin variables.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
tests/all.py: Fix name of arb_tessellation_shader test

'/' is not allowed in the name of tests because it is the delimiter for
group names. This test includes '/' which causes the HTML summary to
render in odd ways.

v2: - use nested group structure rather than adding a test directly to
      the test list (Ilia)

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
tests/all.py: Add assertions for bad characters in test names

'/' is not allowed in test names since it is used as the separator for
groups.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
results.py: Add abstract backend class

This patch adds an abc for Backends, redefining the API that backends
(currently only JSONWriter) produce. In subsequent patches JSONWriter
will be adapted into a Backend derived class and one additional Backend
will be added, for writing JUnit xml.

This is a fairly substantial change, and deserves some explanation. At
Intel we are deploying Jenkins servers to assist our development team,
and piglit's native JSON format isn't supported by Jenkins. VMware
already uses JUnit to interface with Jenkins, but does so by converting
the native piglit JSON into JUnit, there are a couple of problems with
this solution. The biggest problem is that it requires extra time to
convert from one format to another, the second problem is that the
script used to do the conversion is not Python3 ready, or even close,
which is step forward that Intel would like to make. By converting
piglit to have an abstracted backend layer we remove the need to convert
piglit's JSON into another format, and we remove another roadblock
toward python3.

The goal of the Backend class it to present a fairly high level API that
is "just enough" API for piglit's use, not a feature complete general
purpose API as JSONWriter provides. This will make writing backends
simpler.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
python: Don't call methods that are not equivalent to Backend API externally

This patch removes external calls to JSONWriter methods that are not
part of the Backend API (or closely equivalent), since those methods
will be changed from public to protected.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
results.py: Change JSONWriter methods to be more like Backend

This changes initialize_json and close_json to be more like the
constructor and finalize methods of Backend.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
results.py: Make fsync a keyword argument

Since fsync is not relevant to all backends, changing it to file_fsync
makes it fit better into the Backend API

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
results.py: Change JSONWriter to take a string rather than file object

Since not every backend wants a file type not passing one is much nicer
than passing a file. In addition, it removes code duplication between
run and resume.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
results.py: Merge initialize_json into constructor

This moves the Initial metadata write into the constructor, like Backend
expects.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
results.py: Add write_test method

This is the test writing method provided by Backend.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
results.py: Mark numerous methods as protected

This marks open_dict, close_dict, write_dict_key, and write_dict_item as
protected (with a single leading underscore). Since these methods have
no external users and are not provided by the Backend API.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
results.py: Rename JSONWriter.close_json to JSONWriter.finalize

This makes the API consistant with Backend.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
results.py: change JSONWriter locking.

Use an RLock directly rather than synchronized_self.

This is simple because only the three public methods need to lock,
rather than half a dozen methods.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>