arb_internalformat_query-minmax: add more version/ext checking

The valid_formats[] list includes formats supported either by
GL 3.0 or GL_EXT_texture_float and GL_EXT_texture_rg.
ext_texture_array/compressed: check for GL_EXT_texture_array

We obviously should require this extension.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
builtin_functions.py: tweak integer constants

This fixes some misleading fs-op-div-* failures when the driver does
integer arithmetic with floating point.  When we compute the reciprocal
of some integers we wind up with inexact floating point results.  So
expressions like X/X result in 0.9999 or such.

This patch tweaks the generator code to use some "nicer" integers
so that X/X comes out as expected.

Note the GLSL 1.10 spec, section 4.1.3:
"However, there is no requirement that integers in the language map to
an integer type in hardware. It is not expected that underlying hardware
has full support for a wide range of integer operations."
texsubimage: use piglit_get_gl_enum_name()
arb_explicit_location: Add tests without the extension enabled

Make sure that the correct error is generated.  The second 1.30 version
and the 1.40 of the test ensure that layout() exists at all by using a
different extension (or GLSL version).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
framework: Fix mis-indentation of the test changes computation.

b66f365f23a5b6b31a1b3f6c5bb13d3983de2443 appears to have accidentally
indented this code, so that we would calculate the changes from the
1st to 2nd result again when looking at the 3rd result.

Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
framework: Make the set of tests per page always be a set.

Starting with appending to the dictionary entry as a list, then making
the entry into a set later is pretty weird.  Just always use a set.

Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Test unsized arrays in interface blocks

These tests verify that unsized arrays appearing inside interface
blocks obey the same rules as unsized arrays appearing outside
interface blocks.  Namely, their size is inferred from the largest
constant integer index used to access them across all compilation
units for the same shader stage, and this inferred size is used to
validate that interface blocks are properly matched between one shader
stage and the next.
glsl-1.50: Test compilation of interface blocks containing unsized arrays.

Although it's not explicitly stated in the GLSL 1.50 spec, unsized
arrays are allowed in interface blocks.

section 1.2.3 (Changes from revision 5 of version 1.5) of the GLSL
1.50 spec says:

    * Completed full update to grammar section.  Tested spec examples
      against it:

      ...

      * add unsized arrays for block members

And section 7.1 (Vertex and Geometry Shader Special Variables)
includes an unsized array in the built-in gl_PerVertex interface
block:

    out gl_PerVertex {
        vec4 gl_Position;
        float gl_PointSize;
        float gl_ClipDistance[];
    };

Furthermore, GLSL 4.30 contains an example of an unsized array
occurring inside an interface block.  From section 4.3.9 (Interface
Blocks):

    uniform Transform {  // API uses "Transform[2]" to refer to instance 2
        mat4           ModelViewMatrix;
        mat4           ModelViewProjectionMatrix;
        vec4           a[];  // array will get implicitly sized
        float          Deformation;
    } transforms[4];

This patch adds compiler tests to verify that in and out blocks can
contain unsized arrays.

Verified using the NVIDIA proprietary driver for Linux.
Test accuracy of dFdx and dFdy functions.

Mesa/i965 currently (as of commit 1cc3b90) has an inaccurate
implementation of dFdy() which produces the same results for every
pixel in an aligned 2x2 block.  This piglit test exposes the
inaccuracy.
gs: Test core GS inputs on GLSL 1.50
gs: Test corner case for triangle strip ordering with primitive restart.

Verified using the NVIDIA proprietary driver for linux.