Merge branch 'mesa_7_7_branch'
[mesa.git] / src / mesa / state_tracker / st_context.c
index 6c463ca9398b54edffd6e6fff9ce2b22f7c4975a..a62ff248ce5992d7b611147f8a36fd2ce832b825 100644 (file)
 #include "st_cb_blit.h"
 #include "st_cb_bufferobjects.h"
 #include "st_cb_clear.h"
+#include "st_cb_condrender.h"
 #if FEATURE_drawpix
 #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"
@@ -202,7 +203,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
 
@@ -211,8 +212,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);
       }
    }
 
@@ -323,6 +324,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);
@@ -331,6 +337,7 @@ void st_init_driver_functions(struct dd_function_table *functions)
 #if FEATURE_queryobj
    st_init_query_functions(functions);
 #endif
+   st_init_cond_render_functions(functions);
    st_init_readpixels_functions(functions);
    st_init_texture_functions(functions);
    st_init_flush_functions(functions);