diff --git a/docs/envvars.rst b/docs/envvars.rst index 9bb6fd688d8..113ed090f82 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -1188,6 +1188,7 @@ Rusticl environment variables - ``fp16`` enables OpenCL half support - ``fp64`` enables OpenCL double support + - ``intel`` enables various Intel OpenCL extensions .. envvar:: RUSTICL_DEBUG diff --git a/src/gallium/frontends/rusticl/core/platform.rs b/src/gallium/frontends/rusticl/core/platform.rs index a3d2d6e7d1b..0210ff6938c 100644 --- a/src/gallium/frontends/rusticl/core/platform.rs +++ b/src/gallium/frontends/rusticl/core/platform.rs @@ -46,6 +46,7 @@ pub struct PlatformDebug { pub struct PlatformFeatures { pub fp16: bool, pub fp64: bool, + pub intel: bool, } static PLATFORM_ENV_ONCE: Once = Once::new(); @@ -72,6 +73,7 @@ static mut PLATFORM_DBG: PlatformDebug = PlatformDebug { static mut PLATFORM_FEATURES: PlatformFeatures = PlatformFeatures { fp16: false, fp64: false, + intel: false, }; fn load_env() { @@ -108,6 +110,7 @@ fn load_env() { match flag { "fp16" => features.fp16 = true, "fp64" => features.fp64 = true, + "intel" => features.intel = true, "" => (), _ => eprintln!("Unknown RUSTICL_FEATURES flag found: {}", flag), }