shader_runner: delay error for program link / use to piglit_display

To prepare for supporting negative linker tests.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
shader_runner: add support for a link-error command for negative tests

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
glsl-1.50: test for interface block type mismatch error

This tests to see if an interface block with a type mismatch
between the VS and FS causes a link error.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
glsl-1.50: add basic VS / FS interface block compiler tests

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
glsl-1.50: make sure 'in' interface blocks are rejected for VS

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
glsl-1.50: make sure 'out' interface blocks are rejected for FS

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
glsl-1.50: test interface blocks with GS

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.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.
    - Fixup for signature change of piglit_report_subtest_result.
    - Test some multisample array scenarios too.
    - Lookup enum names for some of the output, to make it easier to
        read.
    - Remove the bogus stencil texture case, it's not valid.
    - Skip subtests which can't work with the sample limits exposed
        by the driver, rather than just failing.

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>
texelFetch: add support for multisample targets

Allows verification of texelFetch with all six flavors of MS sampler.

- Put lod/sample_index in the fourth channel of the texture, so we
    can verify that the correct lod/sample was sampled.
- For multisample targets, render the test pattern rather than uploading
  it. GL won't let us do a direct upload into these texture targets, and
  the alternative (upload to a staging texture; copy to target) is
  even messier.
- Accept sample count as an extra parameter after sampler
- Add existing swizzle option to usage string
- Use smaller formats for multisample tests, to avoid running into some
  hardware limits.

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

Tests that glFramebufferTextureLayer produces the correct error for
layer < 0 when used with GL_TEXTURE_2D_MULTISAMPLE_ARRAY. This was
overlooked in the initial mesa implementation of
ARB_texture_multisample, and crashed deep in the driver instead.

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