implement full reference counting for vertex/fragment programs
authorBrian <brian.paul@tungstengraphics.com>
Wed, 7 May 2008 05:08:51 +0000 (23:08 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Wed, 7 May 2008 05:08:51 +0000 (23:08 -0600)
commitdf43fb661b2030d9b833a42dd47b8d7bf58d73aa
treefe53a42d227411380c67d66f05e4f2f9c323bb69
parent38c5b148531b1f470956bb9d66757e7301ce0535
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.
src/mesa/main/context.c
src/mesa/main/mtypes.h
src/mesa/main/state.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/tnl/t_vp_build.c