Cleanup: Remove WITH_COMPOSITOR_CPU option (compositor is always in)
Compositor is a required feature and parts of it have been always included anyway. Remove WITH_COMPOSITOR_CPU build option. Pull Request: https://projects.blender.org/blender/blender/pulls/131838
This commit is contained in:
committed by
Aras Pranckevicius
parent
654c1deb22
commit
7e7f4f0cee
@@ -335,8 +335,6 @@ unset(_option_default)
|
||||
|
||||
option(WITH_GMP "Enable features depending on GMP (Exact Boolean)" ON)
|
||||
|
||||
# Compositor
|
||||
option(WITH_COMPOSITOR_CPU "Enable the Full-Frame CPU nodal compositor" ON)
|
||||
option(WITH_OPENIMAGEDENOISE "Enable the OpenImageDenoise compositing node" ON)
|
||||
|
||||
option(WITH_OPENSUBDIV "Enable OpenSubdiv for surface subdivision" ON)
|
||||
|
||||
@@ -14,7 +14,6 @@ set(WITH_BUILDINFO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_BULLET ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE 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)
|
||||
|
||||
@@ -17,7 +17,6 @@ set(WITH_BUILDINFO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_BULLET OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_FFMPEG OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPOSITOR_CPU OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_DRACO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
|
||||
|
||||
@@ -18,7 +18,6 @@ set(WITH_BUILDINFO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_BULLET ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE 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)
|
||||
|
||||
@@ -4,88 +4,84 @@
|
||||
|
||||
add_subdirectory(realtime_compositor)
|
||||
|
||||
if(WITH_COMPOSITOR_CPU)
|
||||
set(INC
|
||||
.
|
||||
intern
|
||||
realtime_compositor
|
||||
../blenkernel
|
||||
../blentranslation
|
||||
../imbuf
|
||||
../makesrna
|
||||
../nodes
|
||||
../windowmanager
|
||||
../nodes/composite
|
||||
../nodes/intern
|
||||
../render
|
||||
../render/intern
|
||||
|
||||
# RNA_prototypes.hh
|
||||
${CMAKE_BINARY_DIR}/source/blender/makesrna
|
||||
)
|
||||
|
||||
set(INC_SYS
|
||||
|
||||
)
|
||||
|
||||
set(SRC
|
||||
COM_compositor.hh
|
||||
|
||||
intern/COM_compositor.cc
|
||||
)
|
||||
|
||||
set(LIB
|
||||
bf_blenkernel
|
||||
PRIVATE bf::blenlib
|
||||
PRIVATE bf::depsgraph
|
||||
PRIVATE bf::dna
|
||||
PRIVATE bf::intern::clog
|
||||
PRIVATE bf::intern::guardedalloc
|
||||
bf_realtime_compositor
|
||||
PRIVATE bf::intern::atomic
|
||||
)
|
||||
|
||||
if(WITH_TBB)
|
||||
if(WIN32)
|
||||
# TBB includes Windows.h which will define min/max macros
|
||||
# that will collide with the STL versions.
|
||||
add_definitions(-DNOMINMAX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEDENOISE)
|
||||
add_definitions(-DWITH_OPENIMAGEDENOISE)
|
||||
add_definitions(-DOIDN_STATIC_LIB)
|
||||
list(APPEND INC_SYS
|
||||
${OPENIMAGEDENOISE_INCLUDE_DIRS}
|
||||
${TBB_INCLUDE_DIRS}
|
||||
)
|
||||
list(APPEND LIB
|
||||
${OPENIMAGEDENOISE_LIBRARIES}
|
||||
${TBB_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_FFTW3)
|
||||
list(APPEND INC_SYS
|
||||
${FFTW3_INCLUDE_DIRS}
|
||||
)
|
||||
list(APPEND LIB
|
||||
${FFTW3_LIBRARIES}
|
||||
)
|
||||
add_definitions(-DWITH_FFTW3)
|
||||
endif()
|
||||
|
||||
blender_add_lib(bf_compositor "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
|
||||
blender_set_target_unity_build(bf_compositor 10)
|
||||
|
||||
if(CXX_WARN_NO_SUGGEST_OVERRIDE)
|
||||
target_compile_options(bf_compositor PRIVATE "-Wsuggest-override")
|
||||
endif()
|
||||
set(INC
|
||||
.
|
||||
intern
|
||||
realtime_compositor
|
||||
../blenkernel
|
||||
../blentranslation
|
||||
../imbuf
|
||||
../makesrna
|
||||
../nodes
|
||||
../windowmanager
|
||||
../nodes/composite
|
||||
../nodes/intern
|
||||
../render
|
||||
../render/intern
|
||||
|
||||
# RNA_prototypes.hh
|
||||
add_dependencies(bf_compositor bf_rna)
|
||||
${CMAKE_BINARY_DIR}/source/blender/makesrna
|
||||
)
|
||||
|
||||
# End WITH_COMPOSITOR_CPU.
|
||||
set(INC_SYS
|
||||
|
||||
)
|
||||
|
||||
set(SRC
|
||||
COM_compositor.hh
|
||||
|
||||
intern/COM_compositor.cc
|
||||
)
|
||||
|
||||
set(LIB
|
||||
bf_blenkernel
|
||||
PRIVATE bf::blenlib
|
||||
PRIVATE bf::depsgraph
|
||||
PRIVATE bf::dna
|
||||
PRIVATE bf::intern::clog
|
||||
PRIVATE bf::intern::guardedalloc
|
||||
bf_realtime_compositor
|
||||
PRIVATE bf::intern::atomic
|
||||
)
|
||||
|
||||
if(WITH_TBB)
|
||||
if(WIN32)
|
||||
# TBB includes Windows.h which will define min/max macros
|
||||
# that will collide with the STL versions.
|
||||
add_definitions(-DNOMINMAX)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEDENOISE)
|
||||
add_definitions(-DWITH_OPENIMAGEDENOISE)
|
||||
add_definitions(-DOIDN_STATIC_LIB)
|
||||
list(APPEND INC_SYS
|
||||
${OPENIMAGEDENOISE_INCLUDE_DIRS}
|
||||
${TBB_INCLUDE_DIRS}
|
||||
)
|
||||
list(APPEND LIB
|
||||
${OPENIMAGEDENOISE_LIBRARIES}
|
||||
${TBB_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WITH_FFTW3)
|
||||
list(APPEND INC_SYS
|
||||
${FFTW3_INCLUDE_DIRS}
|
||||
)
|
||||
list(APPEND LIB
|
||||
${FFTW3_LIBRARIES}
|
||||
)
|
||||
add_definitions(-DWITH_FFTW3)
|
||||
endif()
|
||||
|
||||
blender_add_lib(bf_compositor "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
|
||||
blender_set_target_unity_build(bf_compositor 10)
|
||||
|
||||
if(CXX_WARN_NO_SUGGEST_OVERRIDE)
|
||||
target_compile_options(bf_compositor PRIVATE "-Wsuggest-override")
|
||||
endif()
|
||||
|
||||
# RNA_prototypes.hh
|
||||
add_dependencies(bf_compositor bf_rna)
|
||||
|
||||
@@ -64,10 +64,6 @@ set(LIB
|
||||
PRIVATE bf::extern::fmtlib
|
||||
)
|
||||
|
||||
if(WITH_COMPOSITOR_CPU)
|
||||
add_definitions(-DWITH_COMPOSITOR_CPU)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEDENOISE)
|
||||
add_definitions(-DWITH_OPENIMAGEDENOISE)
|
||||
endif()
|
||||
|
||||
@@ -15,6 +15,7 @@ set(INC
|
||||
../../makesrna
|
||||
../../render
|
||||
../../windowmanager
|
||||
../../compositor
|
||||
../../compositor/realtime_compositor
|
||||
../../compositor/realtime_compositor/algorithms
|
||||
../../compositor/realtime_compositor/cached_resources
|
||||
@@ -144,13 +145,6 @@ if(WITH_IMAGE_OPENEXR)
|
||||
add_definitions(-DWITH_OPENEXR)
|
||||
endif()
|
||||
|
||||
if(WITH_COMPOSITOR_CPU)
|
||||
list(APPEND INC
|
||||
../../compositor
|
||||
)
|
||||
add_definitions(-DWITH_COMPOSITOR_CPU)
|
||||
endif()
|
||||
|
||||
if(WITH_OPENIMAGEDENOISE)
|
||||
add_definitions(-DWITH_OPENIMAGEDENOISE)
|
||||
add_definitions(-DOIDN_STATIC_LIB)
|
||||
|
||||
@@ -32,9 +32,7 @@
|
||||
#include "NOD_composite.hh"
|
||||
#include "node_composite_util.hh"
|
||||
|
||||
#ifdef WITH_COMPOSITOR_CPU
|
||||
# include "COM_compositor.hh"
|
||||
#endif
|
||||
#include "COM_compositor.hh"
|
||||
|
||||
static void composite_get_from_context(const bContext *C,
|
||||
blender::bke::bNodeTreeType * /*treetype*/,
|
||||
@@ -183,11 +181,7 @@ void ntreeCompositExecTree(Render *render,
|
||||
blender::realtime_compositor::RenderContext *render_context,
|
||||
blender::realtime_compositor::Profiler *profiler)
|
||||
{
|
||||
#ifdef WITH_COMPOSITOR_CPU
|
||||
COM_execute(render, rd, scene, ntree, view_name, render_context, profiler);
|
||||
#else
|
||||
UNUSED_VARS(render, scene, ntree, rd, view_name, render_context, profiler);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* *********************************************** */
|
||||
|
||||
@@ -196,10 +196,6 @@ if(WITH_CODEC_SNDFILE)
|
||||
add_definitions(-DWITH_SNDFILE)
|
||||
endif()
|
||||
|
||||
if(WITH_COMPOSITOR_CPU)
|
||||
add_definitions(-DWITH_COMPOSITOR_CPU)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES)
|
||||
list(APPEND INC
|
||||
../../../../intern/cycles/blender
|
||||
|
||||
@@ -103,11 +103,8 @@ static PyObject *make_builtopts_info()
|
||||
SetObjIncref(Py_False);
|
||||
#endif
|
||||
|
||||
#ifdef WITH_COMPOSITOR_CPU
|
||||
/* Compositor. */
|
||||
SetObjIncref(Py_True);
|
||||
#else
|
||||
SetObjIncref(Py_False);
|
||||
#endif
|
||||
|
||||
#ifdef WITH_CYCLES
|
||||
SetObjIncref(Py_True);
|
||||
|
||||
@@ -108,6 +108,7 @@ set(LIB
|
||||
PRIVATE bf::animrig
|
||||
bf_sequencer
|
||||
bf_intern_ghost
|
||||
bf_compositor
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
@@ -181,13 +182,6 @@ if(WITH_INPUT_IME)
|
||||
add_definitions(-DWITH_INPUT_IME)
|
||||
endif()
|
||||
|
||||
if(WITH_COMPOSITOR_CPU)
|
||||
list(APPEND LIB
|
||||
bf_compositor
|
||||
)
|
||||
add_definitions(-DWITH_COMPOSITOR_CPU)
|
||||
endif()
|
||||
|
||||
if(WITH_XR_OPENXR)
|
||||
add_definitions(-DWITH_XR_OPENXR)
|
||||
|
||||
|
||||
@@ -588,9 +588,7 @@ void WM_exit_ex(bContext *C, const bool do_python_exit, const bool do_user_exit_
|
||||
UV_clipboard_free();
|
||||
wm_clipboard_free();
|
||||
|
||||
#ifdef WITH_COMPOSITOR_CPU
|
||||
COM_deinitialize();
|
||||
#endif
|
||||
|
||||
bke::subdiv::exit();
|
||||
|
||||
|
||||
@@ -638,8 +638,6 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS)
|
||||
message(
|
||||
WARNING "Disabling render tests because tests directory doesn't exist at ${TEST_SRC_DIR}"
|
||||
)
|
||||
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()
|
||||
@@ -867,39 +865,36 @@ if(WITH_CYCLES OR WITH_GPU_RENDER_TESTS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_COMPOSITOR_CPU)
|
||||
if(NOT OPENIMAGEIO_TOOL)
|
||||
message(WARNING "Disabling Compositor CPU tests because OIIO oiiotool does not exist")
|
||||
else()
|
||||
set(compositor_tests
|
||||
color
|
||||
converter
|
||||
filter
|
||||
input
|
||||
output
|
||||
vector
|
||||
if(NOT OPENIMAGEIO_TOOL)
|
||||
message(WARNING "Disabling Compositor tests because OIIO oiiotool does not exist")
|
||||
else()
|
||||
set(compositor_tests
|
||||
color
|
||||
converter
|
||||
filter
|
||||
input
|
||||
output
|
||||
vector
|
||||
|
||||
multiple_node_setups
|
||||
)
|
||||
|
||||
if(WITH_LIBMV)
|
||||
list(APPEND compositor_tests distort matte)
|
||||
endif()
|
||||
|
||||
foreach(comp_test ${compositor_tests})
|
||||
add_render_test(
|
||||
compositor_${comp_test}_cpu
|
||||
${CMAKE_CURRENT_LIST_DIR}/compositor_cpu_render_tests.py
|
||||
--testdir "${TEST_SRC_DIR}/compositor/${comp_test}"
|
||||
--outdir "${TEST_OUT_DIR}/compositor_cpu"
|
||||
)
|
||||
endforeach()
|
||||
multiple_node_setups
|
||||
)
|
||||
|
||||
if(WITH_LIBMV)
|
||||
list(APPEND compositor_tests distort matte)
|
||||
endif()
|
||||
|
||||
foreach(comp_test ${compositor_tests})
|
||||
add_render_test(
|
||||
compositor_${comp_test}_cpu
|
||||
${CMAKE_CURRENT_LIST_DIR}/compositor_cpu_render_tests.py
|
||||
--testdir "${TEST_SRC_DIR}/compositor/${comp_test}"
|
||||
--outdir "${TEST_OUT_DIR}/compositor_cpu"
|
||||
)
|
||||
endforeach()
|
||||
|
||||
endif()
|
||||
|
||||
# NOTE: WITH_COMPOSITOR_CPU is needed for rendering.
|
||||
if(WITH_COMPOSITOR_REALTIME_TESTS AND WITH_COMPOSITOR_CPU)
|
||||
if(WITH_COMPOSITOR_REALTIME_TESTS)
|
||||
if(NOT OPENIMAGEIO_TOOL)
|
||||
message(WARNING "Disabling realtime compositor tests because OIIO oiiotool does not exist")
|
||||
else()
|
||||
|
||||
Reference in New Issue
Block a user