ARB_shading_language_packing: Generate tests for builtin packing functions

This uses the existing pack/unpack testing infrasturcture for GLSL ES
3.0 and adds support for testing pack/unpack 4x8 operations.

Generate the following test files:
	{const,vs,fs}-{pack,unpack}{Snorm,Unorm}{2x16,4x8}.shader_test
	{const,vs,fs}-{pack,unpack}Half2x16.shader_test

Note that division is performed by multiplication by the reciprocal, and
1/255 falls almost exactly in between two representable float32 values,
leading to bad rounding errors. 1/127, 1/32767, and 1/65535 do not have
this behavior.

As a result, the {fs,vs}-unpackUnorm4x8 tests currently fail. the const-
version passes, since the divisions are calculated by the CPU. A
follow-on patch will allow some tolerance in precision.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
android: piglit-vbo.cpp compile error

Android is a bit more strict when it builds. Missing was ctype.h.
It doesn't break Linux.

Signed-off-by: Tom Gall <tom.gall@linaro.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
android: piglit-shader.c compiler error

A very minor change to fix build issue for Android. Needed return
statement at end of function which specifies a return type.

Signed-off-by: Tom Gall <tom.gall@linaro.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
android: piglit_ktx.c compiler error

A very minor change to fix build issue for Android. Needed return
statement at end of function which specifies a return type.

Signed-off-by: Tom Gall <tom.gall@linaro.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Test varying structs in GLSL ES 3.00.

This patch adds the following GLSL ES 3.00 tests:

- varying-struct-basic: a simple test case involving a single varying
  struct.

- varying-struct-arrays: exercise complex interactions between structs
  and arrays in varyings.

- varying-struct-copy-vs: exercise corner cases where a struct
  internal to a vertex shader is copied to a varying struct.

- varying-struct-copy-fs: exercise corner cases where a varying struct
  is copied to a struct internal to a fragment shader.

- varying-struct-interpolation: verify that interpolation qualifiers
  "flat" and "smooth" are inherited by the fields within a varying
  struct.

- varying-struct-centroid: verify that the interpolation qualifier
  "centroid" is inherited by the fields within a varying struct.

Note that "centroid" is tested separately from the other interpolation
qualifiers since MSAA is required to verify that it works correctly,
so it can't be tested with a simple shader_runner test.
shader_runner regression with gles

Augment the parser that examines the shader_test file passed in
with the test to determine which brand of shader_running to
execute, shader_runner, shader_runner_gles2, etc.

This fixes a bug where GLSL ES if first in the [required] section
could match against GL after which the wrong shader_runner command
would be used due to the wrong gl api being used.

Last if plain GLSL is found, GL is presumed as the api. If GLSL ES
is found, GL ES is presumed as the api.

When dispatch is implemented for GLES all this can go away.

Signed-off-by: Tom Gall <tom.gall@linaro.org>
WIP: varying struct xfb: basic-struct errors
WIP: varying struct xfb: basic-struct get