[vbox-dev] [PATCH] Add 3D acceleration support for FreeBSD guests
mikhail sennikovsky
mikhail.sennikovsky at oracle.com
Tue Jun 25 00:36:20 PDT 2013
Hi John,
I've just committed the fix to our repository that uses RT_OS_FREEBSD
instead of BSD define, which should be more VBox-style and should as
well fix the sys/param.h problem (see the diff below).
Let me know if it's OK with you.
FYI: RT_OS_FREEBSD is globally defined in Config.kmk : DEFS.freebsd =
RT_OS_FREEBSD __FREEBSD__
--- src/VBox/Additions/common/crOpenGL/fakedri_drv.c
+++ src/VBox/Additions/common/crOpenGL/fakedri_drv.c
@@ -30,7 +30,7 @@
#include <elf.h>
#include <unistd.h>
-#if defined(BSD)
+#if defined(RT_OS_FREEBSD)
#include <sys/param.h>
#include <fcntl.h>
#include <gelf.h>
@@ -59,7 +59,7 @@
//@todo this could be different...
#ifdef RT_ARCH_AMD64
-# ifdef BSD
+# ifdef RT_OS_FREEBSD
# define DRI_DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
# define DRI_XORG_DRV_DIR "/usr/local/lib/xorg/modules/drivers/"
# else
@@ -67,7 +67,7 @@
# define DRI_XORG_DRV_DIR "/usr/lib/xorg/modules/drivers/"
# endif
#else
-# ifdef BSD
+# ifdef RT_OS_FREEBSD
# define DRI_DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
# define DRI_XORG_DRV_DIR "/usr/local/lib/xorg/modules/drivers/"
# else
@@ -228,7 +228,7 @@
#define FAKEDRI_JMP64_PATCH_SIZE 13
-#if defined(BSD)
+#if defined(RT_OS_FREEBSD)
/* Provide basic dladdr1 flags */
enum {
RTLD_DL_SYMENT = 1
Regards,
Mikhail
On 25.06.2013 10:45, mikhail sennikovsky wrote:
> Hi John,
>
> Is this fix suitable then? (see the below diff).
> This should pass BSD define as compiler option for all VBoxOGL source
> files including fakedri_drv.c.
>
> Regards,
> Mikhail
>
> --- src/VBox/Additions/common/crOpenGL/Makefile.kmk
> +++ src/VBox/Additions/common/crOpenGL/Makefile.kmk
> @@ -243,6 +243,7 @@
> ifdef VBOX_WITH_WDDM
> VBoxOGL_DEFS.win += VBOX_WITH_WDDM
> endif
> +VBoxOGL_DEFS.freebsd += BSD
>
> #
> # VBoxOGL-x86 - x86 VBoxOGL version built for amd64 build
>
> On 25.06.2013 0:41, John Clark wrote:
>> Hello,
>>
>> Unfortunately, sys/param.h is where BSD is defined.
>>
>> Thanks.
>>
>> - John
>>
>> On 06/24/2013 04:12 AM, mikhail sennikovsky wrote:
>>> Sorry for delay, your patch is now applied to trunk with only one
>>> modification that I've put the "#include <sys/param.h>" under "#if
>>> defined(BSD)" in fakedri_drv.c to keep all modifications under "#if
>>> defined(BSD)".
>>>
>>> Thanks,
>>> Mikhail
>>>
>>> On 23.06.2013 13:53, Bernhard Fröhlich wrote:
>>>> Is there anything else that I can do to speed up inclusion of the patch?
>>>>
>>>> --
>>>> Bernhard Fröhlich
>>>> http://www.bluelife.at/
>>>>
>>>>
>>>> On Sun, Jun 2, 2013 at 3:55 PM, Bernhard Fröhlich <decke at bluelife.at>
>>>> wrote:
>>>>> I've updated the patch to ensure that it applies on todays trunk.
>>>>>
>>>>>
>>>>> On Fri, May 31, 2013 at 1:45 PM, mikhail sennikovsky
>>>>> <mikhail.sennikovsky at oracle.com> wrote:
>>>>>> Could you provide a patch against trunk as well please?
>>>>>>
>>>>>> Mikhail
>>>>>>
>>>>>> On 31.05.2013 15:28, Bernhard Fröhlich wrote:
>>>>>>
>>>>>> John Clark did send us a patch to implement 3D acceleration support
>>>>>> for
>>>>>> FreeBSD
>>>>>> guests. The patch is included in the FreeBSD port for a few weeks
>>>>>> now and
>>>>>> shows
>>>>>> no regressions for us so far.
>>>>>>
>>>>>> The patch applied against 4.2.12.
>>>>>>
>>>>>> Author: John Clark <clarkjc at runbox.com>
>>>>>> License: Patch is under MIT License
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> --
>>>>>> Bernhard Fröhlich
>>>>>> http://www.bluelife.at/
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> vbox-dev mailing list
>>>>>> vbox-dev at virtualbox.org
>>>>>> https://www.virtualbox.org/mailman/listinfo/vbox-dev
>>>
>
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> https://www.virtualbox.org/mailman/listinfo/vbox-dev
More information about the vbox-dev
mailing list