intel: Add Meson parameter to enable Xe KMD support
authorJosé Roberto de Souza <jose.souza@intel.com>
Mon, 19 Dec 2022 17:28:00 +0000 (09:28 -0800)
committerMarge Bot <emma+marge@anholt.net>
Fri, 3 Mar 2023 05:25:35 +0000 (05:25 +0000)
The plan is to compile all the Xe files but in run time it will fail
to detect the KMD loaded and it will fall back to software
rendering(if build).

Compiling Xe files makes sure newer commits don't break Xe even if
developers don't have Xe enabled in their build folder.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21368>

meson.build
meson_options.txt

index 2c7c4aa..2b1b68f 100644 (file)
@@ -1428,6 +1428,10 @@ if with_any_intel and ['x86', 'x86_64'].contains(host_machine.cpu_family())
   pre_args += '-DSUPPORT_INTEL_INTEGRATED_GPUS'
 endif
 
+if get_option('intel-xe-kmd').enabled()
+  pre_args += '-DINTEL_XE_KMD_SUPPORTED'
+endif
+
 # Determine whether or not the rt library is needed for time functions
 if host_machine.system() == 'windows' or cc.has_function('clock_gettime')
   dep_clock = null_dep
index 3b66f75..93a71f7 100644 (file)
@@ -630,3 +630,9 @@ option(
                 'the default driconf file is hardcoded into Mesa. ' +
                 'Requires expat.'
 )
+option (
+  'intel-xe-kmd',
+  type : 'feature',
+  value : 'disabled',
+  description: 'Enable Intel Xe KMD support.'
+)