Compositor: Rename compositor build option

Currently, the compositor can be disabled using the WITH_COMPOSITOR
build option. Since, we intent to always build the realtime compositor,
we need to make the distinction between both compositors clear.

So this patch renames the option to WITH_COMPOSITOR_CPU. Additionally,
the check for the option was moved inside the compositor modules' own
CMake file in preparation for the realtime compositor code.

Differential Revision: https://developer.blender.org/D15622

Reviewed By: Jeroen Bakker, Ray Molenkamp
This commit is contained in:
Omar Emara 2022-08-09 15:59:56 +02:00
parent f6639cc4fc
commit 9990792e87
15 changed files with 697 additions and 694 deletions

View File

@ -196,7 +196,7 @@ endif()
option(WITH_GMP "Enable features depending on GMP (Exact Boolean)" ON)
# Compositor
option(WITH_COMPOSITOR "Enable the tile based nodal compositor" ON)
option(WITH_COMPOSITOR_CPU "Enable the tile based CPU nodal compositor" ON)
option(WITH_OPENIMAGEDENOISE "Enable the OpenImageDenoise compositing node" ON)
option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" ON)

View File

@ -13,7 +13,7 @@ set(WITH_BULLET ON CACHE BOOL "" FORCE)
set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE)
set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE)
set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR_CPU ON CACHE BOOL "" FORCE)
set(WITH_CYCLES ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_EMBREE ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE)

View File

@ -18,7 +18,7 @@ set(WITH_BULLET OFF CACHE BOOL "" FORCE)
set(WITH_CODEC_AVI OFF CACHE BOOL "" FORCE)
set(WITH_CODEC_FFMPEG OFF CACHE BOOL "" FORCE)
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR_CPU OFF CACHE BOOL "" FORCE)
set(WITH_COREAUDIO OFF CACHE BOOL "" FORCE)
set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
set(WITH_DRACO OFF CACHE BOOL "" FORCE)

View File

@ -14,7 +14,7 @@ set(WITH_BULLET ON CACHE BOOL "" FORCE)
set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE)
set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE)
set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
set(WITH_COMPOSITOR_CPU ON CACHE BOOL "" FORCE)
set(WITH_CYCLES ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_EMBREE ON CACHE BOOL "" FORCE)
set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE)

View File

@ -48,7 +48,7 @@ if(WITH_LZMA)
add_subdirectory(lzma)
endif()
if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
if(WITH_CYCLES OR WITH_COMPOSITOR_CPU OR WITH_OPENSUBDIV)
add_subdirectory(clew)
if((WITH_CYCLES_DEVICE_CUDA OR WITH_CYCLES_DEVICE_OPTIX) AND WITH_CUDA_DYNLOAD)
add_subdirectory(cuew)
@ -96,6 +96,6 @@ if(WITH_MOD_FLUID)
add_subdirectory(mantaflow)
endif()
if(WITH_COMPOSITOR)
if(WITH_COMPOSITOR_CPU)
add_subdirectory(smaa_areatex)
endif()

View File

@ -151,14 +151,12 @@ add_subdirectory(io)
add_subdirectory(functions)
add_subdirectory(makesdna)
add_subdirectory(makesrna)
add_subdirectory(compositor)
if(WITH_BLENDER_THUMBNAILER)
add_subdirectory(blendthumb)
endif()
if(WITH_COMPOSITOR)
add_subdirectory(compositor)
endif()
if(WITH_IMAGE_OPENEXR)
add_subdirectory(imbuf/intern/openexr)

File diff suppressed because it is too large Load Diff

View File

@ -50,8 +50,8 @@ set(LIB
bf_editor_screen
)
if(WITH_COMPOSITOR)
add_definitions(-DWITH_COMPOSITOR)
if(WITH_COMPOSITOR_CPU)
add_definitions(-DWITH_COMPOSITOR_CPU)
endif()
if(WITH_OPENIMAGEDENOISE)

View File

