diff options
Diffstat (limited to 'src/mesa/drivers/dri/unichrome')
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/unichrome/via_screen.c | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c index ca31245b0fd..abcdcd70a5e 100644 --- a/src/mesa/drivers/dri/unichrome/via_context.c +++ b/src/mesa/drivers/dri/unichrome/via_context.c @@ -251,7 +251,7 @@ static void viaBufferSize(GLframebuffer *buffer, GLuint *width, GLuint *height) /* Extension strings exported by the Unichrome 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 }, diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c index 8de73539259..2ae2322f8ac 100644 --- a/src/mesa/drivers/dri/unichrome/via_screen.c +++ b/src/mesa/drivers/dri/unichrome/via_screen.c @@ -61,6 +61,7 @@ DRI_CONF_BEGIN DRI_CONF_END; static const GLuint __driNConfigOptions = 3; +extern const struct dri_extension card_extensions[]; static int getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo ); @@ -402,7 +403,7 @@ viaFillInModes( unsigned pixel_bits, GLboolean have_back_buffer ) * failure. */ PUBLIC -void * __driCreateNewScreen_20050725( __DRInativeDisplay *dpy, int scrn, +void * __driCreateNewScreen_20050727( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc, const __GLcontextModes * modes, const __DRIversion * ddx_version, @@ -437,6 +438,16 @@ void * __driCreateNewScreen_20050725( __DRInativeDisplay *dpy, int scrn, VIADRIPtr dri_priv = (VIADRIPtr) psp->pDevPriv; *driver_modes = viaFillInModes( dri_priv->bytesPerPixel * 8, GL_TRUE ); + + /* 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 ); } fprintf(stderr, "%s - succeeded\n", __FUNCTION__); |