[PATCH 2/5] Add a DDX specific GLX provider push hook
Jon TURNEY
jon.turney at dronecode.org.uk
Wed Apr 7 09:18:17 PDT 2010
This is needed to give DDX which are statically linked with extensions
a chance to install DDX specific GLX providers before the GLX extension
is initialized
The the swrast provider is installed just before GLX extension is
initialized. The GLX extension asks providers if they can support a
screen in the reverse of the provider installation order, so installing
a DDX-specific GLX provider earlier than this is not useful, as it will
always lose out to swrast. Installing the provider later than this is
not useful as the provider for each screen has already been selected
during GLX extension initialization.
Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
include/ddxhooks.h | 1 +
mi/miinitext.c | 11 ++++++++++-
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/include/ddxhooks.h b/include/ddxhooks.h
index 4d69508..cfa7307 100644
--- a/include/ddxhooks.h
+++ b/include/ddxhooks.h
@@ -27,6 +27,7 @@
struct _DdxHooks
{
void (*ddxBeforeReset)(void);
+ void (*ddxPushProviders)(void);
};
typedef struct _DdxHooks DdxHooks;
diff --git a/mi/miinitext.c b/mi/miinitext.c
index 692be86..1777e27 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -94,6 +94,7 @@ SOFTWARE.
#include "extension.h"
#include "micmap.h"
#include "globals.h"
+#include "ddxhooks.h"
extern Bool noTestExtensions;
@@ -490,7 +491,15 @@ InitExtensions(int argc, char *argv[])
#ifdef GLXEXT
if (serverGeneration == 1)
- GlxPushProvider(&__glXDRISWRastProvider);
+ {
+ GlxPushProvider(&__glXDRISWRastProvider);
+
+ if (ddxHooks.ddxPushProviders)
+ {
+ /* a chance for DDX to install providers better than swrast... */
+ ddxHooks.ddxPushProviders();
+ }
+ }
if (!noGlxExtension) GlxExtensionInit();
#endif
}
--
1.7.0.4
More information about the xorg-devel
mailing list