Major rework

This allows us to get rid of the GLib/GIO dependencies and generally
removes any remnants of the GStreamer plugin ancestry.

In order to make it easier to test various combinations of test-cases, a
dynamic pipeline is introduced which can be created by specifying a list
of stages on the command-line.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Add simple deinterlace and color-correction stages

The deinterlacer uses a simple linear algorithm and color-correction
uses a combination of additive and multiplicative correction.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Display megatexels per second in summary

Since the textures are mapped 1:1 to screen space, the number of texels
processed is equal to the number of pixels displayed. The value shown is
the number of megatexels that are processed through the given pipeline
and not the absolute throughput (which would be dependent on the number
of stages in the pipeline).

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Properly align output

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Use generated subdivided geometry

Assuming that color correction is always performed as the final stage,
use programmatically generated geometry with a given number of
subdivisions specified on the command-line.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Allow transformation of the output geometry

Specifying the -t, --transform option on the command-line causes the
output geometry generated in the color correction stage to be modified
by adding random offsets to the x and y coordinates of vertices. This
is useful to simulate the effect of geometric adaption on the shader
performance.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Make -r, --regenerate option work

In order for options to be properly parsed by getopt_long(), they need
to be listed in the optstring argument in addition to the options array.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Update usage message

Replace test-cases by available pipeline stages and add missing command-
line options.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Do not indent output

The run-tests.sh wrapper script can do the indentation itself. This
allows the testbench to output at column 1 when run standalone instead
of indenting output in a confusing way.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Reorganize code

Split off pipeline implementation and geometry generation and move
pipeline stages to their own files. While at it, allow pipeline stages
to use an arbitrary geometry and split grid generation from grid
randomization to support the --transform command-line option with
externally defined pipeline stages. If this option is specified, the
final stage will be rendered using the transformed geometry to simulate
geometric adaption.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Add copy-one filter

This filter is useful to test the influence of hardware caches on shader
performance. It copies the pixel at the center of the source texture to
all pixels of the destination texture.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Add clear generator

This generator simply fills the target texture with a uniform color
using glClear().

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Enable tests 2 and 4

The pipeline stages that are required for these tests (copyone, clear)
are now available again, so they can be reenabled.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Remove unused external shaders

The shaders are now integrated with the source files of the pipeline
shaders, which allows the testbench to be run standalone and outside of
the source tree.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Alternate colors in clear generator

This is somewhat useful to check that the OpenGL ES implementation
doesn't optimize anything away and also provides visual feedback that
something is actually happening.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Fix single stage pipeline generation

When a pipeline is only composed of a single stage, don't remove that
stage even if regeneration is not requested.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Remove blank lines

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Allow tests to run on HDMI or LVDS

Specifying --hdmi or --lvds will cause the run-tests.sh script to
configure the HDMI or LVDS outputs. Note that this currently assumes
that two outputs (HDMI-1 and LVDS-1) are available and choosing one
explicitly causes the other one to be turned off.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Add --subdivisions and --transform options

These options can be used to specify the number of subdivisions to be
used for geometric adaption and whether to enable transformation of the
geometry.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Wait for X server to shutdown

When shutting down the X server at the end of a test series, wait until
it has stopped by watching for /tmp/.X0-lock to disappear. Otherwise it
can happen that we try to run another series of tests, which will fail
because it detects that another X server is still running.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>