Re: [Mesa-dev] [PATCH v3 1/9] meson: use va-api version reported by pkg-config
Quoting Emil Velikov (2018-02-08 16:14:39) > On 8 February 2018 at 23:36, Dylan Baker wrote: > > Quoting Emil Velikov (2018-02-08 15:22:32) > >> On 8 February 2018 at 23:16, Dylan Baker wrote: > >> > Quoting Emil Velikov (2018-02-08 14:56:27) > >> >> On 2 February 2018 at 19:30, Dylan Baker wrote: > >> >> > Fixes: 5a785d51a6d6 ("meson: build gallium va state tracker") > >> >> > Signed-off-by: Dylan Baker > >> >> > --- > >> >> > meson.build | 2 +- > >> >> > src/gallium/state_trackers/va/meson.build | 6 +++--- > >> >> > 2 files changed, 4 insertions(+), 4 deletions(-) > >> >> > > >> >> > diff --git a/meson.build b/meson.build > >> >> > index 323f706..4c6283c 100644 > >> >> > --- a/meson.build > >> >> > +++ b/meson.build > >> >> > @@ -533,7 +533,7 @@ with_gallium_va = _va == 'true' > >> >> > dep_va = [] > >> >> > if with_gallium_va > >> >> >dep_va = dependency('libva', version : '>= 0.38.0') > >> >> > - dep_va = declare_dependency( > >> >> > + dep_va_headers = declare_dependency( > >> >> > compile_args : run_command(prog_pkgconfig, ['libva', > >> >> > '--cflags']).stdout().split() > >> >> >) > >> >> > endif > >> >> > diff --git a/src/gallium/state_trackers/va/meson.build > >> >> > b/src/gallium/state_trackers/va/meson.build > >> >> > index 56e68e9..35da5ab 100644 > >> >> > --- a/src/gallium/state_trackers/va/meson.build > >> >> > +++ b/src/gallium/state_trackers/va/meson.build > >> >> > @@ -1,4 +1,4 @@ > >> >> > -# Copyright © 2017 Intel Corporation > >> >> > +# Copyright © 2017-2018 Intel Corporation > >> >> > > >> >> > # Permission is hereby granted, free of charge, to any person > >> >> > obtaining a copy > >> >> > # of this software and associated documentation files (the > >> >> > "Software"), to deal > >> >> > @@ -18,7 +18,7 @@ > >> >> > # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > >> >> > DEALINGS IN THE > >> >> > # SOFTWARE. > >> >> > > >> >> > -libva_version = ['2', '3', '0'] > >> >> > +libva_version = dep_va.version().split('.') > >> >> > > >> >> > libva_st = static_library( > >> >> >'va_st', > >> >> > @@ -35,5 +35,5 @@ libva_st = static_library( > >> >> > ), > >> >> >], > >> >> >include_directories : [inc_common], > >> >> > - dependencies : [dep_va, dep_x11_xcb, dep_xcb, dep_xcb_dri2, > >> >> > dep_xcb_dri3], > >> >> > + dependencies : [dep_va_headers, dep_x11_xcb, dep_xcb, > >> >> > dep_xcb_dri2, dep_xcb_dri3], > >> >> You're doing three distinct things here. Please split those up: > >> >> - using the correction version > >> >> - removing the overlinking (against libva) > >> >> - correcting the (link) depedency list > >> > > >> > No, the only thing in your list changing is that we're using the correct > >> > version. Previously dep_va was shadowed to by a headers only dependency, > >> > with > >> > this patch a new variable is created for the headers only dependency and > >> > no > >> > shadowing is done. > >> > > >> Right - slightly misread that one. Still seem like two distinct things, > >> right? > >> > >> >> To save yourself some pain fold the common x11_xcb/etc dependencies > >> >> into a common block at the top level. > >> >> In there you can attribute (perhaps at a later stage) the x11-less > >> >> build. Just like we've been doing in autotools for a while. > >> > > >> > The plan is to do that once we move to meson 0.45, which has a > >> > dependency cache, > >> > and will make checking for a dependency more than once basically free. > >> > > >> Surely one can do that just once (regardless of 0.45) in say top level > >> meson.build? > >> It works with old lovely autotools and meson seems perfectly capable > >> of doing this. > >> > >> -Emil > > > > Are you suggesting doing something like? > > > > group_of_deps = [dep_foo, dep_bar] > > > Whichever works really - be that a list (array?) like you mentioned, a > dependency() thingy or other. possibly. Eric and I have been talking about converting some more things to user declare_dependency() internally (the core gallium libs and the glsl compiler have come up). > Even in the worst case (of calling pkg-config once more per target) > those will be handled in parallel so it won't be noticeable. > > -Emil They won't be handled in parallel. Meson calls pkg-config and pre-populates results for ninja, and meson is serially. There have been some long discussions about using python's asyncio for running pkg-config, but running pkg-config in parallel is actually a really hard problem to solve without introducing race conditions or doing some kind of branch prediction. And having ninja call it just moves the cost from configure time to build time, that's why meson is adding a cache instead, nearly the same performance win without as many hard problems to solve. Dylan signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mail
Re: [Mesa-dev] [PATCH v3 1/9] meson: use va-api version reported by pkg-config
On 8 February 2018 at 23:36, Dylan Baker wrote: > Quoting Emil Velikov (2018-02-08 15:22:32) >> On 8 February 2018 at 23:16, Dylan Baker wrote: >> > Quoting Emil Velikov (2018-02-08 14:56:27) >> >> On 2 February 2018 at 19:30, Dylan Baker wrote: >> >> > Fixes: 5a785d51a6d6 ("meson: build gallium va state tracker") >> >> > Signed-off-by: Dylan Baker >> >> > --- >> >> > meson.build | 2 +- >> >> > src/gallium/state_trackers/va/meson.build | 6 +++--- >> >> > 2 files changed, 4 insertions(+), 4 deletions(-) >> >> > >> >> > diff --git a/meson.build b/meson.build >> >> > index 323f706..4c6283c 100644 >> >> > --- a/meson.build >> >> > +++ b/meson.build >> >> > @@ -533,7 +533,7 @@ with_gallium_va = _va == 'true' >> >> > dep_va = [] >> >> > if with_gallium_va >> >> >dep_va = dependency('libva', version : '>= 0.38.0') >> >> > - dep_va = declare_dependency( >> >> > + dep_va_headers = declare_dependency( >> >> > compile_args : run_command(prog_pkgconfig, ['libva', >> >> > '--cflags']).stdout().split() >> >> >) >> >> > endif >> >> > diff --git a/src/gallium/state_trackers/va/meson.build >> >> > b/src/gallium/state_trackers/va/meson.build >> >> > index 56e68e9..35da5ab 100644 >> >> > --- a/src/gallium/state_trackers/va/meson.build >> >> > +++ b/src/gallium/state_trackers/va/meson.build >> >> > @@ -1,4 +1,4 @@ >> >> > -# Copyright © 2017 Intel Corporation >> >> > +# Copyright © 2017-2018 Intel Corporation >> >> > >> >> > # Permission is hereby granted, free of charge, to any person >> >> > obtaining a copy >> >> > # of this software and associated documentation files (the >> >> > "Software"), to deal >> >> > @@ -18,7 +18,7 @@ >> >> > # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER >> >> > DEALINGS IN THE >> >> > # SOFTWARE. >> >> > >> >> > -libva_version = ['2', '3', '0'] >> >> > +libva_version = dep_va.version().split('.') >> >> > >> >> > libva_st = static_library( >> >> >'va_st', >> >> > @@ -35,5 +35,5 @@ libva_st = static_library( >> >> > ), >> >> >], >> >> >include_directories : [inc_common], >> >> > - dependencies : [dep_va, dep_x11_xcb, dep_xcb, dep_xcb_dri2, >> >> > dep_xcb_dri3], >> >> > + dependencies : [dep_va_headers, dep_x11_xcb, dep_xcb, dep_xcb_dri2, >> >> > dep_xcb_dri3], >> >> You're doing three distinct things here. Please split those up: >> >> - using the correction version >> >> - removing the overlinking (against libva) >> >> - correcting the (link) depedency list >> > >> > No, the only thing in your list changing is that we're using the correct >> > version. Previously dep_va was shadowed to by a headers only dependency, >> > with >> > this patch a new variable is created for the headers only dependency and no >> > shadowing is done. >> > >> Right - slightly misread that one. Still seem like two distinct things, >> right? >> >> >> To save yourself some pain fold the common x11_xcb/etc dependencies >> >> into a common block at the top level. >> >> In there you can attribute (perhaps at a later stage) the x11-less >> >> build. Just like we've been doing in autotools for a while. >> > >> > The plan is to do that once we move to meson 0.45, which has a dependency >> > cache, >> > and will make checking for a dependency more than once basically free. >> > >> Surely one can do that just once (regardless of 0.45) in say top level >> meson.build? >> It works with old lovely autotools and meson seems perfectly capable >> of doing this. >> >> -Emil > > Are you suggesting doing something like? > > group_of_deps = [dep_foo, dep_bar] > Whichever works really - be that a list (array?) like you mentioned, a dependency() thingy or other. Even in the worst case (of calling pkg-config once more per target) those will be handled in parallel so it won't be noticeable. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v3 1/9] meson: use va-api version reported by pkg-config
Quoting Emil Velikov (2018-02-08 15:22:32) > On 8 February 2018 at 23:16, Dylan Baker wrote: > > Quoting Emil Velikov (2018-02-08 14:56:27) > >> On 2 February 2018 at 19:30, Dylan Baker wrote: > >> > Fixes: 5a785d51a6d6 ("meson: build gallium va state tracker") > >> > Signed-off-by: Dylan Baker > >> > --- > >> > meson.build | 2 +- > >> > src/gallium/state_trackers/va/meson.build | 6 +++--- > >> > 2 files changed, 4 insertions(+), 4 deletions(-) > >> > > >> > diff --git a/meson.build b/meson.build > >> > index 323f706..4c6283c 100644 > >> > --- a/meson.build > >> > +++ b/meson.build > >> > @@ -533,7 +533,7 @@ with_gallium_va = _va == 'true' > >> > dep_va = [] > >> > if with_gallium_va > >> >dep_va = dependency('libva', version : '>= 0.38.0') > >> > - dep_va = declare_dependency( > >> > + dep_va_headers = declare_dependency( > >> > compile_args : run_command(prog_pkgconfig, ['libva', > >> > '--cflags']).stdout().split() > >> >) > >> > endif > >> > diff --git a/src/gallium/state_trackers/va/meson.build > >> > b/src/gallium/state_trackers/va/meson.build > >> > index 56e68e9..35da5ab 100644 > >> > --- a/src/gallium/state_trackers/va/meson.build > >> > +++ b/src/gallium/state_trackers/va/meson.build > >> > @@ -1,4 +1,4 @@ > >> > -# Copyright © 2017 Intel Corporation > >> > +# Copyright © 2017-2018 Intel Corporation > >> > > >> > # Permission is hereby granted, free of charge, to any person obtaining > >> > a copy > >> > # of this software and associated documentation files (the "Software"), > >> > to deal > >> > @@ -18,7 +18,7 @@ > >> > # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER > >> > DEALINGS IN THE > >> > # SOFTWARE. > >> > > >> > -libva_version = ['2', '3', '0'] > >> > +libva_version = dep_va.version().split('.') > >> > > >> > libva_st = static_library( > >> >'va_st', > >> > @@ -35,5 +35,5 @@ libva_st = static_library( > >> > ), > >> >], > >> >include_directories : [inc_common], > >> > - dependencies : [dep_va, dep_x11_xcb, dep_xcb, dep_xcb_dri2, > >> > dep_xcb_dri3], > >> > + dependencies : [dep_va_headers, dep_x11_xcb, dep_xcb, dep_xcb_dri2, > >> > dep_xcb_dri3], > >> You're doing three distinct things here. Please split those up: > >> - using the correction version > >> - removing the overlinking (against libva) > >> - correcting the (link) depedency list > > > > No, the only thing in your list changing is that we're using the correct > > version. Previously dep_va was shadowed to by a headers only dependency, > > with > > this patch a new variable is created for the headers only dependency and no > > shadowing is done. > > > Right - slightly misread that one. Still seem like two distinct things, right? > > >> To save yourself some pain fold the common x11_xcb/etc dependencies > >> into a common block at the top level. > >> In there you can attribute (perhaps at a later stage) the x11-less > >> build. Just like we've been doing in autotools for a while. > > > > The plan is to do that once we move to meson 0.45, which has a dependency > > cache, > > and will make checking for a dependency more than once basically free. > > > Surely one can do that just once (regardless of 0.45) in say top level > meson.build? > It works with old lovely autotools and meson seems perfectly capable > of doing this. > > -Emil Are you suggesting doing something like? group_of_deps = [dep_foo, dep_bar] Dylan signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v3 1/9] meson: use va-api version reported by pkg-config
On 8 February 2018 at 23:16, Dylan Baker wrote: > Quoting Emil Velikov (2018-02-08 14:56:27) >> On 2 February 2018 at 19:30, Dylan Baker wrote: >> > Fixes: 5a785d51a6d6 ("meson: build gallium va state tracker") >> > Signed-off-by: Dylan Baker >> > --- >> > meson.build | 2 +- >> > src/gallium/state_trackers/va/meson.build | 6 +++--- >> > 2 files changed, 4 insertions(+), 4 deletions(-) >> > >> > diff --git a/meson.build b/meson.build >> > index 323f706..4c6283c 100644 >> > --- a/meson.build >> > +++ b/meson.build >> > @@ -533,7 +533,7 @@ with_gallium_va = _va == 'true' >> > dep_va = [] >> > if with_gallium_va >> >dep_va = dependency('libva', version : '>= 0.38.0') >> > - dep_va = declare_dependency( >> > + dep_va_headers = declare_dependency( >> > compile_args : run_command(prog_pkgconfig, ['libva', >> > '--cflags']).stdout().split() >> >) >> > endif >> > diff --git a/src/gallium/state_trackers/va/meson.build >> > b/src/gallium/state_trackers/va/meson.build >> > index 56e68e9..35da5ab 100644 >> > --- a/src/gallium/state_trackers/va/meson.build >> > +++ b/src/gallium/state_trackers/va/meson.build >> > @@ -1,4 +1,4 @@ >> > -# Copyright © 2017 Intel Corporation >> > +# Copyright © 2017-2018 Intel Corporation >> > >> > # Permission is hereby granted, free of charge, to any person obtaining a >> > copy >> > # of this software and associated documentation files (the "Software"), >> > to deal >> > @@ -18,7 +18,7 @@ >> > # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS >> > IN THE >> > # SOFTWARE. >> > >> > -libva_version = ['2', '3', '0'] >> > +libva_version = dep_va.version().split('.') >> > >> > libva_st = static_library( >> >'va_st', >> > @@ -35,5 +35,5 @@ libva_st = static_library( >> > ), >> >], >> >include_directories : [inc_common], >> > - dependencies : [dep_va, dep_x11_xcb, dep_xcb, dep_xcb_dri2, >> > dep_xcb_dri3], >> > + dependencies : [dep_va_headers, dep_x11_xcb, dep_xcb, dep_xcb_dri2, >> > dep_xcb_dri3], >> You're doing three distinct things here. Please split those up: >> - using the correction version >> - removing the overlinking (against libva) >> - correcting the (link) depedency list > > No, the only thing in your list changing is that we're using the correct > version. Previously dep_va was shadowed to by a headers only dependency, with > this patch a new variable is created for the headers only dependency and no > shadowing is done. > Right - slightly misread that one. Still seem like two distinct things, right? >> To save yourself some pain fold the common x11_xcb/etc dependencies >> into a common block at the top level. >> In there you can attribute (perhaps at a later stage) the x11-less >> build. Just like we've been doing in autotools for a while. > > The plan is to do that once we move to meson 0.45, which has a dependency > cache, > and will make checking for a dependency more than once basically free. > Surely one can do that just once (regardless of 0.45) in say top level meson.build? It works with old lovely autotools and meson seems perfectly capable of doing this. -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v3 1/9] meson: use va-api version reported by pkg-config
Quoting Emil Velikov (2018-02-08 14:56:27) > On 2 February 2018 at 19:30, Dylan Baker wrote: > > Fixes: 5a785d51a6d6 ("meson: build gallium va state tracker") > > Signed-off-by: Dylan Baker > > --- > > meson.build | 2 +- > > src/gallium/state_trackers/va/meson.build | 6 +++--- > > 2 files changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/meson.build b/meson.build > > index 323f706..4c6283c 100644 > > --- a/meson.build > > +++ b/meson.build > > @@ -533,7 +533,7 @@ with_gallium_va = _va == 'true' > > dep_va = [] > > if with_gallium_va > >dep_va = dependency('libva', version : '>= 0.38.0') > > - dep_va = declare_dependency( > > + dep_va_headers = declare_dependency( > > compile_args : run_command(prog_pkgconfig, ['libva', > > '--cflags']).stdout().split() > >) > > endif > > diff --git a/src/gallium/state_trackers/va/meson.build > > b/src/gallium/state_trackers/va/meson.build > > index 56e68e9..35da5ab 100644 > > --- a/src/gallium/state_trackers/va/meson.build > > +++ b/src/gallium/state_trackers/va/meson.build > > @@ -1,4 +1,4 @@ > > -# Copyright © 2017 Intel Corporation > > +# Copyright © 2017-2018 Intel Corporation > > > > # Permission is hereby granted, free of charge, to any person obtaining a > > copy > > # of this software and associated documentation files (the "Software"), to > > deal > > @@ -18,7 +18,7 @@ > > # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS > > IN THE > > # SOFTWARE. > > > > -libva_version = ['2', '3', '0'] > > +libva_version = dep_va.version().split('.') > > > > libva_st = static_library( > >'va_st', > > @@ -35,5 +35,5 @@ libva_st = static_library( > > ), > >], > >include_directories : [inc_common], > > - dependencies : [dep_va, dep_x11_xcb, dep_xcb, dep_xcb_dri2, > > dep_xcb_dri3], > > + dependencies : [dep_va_headers, dep_x11_xcb, dep_xcb, dep_xcb_dri2, > > dep_xcb_dri3], > You're doing three distinct things here. Please split those up: > - using the correction version > - removing the overlinking (against libva) > - correcting the (link) depedency list No, the only thing in your list changing is that we're using the correct version. Previously dep_va was shadowed to by a headers only dependency, with this patch a new variable is created for the headers only dependency and no shadowing is done. > To save yourself some pain fold the common x11_xcb/etc dependencies > into a common block at the top level. > In there you can attribute (perhaps at a later stage) the x11-less > build. Just like we've been doing in autotools for a while. The plan is to do that once we move to meson 0.45, which has a dependency cache, and will make checking for a dependency more than once basically free. Dylan signature.asc Description: signature ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH v3 1/9] meson: use va-api version reported by pkg-config
On 2 February 2018 at 19:30, Dylan Baker wrote: > Fixes: 5a785d51a6d6 ("meson: build gallium va state tracker") > Signed-off-by: Dylan Baker > --- > meson.build | 2 +- > src/gallium/state_trackers/va/meson.build | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/meson.build b/meson.build > index 323f706..4c6283c 100644 > --- a/meson.build > +++ b/meson.build > @@ -533,7 +533,7 @@ with_gallium_va = _va == 'true' > dep_va = [] > if with_gallium_va >dep_va = dependency('libva', version : '>= 0.38.0') > - dep_va = declare_dependency( > + dep_va_headers = declare_dependency( > compile_args : run_command(prog_pkgconfig, ['libva', > '--cflags']).stdout().split() >) > endif > diff --git a/src/gallium/state_trackers/va/meson.build > b/src/gallium/state_trackers/va/meson.build > index 56e68e9..35da5ab 100644 > --- a/src/gallium/state_trackers/va/meson.build > +++ b/src/gallium/state_trackers/va/meson.build > @@ -1,4 +1,4 @@ > -# Copyright © 2017 Intel Corporation > +# Copyright © 2017-2018 Intel Corporation > > # Permission is hereby granted, free of charge, to any person obtaining a > copy > # of this software and associated documentation files (the "Software"), to > deal > @@ -18,7 +18,7 @@ > # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN > THE > # SOFTWARE. > > -libva_version = ['2', '3', '0'] > +libva_version = dep_va.version().split('.') > > libva_st = static_library( >'va_st', > @@ -35,5 +35,5 @@ libva_st = static_library( > ), >], >include_directories : [inc_common], > - dependencies : [dep_va, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3], > + dependencies : [dep_va_headers, dep_x11_xcb, dep_xcb, dep_xcb_dri2, > dep_xcb_dri3], You're doing three distinct things here. Please split those up: - using the correction version - removing the overlinking (against libva) - correcting the (link) depedency list To save yourself some pain fold the common x11_xcb/etc dependencies into a common block at the top level. In there you can attribute (perhaps at a later stage) the x11-less build. Just like we've been doing in autotools for a while. Thanks Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev