[Mesa-dev] [PATCH] vulkan: Fix compilation on older platforms
Dylan Baker
dylan at pnwbakers.com
Wed Jul 11 17:43:10 UTC 2018
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
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?
Dylan
-------------- 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/20180711/3f6ef031/attachment-0001.sig>
More information about the mesa-dev
mailing list