added pixel_transfer_cache
authorBrian <brian.paul@tungstengraphics.com>
Tue, 30 Oct 2007 18:24:05 +0000 (12:24 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Tue, 30 Oct 2007 18:25:25 +0000 (12:25 -0600)
src/mesa/state_tracker/st_context.c
src/mesa/state_tracker/st_context.h

index 8ced3f504c2abfbe1863918d45902ba6e3ac0ba1..e872e8b12c5f019d27842084ead9e54cade3646e 100644 (file)
@@ -92,6 +92,8 @@ struct st_context *st_create_context( GLcontext *ctx,
 
    st->haveFramebufferRegions = GL_TRUE;
 
+   st->pixel_transfer_cache = _mesa_new_program_cache();
+
 #if 0
    st_init_cb_clear( st );
    st_init_cb_program( st );
@@ -124,6 +126,8 @@ void st_destroy_context( struct st_context *st )
 #endif
    cso_cache_delete( st->cache );
 
+   _mesa_delete_program_cache(st->ctx, st->pixel_transfer_cache);
+
    st->pipe->destroy( st->pipe );
    FREE( st );
 }
index 3774a999ab2cd8c7783c7fc77e2db43282fe9c72..4de70a3b2ea0f4e0258bdff03aec0f9f24c8e8c3 100644 (file)
@@ -28,7 +28,8 @@
 #ifndef ST_CONTEXT_H
 #define ST_CONTEXT_H
 
-#include "mtypes.h"
+#include "main/mtypes.h"
+#include "shader/prog_cache.h"
 #include "pipe/p_state.h"
 
 
@@ -133,6 +134,7 @@ struct st_context
    struct st_fragment_program *fp;  /**< Currently bound fragment program */
 
    struct gl_fragment_program *pixel_transfer_program;
+   struct gl_program_cache *pixel_transfer_cache;
 
    /**
     * Buffer object which stores the ctx->Current.Attrib[] values.