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 <>
Reviewed-by: Jose Maria Casanova Crespo <>
Reviewed-by: Marek Olšák <>
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)
merge request