gallium: implement full reference counting for vertex/fragment programs
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 7 May 2008 14:55:33 +0000 (08:55 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 7 May 2008 14:55:33 +0000 (08:55 -0600)
commita56a59ce74b7f18f25a13992d2a2c1ae7cf973ce
tree77480d5ff607adcfa5c7688805c514e4ab5c51e3
parent10b7192747087ec25f97cdfcfc062654a2d8fe6d
gallium: implement full reference counting for vertex/fragment programs

Use _mesa_reference_vert/fragprog() wherever we assign program pointers.
Fixes a memory corruption bug found with glean/api2 test.
Another memory bug involving shaders yet to be fixed...

Picked from gallium-0.1
src/mesa/main/context.c
src/mesa/main/mtypes.h
src/mesa/main/state.c
src/mesa/shader/prog_cache.c
src/mesa/shader/program.c
src/mesa/shader/program.h
src/mesa/shader/shader_api.c
src/mesa/shader/slang/slang_link.c
src/mesa/state_tracker/st_atom_shader.c
src/mesa/state_tracker/st_context.c
src/mesa/state_tracker/st_program.h