glsl-4.00/ARB_texture_query_lod: Generate compiler tests for built-in functions

For each sampler data type, generate a test for
	(vertex, fragment) shader;
	(glsl-4.00, glsl-1.30 + ARB_texture_query_lod).

The vertex shader tests confirm that textureQueryLOD is not available in
the the vertex shader.

v2: Generate textureQueryLOD if api is ARB_texture_query_lod.
shader_runner: Add 'draw rect tex'

Same as draw rect but allows you to pass tex coordinates.
arb_texture_query_lod: Test textureQueryLOD with nearest filtering.

v2: Use textureQueryLOD instead of textureQueryLOD.
arb_texture_query_lod: Test textureQueryLOD with no mipmapping.

v2: Use textureQueryLOD instead of textureQueryLOD.
shader_runner: Add lod_bias option to texparameter.
arb_texture_query_lod: Test textureQueryLOD with lod-biasing.

v2: Use textureQueryLOD instead of textureQueryLOD.
arb_texture_query_lod: Test textureQueryLOD with linear filtering.

v2: Use textureQueryLOD instead of textureQueryLOD.
arb_texture_query_lod: Add execution shader_tests to all.tests.
CL Builtins: Fix sign-extension bug in rotate

When rotating a negative number right, sign extension was producing the wrong
expected result.

Signed-off-by: Aaron Watry <awatry at gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
CL Builtin: Remove an invalid mad24 test

The CL spec says that the results of this test are undefined.  mad24 and mul24
assume that the input values are 24-bit integers, and anything in the upper 8
bits gets treated in an implementation-defined manner.

Signed-off-by: Aaron Watry <awatry at gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
[CL]: Fix mul24 test and add mad24/mul24 uint tests

Signed-off-by: Aaron Watry <awatry at gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
Add tests for the GL_AMD_performance_monitor extension.

One of the challenging aspects of testing this extension is that it
defines an implementation-specific set of groups and counters.  Many of
the tests here arbitrarily operate on the counters in the first group,
while a few sanity check all counters in all groups.

All tests pass on AMD's Catalyst 12.06 driver on a Radeon 3650, except
for: test_number_of_groups_partial_array, test_delete_monitor_invalid,
and test_get_counter_data_byte_size.  I believe the first two are
legitimate bugs in AMD's implementation, and the latter is a
disagreement about the associativity of text within a paragraph.  Still,
these are minor details and I believe the tests are valid.

v2: Actually set the test name for the second test.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
amd_performance_monitor: s/__func__/__FUNCTION__/

__func__ is not available on MSVC.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
provoking-vertex: also test clockwise triangles

in addition to the counter-clockwise triangles.
Plus minor clean-ups.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Fix build of shader_runner for GLES.

Commit f184de94 (shader_runner: Add lod_bias option to texparameter)
added support for testing the GL_TEXTURE_LOD_BIAS texture parameter to
shader_runner.  However, this feature is only available in desktop GL.
This caused compile errors with GLES.

This patch ifdefs the feature out when building the GLES version of
shader_runner.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Fix all.tests breakage from adding AMD_performance_monitor tests.

Fixes "invalid syntax" errors when running Piglit.

I could have sworn I tried running Piglit normally, but I must have made
last minute changes.  Sorry for the trouble.
arb_shader_texture_lod-texgradcube: Test explicit derivatives for cube maps

Similar to arb_shader_texture_lod-texgrad, but using cube maps instead.
Given the somewhat undefined behavior of explicit gradients with cube
maps, the main purpose of the test is really to test that those work at
all, as there doesn't seem to be any other test covering this.
That said, drivers which simply drop explicit derivatives on the floor
(like softpipe) pass this perfectly as it simply compares implicit vs.
explicit behavior (which, given the fuzzy specification, might not be
really required to be the same here, though given the chosen values, that
is the major axis derivatives being zero, it might seem like a reasonable
assumption).
I guess something which would also test that the implementation is really
using explicit derivatives instead of implicit ones would also be desirable,
but I'll leave that for now, I couldn't really come up with something.

Reviewed-by: Brian Paul <brianp@vmware.com>
lodbias: increase window size to fix test on Windows

Before, the 96x96 window got bumped up to 116x96 by Windows and we
saw a "Got spurious window resize in automatic run" message and the
test reported "warn".

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
arb_sampler_objects: use default window size to fix Windows run

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
arb_shader_objects: use default window size to fix Windows run

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>