ilo: fix a compile error with -Werror=format-security

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83777
nouveau: re-allocate bo's on overflow

The BSP bo might be too small to contain all of the bsp data,
bump its size on overflow. Also bump inter_bo when this happens,
it might be too small otherwise.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org>
nouveau: fix MPEG4 hw decoding

Reorder some fields to make I-frame decoding work correctly.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org>
nouveau: rework reference frame handling

Fixes a regression from "nouveau/vdec: small fixes to h264 handling"

New picking order for frames:
 1. Vidbuf pointer matches.
 2. Take the first kicked ref.
 3. If that fails, take a ref that has a different last_used.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org>
nouveau: remove unneeded assert

No idea why it was added, but the code runs fine even on videos
where it triggers.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org>
nouveau: only enable the depth test if there actually is a depth buffer

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org>
nouveau: only enable stencil func if the visual has stencil bits

The _Enabled property already has the relevant information.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.2 10.3" <mesa-stable@lists.freedesktop.org>
gallium: add a texture target to sampler view and a CAP to use it

This allows a sampler view to have a different texture target than the
underlying resource. This will be used to implement the type casting
between 2d arrays and cube maps as specified in ARB_texture_view.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
mesa/st: add ARB_texture_view support

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
nv50,nvc0: enable ARB_texture_view

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
ilo: careful with empty fb state in ilo_gpe_set_fb()

We cannot pass 0 as the width or height to ilo_gpe_init_view_surface_null().
ilo: remove ILO_GEN_GET_MAJOR()

The last user has gone away.
ilo: add GEN_EXTRACT() and GEN_SHIFT32()

They replace READ() and SET_FIELD() that we have been using.
ilo: use an accessor for dev->gen

It should enable us to do specialized builds by making the accessor return a
constant.
ilo: add ILO_DEV_ASSERT()

It replaces ILO_GPE_VALID_GEN().
ilo: move MI functions to ilo_builder_mi.h

Have a centralized place for MI functions, and remove the duplicated
gen6_MI_LOAD_REGISTER_IMM().
ilo: move BLT functions to ilo_builder_blt.h

Follow the changes for MI functions, but for BLT this time.
ilo: clean up MI functions

With ilo_builder in place, some conventions we had to build commands are no
longer needed.
ilo: clean up BLT functions

Follow the changes for MI functions, but for BLT this time.
ilo: reduce BLT function parameters

Intruduce gen6_blt_bo and gen6_blt_xy_bo to describe BOs.  In the extreme case
of gen6_XY_SRC_COPY_BLT(), the number of parameters goes down from 18 to 8.