[Mesa-dev] [PATCH] meson: better defaults for osx, windows and cygwin

Jon Turney jon.turney at dronecode.org.uk
Mon Feb 5 19:37:39 UTC 2018


On 05/02/2018 17:34, Dylan Baker wrote:
> Quoting Jon Turney (2018-02-03 13:19:20)
>> On 03/02/2018 18:07, Dylan Baker wrote:
>>> Quoting Jon Turney (2018-02-03 05:49:40)
>>>> -  if not ['darwin', 'windows'].contains(host_machine.system())
>>>> +  if not ['darwin', 'windows', 'cygwin'].contains(host_machine.system())
>>>> +    # TODO: PPC, Sparc
>>>>        if ['x86', 'x86_64'].contains(host_machine.cpu_family())
>>>>          _drivers = 'i915,i965,r100,r200,nouveau'
>>>>        else
>>>>          error('Unknown architecture. Please pass -Ddri-drivers to set driver options. Patches gladly accepted to fix this.')
>>>>        endif
>>>>      else
>>>> -    error('Unknown OS. Please pass -Ddri-drivers to set driver options. Patches gladly accepted to fix this.')
>>>> +    # only swrast would make sense here, but gallium swrast is a much better default
>>>> +    _drivers = ''
>>>
>>> I'm really not a fan of dumping the 'else error' case. This currently means that
>>> for example haiku will try to build something that they cannot support. I'd
>>> really rather just set appropriate defaults for OSes that are guaranteed
>>> supported and still let OSes that haven't been tested fall through to error. I
>>> also think that's a nice place for people trying to use mesa meson on a new
>>> platform, since they understand we haven't tested on their OS.
>>
>> Good idea.  But that's not what the code currently does.  If it's not on
>> the list of 'unknown' OSes (darwin, windows), any other OS e.g. haiku
>> gets treated like linux...
>>
>> Attached is a revised patch which is more explicit about what's a known
>> OS.  I guess the BSDs probably should be added somewhere, but idk what's
>> appropriate for them.
>>
> I rather like this patch, so you can add:
> Reviewed-by: Dylan Baker <dylan at pnwbakers.com>

Thanks.

> The only thing I might do differently is instead of checking for Linux use the
> `system_has_kms_drm` variable (which covers the BSDs as well as Linux, but I'm
> okay with landing this as-is and changing that later if that is the right thing
> to do.

Yeah, that seems pretty plausible.


More information about the mesa-dev mailing list