i965g: Remove dead code.
[mesa.git] / src / gallium / state_trackers / dri / dri_extensions.c
index 800d462e322462fcfe761dd8ca7300b7c3e3b670..1259813a4129273fd834a7b781ca296c3c621424 100644 (file)
 #define need_GL_EXT_blend_func_separate
 #define need_GL_EXT_blend_minmax
 #define need_GL_EXT_cull_vertex
+#define need_GL_EXT_draw_buffers2
 #define need_GL_EXT_fog_coord
 #define need_GL_EXT_framebuffer_object
 #define need_GL_EXT_multi_draw_arrays
 #define need_GL_EXT_provoking_vertex
 #define need_GL_EXT_secondary_color
+#define need_GL_EXT_stencil_two_side
 #define need_GL_APPLE_vertex_array_object
 #define need_GL_NV_vertex_program
 #define need_GL_VERSION_2_0
 #define need_GL_VERSION_2_1
-#include "extension_helper.h"
+#include "main/remap_helper.h"
+#include "utils.h"
 
 /**
  * Extension strings exported by the driver.
  */
-const struct dri_extension card_extensions[] = {
+static const struct dri_extension card_extensions[] = {
    {"GL_ARB_fragment_shader", NULL},
    {"GL_ARB_map_buffer_range", GL_ARB_map_buffer_range_functions},
    {"GL_ARB_multisample", GL_ARB_multisample_functions},
@@ -83,6 +86,7 @@ const struct dri_extension card_extensions[] = {
    {"GL_ARB_texture_env_combine", NULL},
    {"GL_ARB_texture_env_dot3", NULL},
    {"GL_ARB_texture_mirrored_repeat", NULL},
+   {"GL_ARB_texture_non_power_of_two", NULL},
    {"GL_ARB_texture_rectangle", NULL},
    {"GL_ARB_vertex_array_object", GL_ARB_vertex_array_object_functions},
    {"GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions},
@@ -95,6 +99,7 @@ const struct dri_extension card_extensions[] = {
    {"GL_EXT_blend_minmax", GL_EXT_blend_minmax_functions},
    {"GL_EXT_blend_subtract", NULL},
    {"GL_EXT_cull_vertex", GL_EXT_cull_vertex_functions},
+   {"GL_EXT_draw_buffers2", GL_EXT_draw_buffers2_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},
@@ -102,6 +107,7 @@ const struct dri_extension card_extensions[] = {
    {"GL_EXT_pixel_buffer_object", NULL},
    {"GL_EXT_provoking_vertex", GL_EXT_provoking_vertex_functions},
    {"GL_EXT_secondary_color", GL_EXT_secondary_color_functions},
+   {"GL_EXT_stencil_two_side", GL_EXT_stencil_two_side_functions},
    {"GL_EXT_stencil_wrap", NULL},
    {"GL_EXT_texture_edge_clamp", NULL},
    {"GL_EXT_texture_env_combine", NULL},
@@ -126,11 +132,11 @@ dri_init_extensions(struct dri_context *ctx)
    /* The card_extensions list should be pruned according to the
     * capabilities of the pipe_screen. This is actually something
     * that can/should be done inside st_create_context().
+    * XXX Not pruning is very bogus. Always all these extensions above
+    * will be advertized, regardless what st_init_extensions
+    * (which depends on the pipe cap bits) does.
     */
-   if (ctx)
-      driInitExtensions(ctx->st->ctx, card_extensions, GL_TRUE);
-   else
-      driInitExtensions(NULL, card_extensions, GL_FALSE);
+   driInitExtensions(ctx->st->ctx, card_extensions, GL_TRUE);
 }
 
 /* vim: set sw=3 ts=8 sts=3 expandtab: */