piglit-util-gl-common: fix ES1 / ES2 build error

This patch #ifdef's out some enums from a switch statement when building
for ES API's.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
util: Add include guards in piglit_gl_framework.h.

Solaris Studio does not support "#pragma once".

Fixes build error with Solaris Studio.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
egl: Fix typo in piglit_expect_egl_error

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
egl_khr_create_context_profile: Verify that invalid profiles are rejected

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
egl_khr_create_context: Verify that the core profile is supported for Desktop GL 3.2

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
egl_khr_create_context_profile: Verify that the profile is ignored pre-3.2

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
draw-vertices-2101010: init color in piglit_draw

Initializes the vertex color back to white at the start of each frame.
Otherwise, the color set by the abi test is left set, corrupting
subsequent frames (the first two triangles end up being red rather than
white).

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Brian Paul <brianp@vmware.com>
piglit-dispatch: patch glDraw{Arrays,Elements}InstancedARB dispatch to accept ARB_instanced_arrays.

ARB_instanced_arrays specification says:

    Dependencies on ARB_draw_instanced

        If neither ARB_draw_instanced nor EXT_draw_instanced is
        supported, all references to instanceID should be removed from
        section 2.8.

        If ARB_draw_instanced is not supported, all references to
        gl_InstanceIDARB should be removed from section 2.8.  This
        extension will introduce the following additional New Procedures
        and Functions:

            void DrawArraysInstancedARB(enum mode, int first, sizei count,
                    sizei primcount);
            void DrawElementsInstancedARB(enum mode, sizei count, enum type,
                    const void *indices, sizei primcount);

This is a quick hack until glapi.json can allow a function to have
multiple categories.

Reviewed-by: Brian Paul <brianp@vmware.com>
egl_khr_create_context: Run tests concurrently

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
egl_khr_create_context: Don't specify the profile in the without-profile case

Reported-by: Chad Versace <chad.versace@linux.intel.com>
util: Fix result reporting on GLUT.

glut_fw.result was never being set, so all tests were passing.
tests/fbo-blit-stretch: add a 1x1 -> nxm stretch test case

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
all.tests: remove glean/teapot

It doesn't test anything.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Fix missing glu.h inclusions

The texgrad test has been completely broken because of this.
all.tests: add 2 missing, existing tests for float RG formats
texwrap: rework the test

- test all formats in an extension category in the automatic mode like
  the fbo tests do unless it's overriden on the command line, e.g.:
    ./texwrap GL_ARB_texture_float GL_RGBA32F
  THE INTERACTIVE MODE IS STILL IMPORTANT FOR THE OTHER OPTIONS THOUGH!!!
- divide the border color test entries in all.tests into the unswizzled and
  swizzled ones
- remove testing of the deprecated texture border
- reindent the code
- test sRGB texture formats (the compressed ones too)
- test all integer formats (EXT_texture_integer, ARB_texture_rg,
  ARB_texture_rgb10_a2ui)
- test the texture border color with integer formats
texwrap: Avoid FLOAT/UINT/INT symbols.

As these clash with symbols from windows.h.

Quick fix to get Windows builds going again.
piglit: fix crashes when using original GLUT

The glutInit() function in the original GLUT expects argv[0] to be the
program name (as from main()), not a NULL pointer.  A strrchr() call
crashes on NULL.

For now, set argv[0]="piglit".  Previously, glutInit would get the
program path/name and it would appear in the window title.

This seems to be a regression since the waffle changes.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
cl: Add scalar-load-uchar test

Reviewed-by: Blaž Tomažič <blaz.tomazic@gmail.com>
cl: Add scalar-load-float test

Reviewed-by: Blaž Tomažič <blaz.tomazic@gmail.com>