We also add a meson option to disable it and re-enable the legacy API.
This code probably won't last long but it gives developers the option.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
].contains(true)
with_any_nouveau = with_gallium_nouveau or with_nouveau_vk
+if with_nouveau_vk and get_option('nvk-legacy-uapi')
+ pre_args += '-DNVK_NEW_UAPI=0'
+else
+ pre_args += '-DNVK_NEW_UAPI=1'
+endif
+
if with_swrast_vk and not with_gallium_softpipe
error('swrast vulkan requires gallium swrast')
endif
value : 'disabled',
description: 'Enable Intel Xe KMD support.'
)
+
+option(
+ 'nvk-legacy-uapi',
+ type : 'boolean',
+ value : 'false',
+ description : 'Build support for legacy kernel uAPI.'
+)
nvk_files = files(
'../../gallium/auxiliary/tgsi/tgsi_from_mesa.c',
- 'nvk_bo_sync.c',
- 'nvk_bo_sync.h',
'nvk_buffer.c',
'nvk_buffer.h',
'nvk_buffer_view.c',
'nvk_wsi.h'
)
+if get_option('nvk-legacy-uapi')
+ nvk_files += files(
+ 'nvk_bo_sync.c',
+ 'nvk_bo_sync.h',
+ )
+endif
+
nvk_entrypoints = custom_target(
'nvk_entrypoints',
input : [vk_entrypoints_gen, vk_api_xml],
extern "C" {
#endif
-#define NVK_NEW_UAPI 0
+#ifndef NVK_NEW_UAPI
+#define NVK_NEW_UAPI 1
+#endif
enum nvk_debug {
/* dumps all push buffers after submission */