mesa: don't forget to clear _Layer field on texture unit
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 1 Oct 2019 08:55:46 +0000 (11:55 +0300)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 1 Oct 2019 18:49:13 +0000 (21:49 +0300)
commit2208d79ddeebd1673f477611d508566ef82bd7c0
tree1a57f39778f67a0db4d57b7eca3380251ac8b37a
parent563f8974d81c3716538036781df3ecbf7e7686c0
mesa: don't forget to clear _Layer field on texture unit

On the Android Antutu benchmark we ran into an assert in ISL where the
(base layer + num layers) > total layers. It turns out the core of
mesa forgot to clear the _Layer variable, potentially leaving an
inconsistent value.

v2: Pull setting u->_Layer out of the conditional blocks (Jason)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/main/shaderimage.c