glsl-es-1.00: sanity.shader_test fragment needs default precision

GLSL ES 1.00 spec 4.5.3 page 36:
"The fragment language has no default precision qualifier for
floating point types."

Adding default precision for float in the fragment shader
so this sanity testcase doesn't error out.
mediump is choosen since according to 4.5.2 page 34:
"The fragment language requires any uses of lowp and mediump to
compile without error.  Support for highp is optional."

Signed-off-by: Tom Gall <tom.gall@linaro.org>
Reviewed-by: Stuart Abercrombie <sabercrombie@chromium.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
new test: glsl-fs-uniform-array-loop-unroll.shader_test

In a loop, access past the end of a uniform array, to check
if stages after loop unrolling can handle the bad access.

Reproduces https://bugs.freedesktop.org/show_bug.cgi?id=59429

Signed-off-by: Frank Henigman <fjhenigman@google.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Test interaction of primitive restart and transform feedback.

v2: Fix "written" subtest (which was testing the wrong query).

Reviewed-by: Eric Anholt <eric@anholt.net>
util: Create generic piglit_draw_rect() functions.  TODO: rework.

This patch adds the following functions to piglit-util-gl-common:
- piglit_draw_rect_generic
- piglit_draw_rect_back_generic
- piglit_draw_rect_z_generic
- piglit_draw_rect_tex_generic

These functions are similar to corresponding functions without the
"_generic" suffix, except that instead of delivering vertex position
and texture coordinates to the vertex shader using glVertexPointer()
and glTexCoordPointer(), they deliver to the generic attributes
PIGLIT_ATTRIB_POS and PIGLIT_ATTRIB_TEX.  These functions use VBO's
and VAO's when available, so they may be used when testing core
contexts.

These functions also work with compatibility contexts and with all
GLES versions.  Since GLES1 doesn't support generic vertex attributes,
we fall back to using glVertexPointer() and glTexCoordPointer() in the
GLES1 case.

When building GLES tests, the behaviour of the new _generic functions
is for all intents and purposes the same as that of the pre-existing
non-generic functions.  So to avoid code duplication, the non-generic
functions simply call their generic equivalents in GLES builds.
WIP: primitive restart draw mode test

TODO: improve initial commentary
WIP: start testing GS in/out types
WIP: fix shader_runner error reporting when vertex data included.
WIP: Basic test of GS input varyings