svga: use pipe_sampler_view_release() in svga_cleanup_tss_binding()
authorBrian Paul <brianp@vmware.com>
Tue, 27 Nov 2012 22:17:27 +0000 (15:17 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 25 Jan 2013 22:57:35 +0000 (15:57 -0700)
commitc1d35aece0afc2822d6d9f6c22664c04e6fcbba3
tree4f22584d7e411e266d781848fdc8e6cd658c7983
parent50c4c818aa61ccc2c815ea722746dd1b12dd5624
svga: use pipe_sampler_view_release() in svga_cleanup_tss_binding()

Fixes a crash when the Redway3D Turbine demo exits.  We've made this
change in other places in the past.  The root issue is texture objects
are being shared by multiple contexts and sampler views get shared too.
Sampler views have a context pointer and if that context gets deleted
we may try to reference that context when finally deleting the sampler
view.

pipe_sampler_view_release() avoids this problem because it takes
an explicit context.

Reviewed-by: Zack Rusin <zackr@vmware.com>
src/gallium/drivers/svga/svga_state_tss.c