@ -124,11 +124,11 @@ if(WITH_IMAGE_OPENEXR)
add_definitions(-DWITH_OPENEXR)
endif()
if(WITH_COMPOSITOR)
if(WITH_COMPOSITOR_CPU)
list(APPEND INC
../../compositor
)
add_definitions(-DWITH_COMPOSITOR)
add_definitions(-DWITH_COMPOSITOR_CPU)
endif()
if(WITH_OPENIMAGEDENOISE)

View File

@ -32,7 +32,7 @@
#include "NOD_composite.h"
#include "node_composite_util.hh"
#ifdef WITH_COMPOSITOR
#ifdef WITH_COMPOSITOR_CPU
# include "COM_compositor.h"
#endif
@ -210,7 +210,7 @@ void ntreeCompositExecTree(Scene *scene,
int do_preview,
const char *view_name)
{
#ifdef WITH_COMPOSITOR
#ifdef WITH_COMPOSITOR_CPU
COM_execute(rd, scene, ntree, rendering, view_name);
#else
UNUSED_VARS(scene, ntree, rd, rendering, view_name);

View File

@ -174,8 +174,8 @@ if(WITH_CODEC_SNDFILE)
add_definitions(-DWITH_SNDFILE)
endif()
if(WITH_COMPOSITOR)
add_definitions(-DWITH_COMPOSITOR)
if(WITH_COMPOSITOR_CPU)
add_definitions(-DWITH_COMPOSITOR_CPU)
endif()
if(WITH_CYCLES)

View File

@ -18,7 +18,7 @@ static PyStructSequence_Field app_builtopts_info_fields[] = {
{"codec_avi", NULL},
{"codec_ffmpeg", NULL},
{"codec_sndfile", NULL},
{"compositor", NULL},
{"compositor_cpu", NULL},
{"cycles", NULL},
{"cycles_osl", NULL},
{"freestyle", NULL},
@ -104,7 +104,7 @@ static PyObject *make_builtopts_info(void)
SetObjIncref(Py_False);
#endif
#ifdef WITH_COMPOSITOR
#ifdef WITH_COMPOSITOR_CPU
SetObjIncref(Py_True);
#else
SetObjIncref(Py_False);

View File

@ -165,11 +165,11 @@ if(WIN32 OR APPLE)
endif()
endif()
if(WITH_COMPOSITOR)
if(WITH_COMPOSITOR_CPU)
list(APPEND LIB
bf_compositor
)
add_definitions(-DWITH_COMPOSITOR)
add_definitions(-DWITH_COMPOSITOR_CPU)
endif()
if(WITH_XR_OPENXR)

View File

@ -540,7 +540,7 @@ void WM_exit_ex(bContext *C, const bool do_python)
BKE_vfont_clipboard_free();
BKE_node_clipboard_free();
#ifdef WITH_COMPOSITOR
#ifdef WITH_COMPOSITOR_CPU
COM_deinitialize();
#endif

View File

@ -635,8 +635,8 @@ if(WITH_CYCLES OR WITH_OPENGL_RENDER_TESTS)
MESSAGE(WARNING "Disabling render tests because OIIO idiff does not exist")
elseif(NOT EXISTS "${TEST_SRC_DIR}/render/shader")
MESSAGE(WARNING "Disabling render tests because tests folder does not exist at ${TEST_SRC_DIR}")
elseif(NOT WITH_COMPOSITOR)
MESSAGE(WARNING "Disabling render tests because WITH_COMPOSITOR is disabled")
elseif(NOT WITH_COMPOSITOR_CPU)
MESSAGE(WARNING "Disabling render tests because WITH_COMPOSITOR_CPU is disabled")
elseif(NOT WITH_OPENCOLORIO)
MESSAGE(WARNING "Disabling render tests because WITH_OPENCOLORIO is disabled")
else()
@ -735,7 +735,7 @@ if(WITH_CYCLES OR WITH_OPENGL_RENDER_TESTS)
endif()
endif()
if(WITH_COMPOSITOR)
if(WITH_COMPOSITOR_CPU)
set(compositor_tests
color
converter