Skip to content

Commit

Permalink
media-gfx/blender: Add "cycles-bin-kernels" useflag
Browse files Browse the repository at this point in the history
This useflag enables precompiling the cycles render kernels at compile
time. This makes it so that the user doesn't have to wait for the
kernels to compile when they are used for the first time.

Signed-off-by: Sebastian Parborg <[email protected]>
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
DarkDefender authored and thesamesam committed Apr 16, 2023
1 parent e8b52f6 commit 7f572b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion media-gfx/blender/blender-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fi
SLOT="${PV%.*}"
LICENSE="|| ( GPL-3 BL )"
IUSE="+bullet +dds +fluid +openexr +tbb \
alembic collada +color-management cuda +cycles \
alembic collada +color-management cuda +cycles cycles-bin-kernels \
debug doc +embree +ffmpeg +fftw +gmp jack jemalloc jpeg2k \
man +nanovdb ndof nls openal +oidn +openimageio +openmp +opensubdiv \
+openvdb optix +osl +pdf +potrace +pugixml pulseaudio sdl +sndfile \
Expand Down Expand Up @@ -237,6 +237,7 @@ src_configure() {
-DWITH_CODEC_SNDFILE=$(usex sndfile)
-DWITH_CXX_GUARDEDALLOC=$(usex debug)
-DWITH_CYCLES=$(usex cycles)
-DWITH_CYCLES_CUDA_BINARIES=$(usex cycles-bin-kernels)
-DWITH_CYCLES_DEVICE_CUDA=$(usex cuda TRUE FALSE)
-DWITH_CYCLES_DEVICE_OPTIX=$(usex optix)
-DWITH_CYCLES_EMBREE=$(usex embree)
Expand Down
5 changes: 5 additions & 0 deletions media-gfx/blender/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
Build cycles renderer (requires <pkg>media-libs/openimageio</pkg> and
<pkg>dev-libs/boost</pkg>).
</flag>
<flag name="cycles-bin-kernels">
Precompile the cycles render kernels for the CUDA/HIP/OneAPI backends, if they are enabled, at compile time.
This makes it so that the user doesn't have to wait for the kernels to compile when they are used for the first time in Blender.
If this option is not on, they will be built as needed at runtime.
</flag>
<flag name="dds">
Adds DDS textures support to Blender.
</flag>
Expand Down

0 comments on commit 7f572b9

Please sign in to comment.