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:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
4
extern/CMakeLists.txt
vendored
4
extern/CMakeLists.txt
vendored
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright 2011 Blender Foundation. All rights reserved.
|
||||
|
||||
set(INC
|
||||
if(WITH_COMPOSITOR_CPU)
|
||||
|
||||
set(INC
|
||||
.
|
||||
intern
|
||||
nodes
|
||||
@@ -28,13 +30,13 @@ set(INC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../makesdna/intern
|
||||
# RNA_prototypes.h
|
||||
${CMAKE_BINARY_DIR}/source/blender/makesrna
|
||||
)
|
||||
)
|
||||
|
||||
set(INC_SYS
|
||||
set(INC_SYS
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
set(SRC
|
||||
set(SRC
|
||||
COM_compositor.h
|
||||
COM_defines.h
|
||||
|
||||
@@ -587,44 +589,44 @@ set(SRC
|
||||
|
||||
operations/COM_MaskOperation.cc
|
||||
operations/COM_MaskOperation.h
|
||||
)
|
||||
)
|
||||
|
||||
set(LIB
|
||||
set(LIB
|
||||
bf_blenkernel
|
||||
bf_blenlib
|
||||
extern_clew
|
||||
)
|
||||
)
|
||||
|
||||
list(APPEND INC
|
||||
list(APPEND INC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/operations
|
||||
)
|
||||
)
|
||||
|
||||
data_to_c(
|
||||
data_to_c(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/operations/COM_OpenCLKernels.cl
|
||||
${CMAKE_CURRENT_BINARY_DIR}/operations/COM_OpenCLKernels.cl.h
|
||||
SRC
|
||||
)
|
||||
)
|
||||
|
||||
add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_1_APIS)
|
||||
add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_1_APIS)
|
||||
|
||||
set(GENSRC_DIR ${CMAKE_CURRENT_BINARY_DIR}/operations)
|
||||
set(GENSRC ${GENSRC_DIR}/COM_SMAAAreaTexture.h)
|
||||
add_custom_command(
|
||||
set(GENSRC_DIR ${CMAKE_CURRENT_BINARY_DIR}/operations)
|
||||
set(GENSRC ${GENSRC_DIR}/COM_SMAAAreaTexture.h)
|
||||
add_custom_command(
|
||||
OUTPUT ${GENSRC}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${GENSRC_DIR}
|
||||
COMMAND "$<TARGET_FILE:smaa_areatex>" ${GENSRC}
|
||||
DEPENDS smaa_areatex
|
||||
)
|
||||
add_custom_target(smaa_areatex_header
|
||||
)
|
||||
add_custom_target(smaa_areatex_header
|
||||
SOURCES ${GENSRC}
|
||||
)
|
||||
list(APPEND SRC
|
||||
)
|
||||
list(APPEND SRC
|
||||
${GENSRC}
|
||||
)
|
||||
unset(GENSRC)
|
||||
unset(GENSRC_DIR)
|
||||
)
|
||||
unset(GENSRC)
|
||||
unset(GENSRC_DIR)
|
||||
|
||||
if(WITH_OPENIMAGEDENOISE)
|
||||
if(WITH_OPENIMAGEDENOISE)
|
||||
add_definitions(-DWITH_OPENIMAGEDENOISE)
|
||||
add_definitions(-DOIDN_STATIC_LIB)
|
||||
list(APPEND INC_SYS
|
||||
@@ -635,26 +637,26 @@ if(WITH_OPENIMAGEDENOISE)
|
||||
${OPENIMAGEDENOISE_LIBRARIES}
|
||||
${TBB_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
blender_add_lib(bf_compositor "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
blender_add_lib(bf_compositor "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
||||
|
||||
if(WITH_UNITY_BUILD)
|
||||
if(WITH_UNITY_BUILD)
|
||||
set_target_properties(bf_compositor PROPERTIES UNITY_BUILD ON)
|
||||
set_target_properties(bf_compositor PROPERTIES UNITY_BUILD_BATCH_SIZE 10)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(COMMAND target_precompile_headers)
|
||||
if(COMMAND target_precompile_headers)
|
||||
target_precompile_headers(bf_compositor PRIVATE COM_precomp.h)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CXX_WARN_NO_SUGGEST_OVERRIDE)
|
||||
if(CXX_WARN_NO_SUGGEST_OVERRIDE)
|
||||
target_compile_options(bf_compositor PRIVATE "-Wsuggest-override")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_dependencies(bf_compositor smaa_areatex_header)
|
||||
add_dependencies(bf_compositor smaa_areatex_header)
|
||||
|
||||
if(WITH_GTESTS)
|
||||
if(WITH_GTESTS)
|
||||
set(TEST_SRC
|
||||
tests/COM_BufferArea_test.cc
|
||||
tests/COM_BufferRange_test.cc
|
||||
@@ -668,9 +670,12 @@ if(WITH_GTESTS)
|
||||
)
|
||||
include(GTestTesting)
|
||||
blender_add_test_lib(bf_compositor_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Needed so we can use dna_type_offsets.h for defaults initialization.
|
||||
add_dependencies(bf_compositor bf_dna)
|
||||
# RNA_prototypes.h
|
||||
add_dependencies(bf_compositor bf_rna)
|
||||
# Needed so we can use dna_type_offsets.h for defaults initialization.
|
||||
add_dependencies(bf_compositor bf_dna)
|
||||
# RNA_prototypes.h
|
||||
add_dependencies(bf_compositor bf_rna)
|
||||
|
||||
# End WITH_COMPOSITOR_CPU.
|
||||
endif()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user