tgsi: correct handling of return value from util_vsnprintf
tgsi: correct handling of return value from util_vsnprintf

We were failing to deal with:
  - vsnprintf returns negative value on error.
  - vsnprintf returns the number of chars that *would* have been
    written on truncation.

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