[Mesa-dev] [PATCH 3/4] anv: Use central api generation scripts.

Emil Velikov emil.l.velikov at gmail.com
Wed Aug 8 10:23:42 UTC 2018

On 8 August 2018 at 00:49, Dylan Baker <dylan at pnwbakers.com> wrote:
> Quoting Bas Nieuwenhuizen (2018-08-07 16:14:33)
>>  anv_extensions_c = custom_target(
>> @@ -36,10 +37,11 @@ anv_extensions_c = custom_target(
>>    input : ['anv_extensions_gen.py', vk_api_xml],
>>    output : 'anv_extensions.c',
>>    command : [
>> +   'env', 'PYTHONPATH=@0@'.format(join_paths(meson.source_root(), 'src/vulkan/util/')),
> This is really gross, you're adding a dependency on a unix console command. I
> know that anv is only built on Unix-like oses, but this will eventually end up
> being used in some code that needs to run on Windows (or mac, does mac have
> env?).
> I know that some people will object, but IMHO a better solution than mucking
> with the python path (either through sys.path or through PYTHONPATH, is to
> put all of the generators in a src/generators directory and be done with it.
> Sure the intel specific bits (for example) aren't in the src/intel folder,
> that's a small price to avoid having to call env just to run a python script.
Considering meson test() has an env argument, shouldn't there be an
equivalent for custom_target()?

It doesn't seem like we'll be able to use the Vulkan drivers on
Windows/Mac soon, so there should be enough time to tweak
custom_target() and update the Mesa build.

This will save Bas some time redoing the patches, plus we can reuse
the functionality elsewhere ;-)


More information about the mesa-dev mailing list