rusticl: Add RUSTICL_FEATURES=intel
We're going to hide some of the cl_intel_* extensions behind that until they start stabilizing. Acked-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31772>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user