Re: [PATCH v2 xf86-video-dummy] Add glamor acceleration which enables native OpenGL support (v2)

2017-09-21 Thread Antoine Martin
On 06/08/17 09:46, Yu, Qiang wrote:
> How do you run the xserver?
https://xpra.org/trac/wiki/Xdummy

> And do you have this file
> /dev/dri/renderD128
Yes.

> and right permission to access?
Yes.

As per ajax's reply, I've revised my reasonable-but-invalid expectations.
I'm primarily interested in 3D acceleration for client applications
running on an Xorg server with the dummy driver, whereas this patch set
accelerates the 2D rendering within the X server itself.

Please do keep me CCed on these patch sets, they will get tested - just
not necessarily in a timely manner..

Cheers
Antoine

> 
> Regards,
> Qiang
> 
> From: Antoine Martin 
> Sent: Saturday, August 5, 2017 8:54:11 PM
> To: xorg-devel@lists.x.org; Yu, Qiang
> Subject: Re: [PATCH v2 xf86-video-dummy] Add glamor acceleration which 
> enables native OpenGL support (v2)
> 
> On 09/03/17 09:26, Qiang Yu wrote:
>> v2:
>>   Update configure.ac for auto enable glamor support and print
>>   corresponding error message when necessary.
>>
>> Enable glamor acceleration in xorg.conf by:
>> Section "Device"
>>   ...
>>   Driver "dummy"
>>   Option "Render" "/dev/dri/renderD128"
>>   ...
>> EndSection
> With an nvidia driver, I get:
> [119367.649] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
> [119367.649] (II) Module glamoregl: vendor="X.Org Foundation"
> [119367.649]compiled for 1.19.3, module version = 1.0.0
> [119367.649]ABI class: X.Org ANSI C Emulation, version 0.4
> [119367.649] (II) glamor: OpenGL accelerated X.org driver based.
> [119367.654] (II) glamor: EGL version 1.4 (DRI2):
> [119367.654] EGL_MESA_drm_image required.
> [119367.654] (EE) DUMMY(0): glamor initialization failed
> 
> And with modesetting or intel drivers:
> [   738.822] (II) glamor: OpenGL accelerated X.org driver based.
> [   738.827] (II) glamor: EGL version 1.4 (DRI2):
> [   738.836] (II) DUMMY(0): glamor initialized
> [   738.836] (--) Depth 24 pixmap format is 32 bpp
> [   738.957] (II) DUMMY(0): Using 3904 scanlines of offscreen memory
> [   738.957] (==) DUMMY(0): Backing store enabled
> [   738.957] (==) DUMMY(0): Silken mouse enabled
> [   738.957] (==) RandR enabled
> [   738.959] (II) SELinux: Disabled by boolean
> [   738.960] (II) AIGLX: Screen 0 is not DRI2 capable
> [   738.960] (EE) AIGLX: reverting to software rendering
> 
> And in both cases, glxinfo reports that my dummy screen uses software
> rendering. (Accelerated: no, Gallium 0.4 on llvmpipe..)
> 
> What am I doing wrong?
> 
> Cheers
> Antoine
> 
> 
>>
>> GPU is chosen by the Render option which specifies the render
>> node of the GPU DRM device.
>>
>> We could use the dumb buffer instead of gbm buffer as the
>> screen front buffer. But dumb buffer requires open
>> /dev/dri/cardx which has the limitation of only one instance
>> of OpenGL enabled xserver can start.
>>
>> With gbm buffer, we can use /dev/dri/renderDx which has no
>> limitation on the number of OpenGL enabled xserver and even
>> won't conflict with a "real" xserver using radeon/amdgpu DDX.
>>
>> Due to using renderDx, only DRI3 OpenGL is supported.
>>
>> DGA is disabled when glamor is enabled, we can enable it with
>> new gbm_bo_map/unmap API, but consider a more effiction way
>> is just using DRI3BufferFromPixmap for the root window pixmap.
>>
>> Signed-off-by: Qiang Yu 
>> ---
>>  configure.ac   |  38 ++
>>  src/Makefile.am|   7 ++-
>>  src/dummy.h|   9 
>>  src/dummy_dga.c|   3 ++
>>  src/dummy_driver.c | 143 
>> -
>>  5 files changed, 188 insertions(+), 12 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 4eb7fae..39d2157 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -68,6 +68,44 @@ AM_CONDITIONAL([DGA], [test "x$DGA" = xyes])
>>  # Obtain compiler/linker options for the driver dependencies
>>  PKG_CHECK_MODULES(XORG, [xorg-server >= 1.4.99.901] xproto fontsproto 
>> $REQUIRED_MODULES)
>>
>> +# Check glamor support
>> +AC_ARG_ENABLE(glamor,
>> +   AS_HELP_STRING([--disable-glamor],
>> +  [Disable glamor, a new GL-based acceleration 
>> [default=auto]]),
>> +   [GLAMOR="$enableval"],
>> +   [GLAMOR=auto])
>> +
>> +SAVE_CPPFLAGS="$CPPFLAGS"
>> +CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
>> +if test "x$G

