On 2014-12-22 09:24, Emil Velikov wrote:
On 22/12/14 14:36, Alexander von Gluck IV wrote:
From: Adrián Arroyo Calle <adrian.arroyoca...@gmail.com>

---
 src/egl/drivers/dri2/egl_dri2.c         |    7 ++
src/egl/drivers/dri2/platform_haiku.cpp | 172 +++++++++++++++++++++++++------
 src/egl/main/SConscript                 |   14 ++-
 src/egl/main/egldisplay.c               |    4 +
 4 files changed, 160 insertions(+), 37 deletions(-)

diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 062fb54..5bda4fd 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -398,9 +398,16 @@ dri2_open_driver(_EGLDisplay *disp)
               "%.*s/tls/%s_dri.so", len, p, dri2_dpy->driver_name);
       dri2_dpy->driver = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
 #endif
+
+
       if (dri2_dpy->driver == NULL) {
+#ifndef HAVE_HAIKU_PLATFORM
         snprintf(path, sizeof path,
                  "%.*s/%s_dri.so", len, p, dri2_dpy->driver_name);
+#else
+        snprintf(path, sizeof path,
+                 "lib%s.so",len,p,dri2_dpy->driver_name);
+#endif
Imho Haiku's way of "reinventing" the DRI model/modules is rather
unfortunate, and it would be nice if it can just follow suite. Unless of
course there is some real (technical) reasons which prohibits it from
going otherwise.

A few reasons:

* libpciaccess needs ported to Haiku to use dri2 or wrapper code needs created. * our video card driver model is substantially different from Linux splitting apart the card driver from the card functions. The driver only enables multiple accelerants to connect to the card device (/dev/graphics/radeonhd_0_0) at once. The driver sets up memory areas and passes these areas to each accelerant. It could be done but it would require someone with deep understanding
    of dri2 and Haiku's graphics card stack.
* Our OpenGL subsystem works using the Mesa GL Dispatch code adding additional complexity.
    http://cgit.freedesktop.org/mesa/mesa/tree/src/hgl/GLDispatcher.cpp


And the biggest reason:
  * I don't have a ton of free time anymore due to a baby :-)

If someone smarter than me could figure out how to do dri2 in a way that makes sense
we would likely jump on it to help reduce upkeep for Mesa (and us)

  -- Alex

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to