* \c __DRIinterfaceMethods::getProcAddress. This function is used to enable
* a GLX extension on the specified screen.
*/
-typedef void (* PFNGLXSCRENABLEEXTENSIONPROC) ( void *psc, const char * name );
+typedef void (* PFNGLXSCRENABLEEXTENSIONPROC) (__DRIscreen *screen,
+ const char *name);
/*@}*/
*/
int (*getMSC)( void *screenPrivate, int64_t *msc );
- /**
- * Opaque pointer that points back to the containing
- * \c __GLXscreenConfigs. This data structure is shared with DRI drivers
- * but \c __GLXscreenConfigs is not. However, they are needed by some GLX
- * functions called by DRI drivers.
- *
- * \since Internal API version 20030813.
- */
- void *screenConfigs;
-
/**
* Functions associated with MESA_allocate_memory.
*
if (priv->driDisplay.createNewScreen &&
priv->driDisplay.createNewScreen[i]) {
- psc->driScreen.screenConfigs = (void *)psc;
psc->driScreen.private =
CallCreateNewScreen(dpy, i, psc,
& priv->driDisplay,
}
}
+#ifdef GLX_DIRECT_RENDERING
/**
* Enable a named GLX extension on a given screen.
* \since Internal API version 20030813.
*/
void
-__glXScrEnableExtension( __GLXscreenConfigs *psc, const char * name )
+__glXScrEnableExtension( __DRIscreen *driScreen, const char * name )
{
+ __GLXscreenConfigs *psc =
+ containerOf(driScreen, __GLXscreenConfigs, driScreen);
+
__glXExtensionsCtr();
__glXExtensionsCtrScreen(psc);
set_glx_extension( known_glx_extensions, name, strlen( name ), GL_TRUE,
psc->direct_support );
}
+#endif
/**
* Initialize global extension support tables.
extern const char * __glXGetClientExtensions( void );
extern void __glXCalculateUsableExtensions( struct __GLXscreenConfigsRec *psc,
GLboolean display_is_direct_capable, int server_minor_version );
-extern void __glXScrEnableExtension( struct __GLXscreenConfigsRec *psc, const char * name );
+
+#ifdef GLX_DIRECT_RENDERING
+
+struct __DRIscreenRec;
+extern void __glXScrEnableExtension( struct __DRIscreenRec *driScreen, const char * name );
+
+#endif
+
extern void __glXCalculateUsableGLExtensions( struct __GLXcontextRec * gc,
const char * server_string, int major_version, int minor_version );
extern void __glXGetGLVersion( int * major_version, int * minor_version );
PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension =
(PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->
getProcAddress("glxEnableExtension"));
- void *const psc = sPriv->psc->screenConfigs;
if (sPriv->devPrivSize != sizeof(I830DRIRec)) {
fprintf(stderr,
}
if (glx_enable_extension != NULL) {
- (*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) (psc, "GLX_MESA_swap_frame_usage");
- (*glx_enable_extension) (psc, "GLX_SGI_make_current_read");
+ (*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) (sPriv->psc, "GLX_MESA_swap_frame_usage");
+ (*glx_enable_extension) (sPriv->psc, "GLX_SGI_make_current_read");
}
/* If we've got a new enough DDX that's initializing TTM and giving us
I830DRIPtr gDRIPriv = (I830DRIPtr)sPriv->pDevPriv;
PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension =
(PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension"));
- void * const psc = sPriv->psc->screenConfigs;
volatile drmI830Sarea *sarea;
if (sPriv->devPrivSize != sizeof(I830DRIRec)) {
}
if (glx_enable_extension != NULL) {
- (*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)( psc, "GLX_MESA_swap_frame_usage" );
- (*glx_enable_extension)( psc, "GLX_SGI_make_current_read" );
- (*glx_enable_extension)( psc, "GLX_MESA_copy_sub_buffer" );
+ (*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)( sPriv->psc, "GLX_MESA_swap_frame_usage" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_SGI_make_current_read" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_MESA_copy_sub_buffer" );
}
return GL_TRUE;
ATIDRIPtr serverInfo = (ATIDRIPtr)sPriv->pDevPriv;
PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension =
(PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension"));
- void * const psc = sPriv->psc->screenConfigs;
if (sPriv->devPrivSize != sizeof(ATIDRIRec)) {
fprintf(stderr,"\nERROR! sizeof(ATIDRIRec) does not match passed size from device driver\n");
if ( glx_enable_extension != NULL ) {
if ( mach64Screen->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" );
}
return mach64Screen;
MGADRIPtr serverInfo = (MGADRIPtr)sPriv->pDevPriv;
PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension =
(PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension"));
- void * const psc = sPriv->psc->screenConfigs;
if (sPriv->devPrivSize != sizeof(MGADRIRec)) {
fprintf(stderr,"\nERROR! sizeof(MGADRIRec) does not match passed size from device driver\n");
}
if ( glx_enable_extension != NULL ) {
- (*glx_enable_extension)( psc, "GLX_MESA_swap_control" );
- (*glx_enable_extension)( psc, "GLX_MESA_swap_frame_usage" );
- (*glx_enable_extension)( psc, "GLX_SGI_make_current_read" );
- (*glx_enable_extension)( psc, "GLX_SGI_swap_control" );
- (*glx_enable_extension)( psc, "GLX_SGI_video_sync" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_MESA_swap_control" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_MESA_swap_frame_usage" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_SGI_make_current_read" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_SGI_swap_control" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_SGI_video_sync" );
}
if (serverInfo->chipset != MGA_CARD_TYPE_G200 &&
R128DRIPtr r128DRIPriv = (R128DRIPtr)sPriv->pDevPriv;
PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension =
(PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension"));
- void * const psc = sPriv->psc->screenConfigs;
if (sPriv->devPrivSize != sizeof(R128DRIRec)) {
fprintf(stderr,"\nERROR! sizeof(R128DRIRec) does not match passed size from device driver\n");
if ( glx_enable_extension != NULL ) {
if ( r128Screen->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" );
}
return r128Screen;
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");
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)
__driConfigOptions, __driNConfigOptions);
if (glx_enable_extension != NULL) {
- (*glx_enable_extension)(sPriv->psc->screenConfigs,
- "GLX_SGI_make_current_read");
+ (*glx_enable_extension)(sPriv->psc, "GLX_SGI_make_current_read");
}
#if 0
TDFXDRIPtr fxDRIPriv = (TDFXDRIPtr) sPriv->pDevPriv;
PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension =
(PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension"));
- void *const psc = sPriv->psc->screenConfigs;
if (sPriv->devPrivSize != sizeof(TDFXDRIRec)) {
fprintf(stderr,"\nERROR! sizeof(TDFXDRIRec) does not match passed size from device driver\n");
}
if (glx_enable_extension != NULL) {
- (*glx_enable_extension)(psc, "GLX_SGI_make_current_read");
+ (*glx_enable_extension)(sPriv->psc, "GLX_SGI_make_current_read");
}
return GL_TRUE;
VIADRIPtr gDRIPriv = (VIADRIPtr)sPriv->pDevPriv;
PFNGLXSCRENABLEEXTENSIONPROC glx_enable_extension =
(PFNGLXSCRENABLEEXTENSIONPROC) (*dri_interface->getProcAddress("glxEnableExtension"));
- void * const psc = sPriv->psc->screenConfigs;
if (sPriv->devPrivSize != sizeof(VIADRIRec)) {
fprintf(stderr,"\nERROR! sizeof(VIADRIRec) does not match passed size from device driver\n");
if ( glx_enable_extension != NULL ) {
if ( viaScreen->irqEnabled ) {
- (*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_SGI_make_current_read" );
- (*glx_enable_extension)( psc, "GLX_MESA_swap_frame_usage" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_SGI_make_current_read" );
+ (*glx_enable_extension)( sPriv->psc, "GLX_MESA_swap_frame_usage" );
}
return GL_TRUE;