arb_texture_multisample: add test for sampling from depth

This demonstrates an i965 bug, where hiz resolves for MSAA surfaces
don't work (on BLORP platforms).

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
cl: Add test for clCreateProgramWithBinary() v3

v2:
  - Fix filename in doxygen comments
  - Remove redundant binary status check.

v3:
  - Add test cases for passing binary programs to clBuildProgram() and
    clCompileProgram().

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
cl: fix clGetKernelWorkGroupInfo

If there is only one device associed with the kernel and device arg is NULL
you don't have to trigger CL_INVALID_DEVICE

v2:
Test for CL_SUCCESS instead of disabling it (Jan Vesely)

Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
arb_copy_image-formats: Initialize variable.

Fixes GCC maybe-uninitialized warning.

formats.c:560:11: warning: 'gtype' may be used uninitialized in this function [-Wmaybe-uninitialized]
   snprintf(fs_src, sizeof(ms_compare_fs_source),
           ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
gl-1.0-fpexceptions: #ifdef out unused functions.

Silences GCC unused-function warnings.

fpexceptions.c:149:1: warning: ‘make_denorm_double’ defined but not used [-Wunused-function]
 make_denorm_double(double *dest, int sign, int mantissa)
 ^
fpexceptions.c:167:1: warning: ‘make_signaling_nan_double’ defined but not used [-Wunused-function]
 make_signaling_nan_double(double *dest)
 ^
fpexceptions.c:173:1: warning: ‘make_quiet_nan_double’ defined but not used [-Wunused-function]
 make_quiet_nan_double(double *dest)
 ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Laura Ekstrand <laura@jlekstrand.net>
cmake: Require Visual Studio 2013.

Verified that cmake aborts with MSVS 2012.

https://bugs.freedesktop.org/show_bug.cgi?id=85528

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
tests/util: Centralize MSVC max/min macros workarounds.

undefining max/min seems unavoidable, but at least it can be done in a
single place.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
tests/util: INFINITY/NAN are defined on MSVC 2013.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
tests/util: Consolidate the MSVC ffs implementations.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
tests/util: MSVC 2013 already defines va_copy macro.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
tests/util: Define snprintf as _snprintf on MSVC.

As the semantics of sprintf_s's arguments are quite different, so code
that relies on it might misbehave.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
cmake: Warn when variable length arrays are used.

As these are not supported on MSVC, not even MSVC 2013 since it only has
library support for C99, it doesn't actually support C99 syntax.

Suggested by Jan Vesely.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
cmake: Fix GCC -Wvla flag check.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86045
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
glsl-es-3.00: test for 'invariant(all)' usage in a fragment shader

This test fails on the current Mesa driver.

v2: add spec citation (Ian Romanick)
v3: move #version directive (Dylan)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glsl-es-1.00: add invariance tests for builtin variables

These tests fail on current Mesa driver.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
registry: Update gl.xml

This replaces the old gl.xml (Revision 26792) with the latest gl.xml from
Khronos (Revision 28929, downloaded on 2014-11-10 from
https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public).

This also updates the python parser, gl.py, to
handle command parameters with an array suffix (see uint baseAndCount[2] in
glPathGlyphIndexRangeNV, for example).  Moreover, gl.py no longer looks for
two types of errors in the gl.xml file because the new gl.xml file does not
contain these errors.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Tested-by: Chad Versace <chad.versace@linux.intel.com>
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.