nv50/ir: retrieve shadow compare from first arg

This can only happen with texture(samplerCubeShadow, bias), where the
compare will be in the first argument.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 30d91e0eecfe79e0d8515189a59051ee4f21f3da)
nv50/ir: ignore bias for samplerCubeShadow on nv50

Unfortunately there's no good way to do this on the nv50 shader isa.
Dropping the bias seems preferable to doing the compare post-filtering.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 1065aa92f4e448fbfe47c074f08dded1933a7f1f)
nvc0/ir: do quadops on the right texture coordinates for TXD

handleTEX moves the layer as the first argument. This makes sure that
the quadops deal with the texture coordinates.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit afea9bae67208cdb00b27a60c9cb013bf7d6de52)
nvc0/ir: use manual TXD when offsets are involved

Something about how we're implementing offsets for TXD is wrong, just
flip to the generic quadop-based implementation in that case.

This is the minimal fix appropriate for backporting.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 114d46829d10c826927cabc1ca14884a4ee249f7)
gallium: fix u_default_transfer_inline_write for textures

This doesn't fix any known issue. In fact, radeon drivers ignore all
the discard flags for textures and implicitly do "discard range"
for any write transfer.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
(cherry picked from commit fe6be9926f63e68d9007571956bed0687003e932)
mesa: fix geometry shader memory leaks

Spotted by Charmaine Lee.
Cc: "10.2" <mesa-stable@lists.freedesktop.org>

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 176b64b81104bffed114a0bdd919338e1e54ed19)
st/mesa: fix geometry shader memory leak

Spotted by Charmaine Lee.
Cc: "10.2" <mesa-stable@lists.freedesktop.org>

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
(cherry picked from commit d10204930f26d906d8a464731c687249434ec72d)
gallium/u_blitter: fix some shader memory leaks

The _msaa shaders weren't getting freed.
Cc: "10.2" <mesa-stable@lists.freedesktop.org>

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 378fa34c7b8ea29672deea7563c552a8e2742809)
st/mesa: fix samplerCubeShadow with bias

It has 5 coordinates: (x,y,z,depth,lodbias)

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
(cherry picked from commit a11fff329ea0b236ee5d2d7ad563af49770c04c7)
radeonsi: fix samplerCubeShadow with bias

Pack the depth value before overwriting it with cube coordinates.

Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit b279f0143f4dce67c8f5af57cd4a5942eb403c13)

Conflicts:
	src/gallium/drivers/radeonsi/si_shader.c