st/mesa: fix a couple of issues in st_bind_ubos 52/6552/1
authorMarek Olšák <maraeo@gmail.com>
Thu, 25 Apr 2013 23:54:41 +0000 (01:54 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sat, 11 May 2013 21:45:02 +0000 (23:45 +0200)
commita17e87d4ebd84c1a01c3821c04ed9d8d7c763983
tree0996d1950a46f5ad8bee73b196fbf1d4371fbedb
parent1ba1d617bf4eff0f08df80a2805b6f25ebf038fb
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 <fredrik@kde.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_atom_constbuf.c