From e59086ab91281cafcae094164bf4d8454df337ae Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Sun, 13 Jul 2008 18:04:49 +0200 Subject: EGL: Only build EGL dri based drivers under linux-dri based configs --- src/egl/drivers/Makefile | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'src/egl/drivers') 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: -- cgit v1.2.3 From e7fd3de9277a0c5efe52966908da8e4e7f1995ee Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 14 Jul 2008 12:09:07 -0600 Subject: egl: set EGL_CONFORMANT, EGL_RENDERABLE_TYPE config fields, fix null ptr crashes in MakeCurrent --- src/egl/drivers/xdri/egl_xdri.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/egl/drivers') diff --git a/src/egl/drivers/xdri/egl_xdri.c b/src/egl/drivers/xdri/egl_xdri.c index dfb491958b8..2471c0425cf 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; @@ -201,6 +205,8 @@ create_configs(_EGLDisplay *disp, __GLXdisplayPrivate *glx_priv) SET_CONFIG_ATTRIB(&config->Base, EGL_STENCIL_SIZE, m->stencilBits); 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 +660,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 +756,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; } -- cgit v1.2.3 From 26df49cd7a67aa9dc26e9cf271d6ed121f08f95d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 16 Jul 2008 10:34:50 -0600 Subject: egl: set EGL_SAMPLES, EGL_SAMPLE_BUFFERS config attribs --- src/egl/drivers/xdri/egl_xdri.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/egl/drivers') diff --git a/src/egl/drivers/xdri/egl_xdri.c b/src/egl/drivers/xdri/egl_xdri.c index 2471c0425cf..3681d9879a2 100644 --- a/src/egl/drivers/xdri/egl_xdri.c +++ b/src/egl/drivers/xdri/egl_xdri.c @@ -203,6 +203,8 @@ 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); -- cgit v1.2.3