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>
40 jobs for !2182 with review/mesa-clear-texture-unit-layer-fix in 18 minutes and 29 seconds (queued for 2 seconds)
detached
Status Job ID Name Coverage
  Containers
passed #685960
debian-10

00:02:48

passed #685961
debian-9

00:00:23

passed #685962
aarch64
test-container:arm64

00:00:21

 
  Build
passed #685965
meson-arm64

00:05:48

passed #685964
meson-armhf

00:03:49

passed #685967
meson-clang

00:07:38

passed #685970
meson-clover

00:06:32

passed #685971
meson-clover-old-llvm

00:06:23

passed #685973
meson-i386

00:04:39

passed #685963
meson-main

00:10:25

passed #685966
meson-swr-glvnd

00:03:52

passed #685972
meson-vulkan

00:03:04

passed #685974
scons

00:09:51

passed #685975
scons-old-llvm

00:07:55

passed #685968
scons-swr

00:05:45

passed #685969
scons-win64

00:06:36

 
  Test
passed #685996
db410c
arm64_a306_gles2 1/4

00:04:10

passed #685997
db410c
arm64_a306_gles2 2/4

00:05:58

passed #685998
db410c
arm64_a306_gles2 3/4

00:04:12

passed #685999
db410c
arm64_a306_gles2 4/4

00:04:27

passed #685985
mesa-cheza
arm64_a630_gles2

00:04:32

passed #685986
mesa-cheza
arm64_a630_gles31 1/4

00:06:08

passed #685987
mesa-cheza
arm64_a630_gles31 2/4

00:07:08

passed #685988
mesa-cheza
arm64_a630_gles31 3/4

00:07:15

passed #685989
mesa-cheza
arm64_a630_gles31 4/4

00:06:45

passed #685990
mesa-cheza
arm64_a630_gles3 1/6

00:04:28

passed #685991
mesa-cheza
arm64_a630_gles3 2/6

00:04:04

passed #685992
mesa-cheza
arm64_a630_gles3 3/6

00:03:49

passed #685993
mesa-cheza
arm64_a630_gles3 4/6

00:04:08

passed #685994
mesa-cheza
arm64_a630_gles3 5/6

00:04:09

passed #685995
mesa-cheza
arm64_a630_gles3 6/6

00:03:59

passed #685976
test-llvmpipe-gles2 1/4

00:03:28

passed #685977
test-llvmpipe-gles2 2/4

00:04:03

passed #685978
test-llvmpipe-gles2 3/4

00:03:33

passed #685979
test-llvmpipe-gles2 4/4

00:03:56

passed #685980
test-softpipe-gles2 1/4

00:01:30

passed #685981
test-softpipe-gles2 2/4

00:01:48

passed #685982
test-softpipe-gles2 3/4

00:01:35

passed #685983
test-softpipe-gles2 4/4

00:01:41

passed #685984
test-softpipe-gles3-limited

00:04:12