r600g: fix int->bool conversion in fence_signalled

NOTE: This is a candidate for the stable branches.
radeonsi: fix int->bool conversion in fence_signalled
gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flag

Usage with pipe_context:
  pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME);

Usage with st_context_iface:
  st->flush(st, ST_FLUSH_END_OF_FRAME, NULL);

The flag is only a hint for drivers. Radeon will use it for buffer eviction
heuristics in the kernel (e.g. for queries like how many frames have passed
since a buffer was used).

The flag is currently only generated by st/dri on SwapBuffers.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
gallium/radeon: send the END_OF_FRAME flag to the DRM
mesa: allow TEXTURE_CUBE_MAP_ARRAY in GetTexImage

Reviewed-by: Brian Paul <brianp@vmware.com>
gallium/util: complete implementation of util_dump_transfer

Reviewed-by: Brian Paul <brianp@vmware.com>
gallium/u_blitter: remove useless parameter from blitter_default_dst_texture

Reviewed-by: Brian Paul <brianp@vmware.com>
gallium/u_blitter: unify some parameters into a dstbox parameter in blit_generic

Reviewed-by: Brian Paul <brianp@vmware.com>
gallium/u_blitter: minor simplification

Reviewed-by: Brian Paul <brianp@vmware.com>
gallium/u_blitter: fix blitting TEXTURE_CUBE_ARRAY with a non-zero cube index

Reviewed-by: Brian Paul <brianp@vmware.com>
gallium/u_blitter: implement 3D blitting

Scaling and flipping in the Z direction isn't allowed yet.

Reviewed-by: Brian Paul <brianp@vmware.com>
st/mesa: fix GetTexImage for compressed cubemaps

I'll deal with 2D arrays later.

NOTE: This is a candidate for the stable branches.
st/mesa: try to find the format matching format+type in decompressed_with_blit

There was the fast path based on _mesa_format_matches_format_and_type
for GetTexImage, but it never worked, because the Mesa format we were testing
there was always compressed. Further testing showed that the fast path
had been completely broken.

In this commit, the somewhat limited helper util_create_rgba_texture is
no longer used and instead, custom code for the texture creation is added,
which tries to find the best matching RGBA8 format, so that we can hit
the fast path *always* if the read format is a variant of RGBA8 and supported
by the driver.

Reviewed-by: Brian Paul <brianp@vmware.com>
gallium/util: remove unused helper util_create_rgba_texture

Reviewed-by: Brian Paul <brianp@vmware.com>
st/mesa: fix GetTexImage for compressed 2D array textures

This uses a 3D blit to decompress the texture and then a 3D transfer
to read it.

Reviewed-by: Brian Paul <brianp@vmware.com>
st/mesa: fix CopyTexSubImage fallback for 1D array textures

- We should use a 3D transfer of size Width x 1 x NumLayers.
- We should use layer_stride instead of stride.
  (even though they are likely to be equal with 1D array textures)

Reviewed-by: Brian Paul <brianp@vmware.com>
st/mesa: accelerate CopyTexSubImage for 1D array textures

Reviewed-by: Brian Paul <brianp@vmware.com>
st/mesa: fix assertion failures with 2101010 vertex formats

Reviewed-by: Brian Paul <brianp@vmware.com>
r600g: implement 3D transfers

That means we can map and read multiple slices with one transfer_map call.
automake: Convert Gallium target and winsys