piglit-run.py: Fix a few PEP8 issues that snuck in

This is purely formatting changes with no functional changes.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
GL 3.2: Test gl_Layer when unassigned or no geometry shader

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
[jordan.l.justen@intel.com: fix compiler error in gs source]
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
GL 3.2: Test gl_Layer with non layered texture.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
[jordan.l.justen@intel.com: fix compiler error in gs source]
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
GL 3.2: Test gl_Layer maps to correct cube map face.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
[jordan.l.justen@intel.com: fix compiler error in gs source]
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
GL 3.2: Test gl_Layer render to layered attachements

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
[jordan.l.justen@intel.com: fix compiler error in gs source]
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
GL 3.2: Test glFramebufferTexture

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
depthstencil-render-miplevels: use double-buffered visual

This allows the depth textures to properly display on all systems
when run in non-automatic mode.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
framework: stop copying dma buffer source padding

Fixes a bug spotted by Chad.

The initial support allowed the stride of the source content in
the dma buffer creation to have some padding but it had to be
less than the padding in the target dma buffer being created.

Moreover the implementation also unnecessarily copied any
padding present in the source to the destination. By copying
only the actual pixel values one not only fixes this but also
allows the source to have greater padding than the destination.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
arb_shader_bit_encoding: Generate tests for 3.30, not 4.00.

I was generating GLSL 4.00 tests because that's when ARB_gpu_shader5
functionality was folded in, but 3.30 is actually the first version with
the bit encoding functions.
gs: Check GL errors in primitive-id-restart test.

Previously, if drawing failed due to a GL error, no primitives would
be generated, so the test would have nothing to check, and it would
erroneously pass.  Avoid that by checking for GL errors at the end of
the test.
glut framework: skip if implementation doesn't support required GL version.

In effect, we are already doing this when Waffle is in use, since
Waffle uses a context creation mechanism that ensures that the context
won't be created if the implementation doesn't support the GL version
needed by the test.  But for GLUT we need to do the check manually,
since GLUT always just creates the highest GL version context it can.
gs: Don't try to use gl_PerVertex when redeclaring fragment shader inputs.

In commit 5b1dff3 (Geometry shaders: Test gl_ClipDistance input (GLSL
1.50)) I accidentally used this syntax to redeclare the
gl_ClipDistance fragment shader input:

    in gl_PerVertex {
      float gl_ClipDistance[8];
    };

This is incorrect--gl_PerVertex is only meaningful in vertex and
geometry shaders.  In fragment shaders gl_ClipDistance isn't in any
interface block.

v2: don't forget the "in" keyword.
Test that in/out qualifiers are required when redeclaring gl_ClipDistance.

Although it is not explicitly stated in the GLSL spec, all examples of
redeclaring built-in in/out variables (such as gl_ClipDistance)
include the "in" or "out" qualifier, so it seems like failure to do so
should cause a compile error.

At present:

- Mesa (as of commit a50c5f8) does not generate an error.

- The NVIDIA proprietary driver for Linux (version 313.18) does not
  generate an error; however, if gl_ClipDistance is redeclared in the
  fragment shader without specifying the "in" keyword, it fails to
  work properly.
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.
built-in-constants: don't try to create GS with version < 150.

Previously, built-in-constants looked at required_glsl_version to
determine what to include in the "#version" directive, but it looked
at glsl_version (the maximum version supported by the implementation)
to decide whether to test geometry shaders.  As a result, it when
testing a built-in constant whose required_glsl_version was less than
150, it would try to create a geometry shader using a "#version"
directive less than 150, leading to GL errors.

This patch prevents the problem by only testing geometry shaders when
required_glsl_version >= 150.