Maybe this is correct, but it makes me nervous treating with_gallium as equivalent to with_dri, since gallium drivers can be built dri-less (gallium-xlib, and some other configurations on windows). I think something like:
with_glx = get_option('glx') if with_glx == 'auto' if with_dri with_glx = 'dri' elif with_gallium # Even when building just gallium drivers the user probably wants dri with_glx = 'dri' with_dri = true elif with_platform_x11 and with_any_opengl and not with_any_vk # The automatic behavior should not be to turn on xlib based glx when # building only vulkan drivers with_glx = 'xlib' else with_glx = 'disabled' endif + elif with_glx == 'dri' + if with_gallium + with_dri = true + endif endif Would achieve the correct result, be simpler, and avoid accidentally adding dri sources when we shouldn't. Dylan Quoting Jon Turney (2018-01-12 05:18:35) > 'meson -Ddri-drivers= -Dgallium-drivers=swrast -Dglx=dri' fails with 'dri > based GLX requires at least one DRI driver' > > Signed-off-by: Jon Turney <jon.tur...@dronecode.org.uk> > --- > meson.build | 2 +- > src/glx/meson.build | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/meson.build b/meson.build > index 77e4e894b23..dd8e6145edb 100644 > --- a/meson.build > +++ b/meson.build > @@ -323,7 +323,7 @@ if with_glx != 'disabled' > if with_dri > error('xlib conflicts with any dri driver') > endif > - elif with_glx == 'dri' and not with_dri > + elif with_glx == 'dri' and not (with_dri or with_gallium) > error('dri based GLX requires at least one DRI driver') > endif > endif > diff --git a/src/glx/meson.build b/src/glx/meson.build > index cdb388e9837..ead6e6138f7 100644 > --- a/src/glx/meson.build > +++ b/src/glx/meson.build > @@ -65,7 +65,7 @@ extra_libs_libglx = [] > extra_deps_libgl = [] > extra_ld_args_libgl = [] > > -if with_dri > +if with_dri or with_gallium > files_libglx += files( > 'dri_common.c', > 'dri_common.h', > -- > 2.15.1 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
signature.asc
Description: signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev