Module: Mesa
Branch: main
Commit: 89dcc52b78339be5bfc846fc8861b5f22e34b944
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=89dcc52b78339be5bfc846fc8861b5f22e34b944

Author: Karol Herbst <[email protected]>
Date:   Tue Sep 13 17:48:45 2022 +0200

rusticl/device: print error when libclc fails to load

Signed-off-by: Karol Herbst <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18580>

---

 src/gallium/frontends/rusticl/core/device.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/gallium/frontends/rusticl/core/device.rs 
b/src/gallium/frontends/rusticl/core/device.rs
index 0a138b273f5..ba9d2f338f8 100644
--- a/src/gallium/frontends/rusticl/core/device.rs
+++ b/src/gallium/frontends/rusticl/core/device.rs
@@ -112,6 +112,10 @@ impl Device {
         }
 
         let lib_clc = spirv::SPIRVBin::get_lib_clc(&screen);
+        if lib_clc.is_none() {
+            eprintln!("Libclc failed to load. Please make sure it is installed 
and provides spirv-mesa3d-.spv and/or spirv64-mesa3d-.spv");
+        }
+
         let mut d = Self {
             base: CLObjectBase::new(),
             helper_ctx: Mutex::new(screen.create_context().unwrap()),

Reply via email to