st/mesa: Treat vertex inputs absent in inputMapping as zero in mesa_to_tgsi

After updating vertex inputs being read based on optimized NIR, they may go out
of sync with inputs in mesa IR. Which is translated to TGSI and used together
with NIR if draw doesn't have llvm.

It's much easier to treat such inputs as zero because there is no pass to
entirely get rid of them and they don't contribute to shader's output.

Fixes: d684fb37
Closes: mesa/mesa#2815
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <mesa/mesa!4705>
49 jobs for !4705 with fix/vertex-program-arb-unused-attribs-regression-v2 in 19 minutes and 35 seconds (queued for 6 seconds)
detached
Status Job ID Name Coverage
  Container
passed #2448959
aarch64
arm_build

00:00:19

passed #2448961
aarch64
arm_test

00:00:19

passed #2448963
windows shell 1809 mesa
windows_build_vs2019

00:00:13

passed #2448952
x86_build

00:01:43

passed #2448957
x86_build_old

00:00:56

passed #2448954
x86_test-gl

00:00:52

passed #2448956
x86_test-vk

00:00:28

 
  Meson X86 64
passed #2448970
meson-clang

00:10:08

passed #2448968
meson-classic

00:03:05

passed #2448972
meson-clover

00:08:36

passed #2448973
meson-clover-old-llvm

00:05:45

passed #2448967
meson-gallium

00:10:48

passed #2448965
meson-testing

00:07:51

passed #2448975
meson-vulkan

00:03:57

 
  Scons
passed #2448977
scons-win64

00:10:00

 
  Meson Misc
passed #2448981
aarch64
meson-arm64

00:05:50

passed #2448983
aarch64
meson-arm64-build-test

00:06:13

passed #2448979
aarch64
meson-armhf

00:06:39

passed #2448987
meson-i386

00:04:14

passed #2448993
meson-mingw32-x86_64

00:06:39

passed #2448991
kvm
meson-ppc64el

00:05:41

passed #2448989
kvm
meson-s390x

00:05:43

passed #2448985
windows docker 1809 mesa
meson-windows-vs2019

00:05:52

 
  Llvmpipe
passed #2449000
llvmpipe-gles2

00:04:36

passed #2449001
llvmpipe-traces

00:00:23

passed #2448996
piglit-glslparser

00:03:27

passed #2448994
piglit-quick_gl

00:09:56

passed #2448998
piglit-quick_shader

00:08:06

 
  Softpipe
passed #2449003
softpipe-gles2

00:02:20

passed #2449008
softpipe-gles31 1/4

00:03:59

passed #2449005
softpipe-gles3 1/2

00:05:17

passed #2449010
softpipe-gles31 2/4

00:03:12

passed #2449012
softpipe-gles31 3/4

00:05:39

passed #2449014
softpipe-gles31 4/4

00:03:54

passed #2449007
softpipe-gles3 2/2

00:04:07

 
  Freedreno
passed #2449022
google-freedreno-db410c
arm64_a306_gles2

00:08:25

passed #2449023
google-freedreno-db820c
arm64_a530_gles2

00:09:14

passed #2449015
mesa-cheza
arm64_a630_gles2

00:01:41

passed #2449020
mesa-cheza
arm64_a630_gles3

00:05:54

passed #2449018
mesa-cheza
arm64_a630_gles31

00:04:06

 
  Panfrost
passed #2449024
mesa-ci-aarch64-lava-collabora
panfrost-t720-gles2:arm64

00:08:20

passed #2449025
mesa-ci-aarch64-lava-collabora
panfrost-t760-gles2:armhf

00:05:21

passed #2449026
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles2:arm64

00:04:38

passed #2449027
mesa-ci-aarch64-lava-collabora
panfrost-t860-gles3:arm64

00:05:32

 
  Radv
passed #2449028
radv-fossils

00:00:54

 
  Virgl
passed #2449029
virgl-gles2

00:03:33

passed #2449030
virgl-gles3

00:03:56

passed #2449031
virgl-gles31

00:02:52

passed #2449032
virgl-traces

00:00:26