diff options
Diffstat (limited to 'src/mesa/tnl/t_context.c')
-rw-r--r-- | src/mesa/tnl/t_context.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index d13056f9f39..b6f5152c741 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -87,14 +87,7 @@ _tnl_CreateContext( GLcontext *ctx ) _tnl_vtx_init( ctx ); if (ctx->_MaintainTnlProgram) { - tnl->vp_cache = (struct tnl_cache *) MALLOC(sizeof(*tnl->vp_cache)); - tnl->vp_cache->size = 5; - tnl->vp_cache->n_items = 0; - tnl->vp_cache->items = (struct tnl_cache_item**) - _mesa_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)); - + _tnl_ProgramCacheInit( ctx ); _tnl_install_pipeline( ctx, _tnl_vp_pipeline ); } else { _tnl_install_pipeline( ctx, _tnl_default_pipeline ); @@ -206,7 +199,7 @@ _tnl_InvalidateState( GLcontext *ctx, GLuint new_state ) RENDERINPUTS_SET( tnl->render_inputs_bitset, _TNL_ATTRIB_POINTSIZE ); if (ctx->ShaderObjects._VertexShaderPresent || ctx->ShaderObjects._FragmentShaderPresent) - RENDERINPUTS_SET_RANGE( tnl->render_inputs_bitset, _TNL_FIRST_ATTRIBUTE, _TNL_LAST_ATTRIBUTE ); + RENDERINPUTS_SET_RANGE( tnl->render_inputs_bitset, _TNL_FIRST_GENERIC, _TNL_LAST_GENERIC ); } |