[Mesa-dev] [PATCH 2/2] fixup! dri3: allow building against older xcb (v3)
Dylan Baker
dylan at pnwbakers.com
Wed Mar 14 16:03:38 UTC 2018
Quoting Dylan Baker (2018-03-13 19:45:37)
> Wrap it in parens and it can span multiple lines
>
> On March 13, 2018 5:40:15 PM PDT, Rob Clark <robdclark at gmail.com> wrote:
>
> On Tue, Mar 13, 2018 at 7:47 PM, Rob Clark <robdclark at gmail.com> wrote:
> On Tue, Mar 13, 2018 at 7:27 PM, Rob Clark <robdclark at gmail.com> wrote:
> On Tue, Mar 13, 2018 at 7:10 PM, Dylan Baker <dylan at pnwbakers.com> wrote:
> Quoting Rob Clark (2018-03-13 16:04:00)
> ---
> I'm a bit unsure about the xcb-present version dependency, as that was
> added in a different commit. OTOH I guess Dave is building vulkan with
> his patch so it is perhaps not a built-time dependency.
>
> meson.build | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index c201644c372..30f1919e6f5 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1235,9 +1235,14 @@ if with_platform_x11
> dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8')
>
> if with_dri3
> - pre_args += ['-DHAVE_DRI3', '-DHAVE_DRI3_MODIFIERS']
> - dep_xcb_dri3 = dependency('xcb-dri3', version : '>= 1.13')
> - dep_xcb_present = dependency('xcb-present', version: '>= 1.13')
> + pre_args += '-DHAVE_DRI3'
> + dep_xcb_dri3 = dependency('xcb-dri3')
> + dep_xcb_present = dependency('xcb-present')
> + # until xcb-dri3 has been around long enough to make a hard-dependency:
> + dep_xcb_dri3_modifiers = dependency('xcb-dri3', version : '>= 1.13', required : false)
> + if dep_xcb_dri3_modifiers.found()
>
> I think you could simplify this by doing:
>
> if dep_xcb_dri3.version().version_compare('>= 1.13')
>
> ahh, yeah, and I guess that will get rid of the confusing error msg
> about xcb-dri3 1.13 not found..
>
>
>
> Or should we be checking for xcb_dri3 and xcb_present >= 1.13?
>
> I'm not entirely sure why we were checking for xcb-present >= 1.13..
> if that is actually a build time requirement then I think Dave's
> initial patch needs some more ifdef.. (but otoh, if it was, I guess
> he would have noticed.)
>
> Anyways, I did a build w/ anv+radv enabled with xcb-present == 1.12
> (and xcb-dri3 1.12).. and 61309c2a727d52d543207d6ae79fcb3e68b5cff3
> looks like it just cares about >= 1.12 of both of those (although not
> sure if it is a compile time dependency).
>
> So *possibly* for both meson and autotools we should require 1.12, and
> optionally 1.13 for HAVE_DRI3_MODIFIERS?
>
>
> so mystery solved, Dave #ifdef'd out the present dependencies too ;-)
>
> so this is what I end up with:
>
> @@ -1235,9 +1235,14 @@ if with_platform_x11
> dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8')
>
> if with_dri3
> - pre_args += ['-DHAVE_DRI3', '-DHAVE_DRI3_MODIFIERS']
> - dep_xcb_dri3 = dependency('xcb-dri3', version : '>= 1.13')
> - dep_xcb_present = dependency('xcb-present', version: '>= 1.13')
> + pre_args += '-DHAVE_DRI3'
> + dep_xcb_dri3 = dependency('xcb-dri3')
> + dep_xcb_present = dependency('xcb-present')
> + # until xcb-dri3 has been around long enough to make a hard-dependency:
> + if dep_xcb_dri3.version().version_compare('>= 1.13') and
> + dep_xcb_present.version().version_compare('>= 1.13')
Sorry, I was replying form mobile last night,
if (dep_xcb_dri3.version().version_compare('>= 1.13') and
dep_xcb_present.version().version_compare('>= 1.13'))
will work. Meson's recursive descent parser sometimes leaves something to be
desired.
>
> hmm, annoyingly enough I found that on rawhide (meson 0.45.0), I seem
> to need the entire if statement on a single line, instead of split in
> two like this.
>
> BR,
> -R
>
> + pre_args += '-DHAVE_DRI3_MODIFIERS'
> + endif
> dep_xcb_sync = dependency('xcb-sync')
> dep_xshmfence = dependency('xshmfence', version : '>= 1.1')
> endif
>
-------------- 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/20180314/40f8a477/attachment-0001.sig>
More information about the mesa-dev
mailing list