st/mesa: fix a couple of issues in st_bind_ubos
st/mesa: fix a couple of issues in st_bind_ubos

- don't reference a buffer for a local variable
  (that's never useful unless it can be the only reference to the buffer)
- check if the buffer is not NULL
- set buffer_size as specified with BindBufferRange

NOTE: This is a candidate for the 9.1 branch.

Reviewed-by: Fredrik Höglund <f487c7598f046a9a67757788cf85ee89028a1b14@kde.org>
Reviewed-by: Brian Paul <3cb4e1df5ec4da2c7c4af7c52cec8cf340a55a10@vmware.com>

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