summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_context.c')
-rw-r--r--src/mesa/state_tracker/st_context.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index e4f18c842c..8f6a0c2423 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -27,11 +27,6 @@
#include "main/imports.h"
#include "main/context.h"
-#include "main/extensions.h"
-#include "main/matrix.h"
-#include "main/buffers.h"
-#include "main/scissor.h"
-#include "main/viewport.h"
#include "vbo/vbo.h"
#include "shader/shader_api.h"
#include "glapi/glapi.h"
@@ -48,7 +43,7 @@
#include "st_cb_drawpixels.h"
#include "st_cb_rasterpos.h"
#endif
-#ifdef FEATURE_OES_draw_texture
+#if FEATURE_OES_draw_texture
#include "st_cb_drawtex.h"
#endif
#include "st_cb_fbo.h"
@@ -68,8 +63,8 @@
#include "st_gen_mipmap.h"
#include "st_program.h"
#include "pipe/p_context.h"
+#include "util/u_inlines.h"
#include "draw/draw_context.h"
-#include "cso_cache/cso_cache.h"
#include "cso_cache/cso_context.h"
@@ -209,7 +204,7 @@ static void st_destroy_context_priv( struct st_context *st )
st_destroy_bitmap(st);
st_destroy_drawpix(st);
#endif
-#ifdef FEATURE_OES_draw_texture
+#if FEATURE_OES_draw_texture
st_destroy_drawtex(st);
#endif
@@ -218,8 +213,8 @@ static void st_destroy_context_priv( struct st_context *st )
}
for (i = 0; i < Elements(st->state.constants); i++) {
- if (st->state.constants[i].buffer) {
- pipe_buffer_reference(&st->state.constants[i].buffer, NULL);
+ if (st->state.constants[i]) {
+ pipe_buffer_reference(&st->state.constants[i], NULL);
}
}
@@ -330,6 +325,11 @@ void st_init_driver_functions(struct dd_function_table *functions)
st_init_drawpixels_functions(functions);
st_init_rasterpos_functions(functions);
#endif
+
+#if FEATURE_OES_draw_texture
+ st_init_drawtex_functions(functions);
+#endif
+
st_init_fbo_functions(functions);
#if FEATURE_feedback
st_init_feedback_functions(functions);