summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2008-07-23 14:05:22 +1000
committerBen Skeggs <[email protected]>2008-07-23 14:05:22 +1000
commit704dca40c4e0e983c07d84c3a32f8f9dc78a5543 (patch)
treebdcc585315d88274ec795b7206a143d562f54a76 /src/egl/drivers
parent0c25ac52425e6d6eb037b99ab90f41b47e3f4491 (diff)
parent7f3d6e74817e8880a0712c85f2b41fd88cf6a347 (diff)
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/egl/drivers')
-rw-r--r--src/egl/drivers/Makefile21
-rw-r--r--src/egl/drivers/xdri/egl_xdri.c17
2 files changed, 16 insertions, 22 deletions
diff --git a/src/egl/drivers/Makefile b/src/egl/drivers/Makefile
index 6ce0e6b66d1..f0538f563f7 100644
--- a/src/egl/drivers/Makefile
+++ b/src/egl/drivers/Makefile
@@ -3,27 +3,10 @@
TOP = ../../..
include $(TOP)/configs/current
+SUBDIRS = $(EGL_DRIVERS_DIRS)
-SUBDIRS = demo dri xdri
-
-
-default: dri_subdirs
-
-
-# (UNUSED) depending on $DRIVER_DIRS...
-conditional_subdirs:
- @if [ "${DRIVER_DIRS}" = "dri" ] ; then \
- $(MAKE) dri_subdirs ; \
- fi
-
-
-dri_subdirs:
- @ (cd dri ; $(MAKE)) || exit 1
- @ (cd xdri ; $(MAKE)) || exit 1
-
-demo_subdir:
- @ (cd demo ; $(MAKE)) || exit 1
+default: subdirs
subdirs:
diff --git a/src/egl/drivers/xdri/egl_xdri.c b/src/egl/drivers/xdri/egl_xdri.c
index dfb491958b8..3681d9879a2 100644
--- a/src/egl/drivers/xdri/egl_xdri.c
+++ b/src/egl/drivers/xdri/egl_xdri.c
@@ -181,6 +181,10 @@ get_drawable_size(Display *dpy, Drawable d, uint *width, uint *height)
static void
create_configs(_EGLDisplay *disp, __GLXdisplayPrivate *glx_priv)
{
+ static const EGLint all_apis = (EGL_OPENGL_ES_BIT |
+ EGL_OPENGL_ES2_BIT |
+ EGL_OPENVG_BIT |
+ EGL_OPENGL_BIT);
__GLXscreenConfigs *scrn = glx_priv->screenConfigs;
const __GLcontextModes *m;
int id = 1;
@@ -199,8 +203,12 @@ create_configs(_EGLDisplay *disp, __GLXdisplayPrivate *glx_priv)
SET_CONFIG_ATTRIB(&config->Base, EGL_ALPHA_SIZE, m->alphaBits);
SET_CONFIG_ATTRIB(&config->Base, EGL_DEPTH_SIZE, m->depthBits);
SET_CONFIG_ATTRIB(&config->Base, EGL_STENCIL_SIZE, m->stencilBits);
+ SET_CONFIG_ATTRIB(&config->Base, EGL_SAMPLES, m->samples);
+ SET_CONFIG_ATTRIB(&config->Base, EGL_SAMPLE_BUFFERS, m->sampleBuffers);
SET_CONFIG_ATTRIB(&config->Base, EGL_NATIVE_VISUAL_ID, m->visualID);
SET_CONFIG_ATTRIB(&config->Base, EGL_NATIVE_VISUAL_TYPE, m->visualType);
+ SET_CONFIG_ATTRIB(&config->Base, EGL_CONFORMANT, all_apis);
+ SET_CONFIG_ATTRIB(&config->Base, EGL_RENDERABLE_TYPE, all_apis);
/* XXX only window rendering allowed ATM */
SET_CONFIG_ATTRIB(&config->Base, EGL_SURFACE_TYPE, EGL_WINDOW_BIT);
@@ -654,7 +662,9 @@ xdri_eglTerminate(_EGLDriver *drv, EGLDisplay dpy)
_eglLog(_EGL_DEBUG, "XDRI: eglTerminate");
_eglLog(_EGL_DEBUG, "XDRI: Closing %s", xdri_drv->dri_driver_name);
+#if 0
dlclose(xdri_drv->dri_driver_handle);
+#endif
xdri_drv->dri_driver_handle = NULL;
free((void*) xdri_drv->dri_driver_name);
@@ -748,15 +758,16 @@ xdri_eglMakeCurrent(_EGLDriver *drv, EGLDisplay dpy, EGLSurface d,
struct xdri_egl_context *xdri_ctx = lookup_context(context);
struct xdri_egl_surface *xdri_draw = lookup_surface(d);
struct xdri_egl_surface *xdri_read = lookup_surface(r);
- __DRIid draw = xdri_draw->driDrawable;
- __DRIid read = xdri_read->driDrawable;
+ __DRIid draw = xdri_draw ? xdri_draw->driDrawable : 0;
+ __DRIid read = xdri_read ? xdri_read->driDrawable : 0;
int scrn = DefaultScreen(disp->Xdpy);
if (!_eglMakeCurrent(drv, dpy, d, r, context))
return EGL_FALSE;
- if (!xdri_ctx->driContext.bindContext(disp->Xdpy, scrn, draw, read,
+ if (xdri_ctx &&
+ !xdri_ctx->driContext.bindContext(disp->Xdpy, scrn, draw, read,
&xdri_ctx->driContext)) {
return EGL_FALSE;
}