summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_context.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-06 20:53:28 +0100
committerBrian <brian.paul@tungstengraphics.com>2007-08-06 20:53:28 +0100
commit6da9234fd437f97267e7831f034c78b31156d939 (patch)
treea272c747c910a58cb2a74ca7fbdae059af2437d1 /src/mesa/state_tracker/st_context.c
parent8ebf91d15eeb6f19d19580f6319477aaad4df3fd (diff)
New st_init_*_functions() to initialize the driver functions table.
We need to do these initializations before initializing the Mesa context because context init involves creating texture/program/etc objects.
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 2b96286770..0ea06c692d 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -28,6 +28,7 @@
#include "imports.h"
#include "st_public.h"
#include "st_context.h"
+#include "st_cb_bufferobjects.h"
#include "st_cb_clear.h"
#include "st_cb_drawpixels.h"
#include "st_cb_texture.h"
@@ -61,10 +62,17 @@ struct st_context *st_create_context( GLcontext *ctx,
st_init_atoms( st );
st_init_draw( st );
+ /* Need these flags:
+ */
+ st->ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
+ st->ctx->FragmentProgram._UseTexEnvProgram = GL_TRUE;
+
+#if 0
st_init_cb_clear( st );
st_init_cb_program( st );
st_init_cb_drawpixels( st );
st_init_cb_texture( st );
+#endif
return st;
}
@@ -75,11 +83,13 @@ void st_destroy_context( struct st_context *st )
st_destroy_atoms( st );
st_destroy_draw( st );
+#if 0
st_destroy_cb_clear( st );
st_destroy_cb_program( st );
st_destroy_cb_drawpixels( st );
/*st_destroy_cb_teximage( st );*/
st_destroy_cb_texture( st );
+#endif
st->pipe->destroy( st->pipe );
FREE( st );
@@ -87,3 +97,11 @@ void st_destroy_context( struct st_context *st )
+void st_init_driver_functions(struct dd_function_table *functions)
+{
+ st_init_bufferobject_functions(functions);
+ st_init_clear_functions(functions);
+ st_init_drawpixels_functions(functions);
+ st_init_program_functions(functions);
+ st_init_texture_functions(functions);
+}