diff options
Diffstat (limited to 'src/mesa/drivers/dri/r200')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_context.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_screen.c | 20 |
2 files changed, 23 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 06834fb626e..fc5cf5a33f3 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -131,7 +131,7 @@ static const GLubyte *r200GetString( GLcontext *ctx, GLenum name ) /* Extension strings exported by the R200 driver. */ -static const struct dri_extension card_extensions[] = +const struct dri_extension card_extensions[] = { { "GL_ARB_multisample", GL_ARB_multisample_functions }, { "GL_ARB_multitexture", NULL }, @@ -162,17 +162,17 @@ static const struct dri_extension card_extensions[] = { NULL, NULL } }; -static const struct dri_extension blend_extensions[] = { +const struct dri_extension blend_extensions[] = { { "GL_EXT_blend_equation_separate", GL_EXT_blend_equation_separate_functions }, { "GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions }, { NULL, NULL } }; -static const struct dri_extension ARB_vp_extension[] = { +const struct dri_extension ARB_vp_extension[] = { { "GL_ARB_vertex_program", GL_ARB_vertex_program_functions } }; -static const struct dri_extension NV_vp_extension[] = { +const struct dri_extension NV_vp_extension[] = { { "GL_NV_vertex_program", GL_NV_vertex_program_functions } }; diff --git a/src/mesa/drivers/dri/r200/r200_screen.c b/src/mesa/drivers/dri/r200/r200_screen.c index ddb3a91b1dc..f0e09d5fc4e 100644 --- a/src/mesa/drivers/dri/r200/r200_screen.c +++ b/src/mesa/drivers/dri/r200/r200_screen.c @@ -90,6 +90,11 @@ DRI_CONF_BEGIN DRI_CONF_END; static const GLuint __driNConfigOptions = 17; +extern const struct dri_extension card_extensions[]; +extern const struct dri_extension blend_extensions[]; +extern const struct dri_extension ARB_vp_extension[]; +extern const struct dri_extension NV_vp_extension[]; + #if 1 /* Including xf86PciInfo.h introduces a bunch of errors... */ @@ -642,7 +647,7 @@ static const struct __DriverAPIRec r200API = { * failure. */ PUBLIC -void * __driCreateNewScreen_20050725( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc, +void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc, const __GLcontextModes * modes, const __DRIversion * ddx_version, const __DRIversion * dri_version, @@ -678,6 +683,19 @@ void * __driCreateNewScreen_20050725( __DRInativeDisplay *dpy, int scrn, __DRIsc (dri_priv->bpp == 16) ? 16 : 24, (dri_priv->bpp == 16) ? 0 : 8, (dri_priv->backOffset != dri_priv->depthOffset) ); + + /* Calling driInitExtensions here, with a NULL context pointer, does not actually + * enable the extensions. It just makes sure that all the dispatch offsets for all + * the extensions that *might* be enables are known. This is needed because the + * dispatch offsets need to be known when _mesa_context_create is called, but we can't + * enable the extensions until we have a context pointer. + * + * Hello chicken. Hello egg. How are you two today? + */ + driInitExtensions( NULL, card_extensions, GL_FALSE ); + driInitExtensions( NULL, blend_extensions, GL_FALSE ); + driInitSingleExtension( NULL, ARB_vp_extension ); + driInitSingleExtension( NULL, NV_vp_extension ); } return (void *) psp; |