/*@{*/
struct _mesa_HashTable;
struct gl_pixelstore_attrib;
+struct gl_program_cache;
struct gl_texture_format;
struct gl_texture_image;
struct gl_texture_object;
/** Program to emulate fixed-function T&L (see above) */
struct gl_vertex_program *_TnlProgram;
+ /** Cache of fixed-function programs */
+ struct gl_program_cache *Cache;
+
#if FEATURE_MESA_program_debug
GLprogramcallbackMESA Callback;
GLvoid *CallbackData;
/** Program to emulate fixed-function texture env/combine (see above) */
struct gl_fragment_program *_TexEnvProgram;
+ /** Cache of fixed-function programs */
+ struct gl_program_cache *Cache;
+
#if FEATURE_MESA_program_debug
GLprogramcallbackMESA Callback;
GLvoid *CallbackData;
#include "context.h"
#include "hash.h"
#include "program.h"
+#include "prog_cache.h"
#include "prog_parameter.h"
#include "prog_instruction.h"
ctx->VertexProgram.TrackMatrix[i] = GL_NONE;
ctx->VertexProgram.TrackMatrixTransform[i] = GL_IDENTITY_NV;
}
+ ctx->VertexProgram.Cache = _mesa_new_program_cache();
#endif
#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program
ctx->FragmentProgram.Current = (struct gl_fragment_program *) ctx->Shared->DefaultFragmentProgram;
assert(ctx->FragmentProgram.Current);
ctx->FragmentProgram.Current->Base.RefCount++;
+ ctx->FragmentProgram.Cache = _mesa_new_program_cache();
#endif
+
/* XXX probably move this stuff */
#if FEATURE_ATI_fragment_shader
ctx->ATIFragmentShader.Enabled = GL_FALSE;