Re: [PATCH v2 xf86-video-dummy] Add glamor acceleration which enables native OpenGL support (v2)

2017-08-08 Thread Adam Jackson
On Sat, 2017-08-05 at 19:54 +0700, Antoine Martin wrote:

> With an nvidia driver, I get:
> [119367.649] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
> [119367.649] (II) Module glamoregl: vendor="X.Org Foundation"
> [119367.649]  compiled for 1.19.3, module version = 1.0.0
> [119367.649]  ABI class: X.Org ANSI C Emulation, version 0.4
> [119367.649] (II) glamor: OpenGL accelerated X.org driver based.
> [119367.654] (II) glamor: EGL version 1.4 (DRI2):
> [119367.654] EGL_MESA_drm_image required.
> [119367.654] (EE) DUMMY(0): glamor initialization failed

This is expected, in the sense that glamor does indeed require
EGL_MESA_drm_image at the moment. But it need not, as far as I can
tell; the EGLImage stuff is only for dri3 buffer import/export, so in
principle glamor could be fixed to just not expose dri3 when that extn
isn't available.

> And with modesetting or intel drivers:
> [   738.822] (II) glamor: OpenGL accelerated X.org driver based.
> [   738.827] (II) glamor: EGL version 1.4 (DRI2):
> [   738.836] (II) DUMMY(0): glamor initialized
> [   738.836] (--) Depth 24 pixmap format is 32 bpp
> [   738.957] (II) DUMMY(0): Using 3904 scanlines of offscreen memory
> [   738.957] (==) DUMMY(0): Backing store enabled
> [   738.957] (==) DUMMY(0): Silken mouse enabled
> [   738.957] (==) RandR enabled
> [   738.959] (II) SELinux: Disabled by boolean
> [   738.960] (II) AIGLX: Screen 0 is not DRI2 capable
> [   738.960] (EE) AIGLX: reverting to software rendering
> 
> And in both cases, glxinfo reports that my dummy screen uses software
> rendering. (Accelerated: no, Gallium 0.4 on llvmpipe..)

This is also expected: the patch series only enables the use of GL for
the server's 2D rendering, it doesn't magically make 3D accel start
working. (I do have a series I'm working on to make glamor-enabled
drivers use the same EGL backend for GLX too, after which this would
work like you expect.)

> What am I doing wrong?

Nothing besides holding reasonable-but-invalid expectations. ;)

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH v2 xf86-video-dummy] Add glamor acceleration which enables native OpenGL support (v2)

2017-08-07 Thread Yu, Qiang

>> And with modesetting or intel drivers:
>> [   738.822] (II) glamor: OpenGL accelerated X.org driver based.
>> [   738.827] (II) glamor: EGL version 1.4 (DRI2):
>> [   738.836] (II) DUMMY(0): glamor initialized
>> [   738.836] (--) Depth 24 pixmap format is 32 bpp
>> [   738.957] (II) DUMMY(0): Using 3904 scanlines of offscreen memory
>> [   738.957] (==) DUMMY(0): Backing store enabled
>> [   738.957] (==) DUMMY(0): Silken mouse enabled
>> [   738.957] (==) RandR enabled
>> [   738.959] (II) SELinux: Disabled by boolean
>> [   738.960] (II) AIGLX: Screen 0 is not DRI2 capable
>> [   738.960] (EE) AIGLX: reverting to software rendering
>>
>> And in both cases, glxinfo reports that my dummy screen uses software
>> rendering. (Accelerated: no, Gallium 0.4 on llvmpipe..)
>>
>> What am I doing wrong?
>>
> The error message should be harmless.
Yes. My implementation doesn't support DRI2 which is required by AIGLX hw acc.
AIGLX hw acc is not needed if you are using DRI3 mesa which will still use GPU
for the rendering.

Regards,
Qiang

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH v2 xf86-video-dummy] Add glamor acceleration which enables native OpenGL support (v2)

2017-08-07 Thread Emil Velikov
On 5 August 2017 at 13:54, Antoine Martin  wrote:
> On 09/03/17 09:26, Qiang Yu wrote:
>> v2:
>>   Update configure.ac for auto enable glamor support and print
>>   corresponding error message when necessary.
>>
>> Enable glamor acceleration in xorg.conf by:
>> Section "Device"
>>   ...
>>   Driver "dummy"
>>   Option "Render" "/dev/dri/renderD128"
>>   ...
>> EndSection
> With an nvidia driver, I get:
> [119367.649] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
> [119367.649] (II) Module glamoregl: vendor="X.Org Foundation"
> [119367.649]compiled for 1.19.3, module version = 1.0.0
> [119367.649]ABI class: X.Org ANSI C Emulation, version 0.4
> [119367.649] (II) glamor: OpenGL accelerated X.org driver based.
> [119367.654] (II) glamor: EGL version 1.4 (DRI2):
> [119367.654] EGL_MESA_drm_image required.
> [119367.654] (EE) DUMMY(0): glamor initialization failed
>
As the message says - the Nvidia driver does not expose the
EGL_MESA_drm_image extension.
Xserver master does not require the extension, but it does need GBM.
Latter of which not a thin on Nvidia, IIRC.


> And with modesetting or intel drivers:
> [   738.822] (II) glamor: OpenGL accelerated X.org driver based.
> [   738.827] (II) glamor: EGL version 1.4 (DRI2):
> [   738.836] (II) DUMMY(0): glamor initialized
> [   738.836] (--) Depth 24 pixmap format is 32 bpp
> [   738.957] (II) DUMMY(0): Using 3904 scanlines of offscreen memory
> [   738.957] (==) DUMMY(0): Backing store enabled
> [   738.957] (==) DUMMY(0): Silken mouse enabled
> [   738.957] (==) RandR enabled
> [   738.959] (II) SELinux: Disabled by boolean
> [   738.960] (II) AIGLX: Screen 0 is not DRI2 capable
> [   738.960] (EE) AIGLX: reverting to software rendering
>
> And in both cases, glxinfo reports that my dummy screen uses software
> rendering. (Accelerated: no, Gallium 0.4 on llvmpipe..)
>
> What am I doing wrong?
>
The error message should be harmless.

I'd suspect the glamor_egl_init() is successful, although you want to
check that first.
Afterwords you're going to Mesa land:
1) mesa must have DRI3 support (--enable-dri3)
2) observe the extra output in $LIBGL_DEBUG=verbose glxinfo
3) last but not least, if you have other !dummy DDX loaded, chances
are that X/Mesa are using it instead of dummy.

HTH
Emil
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH v2 xf86-video-dummy] Add glamor acceleration which enables native OpenGL support (v2)

2017-08-06 Thread Antoine Martin
On 06/08/17 09:46, Yu, Qiang wrote:
> How do you run the xserver?
I usually start it via xpra, which runs something like this (on Fedora):

/usr/libexec/Xorg -noreset -novtswitch -nolisten tcp \
+extension GLX +extension RANDR +extension RENDER \
   -auth $HOME/.Xauthority -logfile $XDG_RUNTIME_DIR/xpra/Xorg.10.log \
   -config /etc/xpra/xorg.conf -depth 24

And starting it directly without xpra makes no difference.
The xorg.conf we use can be found here:
http://xpra.org/svn/Xpra/trunk/src/etc/xpra/xorg.conf
To which I added:
  Option "Render" "/dev/dri/renderD128"

> And do you have this file
> /dev/dri/renderD128
> and right permission to access?
Yes, I chmoded it:
crw-rw-rw-+ 1 root video 226, 128 Aug  2 17:04 /dev/dri/renderD128

Cheers
Antoine


> 
> Regards,
> Qiang
> 
> From: Antoine Martin 
> Sent: Saturday, August 5, 2017 8:54:11 PM
> To: xorg-devel@lists.x.org; Yu, Qiang
> Subject: Re: [PATCH v2 xf86-video-dummy] Add glamor acceleration which 
> enables native OpenGL support (v2)
> 
> On 09/03/17 09:26, Qiang Yu wrote:
>> v2:
>>   Update configure.ac for auto enable glamor support and print
>>   corresponding error message when necessary.
>>
>> Enable glamor acceleration in xorg.conf by:
>> Section "Device"
>>   ...
>>   Driver "dummy"
>>   Option "Render" "/dev/dri/renderD128"
>>   ...
>> EndSection
> With an nvidia driver, I get:
> [119367.649] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
> [119367.649] (II) Module glamoregl: vendor="X.Org Foundation"
> [119367.649]compiled for 1.19.3, module version = 1.0.0
> [119367.649]ABI class: X.Org ANSI C Emulation, version 0.4
> [119367.649] (II) glamor: OpenGL accelerated X.org driver based.
> [119367.654] (II) glamor: EGL version 1.4 (DRI2):
> [119367.654] EGL_MESA_drm_image required.
> [119367.654] (EE) DUMMY(0): glamor initialization failed
> 
> And with modesetting or intel drivers:
> [   738.822] (II) glamor: OpenGL accelerated X.org driver based.
> [   738.827] (II) glamor: EGL version 1.4 (DRI2):
> [   738.836] (II) DUMMY(0): glamor initialized
> [   738.836] (--) Depth 24 pixmap format is 32 bpp
> [   738.957] (II) DUMMY(0): Using 3904 scanlines of offscreen memory
> [   738.957] (==) DUMMY(0): Backing store enabled
> [   738.957] (==) DUMMY(0): Silken mouse enabled
> [   738.957] (==) RandR enabled
> [   738.959] (II) SELinux: Disabled by boolean
> [   738.960] (II) AIGLX: Screen 0 is not DRI2 capable
> [   738.960] (EE) AIGLX: reverting to software rendering
> 
> And in both cases, glxinfo reports that my dummy screen uses software
> rendering. (Accelerated: no, Gallium 0.4 on llvmpipe..)
> 
> What am I doing wrong?
> 
> Cheers
> Antoine
> 
> 
>>
>> GPU is chosen by the Render option which specifies the render
>> node of the GPU DRM device.
>>
>> We could use the dumb buffer instead of gbm buffer as the
>> screen front buffer. But dumb buffer requires open
>> /dev/dri/cardx which has the limitation of only one instance
>> of OpenGL enabled xserver can start.
>>
>> With gbm buffer, we can use /dev/dri/renderDx which has no
>> limitation on the number of OpenGL enabled xserver and even
>> won't conflict with a "real" xserver using radeon/amdgpu DDX.
>>
>> Due to using renderDx, only DRI3 OpenGL is supported.
>>
>> DGA is disabled when glamor is enabled, we can enable it with
>> new gbm_bo_map/unmap API, but consider a more effiction way
>> is just using DRI3BufferFromPixmap for the root window pixmap.
>>
>> Signed-off-by: Qiang Yu 
>> ---
>>  configure.ac   |  38 ++
>>  src/Makefile.am|   7 ++-
>>  src/dummy.h|   9 
>>  src/dummy_dga.c|   3 ++
>>  src/dummy_driver.c | 143 
>> -
>>  5 files changed, 188 insertions(+), 12 deletions(-)
>>
>> diff --git a/configure.ac b/configure.ac
>> index 4eb7fae..39d2157 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -68,6 +68,44 @@ AM_CONDITIONAL([DGA], [test "x$DGA" = xyes])
>>  # Obtain compiler/linker options for the driver dependencies
>>  PKG_CHECK_MODULES(XORG, [xorg-server >= 1.4.99.901] xproto fontsproto 
>> $REQUIRED_MODULES)
>>
>> +# Check glamor support
>> +AC_ARG_ENABLE(glamor,
>> +   AS_HELP_STRING([--disable-glamor],
>> +  [Disable glamor, a new GL-based acceleration 
>> [default=auto]]),
>> +   [GLAMOR="

Re: [PATCH v2 xf86-video-dummy] Add glamor acceleration which enables native OpenGL support (v2)

2017-08-05 Thread Yu, Qiang
How do you run the xserver? And do you have this file
/dev/dri/renderD128
and right permission to access?

Regards,
Qiang

From: Antoine Martin 
Sent: Saturday, August 5, 2017 8:54:11 PM
To: xorg-devel@lists.x.org; Yu, Qiang
Subject: Re: [PATCH v2 xf86-video-dummy] Add glamor acceleration which enables 
native OpenGL support (v2)

On 09/03/17 09:26, Qiang Yu wrote:
> v2:
>   Update configure.ac for auto enable glamor support and print
>   corresponding error message when necessary.
>
> Enable glamor acceleration in xorg.conf by:
> Section "Device"
>   ...
>   Driver "dummy"
>   Option "Render" "/dev/dri/renderD128"
>   ...
> EndSection
With an nvidia driver, I get:
[119367.649] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
[119367.649] (II) Module glamoregl: vendor="X.Org Foundation"
[119367.649]compiled for 1.19.3, module version = 1.0.0
[119367.649]ABI class: X.Org ANSI C Emulation, version 0.4
[119367.649] (II) glamor: OpenGL accelerated X.org driver based.
[119367.654] (II) glamor: EGL version 1.4 (DRI2):
[119367.654] EGL_MESA_drm_image required.
[119367.654] (EE) DUMMY(0): glamor initialization failed

And with modesetting or intel drivers:
[   738.822] (II) glamor: OpenGL accelerated X.org driver based.
[   738.827] (II) glamor: EGL version 1.4 (DRI2):
[   738.836] (II) DUMMY(0): glamor initialized
[   738.836] (--) Depth 24 pixmap format is 32 bpp
[   738.957] (II) DUMMY(0): Using 3904 scanlines of offscreen memory
[   738.957] (==) DUMMY(0): Backing store enabled
[   738.957] (==) DUMMY(0): Silken mouse enabled
[   738.957] (==) RandR enabled
[   738.959] (II) SELinux: Disabled by boolean
[   738.960] (II) AIGLX: Screen 0 is not DRI2 capable
[   738.960] (EE) AIGLX: reverting to software rendering

And in both cases, glxinfo reports that my dummy screen uses software
rendering. (Accelerated: no, Gallium 0.4 on llvmpipe..)

What am I doing wrong?

Cheers
Antoine


>
> GPU is chosen by the Render option which specifies the render
> node of the GPU DRM device.
>
> We could use the dumb buffer instead of gbm buffer as the
> screen front buffer. But dumb buffer requires open
> /dev/dri/cardx which has the limitation of only one instance
> of OpenGL enabled xserver can start.
>
> With gbm buffer, we can use /dev/dri/renderDx which has no
> limitation on the number of OpenGL enabled xserver and even
> won't conflict with a "real" xserver using radeon/amdgpu DDX.
>
> Due to using renderDx, only DRI3 OpenGL is supported.
>
> DGA is disabled when glamor is enabled, we can enable it with
> new gbm_bo_map/unmap API, but consider a more effiction way
> is just using DRI3BufferFromPixmap for the root window pixmap.
>
> Signed-off-by: Qiang Yu 
> ---
>  configure.ac   |  38 ++
>  src/Makefile.am|   7 ++-
>  src/dummy.h|   9 
>  src/dummy_dga.c|   3 ++
>  src/dummy_driver.c | 143 
> -
>  5 files changed, 188 insertions(+), 12 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 4eb7fae..39d2157 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -68,6 +68,44 @@ AM_CONDITIONAL([DGA], [test "x$DGA" = xyes])
>  # Obtain compiler/linker options for the driver dependencies
>  PKG_CHECK_MODULES(XORG, [xorg-server >= 1.4.99.901] xproto fontsproto 
> $REQUIRED_MODULES)
>
> +# Check glamor support
> +AC_ARG_ENABLE(glamor,
> +   AS_HELP_STRING([--disable-glamor],
> +  [Disable glamor, a new GL-based acceleration 
> [default=auto]]),
> +   [GLAMOR="$enableval"],
> +   [GLAMOR=auto])
> +
> +SAVE_CPPFLAGS="$CPPFLAGS"
> +CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
> +if test "x$GLAMOR" != "xno"; then
> + AC_CHECK_HEADERS([glamor.h], [HAS_GLAMOR=yes], [HAS_GLAMOR=no], 
> [#include "xorg-server.h"])
> + PKG_CHECK_MODULES(GBM, [gbm], [], [HAS_GLAMOR=no])
> +fi
> +CPPFLAGS="$SAVE_CPPFLAGS"
> +
> +case "$GLAMOR,$HAS_GLAMOR" in
> + yes,yes | auto,yes)
> + GLAMOR=yes
> + ;;
> + yes,no)
> + AC_MSG_ERROR([GLAMOR requested, but glamor and/or gbm not 
> found.])
> + ;;
> + no,*)
> + ;;
> + *)
> + AC_MSG_NOTICE([GLAMOR disabled because glamor and/or gbm not 
> found.])
> + GLAMOR=no
> + ;;
> +esac
> +
> +AC_MSG_CHECKING([whether to include GLAMOR support])
> +AC_MSG_RESULT([$GLAMOR])
> +
> +if test "x$GLAMOR" != "xno"; then
> +AC_DEFINE(USE_GLAMOR, 1, [Enable glamor acceleration])
&g

Re: [PATCH v2 xf86-video-dummy] Add glamor acceleration which enables native OpenGL support (v2)

2017-08-05 Thread Antoine Martin
On 09/03/17 09:26, Qiang Yu wrote:
> v2:
>   Update configure.ac for auto enable glamor support and print
>   corresponding error message when necessary.
> 
> Enable glamor acceleration in xorg.conf by:
> Section "Device"
>   ...
>   Driver "dummy"
>   Option "Render" "/dev/dri/renderD128"
>   ...
> EndSection
With an nvidia driver, I get:
[119367.649] (II) Loading /usr/lib64/xorg/modules/libglamoregl.so
[119367.649] (II) Module glamoregl: vendor="X.Org Foundation"
[119367.649]compiled for 1.19.3, module version = 1.0.0
[119367.649]ABI class: X.Org ANSI C Emulation, version 0.4
[119367.649] (II) glamor: OpenGL accelerated X.org driver based.
[119367.654] (II) glamor: EGL version 1.4 (DRI2):
[119367.654] EGL_MESA_drm_image required.
[119367.654] (EE) DUMMY(0): glamor initialization failed

And with modesetting or intel drivers:
[   738.822] (II) glamor: OpenGL accelerated X.org driver based.
[   738.827] (II) glamor: EGL version 1.4 (DRI2):
[   738.836] (II) DUMMY(0): glamor initialized
[   738.836] (--) Depth 24 pixmap format is 32 bpp
[   738.957] (II) DUMMY(0): Using 3904 scanlines of offscreen memory
[   738.957] (==) DUMMY(0): Backing store enabled
[   738.957] (==) DUMMY(0): Silken mouse enabled
[   738.957] (==) RandR enabled
[   738.959] (II) SELinux: Disabled by boolean
[   738.960] (II) AIGLX: Screen 0 is not DRI2 capable
[   738.960] (EE) AIGLX: reverting to software rendering

And in both cases, glxinfo reports that my dummy screen uses software
rendering. (Accelerated: no, Gallium 0.4 on llvmpipe..)

What am I doing wrong?

Cheers
Antoine


> 
> GPU is chosen by the Render option which specifies the render
> node of the GPU DRM device.
> 
> We could use the dumb buffer instead of gbm buffer as the
> screen front buffer. But dumb buffer requires open
> /dev/dri/cardx which has the limitation of only one instance
> of OpenGL enabled xserver can start.
> 
> With gbm buffer, we can use /dev/dri/renderDx which has no
> limitation on the number of OpenGL enabled xserver and even
> won't conflict with a "real" xserver using radeon/amdgpu DDX.
> 
> Due to using renderDx, only DRI3 OpenGL is supported.
> 
> DGA is disabled when glamor is enabled, we can enable it with
> new gbm_bo_map/unmap API, but consider a more effiction way
> is just using DRI3BufferFromPixmap for the root window pixmap.
> 
> Signed-off-by: Qiang Yu 
> ---
>  configure.ac   |  38 ++
>  src/Makefile.am|   7 ++-
>  src/dummy.h|   9 
>  src/dummy_dga.c|   3 ++
>  src/dummy_driver.c | 143 
> -
>  5 files changed, 188 insertions(+), 12 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 4eb7fae..39d2157 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -68,6 +68,44 @@ AM_CONDITIONAL([DGA], [test "x$DGA" = xyes])
>  # Obtain compiler/linker options for the driver dependencies
>  PKG_CHECK_MODULES(XORG, [xorg-server >= 1.4.99.901] xproto fontsproto 
> $REQUIRED_MODULES)
>  
> +# Check glamor support
> +AC_ARG_ENABLE(glamor,
> +   AS_HELP_STRING([--disable-glamor],
> +  [Disable glamor, a new GL-based acceleration 
> [default=auto]]),
> +   [GLAMOR="$enableval"],
> +   [GLAMOR=auto])
> +
> +SAVE_CPPFLAGS="$CPPFLAGS"
> +CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
> +if test "x$GLAMOR" != "xno"; then
> + AC_CHECK_HEADERS([glamor.h], [HAS_GLAMOR=yes], [HAS_GLAMOR=no], 
> [#include "xorg-server.h"])
> + PKG_CHECK_MODULES(GBM, [gbm], [], [HAS_GLAMOR=no])
> +fi
> +CPPFLAGS="$SAVE_CPPFLAGS"
> +
> +case "$GLAMOR,$HAS_GLAMOR" in
> + yes,yes | auto,yes)
> + GLAMOR=yes
> + ;;
> + yes,no)
> + AC_MSG_ERROR([GLAMOR requested, but glamor and/or gbm not 
> found.])
> + ;;
> + no,*)
> + ;;
> + *)
> + AC_MSG_NOTICE([GLAMOR disabled because glamor and/or gbm not 
> found.])
> + GLAMOR=no
> + ;;
> +esac
> +
> +AC_MSG_CHECKING([whether to include GLAMOR support])
> +AC_MSG_RESULT([$GLAMOR])
> +
> +if test "x$GLAMOR" != "xno"; then
> +AC_DEFINE(USE_GLAMOR, 1, [Enable glamor acceleration])
> +fi
> +AM_CONDITIONAL(GLAMOR, test x$GLAMOR != xno)
> +
>  # Checks for libraries.
>  
>  
> diff --git a/src/Makefile.am b/src/Makefile.am
> index da1dd9a..9faa9c4 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -25,7 +25,7 @@
>  # _ladir passes a dummy rpath to libtool so the thing will actually link
>  # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
>  
> -AM_CFLAGS = $(XORG_CFLAGS) $(PCIACCESS_CFLAGS)
> +AM_CFLAGS = $(XORG_CFLAGS)
>  
>  dummy_drv_la_LTLIBRARIES = dummy_drv.la
>  dummy_drv_la_LDFLAGS = -module -avoid-version
> @@ -38,6 +38,11 @@ dummy_drv_la_SOURCES = \
>   dummy_driver.c \
>   dummy.h
>  
> +if GLAMOR
> +AM_CFLAGS += $(GBM_CFLAGS)
> +dummy_drv_la_LIBADD += $(GBM_LIBS)
> +endif
> +
>  if DGA
>  dummy_drv_la_SOURCES +=