blender: build hip kernels

Without this, things need to be built at runtime. This matches what is
done for CUDA.

Technically we are only using `hipcc` (gotten here via `clr`) at build
time, however it is complicated in that Blender assumes all ROCm things
are together, and so *just* having `hipcc` causes it to get confused a
bit (especially later when we add hiprt support). While setting
`HIP_ROOT_DIR` might help a bit, it’s all a bit fragile and we have
`clr` in the closure already anyway so it doesn’t seem worth it to
over-optimize. Using `clr` brings libraries and such, so add it to
buildInputs instead of nativeBuildInputs to be a bit safe.
This commit is contained in:
Andrew Marshall
2025-09-09 16:10:44 -04:00
parent fdceba8b15
commit 3ff6d70d2e
+4
View File
@@ -194,6 +194,9 @@ stdenv'.mkDerivation (finalAttrs: {
"-DOPTIX_ROOT_DIR=${optix}"
"-DWITH_CYCLES_CUDA_BINARIES=ON"
]
++ lib.optionals hipSupport [
"-DWITH_CYCLES_HIP_BINARIES=ON"
]
++ lib.optionals waylandSupport [
"-DWITH_GHOST_WAYLAND=ON"
"-DWITH_GHOST_WAYLAND_DBUS=ON"
@@ -268,6 +271,7 @@ stdenv'.mkDerivation (finalAttrs: {
zstd
]
++ lib.optional embreeSupport embree
++ lib.optional hipSupport rocmPackages.clr
++ lib.optional openImageDenoiseSupport (openimagedenoise.override { inherit cudaSupport tbb; })
++ (
if (!stdenv.hostPlatform.isDarwin) then