vbo: fix missing state validation bugs
vbo: fix missing state validation bugs

Commit 2708ddfb06a36d8568e2aa130bf1f7d551fcd309 caused a few regressions.
We need to check/validate state after calling bind_arrays() because
it might set the _NEW_ARRAYS flag if the varying VP inputs change.

The symptom of this problem was some attribute arrays being ignored
(or interpreted as constant-valued) in glDrawRangeElements or
glMultiDrawElements.

A follow-on patch will add some additional asserts to try to catch
this kind of thing in the future.

(cherry picked from commit 3cba779e16935f7c3a0bfd8af48bd5e015068e96)

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