mesa: Adjust _MaxLevel computation to account for views

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Include #slices in miptree debug

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Skip texture validation for immutable-format textures.

We're about to start sharing miptrees in texture views, and I'd rather
not teach this validation code about nonzero MinLevel or MinLayer when
views are guaranteed complete [and all levels resident in the base
miptree].

The only thing we have to do is set up our _MaxLevel derived state.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Add driver hook for TextureView

We need to wire the original texture's mt into the view. All the hard
work of setting up an appropriate tree of gl_texture_image structures
has already been done by core mesa.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Adjust surface_state emission to account for view parameters

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Don't try to use fast upload path for nontrivial views

This will eventually be relaxed, but we'll get the fallback path
working first.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Adjust map/unmap code for MinLevel/MinLayer

This allows core mesa's TexSubImage paths etc to work correctly
with views which have nonzero MinLevel or MinLayer.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Account for MinLevel in texture upload fast path

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Enable texture upload fast path with MinLevel

We'll still avoid MinLayer here since the fast path doesn't understand
arrays at all, but it's straightforward to do levels.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Adjust renderbuffer wrapper to account for MinLevel/MinLayer

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Add `layered` parameter to intel_update_renderbuffer_wrapper

We're about to need this so we can determine the layer count of the
wrapper.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Pull out layer_multiplier in intel_update_renderbuffer_wrapper

We're about to need this in another place.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Add layer_count to intel_renderbuffer

This is the effective layer count, for clears etc. This differs from the
depth of the miptree level when views are involved.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965/blorp: Use irb->layer_count in clear

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965/blorp: Account for nonzero MinLayer in layered clears.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Account for view parameters in fast depth clears

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
i965: Enable ARB_texture_view on Gen7+

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
docs: Mark off ARB_texture_view and add to release notes for 10.2.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>