From 9dd56ff2e7f01679d0d8d988d084caade81ee587 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 17 Mar 2022 00:06:16 +0100 Subject: [PATCH] rusticl: implement clUnloadPlatformCompiler Signed-off-by: Karol Herbst Acked-by: Alyssa Rosenzweig Part-of: --- src/gallium/frontends/rusticl/api/icd.rs | 5 ++--- src/gallium/frontends/rusticl/api/platform.rs | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/gallium/frontends/rusticl/api/icd.rs b/src/gallium/frontends/rusticl/api/icd.rs index 0f2dd948781..0615ad4daa2 100644 --- a/src/gallium/frontends/rusticl/api/icd.rs +++ b/src/gallium/frontends/rusticl/api/icd.rs @@ -1360,9 +1360,8 @@ extern "C" fn cl_link_program( ) } -extern "C" fn cl_unload_platform_compiler(_platform: cl_platform_id) -> cl_int { - println!("cl_unload_platform_compiler not implemented"); - CL_OUT_OF_HOST_MEMORY +extern "C" fn cl_unload_platform_compiler(platform: cl_platform_id) -> cl_int { + match_err!(unload_platform_compiler(platform)) } extern "C" fn cl_get_kernel_arg_info( diff --git a/src/gallium/frontends/rusticl/api/platform.rs b/src/gallium/frontends/rusticl/api/platform.rs index 905e14c53cf..215e261b30b 100644 --- a/src/gallium/frontends/rusticl/api/platform.rs +++ b/src/gallium/frontends/rusticl/api/platform.rs @@ -92,6 +92,12 @@ pub fn get_platform_ids( Ok(()) } +pub fn unload_platform_compiler(platform: cl_platform_id) -> CLResult<()> { + platform.get_ref()?; + // TODO unload the compiler + Ok(()) +} + #[test] fn test_get_platform_info() { let mut s: usize = 0;