[Mesa-dev] [PATCH] vulkan: Fix compilation on older platforms
Danylo Piliaiev
danylo.piliaiev at gmail.com
Thu Jul 12 07:36:36 UTC 2018
On 11.07.18 20:43, Dylan Baker wrote:
> Quoting Danylo Piliaiev (2018-07-11 04:26:03)
>> diff --git a/meson.build b/meson.build
>> index 7d12af3d51..2683060827 100644
>> --- a/meson.build
>> +++ b/meson.build
>> @@ -1088,6 +1088,8 @@ _drm_freedreno_ver = '2.4.92'
>> _drm_intel_ver = '2.4.75'
>> _drm_ver = '2.4.75'
>>
>> +_drm_crt_sequence_ver = '2.4.89'
>> +
>> _libdrm_checks = [
>> ['intel', with_dri_i915 or with_gallium_i915],
>> ['amdgpu', with_amd_vk or with_gallium_radeonsi],
>> @@ -1361,11 +1363,18 @@ if with_platform_x11
>> dep_xcb_xfixes = dependency('xcb-xfixes')
>> endif
>> if with_xlib_lease
>> - dep_xcb_xrandr = dependency('xcb-randr', version : '>= 1.12')
>> + dep_xcb_xrandr = dependency('xcb-randr', version : '>= 1.13')
>> dep_xlib_xrandr = dependency('xrandr', version : '>= 1.3')
>> endif
>> endif
>>
>> +if with_any_vk
>> + dep_drm_crt_sequence = dependency('libdrm', version : '>=' + _drm_crt_sequence_ver, required : false)
>> + if dep_drm_crt_sequence.found()
>> + pre_args += '-DVK_USE_DISPLAY_CONTROL'
>> + endif
>> +endif
>> +
> Instead of calling into pkg-config again, how about in the "if
> dep_libdrm.found()" check around line 1131, we add:
>
> if with_any_vk
> if dep_libdrm.version().version_compare('>= ' + _drm_crt_sequence_ver):
> pre_args += '-DVK_USE_DISPLAY_CONTROL'
> endif
> endif
You are right, this would be better.
> Or (since radv always requires libdrm > 2.4.89), why don't we just set the set
> the minimum to 2.4.89 if vulkan is enabled and be done with it?
It's also affects anv which requires only libdrm >= 2.4.75
>
> Dylan
More information about the mesa-dev
mailing list