gallium: added cso_delete_vertex_fragment_shader() functions
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 24 Apr 2008 17:52:37 +0000 (11:52 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 24 Apr 2008 18:15:05 +0000 (12:15 -0600)
commitf2c31257167f85df276322be1b8523064e8b66a9
tree2f74009aed28f5e7ef132060960b9f593e3ae296
parent35dc003c6a0845a96934f9c222bd57bb62e0a62f
gallium: added cso_delete_vertex_fragment_shader() functions

The state tracker now uses these functions to free shaders, rather than
the pipe->delete_vs/fs-state() functions.  Before, we could get in a situation
where we free() a shader and happen to alloc() a new one at the same address.
The cso_set_vertex/fragment_shader() function would no-op the state change
since the pointers were the same.  This led to problems elsewhere, of course.

The new delete functions null-out the CSO's current shader pointers.
src/gallium/auxiliary/cso_cache/cso_context.c
src/gallium/auxiliary/cso_cache/cso_context.h