summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/tdfx
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2005-06-30 16:00:48 +0000
committerIan Romanick <[email protected]>2005-06-30 16:00:48 +0000
commitc212abf99af494f024b0b981a83350f7ac9821ef (patch)
treecd96ba38b82a5ecaccb7a7f28fc65168688fc2ce /src/mesa/drivers/dri/tdfx
parent1ac8ae446af753ec1bdbb789d7b575a72ff56e8f (diff)
Replace add_newer_entrypoints (src/mesa/main/context.c) with
device-specific code. A new Python script (src/mesa/glapi/extension_helper.py) generates a list of all entry-points for all known extensions. Each driver the selects only the extensions that it needs and enables the via either driInitExtensions or driInitSingleExtension. This code has been compile-tested on a drivers, but has only been run-tested on mga and i915 (on i830 hardware). These changes were discussed at length on the mesa3d-dev mailing list. http://marc.theaimsgroup.com/?t=111947074700001&r=1&w=2
Diffstat (limited to 'src/mesa/drivers/dri/tdfx')
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_context.c99
1 files changed, 62 insertions, 37 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c
index 9b4a79b858f..724416197f2 100644
--- a/src/mesa/drivers/dri/tdfx/tdfx_context.c
+++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c
@@ -62,55 +62,80 @@
#include "utils.h"
+#define need_GL_ARB_multisample
+/* #define need_GL_ARB_point_parameters */
+#define need_GL_ARB_texture_compression
+#define need_GL_ARB_vertex_buffer_object
+/* #define need_GL_ARB_vertex_program */
+#define need_GL_EXT_blend_equation_separate
+#define need_GL_EXT_blend_func_separate
+#define need_GL_EXT_blend_minmax
+#define need_GL_EXT_fog_coord
+#define need_GL_EXT_multi_draw_arrays
+#define need_GL_EXT_paletted_texture
+/* #define need_GL_EXT_secondary_color */
+#define need_GL_IBM_multimode_draw_arrays
+/* #define need_GL_MESA_program_debug */
+/* #define need_GL_NV_vertex_program */
+#include "extension_helper.h"
+
+
/**
* Common extension strings exported by all cards
*/
-static const char * const card_extensions[] =
+static const struct dri_extension card_extensions[] =
{
- "GL_ARB_texture_mirrored_repeat",
- "GL_ARB_vertex_buffer_object",
- "GL_EXT_blend_func_separate",
- "GL_EXT_fog_coord",
- "GL_EXT_multi_draw_arrays",
- "GL_EXT_paletted_texture",
- "GL_EXT_shared_texture_palette",
- "GL_EXT_stencil_wrap",
- "GL_EXT_texture_env_add",
- "GL_EXT_texture_lod_bias",
- "GL_HP_occlusion_test",
- "GL_IBM_multimode_draw_arrays",
-
-#if 0
- "GL_ARB_point_sprite",
- "GL_EXT_point_parameters",
- "GL_EXT_secondary_color",
+ { "GL_ARB_multisample", GL_ARB_multisample_functions },
+ { "GL_ARB_texture_mirrored_repeat", NULL },
+ { "GL_ARB_vertex_buffer_object", GL_ARB_vertex_buffer_object_functions },
+
+ { "GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions },
+ { "GL_EXT_fog_coord", GL_EXT_fog_coord_functions },
+ { "GL_EXT_multi_draw_arrays", GL_EXT_multi_draw_arrays_functions },
+ { "GL_EXT_paletted_texture", GL_EXT_paletted_texture_functions },
+ { "GL_EXT_shared_texture_palette", NULL },
+ { "GL_EXT_stencil_wrap", NULL },
+ { "GL_EXT_texture_env_add", NULL },
+ { "GL_EXT_texture_lod_bias", NULL },
+ { "GL_HP_occlusion_test", NULL },
+ { "GL_IBM_multimode_draw_arrays", GL_IBM_multimode_draw_arrays_functions },
+
+#ifdef need_GL_ARB_point_parameters
+ { "GL_ARB_point_parameters", GL_ARB_point_parameters_functions },
+ { "GL_ARB_point_sprite", NULL },
#endif
-#if 0
- /* not just yet */
- "GL_ARB_vertex_program",
- "GL_NV_vertex_program",
- "GL_NV_vertex_program1_1",
- "GL_MESA_program_debug",
+#ifdef need_GL_EXT_secondary_color
+ { "GL_EXT_secondary_color", GL_EXT_secondary_color_functions },
+#endif
+#ifdef need_GL_ARB_vertex_program
+ { "GL_ARB_vertex_program", GL_ARB_vertex_program_functions }
+#endif
+#ifdef need_GL_NV_vertex_program
+ { "GL_NV_vertex_program", GL_NV_vertex_program_functions }
+ { "GL_NV_vertex_program1_1", NULL },
+#endif
+#ifdef need_GL_MESA_program_debug
+ { "GL_MESA_program_debug", GL_MESA_program_debug_functions },
#endif
- NULL
+ { NULL, NULL }
};
/**
* Extension strings exported only by Naplam (e.g., Voodoo4 & Voodoo5) cards.
*/
-static const char * const napalm_extensions[] =
+static const struct dri_extension napalm_extensions[] =
{
- "GL_ARB_texture_compression",
- "GL_ARB_texture_env_combine",
- "GL_EXT_blend_equation_separate",
- "GL_EXT_blend_subtract",
- "GL_EXT_texture_compression_s3tc",
- "GL_EXT_texture_env_combine",
-
- "GL_3DFX_texture_compression_FXT1",
- "GL_NV_blend_square",
- "GL_S3_s3tc",
- NULL
+ { "GL_ARB_texture_compression", GL_ARB_texture_compression_functions },
+ { "GL_ARB_texture_env_combine", NULL },
+ { "GL_EXT_blend_equation_separate", GL_EXT_blend_equation_separate_functions },
+ { "GL_EXT_blend_subtract", GL_EXT_blend_minmax_functions },
+ { "GL_EXT_texture_compression_s3tc", NULL },
+ { "GL_EXT_texture_env_combine", NULL },
+
+ { "GL_3DFX_texture_compression_FXT1", NULL },
+ { "GL_NV_blend_square", NULL },
+ { "GL_S3_s3tc", NULL },
+ { NULL, NULL }
};
/*