summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorAapo Tahkola <aet@rasterburn.org>2005-11-02 14:07:03 +0000
committerAapo Tahkola <aet@rasterburn.org>2005-11-02 14:07:03 +0000
commit26b1c97a9dfba05334ecbe7ac312c7ee5b3a554e (patch)
tree345db099a5f2ff6215a1fb2833817fb049d6bd25 /src/mesa/tnl
parente4894177ba725c85f75bfe87bdc03d2c94b0941b (diff)
Remove some ghost code and adjust things a bit.
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_vp_build.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c
index 0fc4f6c6b55..d552748b6c8 100644
--- a/src/mesa/tnl/t_vp_build.c
+++ b/src/mesa/tnl/t_vp_build.c
@@ -1489,22 +1489,12 @@ void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx )
GLuint hash;
struct vertex_program *prev = ctx->VertexProgram._Current;
- if (ctx->VertexProgram._Enabled) {
+ if (ctx->VertexProgram._Enabled == GL_FALSE) {
/* Grab all the relevent state and put it in a single structure:
*/
key = make_state_key(ctx);
hash = hash_key(key);
- if (tnl->vp_cache == NULL) {
- tnl->vp_cache = MALLOC(sizeof(*tnl->vp_cache));
- tnl->vp_cache->size = 5;
- tnl->vp_cache->n_items = 0;
- tnl->vp_cache->items = MALLOC(tnl->vp_cache->size *
- sizeof(*tnl->vp_cache->items));
- _mesa_memset(tnl->vp_cache->items, 0, tnl->vp_cache->size *
- sizeof(*tnl->vp_cache->items));
- }
-
/* Look for an already-prepared program for this state:
*/
ctx->_TnlProgram = (struct vertex_program *)
@@ -1530,6 +1520,7 @@ void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx )
if (0)
_mesa_printf("Found existing TNL program for key %x\n", hash);
}
+ ctx->VertexProgram._Current = ctx->_TnlProgram;
}
else {
ctx->VertexProgram._Current = ctx->VertexProgram.Current;