DragonFly BSD
DragonFly submit List (threaded) for 2004-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

dri dfport


From: Craig Dooley <xlnxminusx@xxxxxxxxx>
Date: Wed, 15 Dec 2004 10:05:01 -0500

I've made a dfport for dri.  It builds and installs cleanly, but to make
dri work, I had to manually copy libdrm.a from
/usr/X11R6/lib/modules/freebsd to /usr/X11R6/lib/modules/.  Perhaps we
could either add a script to symlink this or just a message to let
people know that this is needed to make DRI work.  As a permanent fix,
this will require another patch to xorg-server.  I believe this might
require a change to OS_SUBDIR in
programs/Xserver/hw/xfree86/os-support/bsd/drm/Imakefile.  Since there
are commits in the freebsd ports about cleaning up for X.org 6.8.1, I
will wait until this goes in to fix that up unless someone requests it
now, or someone else takes it up.  As a positive note though, this
raised my fps on glxgears from < 900 with XFree86 4.3.0 to > 1400 on a
Radeon 9200 with a 1.4ghz Pentium M.

--- Makefile    2004-09-25 23:20:01.000000000 -0400
+++ Makefile    2004-12-14 14:48:08.000000000 -0500
@@ -26,7 +26,7 @@
 XINSTALL_DIRS=         lib/GL/mesa/src/drv
 
 .include "${.CURDIR}/../../x11-servers/xorg-server/Makefile.inc"
-.include <bsd.port.pre.mk>
+.include <bsd.dfport.pre.mk>
 .if ${ARCH} == i386
 PLIST_SUB+=    I386=""
 .else
@@ -37,4 +37,4 @@
 .else
 PLIST_SUB+=    NO_AMD64=""
 .endif
-.include <bsd.port.post.mk>
+.include <bsd.dfport.post.mk>
--- files/patch-dragonfly       1969-12-31 19:00:00.000000000 -0500
+++ files/patch-dragonfly       2004-12-14 15:49:10.000000000 -0500
@@ -0,0 +1,88 @@
+--- extras/Mesa/src/X86/assyntax.h     2004-12-14 15:22:00.000000000 -0500
++++ extras/Mesa/src/X86/assyntax.h     2004-12-14 15:24:35.000000000 -0500
+@@ -968,7 +968,7 @@
+ 
+ #if defined(Lynx) || (defined(SYSV) || defined(SVR4)) \
+  || (defined(__linux__) || defined(__OS2ELF__)) && defined(__ELF__) \
+- || defined(__FreeBSD__) && __FreeBSD__ >= 3
++ || defined(__FreeBSD__) && __FreeBSD__ >= 3 || defined(__DragonFly__)
+ #define GLNAME(a)     a
+ #else
+ #define GLNAME(a)     CONCAT(_, a)
+--- extras/Mesa/src/X86/common_x86.c   2004-12-14 15:22:00.000000000 -0500
++++ extras/Mesa/src/X86/common_x86.c   2004-12-14 15:25:07.000000000 -0500
+@@ -37,7 +37,7 @@
+ #if defined(USE_SSE_ASM) && defined(__linux__)
+ #include <signal.h>
+ #endif
+-#if defined(USE_SSE_ASM) && defined(__FreeBSD__)
++#if defined(USE_SSE_ASM) && (defined(__FreeBSD__) || defined(__DragonFly__))
+ #include <sys/types.h>
+ #include <sys/sysctl.h>
+ #endif
+@@ -217,7 +217,7 @@
+    message( "Cannot test OS support for SSE, disabling to be safe.\n" );
+    _mesa_x86_cpu_features &= ~(X86_FEATURE_XMM);
+ #endif /* _POSIX_SOURCE && X86_FXSR_MAGIC */
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+    {
+       int ret, len, enabled;
+       len = sizeof(enabled);
+--- extras/Mesa/src/imports.c  2004-12-14 15:22:02.000000000 -0500
++++ extras/Mesa/src/imports.c  2004-12-14 15:24:17.000000000 -0500
+@@ -215,7 +215,7 @@
+ {
+ #if defined(XFree86LOADER) && defined(IN_MODULE)
+    xf86memset( dst, 0, n );
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__DragonFly__)
+    bzero( dst, n );
+ #else
+    memset( dst, 0, n );
+--- include/Xos_r.h    2004-12-14 15:21:09.000000000 -0500
++++ include/Xos_r.h    2004-12-14 15:23:19.000000000 -0500
+@@ -257,7 +257,7 @@
+  */
+ 
+ #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
+-    defined(__APPLE__)
++    defined(__APPLE__) || defined(__DragonFly__)
+ static __inline__ void _Xpw_copyPasswd(_Xgetpwparams p)
+ {
+    memcpy(&(p).pws, (p).pwp, sizeof(struct passwd));
+@@ -427,7 +427,7 @@
+ /* UnixWare 2.0, or other systems with thread support but no _r API. */
+ /* WARNING:  The h_addr_list and s_aliases values are *not* copied! */
+ 
+-#if defined(__NetBSD__) || defined(__FreeBSD__)
++#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
+ #include <sys/param.h>
+ #endif
+ 
+--- programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c
2004-12-14 15:20:42.000000000 -0500
++++ programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c
2004-12-14 15:27:21.000000000 -0500
+@@ -90,6 +90,10 @@
+ #define DRM_MAJOR 145
+ #endif
+ 
++#ifdef __DragonFly__
++#define DRM_MAJOR 145
++#endif
++
+ #ifdef __NetBSD__
+ #define DRM_MAJOR 34
+ #endif
+--- programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/drm.h   
 2004-12-14 15:20:41.000000000 -0500
++++ programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/drm.h   
 2004-12-14 15:26:24.000000000 -0500
+@@ -46,8 +46,8 @@
+ #define DRM_IOC_WRITE         _IOC_WRITE
+ #define DRM_IOC_READWRITE     _IOC_READ|_IOC_WRITE
+ #define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size)
+-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+-#if defined(__FreeBSD__) && defined(IN_MODULE)
++#elif defined(__FreeBSD__) || defined(__NetBSD__) ||
defined(__OpenBSD__) || defined(__DragonFly__)
++#if (defined(__FreeBSD__) || defined(__DragonFly)) && defined(IN_MODULE)
+ /* Prevent name collision when including sys/ioccom.h */
+ #undef ioctl
+ #include <sys/ioccom.h>


-- 
-----------------------------------------------------------------------
Craig Dooley <xlnxminusx@xxxxxxxxx>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]