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>
util: Create generic piglit_draw_rect() functions.  TODO: rework.

This patch adds the following functions to piglit-util-gl-common:
- piglit_draw_rect_generic
- piglit_draw_rect_back_generic
- piglit_draw_rect_z_generic
- piglit_draw_rect_tex_generic

These functions are similar to corresponding functions without the
"_generic" suffix, except that instead of delivering vertex position
and texture coordinates to the vertex shader using glVertexPointer()
and glTexCoordPointer(), they deliver to the generic attributes
PIGLIT_ATTRIB_POS and PIGLIT_ATTRIB_TEX.  These functions use VBO's
and VAO's when available, so they may be used when testing core
contexts.

These functions also work with compatibility contexts and with all
GLES versions.  Since GLES1 doesn't support generic vertex attributes,
we fall back to using glVertexPointer() and glTexCoordPointer() in the
GLES1 case.

When building GLES tests, the behaviour of the new _generic functions
is for all intents and purposes the same as that of the pre-existing
non-generic functions.  So to avoid code duplication, the non-generic
functions simply call their generic equivalents in GLES builds.