anv: add a check for depthStencilState before using it

v2: move the code under existing correct check!

Fixes: e4590c07 ("anv: depth/stencil dynamic state support")
Closes: mesa/mesa#3375
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Brian Paul <brianp@vmware.com>
Part-of: <mesa/mesa!6240>
31 jobs for !6240 with fix-for-3375 in 7 minutes and 58 seconds (queued for 3 seconds)
detached
Status Job ID Name Coverage
  Container+Docs
passed #4034044
aarch64
arm_build

00:00:25

passed #4034045
arm_test-base

00:00:18

passed #4034041
x86_build-base

00:00:27

passed #4034043
x86_build_old

00:00:25

passed #4034042
x86_test-base

00:00:26

 
  Container 2
passed #4034055
arm64_test

00:00:33

passed #4034050
i386_build

00:00:20

passed #4034046
kernel+rootfs_amd64

00:01:14

passed #4034047
aarch64
kernel+rootfs_arm64

00:01:11

passed #4034048
aarch64
kernel+rootfs_armhf

00:00:16

passed #4034051
ppc64el_build

00:00:15

passed #4034052
s390x_build

00:00:18

passed #4034049
x86_build

00:00:15

passed #4034053
x86_test-gl

00:00:20

passed #4034054
x86_test-vk

00:00:19

 
  Meson X86 64
passed #4034059
meson-android

00:02:15

passed #4034060
meson-clang

00:05:51

passed #4034058
meson-classic

00:01:46

passed #4034061
meson-clover

00:02:11

passed #4034062
meson-clover-old-llvm

00:03:56

passed #4034057
meson-gallium

00:07:14

passed #4034056
meson-testing

00:02:44

passed #4034063
meson-vulkan

00:03:14

 
  Scons
passed #4034064
scons-win64

00:05:53

 
  Meson Misc
passed #4034066
aarch64
meson-arm64

00:01:03

passed #4034067
aarch64
meson-arm64-build-test

00:01:49

passed #4034065
aarch64
meson-armhf

00:01:09

passed #4034068
meson-i386

00:02:02

passed #4034071
meson-mingw32-x86_64

00:01:22

passed #4034070
kvm
meson-ppc64el

00:04:15

passed #4034069
kvm
meson-s390x

00:02:56