Hello,
Dan Nicholson, le Wed 22 Apr 2009 06:31:54 -0700, a écrit :
> Could you split the patch in two? One patch for direct rendering fixes
> and one for hurd specific fixes?
Sure. Attached patch-mesa-gnu is
- dri_interface.h: no libdrm support either.
- configure.ac:
- GNU/Hurd is a GNU OS with _GNU_SOURCE and PTHREADS.
- GNU needs a couple of flags like other OSes.
and can probably be applied without problem indeed.
patch-mesa-nongnu is
- dri2.c: only compile if GLX_DIRECT_RENDERING
- configure.ac: libdrm should only be required if direct rendering is enable,
which
then should be configured earlier.
> I'd like to get confirmation from someone more knowledgeable about
> DRI to confirm that libdrm and dri2.c are not needed without direct
> rendering. I'm hitting build errors on i915 with this patch and
> --disable-driglx-direct because it's still pulling in drm.h. I'm
> guessing you want swrast only, which is not the same as indirect only.
Well, the thing is: GNU/Hurd does not have libdrm because it uses ioctls
that do not exist (and actually can not be expressed at the moment) on
GNU/Hurd.
Samuel
--- src/glx/x11/dri2.c.orig 2009-04-10 00:14:44.000000000 +0000
+++ src/glx/x11/dri2.c 2009-04-10 00:14:50.000000000 +0000
--- include/GL/internal/dri_interface.h.orig 2009-04-10 00:37:16.000000000
+0000
+++ include/GL/internal/dri_interface.h 2009-04-10 00:37:23.000000000 +0000
@@ -41,7 +41,7 @@
#define DRI_INTERFACE_H
/* For archs with no drm.h */
-#if !defined(__APPLE__) && !defined(__CYGWIN__)
+#if !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(__GNU__)
#include <drm.h>
#else
typedef unsigned int drm_context_t;
--- /var/tmp/configure.ac 2009-04-09 23:52:09.000000000 +0000
+++ configure.ac 2009-04-10 00:48:37.000000000 +0000
@@ -87,7 +87,7 @@
DEFINES=""
AC_SUBST([DEFINES])
case "$host_os" in
-linux*|*-gnu*)
+linux*|*-gnu*|gnu*)
DEFINES="$DEFINES -D_GNU_SOURCE -DPTHREADS"
;;
solaris*)
@@ -698,6 +698,10 @@
unichrome savage sis swrast"
fi
;;
+ gnu*)
+ DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
+ DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS"
+ ;;
solaris*)
DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING"
--- src/glx/x11/dri2.c.orig 2009-04-10 00:14:44.000000000 +0000
+++ src/glx/x11/dri2.c 2009-04-10 00:14:50.000000000 +0000
@@ -30,6 +30,7 @@
* Kristian Høgsberg ([email protected])
*/
+#ifdef GLX_DIRECT_RENDERING
#define NEED_REPLIES
#include <X11/Xlibint.h>
UnlockDisplay(dpy);
SyncHandle();
}
+#endif
--- include/GL/internal/dri_interface.h.orig 2009-04-10 00:37:16.000000000
+0000
+++ include/GL/internal/dri_interface.h 2009-04-10 00:37:23.000000000 +0000
@@ -41,7 +41,7 @@
#define DRI_INTERFACE_H
/* For archs with no drm.h */
-#if !defined(__APPLE__) && !defined(__CYGWIN__)
+#if !defined(__APPLE__) && !defined(__CYGWIN__) && !defined(__GNU__)
#include <drm.h>
#else
typedef unsigned int drm_context_t;
--- /var/tmp/configure.ac 2009-04-09 23:52:09.000000000 +0000
+++ configure.ac 2009-04-10 00:48:37.000000000 +0000
@@ -490,6 +490,13 @@
enable_xcb=no
fi
+dnl Direct rendering or just indirect rendering
+AC_ARG_ENABLE([driglx-direct],
+ [AS_HELP_STRING([--disable-driglx-direct],
+ [enable direct rendering in GLX for DRI @<:@default=enabled@:>@])],
+ [driglx_direct="$enableval"],
+ [driglx_direct="yes"])
+
dnl
dnl libGL configuration per driver
dnl
@@ -523,11 +530,13 @@
AC_MSG_ERROR([Can't use static libraries for DRI drivers])
fi
- # Check for libdrm
- PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
- PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
- GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >=
$DRI2PROTO_REQUIRED"
- DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
+ if test x"$driglx_direct" = xyes; then
+ # Check for libdrm
+ PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
+ PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
+ GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >=
$DRI2PROTO_REQUIRED"
+ DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
+ fi
# find the DRI deps for libGL
if test "$x11_pkgconfig" = yes; then
@@ -594,12 +603,6 @@
[DRI_DRIVER_INSTALL_DIR="$withval"],
[DRI_DRIVER_INSTALL_DIR='${libdir}/dri'])
AC_SUBST([DRI_DRIVER_INSTALL_DIR])
-dnl Direct rendering or just indirect rendering
-AC_ARG_ENABLE([driglx-direct],
- [AS_HELP_STRING([--disable-driglx-direct],
- [enable direct rendering in GLX for DRI @<:@default=enabled@:>@])],
- [driglx_direct="$enableval"],
- [driglx_direct="yes"])
dnl Which drivers to build - default is chosen by platform
AC_ARG_WITH([dri-drivers],
[AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@],
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev