arb_separate_shader_object: Silence GCC maybe-uninitialized warnings.

ValidateProgramPipeline.c:345:25: warning: 'prog_tes' may be used uninitialized in this function [-Wmaybe-uninitialized]
  build_and_validate_pipe(pipe, true,
                         ^
ValidateProgramPipeline.c:345:25: warning: 'prog_tcs' may be used uninitialized in this function [-Wmaybe-uninitialized]
ValidateProgramPipeline.c:383:26: warning: 'prog_vs_gs' may be used uninitialized in this function [-Wmaybe-uninitialized]
   build_and_validate_pipe(pipe, false,
                          ^
ValidateProgramPipeline.c:345:25: warning: 'prog_gs' may be used uninitialized in this function [-Wmaybe-uninitialized]
  build_and_validate_pipe(pipe, true,
                         ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
ext_transform_feedback: Silence GCC maybe-uninitialized warning.

Fixes this GCC warning.

api-errors.c:401:21: warning: 'progs[1]' may be used uninitialized in this function [-Wmaybe-uninitialized]
   glUseProgramStages(pipes[1], GL_VERTEX_SHADER_BIT, progs[1]);
                     ^
api-errors.c:214:9: note: 'progs[1]' was declared here
  GLuint progs[2];
         ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
glx-close-display: Fix GLX_DOUBLEBUFFER attrib.

https://www.opengl.org/sdk/docs/man2/xhtml/glXChooseFBConfig.xml states
that

  "GLX_DOUBLEBUFFER Must be followed by True or False."

No idea how this ever passed given the buffer overflow that ensued.
glx_ext_create_context_es2_profile: Update versions.

Tested with NVIDIA drivers.
cl: add tests for clCompileProgram

v2:
Use clBuildProgram to create to program to attach kernel to
cl: fix doxygen filename
cl: fix test name
cl: add CL_MEM_HOST_* releated tests
cl: split CL10/CL11+ optimization options testing

because -cl-strict-aliasing options argument to
clBuildProgram is no longer supported in OpenCL 1.1.
ext_transform_feedback: Silence GCC -Wmaybe-uninitialized warning.

Fixes this GCC maybe-uninitialized warning.

intervening-read.c: In function 'piglit_init':
intervening-read.c:225:17: warning: 'gs' may be used uninitialized in this function [-Wmaybe-uninitialized]
   glAttachShader(prog, gs);
                 ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
glx-query-drawable: Use visual depth when creating pixmap.

Prevents BadValue being raised during X_CreatePixmap when testing with
vncserver, which unfortunately seems to refuse creating 32 depth
visuals.

Trivial.
results.py: remove unused import

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
results.py: Allow partially completed runs to be summarized

This restores the ability to create a summary from a partial set of
runs by using the same functionality as resume.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Tested-by: Dave Airlie <airlied@redhat.com>`kj:x
glsl-1.10: check that mul source is used before dest is written

r600 cayman (currently) has a bug on cayman because each component is
multiplied separately when constants are used, but the destination gets
modified before all of the source is read out. This test reproduces that
scenario where it will read the first .x correctly, but for the y
component, it will read the "new" x.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Add a test using gl_VertexID with glPolygonMode(GL_POINT)

This currently exposes a bug in the i965 driver.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84677
Add a test for GLX_ARB_context_flush_control

The test takes the following steps using two threads. The threads are
only used so it can operate on another context without having to
rebind it. The threads are run lock-step so that each step is run
sequentially.

Thread 1: Make a flushless context A
Thread 1: Make a flushy context B, shared with A
Thread 1: Make a flushy context C, shared with A
Thread 1: Bind context A
Thread 2: Bind context C
Thread 1: Make a renderbuffer.
Thread 1: glClear() it to green.
Thread 1: glFinish()
Thread 1: glClear() it to red.
Thread 2: Do a glReadPixels()

(At this point the GL implementation is allowed to have finished
the clear to red but it probably won't have. If the read pixels
returns green here then it's not a failure but the test won't work
so it will report PIGLIT_SKIP)

Thread 1: Bind context C
Thread 1: sleep(.5)
Thread 2: Make sure glReadPixels() is still green, otherwise fail.

All of the steps are then run again but this time context A is made
flushy and the last step ensures that the pixel becomes red instead
of green. If it did become red then the GL successfully made a
flush when context A was released.

The test also verifies that calling glGetIntegerv with
GL_CONTEXT_RELEASE_BEHAVIOR returns the expected value when setting
the attribute to none and flush and also when the attribute is left
out entirely.
glsl-1.20: Add tests exposing some crashes with const arrays

I stumbled across these while implementing tessellation. In particular,
the first test is a cutdown version of the tessellation nop.shader_test.

The crash in array-initializers-1 is caused by the lowering of const arrays to
uniforms. The hidden uniforms for both are named 'constarray', and a
later phase in the linker gets horribly confused when it tries to look
them up by name.

I have not yet usefully characterized the crash in double-indirect-1,
other than that it is in the i965 backend rather than in the GLSL
compiler.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
arb_arrays_of_arrays: geometry shader tests

V2: Added Nvidia results to commit message

Test results are from the following hardware/driver combination:

AMD Radeon HD 6670 - Catalyst 13.251 OpenGL 4.3
Nvidia Geforce GTX 570 - 340.24 OpenGL 4.4

The Nvidia results do not always mean what they are intended
to (e.g. passing for the wrong reason) as the driver doesn't
allow multi dimensional arrays of interface blocks even
though the spec says they are allowed. I've indicated these
tests with a *

gs-input-sizing-consistent-with-prev-length-blocks.geom
AMD: pass
Nvidia: fail*

gs-input-sizing-consistent-with-prev-length.geom
AMD: pass
Nvidia: pass

gs-input-sizing-implied-length-blocks.geom
AMD: pass
Nvidia: fail

gs-input-sizing-implied-length-consistent-with-prev-usage-blocks.geom
AMD: pass
Nvidia: fail*

gs-input-sizing-implied-length-consistent-with-prev-usage.geom
AMD: pass
Nvidia: pass

gs-input-sizing-implied-length-inconsistent-with-prev-usage-blocks.geom
AMD: fail
Nvidia: pass*

gs-input-sizing-implied-length-inconsistent-with-prev-usage.geom
AMD: fail
Nvidia: fail

gs-input-sizing-implied-length.geom
AMD: pass
Nvidia: fail

gs-input-sizing-inconsistent-blocks-invalid.geom
AMD: fail
Nvidia: pass*

gs-input-sizing-inconsistent-blocks-valid.geom
AMD: pass
Nvidia: fail*

gs-input-sizing-inconsistent-invalid.geom
AMD: fail
Nvidia: pass

gs-input-sizing-inconsistent-valid.geom
AMD: pass
Nvidia: pass

gs-output.geom
AMD: pass
Nvidia: fail*

gs-redeclares-pervertex-in-as-array-of-arrays.geom
AMD: fail
Nvidia: pass*

gs-redeclares-pervertex-in-as-array-of-arrays2.geom
AMD: fail
Nvidia: pass*

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Ported logicop test from Glean to Piglit.

Reviewed-by: Dylan Baker <dylanx.c.baker@intel.com>
Removed Glean logicop test.

Reviewed-By: Glenn Kennard <glenn.kennard@gmail.com>