[Mesa-dev] [PATCH v2 6/8] gallium: Enable swr driver

Kyriazis, George george.kyriazis at intel.com
Thu Nov 10 20:18:34 UTC 2016


Emil,

I've followed the approach of trying to localize the swr changes to where they belong in order to avoid "polluting" upper-level files.  If you're talking about modifying some of the files in the scons/ directory, I don't see a place where swr fits in, conceptually.

I do agree that using the full SCons.Script.ARGUMENTS is clunky, but I don't want to pollute top-level files with driver-specific things (swr in this case).

Thoughts?

George

> -----Original Message-----
> From: Emil Velikov [mailto:emil.l.velikov at gmail.com]
> Sent: Thursday, November 10, 2016 12:13 PM
> To: Kyriazis, George <george.kyriazis at intel.com>
> Cc: ML mesa-dev <mesa-dev at lists.freedesktop.org>
> Subject: Re: [Mesa-dev] [PATCH v2 6/8] gallium: Enable swr driver
> 
> On 10 November 2016 at 17:27, Kyriazis, George <george.kyriazis at intel.com>
> wrote:
> >> -----Original Message-----
> >> From: Emil Velikov [mailto:emil.l.velikov at gmail.com]
> >> Sent: Thursday, November 10, 2016 8:14 AM
> >> To: Kyriazis, George <george.kyriazis at intel.com>
> >> Cc: ML mesa-dev <mesa-dev at lists.freedesktop.org>
> >> Subject: Re: [Mesa-dev] [PATCH v2 6/8] gallium: Enable swr driver
> >>
> >> "gallium/targets: scons: wire swr support for libgl-gdi/libgl-xlib/osmesa"
> >>
> >> ... or alike ?
> >>
> >> > +import SCons.Script.SConscript
> >> > +
> >>
> >> > +    if 'swr' in SCons.Script.ARGUMENTS and
> >> SCons.Script.ARGUMENTS['swr']:
> >> With the "move this to top level" suggestion this will read roughly
> >> as
> >>
> >> if env['swr']:
> >>
> > The command line variables, however (like swr=1) are not part of the
> environment.  Even then, env['swr'] would fail for non-swr builds, since 'swr'
> is not in the env dictionary.  This works for env['llvm'] sincellvm.py initially
> sets it to False.  So, it will still be a 2-level test:   if 'swr' in env and env['swr']:,
> which is not a simplication really.
> >
> > Is your point to move it to the environment, or to do a one-check test?
> >
> To consolidate the 'clunky' SCons.Script.ARGUMENTS + requirements [only
> llvm?] checking in a single place. Thus the [newly added in the env dictionary]
> swr can be used throughout without even import(ing)
> SCons.Script.SConscript.
> 
> Thanks !
> Emil


More information about the mesa-dev mailing list