clover: Add clCreateProgramWithBuiltInKernels.

[ Francisco Jerez: Check for devices not associated with the specified
  context.  Style fix. ]

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
clover: Add clUnloadPlatformCompiler.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
ilo: free transfers with util_slab_free()

We used FREE() in one of the error path.
ilo: tidy up choose_transfer_method()

Add a bunch of helper functions and a big comment for
choose_transfer_method().  This also fixes handling of
PIPE_TRANSFER_MAP_DIRECTLY to not ignore tiling.
ilo: tidy up transfer mapping/unmapping

Add xfer_map() to replace map_bo_for_transfer().  Add xfer_unmap() and
xfer_alloc_staging_sys() to simplify texture and buffer mapping/unmapping, and
enable more code sharing between them.
ilo: drop unused context param from transfer functions

Many of the transfer functions do not need an ilo_context.  Drop it.
ilo: s/TRANSFER_MAP_UNSYNC/TRANSFER_MAP_GTT_UNSYNC/

It maps to drm_intel_gem_bo_map_unsynchronized(), which results in
unsynchronized GTT mapping.
ilo: drop ptr from ilo_transfer

With the recent clean-ups, we can pass the mapped pointer around between
functions cleanly.  Drop it to make ilo_transfer smaller.
ilo: enable persistent and coherent transfers

Enable PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT and reorder caps a bit.
ilo: try unblocking a transfer with a staging bo

When mapping a busy resource with PIPE_TRANSFER_DISCARD_RANGE or
PIPE_TRANSFER_FLUSH_EXPLICIT, we can avoid blocking by allocating and mapping
a staging bo, and emit pipelined copies at proper places.  Since the staging
bo is never bound to GPU, we give it packed layout to save space.
ilo: unblock an inline write with a staging bo

This should allow a deeper pipeline.
r600g/compute: Add documentation to compute_memory_pool

v2: Rebased on top of master

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
r600g/compute: Add debug information to promote and demote functions

v2: Add information about the item's starting point and size
v3: Rebased on top of master

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
clover: Add checks for image support to the image functions v2

Most image functions are required to return a CL_INVALID_OPERATION
error when used on devices without image support.

v2:
  - Simplified the code

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
util: Add util_memcpy_cpu_to_le32() v3

v2:
  - Preserve word boundaries.

v3:
  - Use const and restrict.
  - Fix indentation.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
radeonsi: Use util_memcpy_cpu_to_le32()

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
ilo: add ilo_resource_get_bo() helper

We will need it in the following commit.
ilo: correctly propagate resource renames to hardware

Not only should we mark states dirty when the underlying resource is renamed,
we should also update the CSO bo when available.
util: Fix typo

Spotted by okias on IRC.
r600g: switch SNORM conversion to DX and GLES behavior

it also matches GL 4.2

further discussion:
http://lists.freedesktop.org/archives/mesa-dev/2013-August/042680.html

Cc: mesa-stable@lists.freedesktop.org