shader_runner: Alter GL/GLSL ES version requirement syntax.

The current syntax isn't compatible with the same shader_test
supporting GL and GLES in the future.

Modify existing GL ES tests to use the new syntax, and remove
explicit #version directives, which will instead be inserted based on
GLSL >= requirements.

v2 Added check for trailing chars. Formatting.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Tom Gall <tom.gall@linaro.org>
Accept array uniform names with or without [0] from glGetActiveUniform

This is required by OpenGL ES 3.0 and desktop OpenGL 4.2.  Previous
version were ambiguous.

Previously these tests failed on NVIDIA's closed-source driver (version
304.64) with the error messages:

    0: f1 loc=0 size=1 type=0x1406
    1: f2 loc=1 size=1 type=0x1406
    2: s.a loc=2 size=1 type=0x1406
    3: s.b loc=3 size=1 type=0x1406
    4: s.c loc=4 size=1 type=0x1406
    5: s.d loc=5 size=1 type=0x1406
    6: v[0] loc=6 size=3 type=0x8b52
    getuniform-02: wrong type for 'v' (found 0x8b52, expected 0x1406)

and

    Unexpected max active uniform length (saw 9, expected 6)
    Unexpected active uniform length (saw 8, expected 5) for "color[0]"

With these changes, both tests pass.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
arb_texture_multisample: add cmake plumbing

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
arb_texture_multisample: new minmax test

Verifies new minimum maximums in ARB_texture_multisample:

GL_MAX_COLOR_TEXTURE_SAMPLES >= 1
GL_MAX_DEPTH_TEXTURE_SAMPLES >= 1
GL_MAX_INTEGER_SAMPLES >= 1
GL_MAX_SAMPLE_MASK_WORDS >= 1

V2: - Don't specify the window size; we don't render anything
      so we don't care.
    - Use piglit_minmax_pass so we actually fail the test if things
      are broken.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
arb_texture_multisample: new test for fb configs

This tests FBO setup with various combinations of multisample textures
and `classic` multisample renderbuffers, and for each, checks:

- That the renderbuffers or textures can be created
- Completeness status

If the configuration is expected to work, additionally:
- Actual sample count >= requested sample count
- Sample positions meet spec requirements (all obtainable, and in [0,1]

Covers the fixedsamplelocations and sample count consistency
requirements in the spec.

V2: - Don't specify window size, we don't care.
    - Add comment about internalformat defaulting.
    - Don't specify dims, sample count per attachment; attachment
      is either multisampled or not, dims are always the same.
    - Report each config result using subtests
    - Support testing different sample counts, and test 2/4/6/8/16
        samples in all.tests. Unsupported sample counts are skipped.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
arb_texture_multisample: new test for teximage state

This tests that the new teximage state added in ARB_texture_multisample
exists and has correct defaults for non-multisample textures:

    - GL_TEXTURE_SAMPLES = 0
    - GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = true

V2: Don't specify window size, we don't care.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
arb_texture_multisample: new tests for sample mask

Adds tests for sample mask:

- Initial state
- Fetching of each sample mask word
- Execution test via rendering with various masks to a multisample FBO,
  then downsampling via glBlitFramebuffer and checking the result.

V2: Don't specify window size when we don't care

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
arb_texture_multisample: add new sampler targets to textureSize

Covers use of the textureSize() glsl builtin with multisample samplers

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
arb_texture_multisample: add test for texelFetch()

Writes a test pattern to individual samples in a multisample texture,
and tests texelFetch() reads the correct values for each sample.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
rude hack: use smaller formats in texturing tests.

RGBA32I, RGBA32UI, and RGBA32F are huge and
unsupported for multisample textures on at least Gen6 i965.

This shouldn't be committed as-is, but it allowed for testing of
multisample samplers with the generic textureSize() test.

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