Don't initialize extensions we can't support when !ttm.
authorEric Anholt <eric@anholt.net>
Tue, 31 Jul 2007 16:21:20 +0000 (09:21 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 31 Jul 2007 16:24:04 +0000 (09:24 -0700)
src/mesa/drivers/dri/i915tex/intel_context.c

index cd4333d0d34f1bd74b0be335033aeed65e7f16fa..3eb58bdd9cefecf409deb19a9a8d42061b999e34 100644 (file)
@@ -177,7 +177,6 @@ const struct dri_extension card_extensions[] = {
    {"GL_ARB_texture_mirrored_repeat", NULL},
    {"GL_ARB_texture_rectangle", NULL},
    {"GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions},
-   {"GL_ARB_pixel_buffer_object", NULL},
    {"GL_ARB_vertex_program", GL_ARB_vertex_program_functions},
    {"GL_ARB_window_pos", GL_ARB_window_pos_functions},
    {"GL_EXT_blend_color", GL_EXT_blend_color_functions},
@@ -188,7 +187,6 @@ const struct dri_extension card_extensions[] = {
    {"GL_EXT_blend_subtract", NULL},
    {"GL_EXT_cull_vertex", GL_EXT_cull_vertex_functions},
    {"GL_EXT_fog_coord", GL_EXT_fog_coord_functions},
-   {"GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions},
    {"GL_EXT_multi_draw_arrays", GL_EXT_multi_draw_arrays_functions},
 #if 1                           /* XXX FBO temporary? */
    {"GL_EXT_packed_depth_stencil", NULL},
@@ -211,6 +209,12 @@ const struct dri_extension card_extensions[] = {
    {NULL, NULL}
 };
 
+const struct dri_extension ttm_extensions[] = {
+   {"GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions},
+   {"GL_ARB_pixel_buffer_object", NULL},
+   {NULL, NULL}
+};
+
 extern const struct tnl_pipeline_stage _intel_render_stage;
 
 static const struct tnl_pipeline_stage *intel_pipeline[] = {
@@ -468,6 +472,9 @@ intelInitContext(struct intel_context *intel,
 /*                   GL_TRUE, */
                      GL_FALSE);
 
+   if (intelScreen->ttm)
+      driInitExtensions(ctx, ttm_extensions, GL_FALSE);
+
 
    intel->batch = intel_batchbuffer_alloc(intel);
    intel->last_swap_fence = NULL;