i965: Fold prepare() and emit() of VS surface state setup together.
i965: Fold prepare() and emit() of VS surface state setup together.

This rearranges the code a bit, and makes the upload of the binding
table take only as many surfaces as there are in use.

Reviewed-by: Kenneth Graunke <bd2562f754ec92342f93f61c25d731e290a2ffa8@whitecape.org>
Acked-by: Paul Berry <de21b9f22e6dd0bdf7890875d6e07ef4967c44ce@gmail.com>

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