mesa: remove assertions that do not allow compressed 2D_ARRAY textures

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
gallium/u_gen_mipmap: accelerate depth texture mipmap generation

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
gallium/u_blitter: minify depth0 when initializing last_layer

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
gallium: add util_format_stencil_only helper function

used for stencil sampler views.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
gallium/u_blitter: accelerate depth-stencil copying using shader stencil export

This fixes stencil buffer write transfers on r600g.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
gallium/u_blitter: accelerate stencil-only copying

This doesn't seem to be used by anything yet, but better safe than sorry.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
gallium/util: move pipe_tex_to_tgsi_tex helper function into u_inlines

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
gallium/u_blit: don't do two copies for non-2D textures

Because u_blit couldn't sample a 1D, 3D, CUBE and ARRAY texture, we created
a 2D texture holding a copy of one slice of the source texture (even for 1D).

Let's just do it right.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
gallium/u_blit: drop not-very-useful wrapper around util_blit_pixels_writemask

just rename it to util_blit_pixels

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
gallium/u_blit: remove useless memset calls

the structure is calloc'd.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
st/mesa: set colormask to zero when blitting depth

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
st/mesa: implement accelerated stencil blitting using shader stencil export

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
r600g: move CB_TARGET_MASK setup into new cb_misc_state

to remove some overhead from draw_vbo. This is a derived state.

BTW, I've got no idea how compute interacts with 3D here, but it should
use cb_misc_state, so that 3D and compute don't conflict.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
r600g: move MULTIWRITE setup into cb_misc_state for r6xx-r7xx

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
r600g: move CB_SHADER_MASK setup into cb_misc_state

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
r600g: set DISABLE in CB_COLOR_CONTROL if colormask is 0

this will be useful for in-place DB decompression, otherwise should be harmless

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
r600g: remove is_flush from DSA state

we can just update the state when decompressing, there's no need to add
additional info into the DSA state

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
r600g: do fine-grained depth texture flushing

- maintain a mask of which mipmap levels are dirty (instead of one big flag)
- only flush what was requested at a given point and not the whole resource
  (most often only one level and one layer has to be flushed)

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
r600g: flush depth textures bound to vertex shaders

This was missing/broken. There are also minor code cleanups.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
r600g: don't set dirty_db_mask for a flushed depth texture

A flush depth texture is never set as a depth buffer and never flushed.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>