On 12/01/2018 17:33, Dylan Baker wrote:
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.
Ah, yes. I'd completely failed to spot that in the 'auto' case above. How about the attached?
From f6d27e04bd7d8581b2cb723edaf6449eddb77cc8 Mon Sep 17 00:00:00 2001 From: Jon Turney <[email protected]> Date: Mon, 15 Jan 2018 19:39:46 +0000 Subject: [PATCH] meson: Set with_dri from with_gallium when DRI glx is explicitly configured Set with_dri from with_gallium when DRI GLX is explicitly configured, as well as when DRI GLX is chosen automatically. Signed-off-by: Jon Turney <[email protected]> --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 77e4e894b23..7bc4983d96e 100644 --- a/meson.build +++ b/meson.build @@ -248,7 +248,6 @@ if with_glx == 'auto' 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 @@ -257,6 +256,11 @@ if with_glx == 'auto' with_glx = 'disabled' endif endif +if with_glx == 'dri' + if with_gallium + with_dri = true + endif +endif if not (with_dri or with_gallium or with_glx == 'xlib' or with_glx == 'gallium-xlib') with_gles1 = false -- 2.15.1
_______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
