st/mesa: unbind constant buffer when not in use
authorKeith Whitwell <keithw@vmware.com>
Tue, 2 Nov 2010 16:29:10 +0000 (16:29 +0000)
committerKeith Whitwell <keithw@vmware.com>
Tue, 2 Nov 2010 16:57:24 +0000 (16:57 +0000)
commit8dfafbf0861fe3d2542332658dd5493851053c78
treee6adb0bb2cd6f965b25a64c8d5d22234121b031b
parentdebcb434891756573ed2dc102ad1b673a8dce7da
st/mesa: unbind constant buffer when not in use

Important as more constant buffers per shader start to get used.

Fix up r600 (tested) and nv50 (untested) to cope with this.  Drivers
previously didn't see unbinds of constant buffers often or ever, so
this isn't always dealt with cleanly.

For r600 just return and keep the reference.  Will try to do better in
a followup change.
src/gallium/drivers/nv50/nv50_shader_state.c
src/gallium/drivers/r600/r600_state.c
src/mesa/state_tracker/st_atom_constbuf.c