aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2007-05-11 16:11:23 -0400
committerKristian Høgsberg <[email protected]>2007-10-10 18:00:13 -0400
commitaac367f48afc62176faf67aa6f329fbeae2004b4 (patch)
tree9afce18cf316c930ca764e27caeadb2b0fb2f0be /src/mesa/drivers/dri/radeon
parentfa72013adaab4d0755e852805e2e44d1a879a204 (diff)
Remove screenConfigs from __DRIscreen.
The screenConfigs field of __DRIscreen points back to the containing __GLXscreenConfigs struct. This is a serious abstraction violation; it assumes that the loader is libGL and that there *is* a __GLXscreenConfigs type in the loader. Using the containerOf macro, we can get from the __DRIscreen pointer to the containing __GLXscreenConfigs struct, at a place in the stack where the above is a valid assumption. Besides, the __DRI* structs shouldn't hold state other than the private pointer.
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index 2d44532a843..8f9509de5b2 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -343,7 +343,6 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
unsigned char *RADEONMMIO;
PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension =
(PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension"));
- void * const psc = sPriv->psc->screenConfigs;
if (sPriv->devPrivSize != sizeof(RADEONDRIRec)) {
fprintf(stderr,"\nERROR! sizeof(RADEONDRIRec) does not match passed size from device driver\n");
@@ -734,17 +733,17 @@ radeonCreateScreen( __DRIscreenPrivate *sPriv )
if ( glx_enable_extension != NULL ) {
if ( screen->irq != 0 ) {
- (*glx_enable_extension)( psc, "GLX_SGI_swap_control" );
- (*glx_enable_extension)( psc, "GLX_SGI_video_sync" );
- (*glx_enable_extension)( psc, "GLX_MESA_swap_control" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_SGI_swap_control" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_SGI_video_sync" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_MESA_swap_control" );
}
- (*glx_enable_extension)( psc, "GLX_MESA_swap_frame_usage" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_MESA_swap_frame_usage" );
if (IS_R200_CLASS(screen))
- (*glx_enable_extension)( psc, "GLX_MESA_allocate_memory" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_MESA_allocate_memory" );
- (*glx_enable_extension)( psc, "GLX_MESA_copy_sub_buffer" );
- (*glx_enable_extension)( psc, "GLX_SGI_make_current_read" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_MESA_copy_sub_buffer" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_SGI_make_current_read" );
}
#if RADEON_COMMON && defined(RADEON_COMMON_FOR_R200)