ARB_texture_view: Test for API coverage of subset of input params

Tests GL_ARB_texture_view  and validity of input parameters.
Use both valid and invalid parameters, although mostly invalid
parameters are tested  since other tests will use valid parameters.
Only the parameters  "texture", "origtexture", "minlevel", "numlevels",
"minlayer", "numlayers"  are tested for validity  as per section 8.18 of
OpenGL 4.3 Core spec.

Tested on Nvidia Quadro 600 and it passes except the test invalid_layer_param.
NV driver returns INVALID_OPERATION instead of INVALID_VALUE for this test.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
arb_texture_view: Test valid and invalid formats

When calling glTextureView() only certain formats are valid based on the format
of the original texture. This tests valid/invalid combinations.

Tested on Nvidia Quadro 600, all tests pass.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
ARB_texture_view: Test valid and invalid targets for TextureView

The new target supplied with textureView must be compatible with the
original textures target. This tests  valid and invalid combinations.

Tested on Nvidia Quadro 600, all tests pass.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
ARB_texture_view: Add query tests for gl state effected by this extension

Tests the queryable state from ARB_texture_view extension is correct.
Includes GL_TEXTURE_IMMUTABLE_LEVELS,GL_TEXTURE_VIEW_MIN_LEVEL,
 GL_TEXTURE_VIEW_NUM_LEVELS, GL_TEXTURE_IMMUTABLE_FORMAT.

Tested on Nvidia Quadro 600, all subtests pass.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
ARB_texture_view: Test for rendering various targets in texture view

Tests GL_ARB_texture_view rendering with various texture targets.
Creates texture maps with different solid colors for each level or layer
reads the framebuffer to ensure the rendered color is correct.

Tested on Nvidia  Quadro 600, all subtests pass.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
ARB_texture_view: Test for rendering various levels and layers in texture view

Tests GL_ARB_texture_view  rendering with various layers  and levels.
Creates texture maps with different  solid colors for each level or layer,
reads the framebuffer to ensure the rendered color is correct.

Tested on Nvidia  Quadro 600, all subtests pass.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
ARB_texture_view: Test texture view format changes and lifetimes

Tests texture views with data format changes. 1D textures only.
Uses multiple simultaneous views with different lifetimes and
check results via glGetTexImage().

Tested on Nvidia  Quadro 600, all subtests pass.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Jon Ashburn <jon@lunarg.com>
glean: Fix occlusion query test: expect Gen/DeleteQueries while active to work

A recent inspection of the latest OpenGL specification revealed that
there is no requirement for errors to be generated if GenQueries or
DeleteQueries are called while a query is active.

Specifically, in Section 4.2 of OpenGL 4.4 (Core Profile) the only
errors specified for GenQueries and DeleteQueries is INVALID_VALUE if
the ID is negative.

Additionally, the same section specifies what to do in case the active
query is deleted:

	If an active query object is deleted its name immediately
	becomes unused,...

Implementing this requires that DeleteQueries be able to succeed when
a query is active.

Reviewed-by: Brian Paul <brianp@vmware.com>
cmake: Define PIGLIT_HAS_WAYLAND if using Waffle

File piglit_wl_framework.c, which belongs to the waffle framework, has
no compile-time Wayland dependencies. So it's always safe to build the
file and thus build Wayland support into Piglit.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cmake: Remove unused PIGLIT_HAS_EGL

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cmake: Fail if PIGLIT_BUILD_GLES${N}_TESTS but cannot find EGL

If the user requests to build GLES tests but cmake fails to find the EGL
library, then configuration succeeded. Not until much later did faiure
occur, during linking the GLES tests.

Instead, cmake should fail early, during configuration not linking.
cmake: Use pkg-config to find EGL

This restricts building the EGL tests to Linux only. No problem, though,
because no other platform yet has EGL anyway.

Should fix Ian's build failure with egl-terminate-then-unbind-context.c.

CC: Ian Romanick <idr@freedesktop.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
status.py: convert status object attributes from instance to class

This converts Status objects attributes to class attributes. This should
reduce lookup time and memory consumption of these classes.

Tested-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: Replace buildDictionary function with a much simpler method

This patch produces the exact same output as the previous approach, just
in a much simpler way. It also moves some more of the status information
out of if branches and into the Status class in the status module.

There are a few side effects of using a defaultdict class, namely that
they do not generate a KeyError when one calls for a non existent key.
This means there are a couple of places where try/except blocks are
replaced by if checks.

v2: - fix HTMLIndex._groupResult()
    - don't overwrite the previous status with skip
    - Use a helper function to reduce code duplication

Tested-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>