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

Dylan Baker dylan at pnwbakers.com
Wed Aug 8 16:11:37 UTC 2018


Quoting Eric Engestrom (2018-08-08 03:46:05)
> On Tuesday, 2018-08-07 16:49:17 -0700, Dylan Baker 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.
> >
> > Dylan
> >
> > P.S: Sorry if this goes through twice, I've been having trouble with my mail
> > setup.
> 
> I agree, using `env` is not nice. I'm not sure what you mean with
> src/generators though, can't we just move the extensions generators to
> src/vulkan/util/? (the `util` bit might need to be renamed though)

Sure, we can put them wherever.

> 
> Side note: can we also define that whole path only once (in
> src/vulkan/util/meson.build) and reuse it, instead of doing the dance
> every time?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180808/b381cafc/attachment.sig>


More information about the mesa-dev mailing list