diff --git a/meson_options.txt b/meson_options.txt index 18a4b01b324..de4673a5b24 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -163,7 +163,7 @@ option( option( 'gallium-rusticl-enable-drivers', type : 'array', - value : ['auto'], + value : ['auto', 'asahi'], description : 'List of gallium drivers for which rusticl will be enabled ' + 'by default', ) diff --git a/src/gallium/frontends/rusticl/mesa/pipe/device.rs b/src/gallium/frontends/rusticl/mesa/pipe/device.rs index 010943c9ea9..8f89a777944 100644 --- a/src/gallium/frontends/rusticl/mesa/pipe/device.rs +++ b/src/gallium/frontends/rusticl/mesa/pipe/device.rs @@ -56,7 +56,10 @@ fn get_enabled_devs() -> HashMap { let mut res = HashMap::new(); // we require the type here as this list can be empty depending on the build options - let default_devs: &[&str] = &[]; + let default_devs: &[&str] = &[ + #[cfg(any(rusticl_enable_asahi, rusticl_enable_auto))] + "asahi", + ]; // I wished we could use different iterators, but that's not really working out. let enabled_devs = env::var("RUSTICL_ENABLE").unwrap_or(default_devs.join(","));