summaryrefslogtreecommitdiffstats
path: root/src/glx/x11/glxextensions.c
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/glx/x11/glxextensions.c
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/glx/x11/glxextensions.c')
-rw-r--r--src/glx/x11/glxextensions.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/glx/x11/glxextensions.c b/src/glx/x11/glxextensions.c
index 1d99b61db08..96964d1db10 100644
--- a/src/glx/x11/glxextensions.c
+++ b/src/glx/x11/glxextensions.c
@@ -356,6 +356,7 @@ __glXProcessServerString( const struct extension_info * ext,
}
}
+#ifdef GLX_DIRECT_RENDERING
/**
* Enable a named GLX extension on a given screen.
@@ -370,14 +371,18 @@ __glXProcessServerString( const struct extension_info * ext,
* \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.