fbo-alphatest-formats: correct the expected intensity/luminance values

The expected intensity and luminance values are different depending on
whether we're doing glReadPixels() from a texture or sampling the texture.

Fixes failures both with NVIDIA's driver and Mesa since we changed/fixed
readback of luminance/intensity textures.

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

Reviewed-by: Eric Anholt <eric@anholt.net>
glslparsertest: Allow ! in extension list to require non-support.

For example:
// [config]
// required_extensions: !GL_ARB_draw_instanced
// [end config]
will cause the test to run only if the GL_ARB_draw_instanced is _not_
advertised.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Fix ARB_draw_instanced feature-macro-disabled tests.

If the GL supports the GL_ARB_draw_instanced extension, the preprocessor
macro must exist regardless of whether or not the shader enables the
extension.  (In fact, this allows them to check if it's supported!)

This patch changes the tests to only run if GL_ARB_draw_instanced is
_not_ supported by the driver, in which case it's an error to define
the preprocessor macro.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Make valgrind testing a command line option rather than extra tests.

Valgrind testing is useful, but really should be done as a separate
exercise from the usual regression testing, as it takes way too long.

Rather than including it by default in all.tests and making people
exclude it with the -x valgrind option (or by using quick.tests), it
makes sense to explicitly request valgrind testing with --valgrind.

To perform valgrind testing:
$ piglit-run.py --valgrind <options> tests/quick.tests results/vg-1

The ExecTest class now handles Valgrind wrapping natively, rather than
relying on the tests/valgrind-test/valgrind-test shell script wrapper.
This provides a huge benefit: we can leverage the interpretResult()
function to make it work properly for any subclass of ExecTest.  The
old shell script only worked for PlainExecTest (piglit) and GleanTest.

Another small benefit is that you can now use --valgrind with any test
profile (such as quick.tests).  Also, you can use all.tests without
having to remember to specify "-x valgrind".

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
fbo-blending-formats: fix expected result for intensity and luminance textures

This is pretty much the same fix as for the fbo-alphatest-formats test.
Note: NVIDIA's driver is still failing for GL_RGB5_A1 for some unknown reason.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=47217
fbo-luminance-alpha: fix expected result colors

The results of reading back a luminance/alpha texture with glReadPixels
is different than the results of texturing with that texture.

Fixes failures with NVIDIA driver and Mesa.

http://bugs.freedesktop.org/show_bug.cgi?id=47261

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Move more MSVC workarounds to piglit-util.h

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
gl-2.1/minmax: Actually use the Y dimension we get for calculating OQ bits.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
gl-3.0/minmax: Fix stack smashing in GL_MAX_VIEWPORT_DIMS handling.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
gl-3.1/minmax: New test for query minimum requirements.

v2: Fix another bug in handling comparisons due to
    GL_MAX_VIEWPORT_DIMS by special-casing that enum.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
glsl-1.40: Add compiler tests for builtin in/out/uniforms.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
glsl-1.40: Add tests for minimum maximum constants.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
glsl-1.40: Add tests for removal of deprecated builtin uniforms.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
glsl-1.40: Add some tests for ARB_texture_rectangle being folded in.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Add test to verify large textures are handled correctly in mesa

This test tries to create the maximum supported texture using
gltexImage1D/2D/3D functions and later modifies it using
glTexSubImage1D/2D/3D functions.

At the moment Intel driver throws GL_OUT_OF_MEMORY and an assertion
failure / a SIGBUS with large textures.

Test reproduces the errors reported in:
https://bugs.freedesktop.org/show_bug.cgi?id=44970
https://bugs.freedesktop.org/show_bug.cgi?id=46303

V2: Added the test using proxy textures, deleted redundant code,
    data array allocation based on size returned

V3: Continue testing with other formats if ARB_texture_float is not present.
    Moved the test case to tests/texturing with an appropriate name.
    Removed the loop which was testing with a number of large textures.
    Added GL_OUT_OF_MEMORY as an expected error.
    Added GL_TEXTURE_RECTANGLE in texture target array.

V4: Removed redundant code.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>