draw: fix vs/fs input/output mismatches
draw: fix vs/fs input/output mismatches

When we've changed draw_find_shader_output to return -1 instead
of 0 on non found attribs we broke the default behavior of
draw, which was to always redirect those to the first (0th) slot.
To preserve that behavior if draw_emit_vertex_attr notices a
mismatched vertex attrib, it just redirects it to the first slot
(instead of trying to use negative index in an array).

Signed-off-by: Zack Rusin <6ab0df0692bc027e828ec9e4e9fbe8fa1a7842a8@vmware.com>
Reviewed-by: José Fonseca <61b5a29db2c0650f7c8510f93eece059c1b09320@vmware.com>

metora/MesaGLSLCompiler,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,benaadams/glsl-optimizer,zz85/glsl-optimizer,djreep81/glsl-optimizer,metora/MesaGLSLCompiler,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,mcanthony/glsl-optimizer,benaadams/glsl-optimizer,djreep81/glsl-optimizer,mapbox/glsl-optimizer,tokyovigilante/glsl-optimizer,dellis1972/glsl-optimizer,dellis1972/glsl-optimizer,jbarczak/glsl-optimizer,bkaradzic/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,mapbox/glsl-optimizer,dellis1972/glsl-optimizer,djreep81/glsl-optimizer,djreep81/glsl-optimizer,mapbox/glsl-optimizer,zz85/glsl-optimizer,wolf96/glsl-optimizer,tokyovigilante/glsl-optimizer,zz85/glsl-optimizer,dellis1972/glsl-optimizer,wolf96/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,tokyovigilante/glsl-optimizer,mcanthony/glsl-optimizer,mcanthony/glsl-optimizer,wolf96/glsl-optimizer,wolf96/glsl-optimizer,mcanthony/glsl-optimizer,dellis1972/glsl-optimizer,benaadams/glsl-optimizer,zeux/glsl-optimizer,zeux/glsl-optimizer,mapbox/glsl-optimizer,metora/MesaGLSLCompiler,bkaradzic/glsl-optimizer,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,zeux/glsl-optimizer,tokyovigilante/glsl-optimizer,bkaradzic/glsl-optimizer,tokyovigilante/glsl-optimizer,wolf96/glsl-optimizer,zz85/glsl-optimizer,zeux/glsl-optimizer,djreep81/glsl-optimizer,mapbox/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer