Re: [Mesa-dev] [PATCH-RFC] autoconf: add --enable-{dri,glx,osmesa}
On 02/07/2011 02:31, Chia-I Wu wrote: > On Sat, Jul 2, 2011 at 4:10 AM, Jon TURNEY > wrote: >> This seems like a useful rationalization of the configuration arguments, but >> one of your follow up patches to this ("autoconf: fix --disable-glx") has >> changed the condition for checking for libdrm from mesadriver=dri && >> driglx_direct=yes to just enable_dri=yes. >> >> This change causes ./configure --with-driver=dri --disable-driglx-direct to >> fail when libdrm isn't present, see [1]. > It should be fixed now. Please try again. Yes, fixed now. Thanks. > You should be able to replace "--with-driver=dri" by "--disable-dri" > now if all you need is libGL with indirect rendering. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH-RFC] autoconf: add --enable-{dri,glx,osmesa}
On Sat, Jul 2, 2011 at 4:10 AM, Jon TURNEY wrote: > This seems like a useful rationalization of the configuration arguments, but > one of your follow up patches to this ("autoconf: fix --disable-glx") has > changed the condition for checking for libdrm from mesadriver=dri && > driglx_direct=yes to just enable_dri=yes. > > This change causes ./configure --with-driver=dri --disable-driglx-direct to > fail when libdrm isn't present, see [1]. It should be fixed now. Please try again. You should be able to replace "--with-driver=dri" by "--disable-dri" now if all you need is libGL with indirect rendering. > (I'll just note that I'd also like to be able to ./configure --with-driver=dri > --with-dri-drivers=swrast without requiring libdrm, as there is no functional > dependency, but it's not possible to build that at the moment without some > patching to untangle a build dependency) That probably could be done by defining HAVE_LIBDRM when libdrm is available and let glx checks the macro. > [1] > http://tinderbox.freedesktop.org/builds/2011-07-01-0004/logs/libGL-indirect-only/#configure > -- o...@lunarg.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH-RFC] autoconf: add --enable-{dri,glx,osmesa}
On 30/06/2011 02:48, Chia-I Wu wrote: > On Sun, Jun 26, 2011 at 10:39 PM, Chia-I Wu wrote: >> From: Chia-I Wu >> >> The idea is that DRI driver, libGL and libOSMesa are libraries that can >> be independently enabled, yet --with-driver does not allow us to easily >> do that, if not impossible. This also matches what >> --enable-{egl,xorg,d3d1x} do for the respective libraries. >> >> There are two libGL providers: Xlib-based and DRI-based. They cannot >> coexist. To be able to choose between them, --enable-xlib-glx is also >> added. >> >> With this commit, --with-driver=dri can be replaced by >> >> $ ./configure --enable-dri --enable-glx --disable-osmesa >> >> --with-driver=xlib can be replaced by >> >> $ ./configure --disable-dri --enable-glx --enable-osmesa \ >>--enable-xlib-glx >> >> and --with-driver=osmesa can be replaced by >> >> $ ./configure --disable-dri --disable-glx --enable-osmesa >> >> Some combinations that cannot be supported with --with-driver will >> produce errors at the moment. But in the future, we would like to >> support, for example, >> >> $ ./configure --enable-dri --disable-glx --enable-egl >> (build libEGL and DRI drivers, but not libGL) >> >> Note that this commit still keeps --with-driver for transitional >> purpose. > If there is no objection, I'd like to make the change later this week. This seems like a useful rationalization of the configuration arguments, but one of your follow up patches to this ("autoconf: fix --disable-glx") has changed the condition for checking for libdrm from mesadriver=dri && driglx_direct=yes to just enable_dri=yes. This change causes ./configure --with-driver=dri --disable-driglx-direct to fail when libdrm isn't present, see [1]. (I'll just note that I'd also like to be able to ./configure --with-driver=dri --with-dri-drivers=swrast without requiring libdrm, as there is no functional dependency, but it's not possible to build that at the moment without some patching to untangle a build dependency) [1] http://tinderbox.freedesktop.org/builds/2011-07-01-0004/logs/libGL-indirect-only/#configure ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH-RFC] autoconf: add --enable-{dri,glx,osmesa}
On Sun, Jun 26, 2011 at 10:39 PM, Chia-I Wu wrote: > From: Chia-I Wu > > The idea is that DRI driver, libGL and libOSMesa are libraries that can > be independently enabled, yet --with-driver does not allow us to easily > do that, if not impossible. This also matches what > --enable-{egl,xorg,d3d1x} do for the respective libraries. > > There are two libGL providers: Xlib-based and DRI-based. They cannot > coexist. To be able to choose between them, --enable-xlib-glx is also > added. > > With this commit, --with-driver=dri can be replaced by > > $ ./configure --enable-dri --enable-glx --disable-osmesa > > --with-driver=xlib can be replaced by > > $ ./configure --disable-dri --enable-glx --enable-osmesa \ > --enable-xlib-glx > > and --with-driver=osmesa can be replaced by > > $ ./configure --disable-dri --disable-glx --enable-osmesa > > Some combinations that cannot be supported with --with-driver will > produce errors at the moment. But in the future, we would like to > support, for example, > > $ ./configure --enable-dri --disable-glx --enable-egl > (build libEGL and DRI drivers, but not libGL) > > Note that this commit still keeps --with-driver for transitional > purpose. If there is no objection, I'd like to make the change later this week. > --- > configure.ac | 301 > ++ > 1 files changed, 177 insertions(+), 124 deletions(-) > > diff --git a/configure.ac b/configure.ac > index c36b2f6..5489c3f 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -532,6 +532,28 @@ AC_ARG_ENABLE([openvg], > [enable support for OpenVG API @<:@default=no@:>@])], > [enable_openvg="$enableval"], > [enable_openvg=no]) > + > +AC_ARG_ENABLE([dri], > + [AS_HELP_STRING([--enable-dri], > + [enable DRI modules @<:@default=auto@:>@])], > + [enable_dri="$enableval"], > + [enable_dri=auto]) > +AC_ARG_ENABLE([glx], > + [AS_HELP_STRING([--enable-glx], > + [enable GLX library @<:@default=auto@:>@])], > + [enable_glx="$enableval"], > + [enable_glx=auto]) > +AC_ARG_ENABLE([osmesa], > + [AS_HELP_STRING([--enable-osmesa], > + [enable OSMesa library @<:@default=auto@:>@])], > + [enable_osmesa="$enableval"], > + [enable_osmesa=auto]) > +AC_ARG_ENABLE([egl], > + [AS_HELP_STRING([--disable-egl], > + [disable EGL library @<:@default=enabled@:>@])], > + [enable_egl="$enableval"], > + [enable_egl=yes]) > + > AC_ARG_ENABLE([xorg], > [AS_HELP_STRING([--enable-xorg], > [enable support for X.Org DDX API @<:@default=no@:>@])], > @@ -542,16 +564,17 @@ AC_ARG_ENABLE([d3d1x], > [enable support for Direct3D 10 & 11 low-level API > @<:@default=no@:>@])], > [enable_d3d1x="$enableval"], > [enable_d3d1x=no]) > -AC_ARG_ENABLE([egl], > - [AS_HELP_STRING([--disable-egl], > - [disable EGL library @<:@default=enabled@:>@])], > - [enable_egl="$enableval"], > - [enable_egl=yes]) > AC_ARG_ENABLE([gbm], > [AS_HELP_STRING([--enable-gbm], > [enable gbm library @<:@default=auto@:>@])], > [enable_gbm="$enableval"], > [enable_gbm=auto]) > + > +AC_ARG_ENABLE([xlib_glx], > + [AS_HELP_STRING([--enable-xlib-glx], > + [make GLX library Xlib-based instead of DRI-based > @<:@default=disable@:>@])], > + [enable_xlib_glx="$enableval"], > + [enable_xlib_glx=auto]) > AC_ARG_ENABLE([gallium_egl], > [AS_HELP_STRING([--enable-gallium-egl], > [enable optional EGL state tracker (not required > @@ -637,24 +660,66 @@ if test "x$enable_opengl" = xno; then > fi > > AC_ARG_WITH([driver], > - [AS_HELP_STRING([--with-driver=DRIVER], > - [driver for Mesa: xlib,dri,osmesa @<:@default=dri when available, or > xlib@:>@])], > + [AS_HELP_STRING([--with-driver=DRIVER], [DEPRECATED])], > [mesa_driver="$withval"], > - [mesa_driver="$default_driver"]) > + [mesa_driver=auto]) > dnl Check for valid option > case "x$mesa_driver" in > -xxlib|xdri|xosmesa) > - if test "x$enable_opengl" = xno; then > - AC_MSG_ERROR([Driver '$mesa_driver' requires OpenGL enabled]) > +xxlib|xdri|xosmesa|xno) > + if test "x$enable_dri" != xauto -o \ > + "x$enable_glx" != xauto -o \ > + "x$enable_osmesa" != xauto -o \ > + "x$enable_xlib_glx" != xauto; then > + AC_MSG_ERROR([--with-driver=$mesa_driver is deprecated]) > fi > ;; > -xno) > +xauto) > + mesa_driver="$default_driver" > ;; > *) > AC_MSG_ERROR([Driver '$mesa_driver' is not a valid option]) > ;; > esac > > +# map $mesa_driver to APIs > +if test "x$enable_dri" = xauto; then > + case "x$mesa_driver" in > + xdri) enable_dri=yes ;; > + *) enable_dri=no ;; > + esac > +fi > + > +if test "x$enable_glx" = xauto; then > + case "x$mesa_driver" in > + xdri|xxlib) enable_glx=yes ;; > + *) enable_glx=no ;; > + esac > +fi > + > +if test "x$enable_osmesa" = xauto; then > + case "x$mesa_driver"
Re: [Mesa-dev] [PATCH-RFC] autoconf: add --enable-{dri,glx,osmesa}
On Tue, Jun 28, 2011 at 6:00 AM, Kenneth Graunke wrote: > On 06/27/2011 12:17 PM, Dan Nicholson wrote: >> >> On Sun, Jun 26, 2011 at 6:39 AM, Chia-I Wu wrote: >>> >>> From: Chia-I Wu >>> >>> The idea is that DRI driver, libGL and libOSMesa are libraries that can >>> be independently enabled, yet --with-driver does not allow us to easily >>> do that, if not impossible. This also matches what >>> --enable-{egl,xorg,d3d1x} do for the respective libraries. >> >> I haven't read this in any detail, but I definitely like the idea. >> When I originally wrote all this, I struggled to coordinate DRI vs. >> GLX, and I didn't really bother with the EGL code that was mostly >> experimental. This is much more coherently structured. >> >>> There are two libGL providers: Xlib-based and DRI-based. They cannot >>> coexist. To be able to choose between them, --enable-xlib-glx is also >>> added. >> >> This is the only part that kind of bugs me. It seems to me that the >> --enable-dri and --enable-xlib-glx options aren't really symmetric. I >> believe you'd need this to be --enable-dri-glx to really act as a >> provider. I can see why you didn't do that since dri is a "provider" >> to many of the APIs and would require a lot more hacking of >> configure.ac. Is my understanding of that correct? I'm not as familiar >> with the newer non-GL Mesa components. > > How does --enable-xcb ("use XCB for GLX") fit in? I've been using that for > ages. Why isn't it the default these days? XCB isn't exactly cutting edge, > and I believe we already use it for some DRI2 stuff. Is there some > Xlib-based stuff that still needs to be converted? Can we just kill > Xlib-GLX entirely? Xlib-based GLX (sources under $mesa/src/mesa/drivers/glx) is the faked GLX, emulated with only core protocol. I was not clear. I just thought that fake GLX sounded scary. So --enable-xcb enables the use of XCB in DRI-based GLX ($mesa/src/glx). It is relevant when GLX is enabled and DRI-based GLX is chosen. > I'm probably not understanding any of this...sorry :) > > --Kenneth > ___ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev > -- o...@lunarg.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH-RFC] autoconf: add --enable-{dri,glx,osmesa}
On Tue, Jun 28, 2011 at 4:17 AM, Dan Nicholson wrote: > On Sun, Jun 26, 2011 at 6:39 AM, Chia-I Wu wrote: >> From: Chia-I Wu >> >> The idea is that DRI driver, libGL and libOSMesa are libraries that can >> be independently enabled, yet --with-driver does not allow us to easily >> do that, if not impossible. This also matches what >> --enable-{egl,xorg,d3d1x} do for the respective libraries. > > I haven't read this in any detail, but I definitely like the idea. > When I originally wrote all this, I struggled to coordinate DRI vs. > GLX, and I didn't really bother with the EGL code that was mostly > experimental. This is much more coherently structured. Great. >> There are two libGL providers: Xlib-based and DRI-based. They cannot >> coexist. To be able to choose between them, --enable-xlib-glx is also >> added. > > This is the only part that kind of bugs me. It seems to me that the > --enable-dri and --enable-xlib-glx options aren't really symmetric. I > believe you'd need this to be --enable-dri-glx to really act as a > provider. I can see why you didn't do that since dri is a "provider" > to many of the APIs and would require a lot more hacking of > configure.ac. Is my understanding of that correct? I'm not as familiar > with the newer non-GL Mesa components. I would like APIs to be enabled in the most straightforward ways. Say, when I need GLX and D3D1X, I should be able to express that by specifying --enable-glx --enable-d3d1x (--enable-glx is redundant as it is default on) These API options are the high-level ones. Then there are lower levels of options to change how APIs are implemented. Users usually don't need to care about these options as we pick the best we have by default (finger crossed). Examples of such options are, for GLX, --enable-xcb Use XCB in DRI-based GLX --enable-driglx-direct Support direct rendering in DRI-based GLX (here DRI-based actually means {GLX/DRI2}PROTO-based) --enable-xlib-glx Use Xlib-based GLX instead (and the first two options become irrelevant) For DRI, there is --enable-shared-dricore; for EGL, there is --enable-gallium-egl. And so on. This is the idea behind those options. I hope this expresses my idea more clear, and help us come up with a more systematical way to name the options. > -- > Dan > -- o...@lunarg.com ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH-RFC] autoconf: add --enable-{dri,glx,osmesa}
On 06/27/2011 12:17 PM, Dan Nicholson wrote: On Sun, Jun 26, 2011 at 6:39 AM, Chia-I Wu wrote: From: Chia-I Wu The idea is that DRI driver, libGL and libOSMesa are libraries that can be independently enabled, yet --with-driver does not allow us to easily do that, if not impossible. This also matches what --enable-{egl,xorg,d3d1x} do for the respective libraries. I haven't read this in any detail, but I definitely like the idea. When I originally wrote all this, I struggled to coordinate DRI vs. GLX, and I didn't really bother with the EGL code that was mostly experimental. This is much more coherently structured. There are two libGL providers: Xlib-based and DRI-based. They cannot coexist. To be able to choose between them, --enable-xlib-glx is also added. This is the only part that kind of bugs me. It seems to me that the --enable-dri and --enable-xlib-glx options aren't really symmetric. I believe you'd need this to be --enable-dri-glx to really act as a provider. I can see why you didn't do that since dri is a "provider" to many of the APIs and would require a lot more hacking of configure.ac. Is my understanding of that correct? I'm not as familiar with the newer non-GL Mesa components. How does --enable-xcb ("use XCB for GLX") fit in? I've been using that for ages. Why isn't it the default these days? XCB isn't exactly cutting edge, and I believe we already use it for some DRI2 stuff. Is there some Xlib-based stuff that still needs to be converted? Can we just kill Xlib-GLX entirely? I'm probably not understanding any of this...sorry :) --Kenneth ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH-RFC] autoconf: add --enable-{dri,glx,osmesa}
On Sun, Jun 26, 2011 at 6:39 AM, Chia-I Wu wrote: > From: Chia-I Wu > > The idea is that DRI driver, libGL and libOSMesa are libraries that can > be independently enabled, yet --with-driver does not allow us to easily > do that, if not impossible. This also matches what > --enable-{egl,xorg,d3d1x} do for the respective libraries. I haven't read this in any detail, but I definitely like the idea. When I originally wrote all this, I struggled to coordinate DRI vs. GLX, and I didn't really bother with the EGL code that was mostly experimental. This is much more coherently structured. > There are two libGL providers: Xlib-based and DRI-based. They cannot > coexist. To be able to choose between them, --enable-xlib-glx is also > added. This is the only part that kind of bugs me. It seems to me that the --enable-dri and --enable-xlib-glx options aren't really symmetric. I believe you'd need this to be --enable-dri-glx to really act as a provider. I can see why you didn't do that since dri is a "provider" to many of the APIs and would require a lot more hacking of configure.ac. Is my understanding of that correct? I'm not as familiar with the newer non-GL Mesa components. -- Dan ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH-RFC] autoconf: add --enable-{dri,glx,osmesa}
From: Chia-I Wu The idea is that DRI driver, libGL and libOSMesa are libraries that can be independently enabled, yet --with-driver does not allow us to easily do that, if not impossible. This also matches what --enable-{egl,xorg,d3d1x} do for the respective libraries. There are two libGL providers: Xlib-based and DRI-based. They cannot coexist. To be able to choose between them, --enable-xlib-glx is also added. With this commit, --with-driver=dri can be replaced by $ ./configure --enable-dri --enable-glx --disable-osmesa --with-driver=xlib can be replaced by $ ./configure --disable-dri --enable-glx --enable-osmesa \ --enable-xlib-glx and --with-driver=osmesa can be replaced by $ ./configure --disable-dri --disable-glx --enable-osmesa Some combinations that cannot be supported with --with-driver will produce errors at the moment. But in the future, we would like to support, for example, $ ./configure --enable-dri --disable-glx --enable-egl (build libEGL and DRI drivers, but not libGL) Note that this commit still keeps --with-driver for transitional purpose. --- configure.ac | 301 ++ 1 files changed, 177 insertions(+), 124 deletions(-) diff --git a/configure.ac b/configure.ac index c36b2f6..5489c3f 100644 --- a/configure.ac +++ b/configure.ac @@ -532,6 +532,28 @@ AC_ARG_ENABLE([openvg], [enable support for OpenVG API @<:@default=no@:>@])], [enable_openvg="$enableval"], [enable_openvg=no]) + +AC_ARG_ENABLE([dri], +[AS_HELP_STRING([--enable-dri], +[enable DRI modules @<:@default=auto@:>@])], +[enable_dri="$enableval"], +[enable_dri=auto]) +AC_ARG_ENABLE([glx], +[AS_HELP_STRING([--enable-glx], +[enable GLX library @<:@default=auto@:>@])], +[enable_glx="$enableval"], +[enable_glx=auto]) +AC_ARG_ENABLE([osmesa], +[AS_HELP_STRING([--enable-osmesa], +[enable OSMesa library @<:@default=auto@:>@])], +[enable_osmesa="$enableval"], +[enable_osmesa=auto]) +AC_ARG_ENABLE([egl], +[AS_HELP_STRING([--disable-egl], +[disable EGL library @<:@default=enabled@:>@])], +[enable_egl="$enableval"], +[enable_egl=yes]) + AC_ARG_ENABLE([xorg], [AS_HELP_STRING([--enable-xorg], [enable support for X.Org DDX API @<:@default=no@:>@])], @@ -542,16 +564,17 @@ AC_ARG_ENABLE([d3d1x], [enable support for Direct3D 10 & 11 low-level API @<:@default=no@:>@])], [enable_d3d1x="$enableval"], [enable_d3d1x=no]) -AC_ARG_ENABLE([egl], -[AS_HELP_STRING([--disable-egl], -[disable EGL library @<:@default=enabled@:>@])], -[enable_egl="$enableval"], -[enable_egl=yes]) AC_ARG_ENABLE([gbm], [AS_HELP_STRING([--enable-gbm], [enable gbm library @<:@default=auto@:>@])], [enable_gbm="$enableval"], [enable_gbm=auto]) + +AC_ARG_ENABLE([xlib_glx], +[AS_HELP_STRING([--enable-xlib-glx], +[make GLX library Xlib-based instead of DRI-based @<:@default=disable@:>@])], +[enable_xlib_glx="$enableval"], +[enable_xlib_glx=auto]) AC_ARG_ENABLE([gallium_egl], [AS_HELP_STRING([--enable-gallium-egl], [enable optional EGL state tracker (not required @@ -637,24 +660,66 @@ if test "x$enable_opengl" = xno; then fi AC_ARG_WITH([driver], -[AS_HELP_STRING([--with-driver=DRIVER], -[driver for Mesa: xlib,dri,osmesa @<:@default=dri when available, or xlib@:>@])], +[AS_HELP_STRING([--with-driver=DRIVER], [DEPRECATED])], [mesa_driver="$withval"], -[mesa_driver="$default_driver"]) +[mesa_driver=auto]) dnl Check for valid option case "x$mesa_driver" in -xxlib|xdri|xosmesa) -if test "x$enable_opengl" = xno; then -AC_MSG_ERROR([Driver '$mesa_driver' requires OpenGL enabled]) +xxlib|xdri|xosmesa|xno) +if test "x$enable_dri" != xauto -o \ +"x$enable_glx" != xauto -o \ +"x$enable_osmesa" != xauto -o \ +"x$enable_xlib_glx" != xauto; then +AC_MSG_ERROR([--with-driver=$mesa_driver is deprecated]) fi ;; -xno) +xauto) +mesa_driver="$default_driver" ;; *) AC_MSG_ERROR([Driver '$mesa_driver' is not a valid option]) ;; esac +# map $mesa_driver to APIs +if test "x$enable_dri" = xauto; then +case "x$mesa_driver" in +xdri) enable_dri=yes ;; +*)enable_dri=no ;; +esac +fi + +if test "x$enable_glx" = xauto; then +case "x$mesa_driver" in +xdri|xxlib) enable_glx=yes ;; +*) enable_glx=no ;; +esac +fi + +if test "x$enable_osmesa" = xauto; then +case "x$mesa_driver" in +xxlib|xosmesa) enable_osmesa=yes ;; +*) enable_osmesa=no ;; +esac +fi + +if test "x$enable_xlib_glx" = xauto; then +case "x$mesa_driver" in +xxlib) enable_xlib_glx=yes ;; +*) enable_xlib_glx=no ;; +esac +fi + +if test "x$enable_glx" = xno; then +enable_xlib_glx=no +fi + +if test "x$enable_dri" = xyes; then +if test "