cl: fix 64bit-integer reading

"int-definitions.cl" uses a 64bit-integer 18446744073709551615.

  in "tests/cl/program/execute/compiler_long_mult.cl",
	[test]
	name: Long Definitions
	kernel_name: test_long
	arg_out: 0 buffer long[3] 9223372036854775807 \
				  -9223372036854775808 \
  HERE->			  18446744073709551615

That integer was read by "strtoll()".

in "tests/cl/program/program-tester.c",
 int64_t
 get_int(const char* src)
 {
       if(regex_match(src, REGEX_FULL_MATCH(REGEX_INT))) {
HERE->     return strtoll(src, NULL, 0);

But,
  strtoll("18446744073709551615", NULL, 0) == 9223372036854775807

This patch fixes the bug.

Signed-off-by: Homer Hsing <homer.xing@intel.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
framework: don't report failed cases as PASS

If in multiple subtests, first failed, last passed, then subtests
was looked as "passed". Because "interpretResult" function overwrote
previous results. See framework/exectest.py, interpretResult():

	     if piglit.startswith('subtest'):
		 if not 'subtest' in results:
		     results['subtest'] = {}
HERE->           results['subtest'].update(eval(piglit[7:]))

For instance, if test result was
 ["subtest {'clz char1' : 'fail'}", "subset {'clz char1' : 'pass'}"]
then results['subtest'] would be 'pass'.

"doRun" function also overwrote old results. See framework/core.py,

         if 'subtest' in result and len(result['subtest'].keys()) > 1:
             for test in result['subtest'].keys():
HERE->           result['result'] = result['subtest'][test]

Thus if some subtests failed, but others passed, then final result might
be "PASS".

This patch fixes the bug. For example, if we have the follow subtest
results in order: "pass, warn, fail, crash"; then the final result will
be "crash". And "skip" will not overwrite "pass".

version 2: order is: skip, pass, warn, fail, crash.

Signed-off-by: Homer Hsing <homer.xing@intel.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: Fix bug in testpage html regeration

The bug showed up in that test pages linked back statically to the
index.html page, which is a problem if you want to move the html
structure around and use the in page navigation. The patch corrects that
by using path.relpath to make the paths relative.

Reported-by: Kenney Phillis <kphillisjr@gmail.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
glsl-1.40: Don't use embedded structure definitions

NVIDIA's compiler (304.64 on a GTX 260) generates the error messages:

0(5) : error C7539: GLSL 1.20 does not allow nested structs
0(9) : error C7539: GLSL 1.20 does not allow nested structs

Mesa's compiler was even generating the error messages:

0:7(2): error: embedded structure declartions are not allowed
0:13(2): error: embedded structure declartions are not allowed

The tests passed without this patch on AMD (Catalyst Legacy 12.06 on a
Radeon HD 3650).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Tested-by: Kenneth Graunke <kenneth@whitecape.org>
arb_uniform_buffer_object: Add UBO from vs-struct-pad tests

The vs-struct-pad and fs-struct-pad tests both fail on Mesa.  The UBOs
from those tests are added here to help narrow down the origin of the
problem.

This test fails on NVIDIA (304.64 on GTX 260), but it passes on AMD
(Catalyst Legacy 12.06 on a Radeon HD 3650).  The NVIDIA driver
generates {0, 4, 8, 12} for the offsets of ubo1.  Mesa generates the
same (incorrect) offsets.

v2: Added spec quotation to justify the {0, 16, 20, 24}
alignments. Suggested by Paul.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Tested-by: Kenneth Graunke <kenneth@whitecape.org>
GL_ARB_texture_compression/invalid_formats: Add GL_OES_compressed_ETC1_RGB8_texture

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Tested-by: Anuj Phogat <anuj.phogat@gmail.com> (on NVIDIA closed-source)
GL_ARB_texture_compression/invalid_formats: Allow some formats to be optional

There are some compressed formats that the spec doesn't seem to require
implementations to advertise via GL_COMPRESSED_TEXTURE_FORMATS.  No
formats are yet marked as optional.  The next two patches will add that.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Tested-by: Anuj Phogat <anuj.phogat@gmail.com> (on NVIDIA closed-source)
GL_ARB_texture_compression/invalid_formats: Add ETC2 / EAC formats

These formats are dragged into desktop OpenGL via
GL_ARB_ES3_compatibility or OpenGL 4.3.  The extension spec says nothing
about whether or not these must be advertised via
GL_COMPRESSED_TEXTURE_FORMATS.  The OpenGL 4.3 spec requires these
formats, but it says that GL_NUM_COMPRESSED_TEXTURE_FORMATS must be at
least 0.

NVIDIA's driver advertises them, but Mesa currently does not.  Since no
hardware supported by Mesa natively handles these formats, we'd rather
not advertise them.  Classify them as optional.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Tested-by: Anuj Phogat <anuj.phogat@gmail.com> (on NVIDIA closed-source)
GL_ARB_texture_compression/invalid_formats: Mark BPTC formats as optional

NVIDIA's driver doesn't expose these formats, and nothing in the
ARB_texture_compression_bptc extension spec or OpenGL 4.2 spec seem to
require they be advertised.

With this patch, NVIDIA is closer to passing this test.  However, they
also advertise the GL_OES_compressed_paletted_texture formats without
advertising the extension.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Tested-by: Anuj Phogat <anuj.phogat@gmail.com> (on NVIDIA closed-source)
Make indentation in all.tests PEP8-compliant.

Re-indented the file using the script
https://github.com/stereotype441/mesa-tools/blob/master/fix-indentation.py.
This is the same script I used for
http://cgit.freedesktop.org/mesa/mesa/commit/?id=99802519b47983be8301a0283f2946a44a9656a5
("glapi: Reformat python code generation scripts to use 4-space
indentation.")

Only whitespace differences.
util: Add piglit_build_simple_program_unlinked().
Make use of piglit_build_simple_program_unlinked() in some tests.
gs: Test that geometry shader inputs must be arrays.

v2: Additional tests.
gs: Test that geometry shader input declaration rules don't apply to outputs.
gs: Test EndPrimitive() functionality.
gs: test all input primitive types.

Verified using the NVIDIA proprietary driver for Linux.
!UPSTREAM: Test core GS inputs on GLSL 1.50

TODO:
- Make this work.