darktable: fix OpenCL support
The OpenCL compiler does not properly support -I flags to include the kernel paths, breaking relative includes. Simply replace the included files by absolute paths. OpenCL kernels verified to compile and work on an RX 580. Credits for the fix go to nixos-rocm.
This commit is contained in:
parent
6faba433b2
commit
0aef146cdd
1 changed files with 4 additions and 0 deletions
|
@ -43,6 +43,10 @@ stdenv.mkDerivation rec {
|
|||
libPathEnvVar = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
|
||||
libPathPrefix = "$out/lib/darktable" + stdenv.lib.optionalString stdenv.isLinux ":${ocl-icd}/lib";
|
||||
in ''
|
||||
for f in $out/share/darktable/kernels/*.cl; do
|
||||
sed -r "s|#include \"(.*)\"|#include \"$out/share/darktable/kernels/\1\"|g" -i "$f"
|
||||
done
|
||||
|
||||
gappsWrapperArgs+=(
|
||||
--prefix ${libPathEnvVar} ":" "${libPathPrefix}"
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue