[Mesa-dev] [RFC PATCH mesa 2/5] meson: simplify the gbm option code, and avoid changing types
Dylan Baker
dylan at pnwbakers.com
Sat Feb 24 00:44:06 UTC 2018
Quoting Eric Engestrom (2018-02-23 10:08:45)
> Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
> ---
> meson.build | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 2d474b140373292e49e7..28d068742ff914a623f6 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -303,16 +303,14 @@ if not (with_dri or with_gallium or with_glx == 'xlib' or with_glx == 'gallium-x
> with_shared_glapi = false
> endif
>
> -with_gbm = get_option('gbm')
> -if with_gbm == 'auto' and with_dri # TODO: or gallium
> - with_gbm = system_has_kms_drm
> -elif with_gbm == 'true'
> - if not system_has_kms_drm
> - error('GBM only supports DRM/KMS platforms')
> - endif
> - with_gbm = true
> +_gbm = get_option('gbm')
> +if _gbm == 'auto'
> + with_gbm = system_has_kms_drm and with_dri # TODO: or gallium
The gallium comment can be dropped, it's wrong.
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
> else
> - with_gbm = false
> + with_gbm = _gbm == 'true'
> +endif
> +if with_gbm and not system_has_kms_drm
> + error('GBM only supports DRM/KMS platforms')
> endif
>
> _egl = get_option('egl')
> --
> Cheers,
> Eric
>
-------------- 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/20180223/8881aef1/attachment.sig>
More information about the mesa-dev
mailing list