tests/all.py: Fix bug that erases tests

Previously spec['glsl-3.30'] was initialized to {} twice, meaning all
tests added before the second assignment were discarded.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
python: change she-bang to python2

This replaces #!/usr/bin/env python with #!/usr/bin/env python2, which
fixes the build on archlinux. This has been proposed before, but at that
time debian didn't provide a python2 executable, so it would break
debian. Debian sid as of today provides python2.

v2: - fix piglit as well

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
tests/igt.py: fix various pylint warnings

v2: Change comparisons with None from "==" to "is" (Dylan Baker)

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
cl: Add TRUE definition with type dependent value for generated tests

Scalar true is 1, but vector true is -1.

This means that getValue needs to know if we are requesting TRUE for
a scalar or vector.

Signed-off-by: Aaron Watry <awatry@gmail.com>
cl: Add isgreater(float, float) relational tests

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
cl: Add isgreaterequal(float, float) relational tests

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
cl: Add isnotequal(float, float) relational tests

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
cl: Add isequal(float) relational tests

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
cl: Add 3-arg TTS kernel type

For built-ins with (vec, vec, scalar) arguments (such as mix)

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
cl: Add mix tests

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
cl: Add signbit(float) relational tests

Also, while doing this, needed to add a NEGNAN define to genclbuiltins.py because
python just prints nan for float("-nan") when generating tests.

cl-program-tester can handle -nan as an input correctly, so just pass the value
through as a string without python attempting to handle it.

v2: Add nan and -nan tests

Signed-off-by: Aaron Watry <awatry@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
CC: Tom Stellard <thomas.stellard@amd.com>
Add a test to reject semicolons after #extension.

Mesa's main GLSL lexer currently falls through to flex's fantastic
"print unknown tokens to the screen" case in the PP start condition,
resulting in random semicolons in your output when you compile shaders.

These semicolons are not legal, as far as I can tell, so we should
reject them.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
arb_fragment_layer_viewport: add an initial batch of tests

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
shader_runner: Add support for layered framebuffer

This allows attaching an entire 2darray texture as a layered
framebuffer.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
shader_runner: Support creating uninitialized 2d array textures

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
arb_fragment_layer_viewport: Add tests for FS reading correct values

This covers both in-range and out-of-range cases.

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