svga: allow non-contiguous VS input declarations
This fixes a glDrawPixels regression since
b63fe0552b5f. The new
quad-drawing utility code uses 3 vertex attributes (xyz, rgba, st).
For glDrawPixels path we don't use the rgba attribute so there's a
gap in the TGSI VS input declarations (INPUT[0] = pos, INPUT[2] =
texcoord). The TGSI->VGPU10 translations code did not handle this
correctly. I missed this because my VM was configured for HWv11
while testing.
Another way to fix this would be to change the tgsi_scan.c code so
that the tgsi_shader_info::num_inputs (and num_outputs) included
the unused inputs/outputs. These counts would then actually be
"max input register index + 1" rather than "number of used inputs".
But that change could impact all drivers so put it off for now.
No regressions found with piglit or typical GL apps.
v2: also update alloc_system_value_index() to use info.file_max[]
Reviewed-by: Charmaine Lee <charmainel@vmware.com>