From 9780327c5d95586a88fce94d7b47342355ead118 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Fri, 14 Sep 2007 04:08:58 -0400 Subject: First stab at immutable state objects (create/bind/delete) We want our state objects to be immutable, handled via the create/bind/delete calls instead of struct propagation. Only implementing the blend state to see how it would look like and work. --- src/mesa/state_tracker/st_context.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa/state_tracker/st_context.c') diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 6ab643f1fe..26815d5cd4 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -45,6 +45,7 @@ #include "st_program.h" #include "pipe/p_context.h" #include "pipe/draw/draw_context.h" +#include "cso_cache/cso_cache.h" void st_invalidate_state(GLcontext * ctx, GLuint new_state) @@ -71,6 +72,8 @@ struct st_context *st_create_context( GLcontext *ctx, st->dirty.mesa = ~0; st->dirty.st = ~0; + st->cache = cso_cache_create(); + st_init_atoms( st ); st_init_draw( st ); @@ -112,6 +115,7 @@ void st_destroy_context( struct st_context *st ) /*st_destroy_cb_teximage( st );*/ st_destroy_cb_texture( st ); #endif + cso_cache_destroy( st->cache ); st->pipe->destroy( st->pipe ); FREE( st ); -- cgit v1.2.3