[Mesa-dev] [PATCH mesa 1/6] meson: dedup gallium-vdpau logic

Eric Engestrom eric.engestrom at imgtec.com
Thu Dec 7 17:39:34 UTC 2017


On Thursday, 2017-12-07 09:29:26 -0800, Dylan Baker wrote:
> I didn't look at these super closely after the vdpau one, but we use this logic
> elsewhere in the meson build,
> 
> For the series,
> Reviewed-by: Dylan Baker <dylan at pnwbakers.com>

Thanks; I've actually found a few more bits of code that can be removed,
but I think I'll send a single patch with all of them.
I'll push the lot later, once you've seen that final patch too.

> 
> Quoting Eric Engestrom (2017-12-07 08:52:17)
> > Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
> > ---
> >  meson.build | 45 +++++++++++++++++++++------------------------
> >  1 file changed, 21 insertions(+), 24 deletions(-)
> > 
> > diff --git a/meson.build b/meson.build
> > index 1ea63fb12915c93a67d5..d8f317e1aaf350c26687 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -364,36 +364,33 @@ if with_dri or with_gallium
> >    endif
> >  endif
> >  
> > -dep_vdpau = []
> >  _vdpau = get_option('gallium-vdpau')
> > -if _vdpau == 'auto'
> > -  if not ['linux', 'bsd'].contains(host_machine.system())
> > -    with_gallium_vdpau = false
> > -  elif not with_platform_x11
> > -    with_gallium_vdpau = false
> > -  elif not (with_gallium_r300 or with_gallium_r600 or with_gallium_radeonsi or
> > -            with_gallium_nouveau)
> > -    with_gallium_vdpau = false
> > -  else
> > -    dep_vdpau = dependency('vdpau', version : '>= 1.1', required : false)
> > -    with_gallium_vdpau = dep_vdpau.found()
> > -  endif
> > -elif _vdpau == 'true'
> > -  if not ['linux', 'bsd'].contains(host_machine.system())
> > +if not ['linux', 'bsd'].contains(host_machine.system())
> > +  if _vdpau == 'true'
> >      error('VDPAU state tracker can only be build on unix-like OSes.')
> > -  elif not with_platform_x11
> > +  else
> > +    _vdpau = 'false'
> > +  endif
> > +elif not with_platform_x11
> > +  if _vdpau == 'true'
> >      error('VDPAU state tracker requires X11 support.')
> > -    with_gallium_vdpau = false
> > -  elif not (with_gallium_r300 or with_gallium_r600 or with_gallium_radeonsi or
> > -            with_gallium_nouveau)
> > +  else
> > +    _vdpau = 'false'
> > +  endif
> > +elif not (with_gallium_r300 or with_gallium_r600 or with_gallium_radeonsi or
> > +          with_gallium_nouveau)
> > +  if _vdpau == 'true'
> >      error('VDPAU state tracker requires at least one of the following gallium drivers: r300, r600, radeonsi, nouveau.')
> > +  else
> > +    _vdpau = 'false'
> >    endif
> > +elif _vdpau == 'auto'
> > +  _vdpau = 'true'
> > +endif
> > +with_gallium_vdpau = _vdpau == 'true'
> > +dep_vdpau = []
> > +if with_gallium_vdpau
> >    dep_vdpau = dependency('vdpau', version : '>= 1.1')
> > -  with_gallium_vdpau = true
> > -else
> > -  with_gallium_vdpau = false
> > -endif
> > -if with_gallium_vdpau
> >    dep_vdpau = declare_dependency(
> >      compile_args : dep_vdpau.get_pkgconfig_variable('cflags').split()
> >    )
> > -- 
> > Cheers,
> >   Eric
> > 




More information about the mesa-dev mailing list