[Mesa-dev] [PATCH 07/21] vulkan: Add EXT_acquire_xlib_display

Keith Packard keithp at keithp.com
Thu Feb 15 20:26:57 UTC 2018


Eric Engestrom <eric.engestrom at imgtec.com> writes:

> Can be simplified a bit:
>
>   _xlib_lease = get_option('xlib-lease')
>   if _xlib_lease == 'auto'
>     with_xlib_lease = with_platform_x11 and with_platform_display
>   else
>     with_xlib_lease = _xlib_lease == 'true'
>   endif
>
> (We also usually try to avoid changing the type of a var, and meson might
> start being more strict with types in future releases)

I wondered about that in the places I copied my code from. Good to know
there's a better practice. I've switched to using this form.

>> +if with_xlib_lease
>> +  vulkan_wsi_deps += dep_xcb_xrandr
>> +  vulkan_wsi_args += [
>> +    '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT',
>> +  ]
>
> vulkan_wsi_args += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'

I switched all of the inappropriate usage to this form for six separate
patches (three each for core/anv/radv by two extensions (DISPLAY and XLIB_XRANDR).

> with that, the meson part of this is
> Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>

Awesome!

Thanks for reviewing the build system bits; I'm just starting to use
meson and every new change is a learning opportunity at this point.

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180215/565cc26d/attachment.sig>


More information about the mesa-dev mailing list