Commit 879515b1 authored by Kristian Høgsberg's avatar Kristian Høgsberg Committed by Kristian Høgsberg

Add GLX provider for DRI2.

parent b71dc543
......@@ -25,6 +25,7 @@ INCLUDES = \
-I$(top_srcdir)/hw/xfree86/os-support/bus \
-I$(top_srcdir)/hw/xfree86/common \
-I$(top_srcdir)/hw/xfree86/dri \
-I$(top_srcdir)/hw/xfree86/dri2 \
-I$(top_srcdir)/mi
......@@ -36,6 +37,7 @@ nodist_libglx_la_SOURCES = indirect_size.h \
libglxdri_la_SOURCES = \
glxdri.c \
glxdri2.c \
extension_string.c \
extension_string.h
......
This diff is collapsed.
......@@ -280,6 +280,30 @@ void GlxSetVisualConfigs(int nconfigs,
* call it. */
}
static void
filterOutNativeConfigs(__GLXscreen *pGlxScreen)
{
__GLcontextModes *m, *next, *native_modes, **last;
ScreenPtr pScreen = pGlxScreen->pScreen;
int i, depth;
last = &pGlxScreen->fbconfigs;
for (m = pGlxScreen->fbconfigs; m != NULL; m = next) {
next = m->next;
depth = m->redBits + m->blueBits + m->greenBits;
for (i = 0; i < pScreen->numVisuals; i++) {
if (pScreen->visuals[i].nplanes == depth) {
*last = m;
last = &m->next;
break;
}
}
}
*last = NULL;
}
static XID
findVisualForConfig(ScreenPtr pScreen, __GLcontextModes *m)
{
......@@ -513,6 +537,8 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen)
pGlxScreen->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = glxCloseScreen;
filterOutNativeConfigs(pGlxScreen);
i = 0;
for (m = pGlxScreen->fbconfigs; m != NULL; m = m->next) {
m->fbconfigID = FakeClientID(0);
......
......@@ -125,6 +125,9 @@ glxSetup(pointer module, pointer opts, int *errmaj, int *errmin)
provider = LoaderSymbol("__glXDRIProvider");
if (provider)
GlxPushProvider(provider);
provider = LoaderSymbol("__glXDRI2Provider");
if (provider)
GlxPushProvider(provider);
}
switch (xf86Info.glxVisuals) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment