[Mesa-dev] [PATCH] glx: Fix scons build.

Jose Fonseca jfonseca at vmware.com
Sun Nov 10 23:27:11 PST 2013



----- Original Message -----
> On Fri, Nov 8, 2013 at 9:55 AM,  <jfonseca at vmware.com> wrote:
> > From: José Fonseca <jfonseca at vmware.com>
> >
> > By disabling DRI3 support for the time being.
> >
> > I'll add DRI3 support to scons build when the DRI3 dependencies become
> > more widely available (as now there is no convenient way of testing it
> > except building dependencies from source).
> > ---
> >  src/glx/SConscript | 6 ++++++
> >  src/glx/glxext.c   | 2 ++
> >  2 files changed, 8 insertions(+)
> >
> > diff --git a/src/glx/SConscript b/src/glx/SConscript
> > index ef372d0..f581c12 100644
> > --- a/src/glx/SConscript
> > +++ b/src/glx/SConscript
> > @@ -40,6 +40,9 @@ if env['HAVE_XF86VIDMODE']:
> >  if False: # XXX: SHARED_GLAPI
> >      env.Append(CPPDEFINES = ['GLX_SHARED_GLAPI'])
> >
> > +# XXX: Disable DRI3 for now
> > +env.Append(CPPDEFINES = ['GLX_NO_DRI3'])
> > +
> >  sources = [
> >      'clientattrib.c',
> >      'clientinfo.c',
> > @@ -63,6 +66,7 @@ sources = [
> >      'indirect_vertex_program.c',
> >      'pixel.c',
> >      'pixelstore.c',
> > +    'query_renderer.c',
> >      'render2.c',
> >      'renderpix.c',
> >      'single2.c',
> > @@ -79,6 +83,8 @@ sources = [
> >      'dri2_glx.c',
> >      'dri2.c',
> >      'dri2_query_renderer.c',
> > +    #'dri3_glx.c',
> > +    #'dri3_common.c',
> >      'applegl_glx.c',
> >  ]
> >
> > diff --git a/src/glx/glxext.c b/src/glx/glxext.c
> > index c6e4d9f..d3c92574 100644
> > --- a/src/glx/glxext.c
> > +++ b/src/glx/glxext.c
> > @@ -865,8 +865,10 @@ __glXInitialize(Display * dpy)
> >      ** (e.g., those called in AllocAndFetchScreenConfigs).
> >      */
> >     if (glx_direct && glx_accel) {
> > +#if !defined(GLX_NO_DRI3)
> 
> Please name this HAVE_DRI3 instead. That's what the associated
> autotools patch calls it and I kind of dislike thinking about the
> meaning of double negatives.

I agree in principle, but there was no autotools patch when I posted this, and unless I used a negative flag I'd need to modify autotools to set it, which was more trouble than I thought it worth, as I knew soon or later somebody would fix the autotools to be optional too.

Anyway, with the autotools patch now in most of this patch is now irrelevant -- as long as scons doesn't defines HAVE_DRI3 there won't be any problem.

Jose


More information about the mesa-dev mailing list