linestipple: print what is tested
msaa: Share visualize_image function by moving it to common.cpp

visualize_image function is utilized by multiple msaa test cases.

Reviewed-by: Paul Berry<stereotype441@gmail.com>
msaa: Add files containing the shared code to test multiple draw buffers

Functions defined in these files are utilized by following test cases:
draw-buffers-alpha-to-one
int-draw-buffers-alpha-to-one
draw-buffers-alpha-to-coverage
int-draw-buffers-alpha-to-coverage

V2: Removed unnecessary conditional checks
    Switched to shared visualize_image function
    Updated few comments

Reviewed-by: Paul Berry<stereotype441@gmail.com>
msaa: Add test to verify sample-alpha-to-one with multiple draw buffers

When rendering to multiple draw buffers, GL_SAMPLE_TO_ONE should modify
the alpha values sent to each draw buffer.

OpenGL 3.3 specification's section 4.1.3 is little unclear about the exact
behavior in above mentioned case. So, this test assumes the behavior shown
by NVIDIA's proprietary drivers.

Reviewed-by: Paul Berry<stereotype441@gmail.com>
msaa: Add test to verify sample-alpha-to-coverage with multiple draw buffers

When rendering to multiple draw buffers, the alpha value used by
GL_SAMPLE_ALPHA_TO_COVERAGE should come from draw buffer zero, but it should
have an effect on all the draw buffers.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
msaa: Add test to verify sample-alpha-to-one with integer draw buffers

When draw buffer zero is bound to an integer format buffer,`
GL_SAMPLE_ALPHA_TO_ONE should have no effect. This should work properly
even if there are other draw buffers that are not in integer format.

Note: Test passes on Sandybridge with following patch applied on mesa.
Patch is under review on mesa-dev mailing list:
[PATCH] i965/msaa: Disable alpha-to-{coverage, one} when drawbuffer zero
is in integer format

Reviewed-by: Paul Berry <stereotype441@gmail.com>
msaa: Add test to verify sample-alpha-to-coverage with integer draw buffers

When draw buffer zero is bound to an integer format buffer,
GL_SAMPLE_ALPHA_TO_COVERAGE should have no effect. This should work
properly even if there are other draw buffers that are not in integer
format.

Note: Test passes on Sandybridge with following patch applied on mesa.
Patch is under review on mesa-dev mailing list:
[PATCH] i965/msaa: Disable alpha-to-{coverage, one} when drawbuffer zero
is in integer format

Reviewed-by: Paul Berry <stereotype441@gmail.com>
msaa: Add test to verify sample-alpha-to-one with GL_MULTISAMPLE disabled

This test varifies that alpha values are not changed with
GL_SAMPLE_ALPHA_TO_ONE enabled if GL_MULTISAMPLE is disabled.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Paul Berry<stereotype441@gmail.com>
msaa: Add test to verify sample-alpha-to-one with single sample FBO

This test verifies that alpha values are not modified if
GL_SAMPLE_ALPHA_TO_ONE is enabled and the buffer is single-sampled.

Reviewed-by: Paul Berry<stereotype441@gmail.com>
msaa: Rewrite sample-alpha-to-coverage test to utilize the shared code

Lot of the functions defined in this test case are also shared by
draw-buffers-common.cpp. So this refactoring is done to avoid code
duplication.

Reviewed-by: Paul Berry<stereotype441@gmail.com>
msaa: Rewrite sample-alpha-to-one test to utilize shared code

Lot of the functions defined in this test case are also shared by
draw-buffers-common.cpp. So this refactoring is done to avoid code
duplication.

Reviewed-by: Paul Berry<stereotype441@gmail.com>
msaa: Add depth buffer testing support in draw-buffer-common.cpp

Computes expected depth values and probes the depth buffer only for coverage
value equal to 0.0 and 1.0 because depth buffer behaviour is undefined for
intermediate coverage values.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
msaa: Add depth buffer testing to sample-alpha-to-coverage test case

Tests the depth buffer only for coverage value equal to 0.0 and 1.0 because
depth buffer behaviour is undefined for intermediate coverage values.

This test found an issue with the current implemantation of msaa for i965
on mesa. Following patch on mesa makes this test to pass:
[PATCH] i965/msaa: Set KILL_ENABLE when GL_ALPHA_TO_COVERAGE enabled
commit 6c355cca9149e43850cf27f2d0821fab1e7a69f5

Reviewed-by: Paul Berry <stereotype441@gmail.com>
crash-cubemap-order: check extension support
fdo25614-genmipmap: fix gl version checking
util: Remove unused/non-portable headers.

sys/mman.h is not available on Windows.
fbo-blit-stretch: test for stretched blits

v2: More clip tests and comments.
glx_arb_create_context_profile: Verify that invalid profiles are rejected

NVIDIA's closed-source driver passes this test.  AMD's closed-source
driver has not been tested.

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

NVIDIA's closed-source driver passes this test.  AMD's closed-source
driver has not been tested.  NVIDIA's closed-source driver supports
both core and compatibility profiles.

v2: Try to create a core profile both with and without the core
profile mask.  This was suggested by Chad Versace.

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

The profile mechanism is only meaningful for OpenGL 3.2 or later.
Verify that the profile setting is silently ignored when a version
earlier than 3.2 is requested.

NVIDIA's closed-source driver passes this test.  AMD's closed-source
driver has not been tested.

v2: Try versions other than just 1.0.  This catches a bug in recent
xserver code.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
References: http://lists.x.org/archives/xorg-devel/2012-July/032440.html
Cc: Chad Versace <chad.versace@linux.intel.com>