summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_context.c
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2007-09-14 04:08:58 -0400
committerZack Rusin <zack@tungstengraphics.com>2007-09-18 06:31:22 -0400
commit9780327c5d95586a88fce94d7b47342355ead118 (patch)
tree9007ea135504d8fd90b49a391a43fa579b9374b5 /src/mesa/state_tracker/st_context.c
parentffacb1c12a77d71613e8171e31ffc348959881e4 (diff)
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.
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c4
1 files changed, 4 insertions, 0 deletions
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 );