diff options
author | Kristian Høgsberg <krh@redhat.com> | 2008-02-27 11:19:29 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2008-02-27 11:24:29 -0500 |
commit | 60c0f09abb9421de359cd92e094a943d650fc7fa (patch) | |
tree | 8a5bf33c1de4e653dd61aae2a39617850ff68dc8 /src/mesa/drivers | |
parent | c34b024cf49f3fc06271d561a4069c77d7b65c48 (diff) |
intel: Always use intelInitExtensions() for initializing extensions.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 15 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_context.c | 19 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_context.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_screen.c | 17 |
4 files changed, 17 insertions, 35 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 2d32f1d614..349b8be49b 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -52,18 +52,6 @@ * Mesa's Driver Functions ***************************************/ -static const struct dri_extension brw_extensions[] = -{ - { "GL_ARB_depth_texture", NULL }, - { "GL_ARB_fragment_program", NULL }, - { "GL_ARB_shadow", NULL }, - { "GL_EXT_shadow_funcs", NULL }, - /* ARB extn won't work if not enabled */ - { "GL_SGIX_depth_texture", NULL }, - { "GL_ARB_texture_env_crossbar", NULL }, - { NULL, NULL } -}; - static void brwUseProgram(GLcontext *ctx, GLuint program) { struct brw_context *brw = brw_context(ctx); @@ -176,9 +164,6 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis, /* ctx->Const.MaxNativeVertexProgramTemps = 32; */ - - driInitExtensions( ctx, brw_extensions, GL_FALSE ); - brw_init_attribs( brw ); brw_init_metaops( brw ); brw_init_state( brw ); diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index d5cb07de99..7e39f687bf 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -189,7 +189,7 @@ intelGetString(GLcontext * ctx, GLenum name) * It appears that ARB_texture_env_crossbar has "disappeared" compared to the * old i830-specific driver. */ -const struct dri_extension card_extensions[] = { +static const struct dri_extension card_extensions[] = { {"GL_ARB_multisample", GL_ARB_multisample_functions}, {"GL_ARB_multitexture", NULL}, {"GL_ARB_point_parameters", GL_ARB_point_parameters_functions}, @@ -243,22 +243,29 @@ const struct dri_extension card_extensions[] = { {NULL, NULL} }; -const struct dri_extension brw_extensions[] = { +static const struct dri_extension brw_extensions[] = { { "GL_ARB_shading_language_100", GL_VERSION_2_0_functions}, { "GL_ARB_shading_language_120", GL_VERSION_2_1_functions}, { "GL_ARB_shader_objects", GL_ARB_shader_objects_functions}, { "GL_ARB_vertex_shader", GL_ARB_vertex_shader_functions}, { "GL_ARB_fragment_shader", NULL }, { "GL_ARB_draw_buffers", NULL }, - {NULL, NULL} + { "GL_ARB_depth_texture", NULL }, + { "GL_ARB_fragment_program", NULL }, + { "GL_ARB_shadow", NULL }, + { "GL_EXT_shadow_funcs", NULL }, + /* ARB extn won't work if not enabled */ + { "GL_SGIX_depth_texture", NULL }, + { "GL_ARB_texture_env_crossbar", NULL }, + { NULL, NULL } }; -const struct dri_extension arb_oc_extensions[] = { +static const struct dri_extension arb_oc_extensions[] = { {"GL_ARB_occlusion_query", GL_ARB_occlusion_query_functions}, {NULL, NULL} }; -const struct dri_extension ttm_extensions[] = { +static const struct dri_extension ttm_extensions[] = { {"GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions}, {"GL_ARB_pixel_buffer_object", NULL}, {NULL, NULL} @@ -268,7 +275,7 @@ const struct dri_extension ttm_extensions[] = { * Initializes potential list of extensions if ctx == NULL, or actually enables * extensions for a context. */ -static void intelInitExtensions(GLcontext *ctx, GLboolean enable_imaging) +void intelInitExtensions(GLcontext *ctx, GLboolean enable_imaging) { struct intel_context *intel = ctx?intel_context(ctx):NULL; diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h index 818856d89a..6c97955b14 100644 --- a/src/mesa/drivers/dri/intel/intel_context.h +++ b/src/mesa/drivers/dri/intel/intel_context.h @@ -416,6 +416,7 @@ extern void intelFinish(GLcontext * ctx); extern void intelFlush(GLcontext * ctx); extern void intelInitDriverFunctions(struct dd_function_table *functions); +extern void intelInitExtensions(GLcontext *ctx, GLboolean enable_imaging); /* ================================================================ diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 8dec808ecf..5d0bf4a1da 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -72,12 +72,6 @@ const GLuint __driNConfigOptions = 5; static PFNGLXCREATECONTEXTMODES create_context_modes = NULL; #endif /*USE_NEW_INTERFACE */ -extern const struct dri_extension card_extensions[]; -extern const struct dri_extension ttm_extensions[]; -#ifndef I915 -extern const struct dri_extension arb_oc_extensions[]; -#endif - /** * Map all the memory regions described by the screen. * \return GL_TRUE if success, GL_FALSE if error. @@ -803,12 +797,8 @@ PUBLIC __GLcontextModes *__driDriverInitScreen(__DRIscreenPrivate *psp) * * Hello chicken. Hello egg. How are you two today? */ - driInitExtensions(NULL, card_extensions, GL_FALSE); - driInitExtensions(NULL, ttm_extensions, GL_FALSE); -#ifndef I915 - driInitExtensions(NULL, arb_oc_extensions, GL_FALSE); -#endif - + intelInitExtensions(NULL, GL_TRUE); + if (!intelInitDriver(psp)) return NULL; @@ -865,8 +855,7 @@ PUBLIC __GLcontextModes *__dri2DriverInitScreen(__DRIscreenPrivate *psp) * * Hello chicken. Hello egg. How are you two today? */ - driInitExtensions(NULL, card_extensions, GL_FALSE); - driInitExtensions(NULL, ttm_extensions, GL_FALSE); + intelInitExtensions(NULL, GL_TRUE); /* Allocate the private area */ intelScreen = (intelScreenPrivate *) CALLOC(sizeof(intelScreenPrivate)); |