summaryrefslogtreecommitdiffstats
path: root/src/glx/x11/glxcmds.c
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2009-08-30 13:06:18 +0200
committerMichel Dänzer <[email protected]>2009-08-30 13:06:18 +0200
commit9053bb0d405db0b1a2a917317c7ec41e63b54f09 (patch)
treefaaa373cf126c3d23169a436f72d24c89e8d6812 /src/glx/x11/glxcmds.c
parent3c1172f06636ff4aec24a6c68df937844da73a53 (diff)
parentedb117879846155632aaeb66483a3085c7a78815 (diff)
Merge branch 'mesa_7_5_branch'
Conflicts: src/glx/x11/glxcmds.c
Diffstat (limited to 'src/glx/x11/glxcmds.c')
-rw-r--r--src/glx/x11/glxcmds.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index 2efe1919820..ea55cc49efe 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -880,6 +880,34 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap)
req->glxpixmap = xid = XAllocID(dpy);
UnlockDisplay(dpy);
SyncHandle();
+
+#ifdef GLX_DIRECT_RENDERING
+ do {
+ /* FIXME: Maybe delay __DRIdrawable creation until the drawable
+ * is actually bound to a context... */
+
+ __GLXdisplayPrivate *const priv = __glXInitialize(dpy);
+ __GLXDRIdrawable *pdraw;
+ __GLXscreenConfigs *psc;
+ __GLcontextModes *modes;
+
+ psc = &priv->screenConfigs[vis->screen];
+ if (psc->driScreen == NULL)
+ break;
+ modes = _gl_context_modes_find_visual(psc->visuals, vis->visualid);
+ pdraw = psc->driScreen->createDrawable(psc, pixmap, req->glxpixmap, modes);
+ if (pdraw == NULL) {
+ fprintf(stderr, "failed to create pixmap\n");
+ break;
+ }
+
+ if (__glxHashInsert(psc->drawHash, req->glxpixmap, pdraw)) {
+ (*pdraw->destroyDrawable) (pdraw);
+ return None; /* FIXME: Check what we're supposed to do here... */
+ }
+ } while (0);
+#endif
+
return xid;
}