summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/mach64/mach64_screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/mach64/mach64_screen.c')
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_screen.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/mach64/mach64_screen.c b/src/mesa/drivers/dri/mach64/mach64_screen.c
index fd9acec36f..91aa31eecc 100644
--- a/src/mesa/drivers/dri/mach64/mach64_screen.c
+++ b/src/mesa/drivers/dri/mach64/mach64_screen.c
@@ -67,7 +67,6 @@ static const GLuint __driNConfigOptions = 3;
static const GLuint __driNConfigOptions = 2;
#endif
-static PFNGLXCREATECONTEXTMODES create_context_modes = NULL;
static __GLcontextModes * fill_in_modes( __GLcontextModes * modes,
unsigned pixel_bits,
@@ -173,7 +172,7 @@ mach64FillInModes( unsigned pixel_bits, unsigned depth_bits,
num_modes = depth_buffer_factor * back_buffer_factor * 4;
- modes = (*create_context_modes)( num_modes, sizeof( __GLcontextModes ) );
+ modes = (*dri_interface->createContextModes)( num_modes, sizeof( __GLcontextModes ) );
m = modes;
for ( i = 0 ; i < depth_buffer_factor ; i++ ) {
m = fill_in_modes( m, pixel_bits,
@@ -209,7 +208,7 @@ mach64CreateScreen( __DRIscreenPrivate *sPriv )
mach64ScreenPtr mach64Screen;
ATIDRIPtr serverInfo = (ATIDRIPtr)sPriv->pDevPriv;
PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension =
- (PFNGLXSCRENABLEEXTENSIONPROC) glXGetProcAddress( (const GLubyte *) "__glXScrEnableExtension" );
+ (PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension"));
void * const psc = sPriv->psc->screenConfigs;
@@ -499,7 +498,7 @@ static struct __DriverAPIRec mach64API = {
* failure.
*/
PUBLIC
-void * __driCreateNewScreen_20050722( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc,
+void * __driCreateNewScreen_20050725( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc,
const __GLcontextModes * modes,
const __DRIversion * ddx_version,
const __DRIversion * dri_version,
@@ -507,6 +506,7 @@ void * __driCreateNewScreen_20050722( __DRInativeDisplay *dpy, int scrn, __DRIsc
const __DRIframebuffer * frame_buffer,
drmAddress pSAREA, int fd,
int internal_api_version,
+ const __DRIinterfaceMethods * interface,
__GLcontextModes ** driver_modes )
{
@@ -515,6 +515,8 @@ void * __driCreateNewScreen_20050722( __DRInativeDisplay *dpy, int scrn, __DRIsc
static const __DRIversion dri_expected = { 4, 0, 0 };
static const __DRIversion drm_expected = { 1, 0, 0 };
+ dri_interface = interface;
+
if ( ! driCheckDriDdxDrmVersions2( "Mach64",
dri_version, & dri_expected,
ddx_version, & ddx_expected,
@@ -527,15 +529,11 @@ void * __driCreateNewScreen_20050722( __DRInativeDisplay *dpy, int scrn, __DRIsc
frame_buffer, pSAREA, fd,
internal_api_version, &mach64API);
if ( psp != NULL ) {
- create_context_modes = (PFNGLXCREATECONTEXTMODES)
- glXGetProcAddress( (const GLubyte *) "__glXCreateContextModes" );
- if ( create_context_modes != NULL ) {
- ATIDRIPtr dri_priv = (ATIDRIPtr) psp->pDevPriv;
- *driver_modes = mach64FillInModes( dri_priv->cpp * 8,
- 16,
- 0,
- 1);
- }
+ ATIDRIPtr dri_priv = (ATIDRIPtr) psp->pDevPriv;
+ *driver_modes = mach64FillInModes( dri_priv->cpp * 8,
+ 16,
+ 0,
+ 1);
}
return (void *) psp;