[Mesa-dev] [PATCH 2/2] fixup! dri3: allow building against older xcb (v3)
Rob Clark
robdclark at gmail.com
Tue Mar 13 23:27:47 UTC 2018
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?
BR,
-R
>
> Dylan
>
>> + pre_args += '-DHAVE_DRI3_MODIFIERS'
>> + endif
>> dep_xcb_sync = dependency('xcb-sync')
>> dep_xshmfence = dependency('xshmfence', version : '>= 1.1')
>> endif
>> --
>> 2.14.3
>>
More information about the mesa-dev
mailing list