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

Jose Fonseca jfonseca at vmware.com
Mon Nov 14 22:18:34 UTC 2016


On 10/11/16 17:27, Kyriazis, George 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?
>
> Thanks,
>
> George
>
>> -Emil
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>


What you need is this:


diff --git a/common.py b/common.py
index fb0884e..179170b 100644
--- a/common.py
+++ b/common.py
@@ -110,5 +110,6 @@ def AddOptions(opts):
      opts.Add(BoolOption('texture_float',
                          'enable floating-point textures and 
renderbuffers',
                          'no'))
+    opts.Add(BoolOption('swr', 'Build SWR', 'no'))
      if host_platform == 'windows':
          opts.Add('MSVC_VERSION', 'Microsoft Visual C/C++ version')

Then swr should always be part of the environment.


Jose


More information about the mesa-dev mailing list