mesa: Add infrastructure for GL_ARB_texture_mirror_clamp_to_edge.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Rico Schüller <kgbricola@web.de>
swrast: Enable ARB_texture_mirror_clamp_to_edge.

v2: fix commit message

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Rico Schüller <kgbricola@web.de>
gallium: Enable ARB_texture_mirror_clamp_to_edge.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Rico Schüller <kgbricola@web.de>
r200: Enable ARB_texture_mirror_clamp_to_edge.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Rico Schüller <kgbricola@web.de>
radeon: Enable ARB_texture_mirror_clamp_to_edge.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Rico Schüller <kgbricola@web.de>
winsys/radeon: cleanup CS offloading

Using atomic function for ncs is superfluous since it is
protected by a mutex anyway. Also lock the mutex only once
while retrieving the next CS for submission.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
gallivm: implement seamless cube filtering

For seamless cube filtering it is necessary to determine new faces and new
coords per sample. The logic for this is _seriously_ complex (what needs
to happen is very "asymmetric" wrt face, x/y under/overflow), further
complicated by the fact that if the 4 samples are in a corner (meaning we
only have actually 3 samples, and all 3 are on different faces) then
falling off the edge is happening _both_ on x and y axis simultaneously.
There was a noticeable performance hit in mesa's cubemap demo when seamless
filtering was forced on (just below 10 percent or so in a debug build, when
disabling all filtering hacks, otherwise it would probably be a bit more) and
when always doing the logic, hence use a branch which it only does it if any
of the pixels in a quad (or in two quads) actually hit this. With that there
was no measurable performance hit in the cubemap demo (neither in a debug nor
release buidl), but this will vary (cubemap demo very rarely hits edges).
Might also be different on other cpus, as this forces SoA sampling path which
potentially can be quite a bit slower.
Note that as for corners, this code gets all the 3 samples which actually
exist right, and the 4th texel will simply be the same as one of the others,
meaning that filter weights will be a bit wrong. This however should be
enough for full OpenGL (but not d3d10) compliance.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
llvmpipe: enable seamless cube filtering

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
clover: Use std::numeric_limits<std::size_t>::max() instead of SIZE_MAX

This prevents a build failure on some systems.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
clover: Require GCC 4.7 or higher to build.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
clover: Import new utility library.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
clover: Clean up the event profiling code.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
clover: Replace a bunch of double underscores with single underscores.

Identifiers with double underscores are reserved, and using them has
undefined behavior according to the C++ spec.  It's unlikely to make
any difference, but...

Tested-by: Tom Stellard <thomas.stellard@amd.com>
clover: Name include guards consistently.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
clover: Switch to the new utility code.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
clover: Clean up property query functions by using a new property_buffer helper class.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
clover: Define helper classes for the new object model.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
clover: Switch platform objects to the new model.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
clover: Switch device objects to the new model.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
clover: Switch context objects to the new model.

Tested-by: Tom Stellard <thomas.stellard@amd.com>