This patch introduces a new Derived Resources concept to the compositor. Derived resources are resources that are computed from a particular result and cached in it in case it is needed by another operation, which can greatly improve performance in some cases at the cost of more memory usage. The first use case is to store denoised versions of the Denoising Albedo and Denoising Normals passes if auxiliary pass denoising is enabled in the denoise node. Consequently, multi-pass denoising setups where the same auxiliary passes are used in multiple denoise nodes should be much faster due to caching of the derived resources. This implementation has the limitation that it can't preemptively invalidate the cache when the derived resources are no longer needed to free up memory. This requires a special resource tracking mechanism that need to happen during node tree compilation, and will be submitted later. The limitation is not significant in the particular derived resources that is currently implemented. Since the auxiliary passes are rarely used outside of denoising. Fixes #131171. Pull Request: https://projects.blender.org/blender/blender/pulls/125671
104 lines
1.8 KiB
CMake
104 lines
1.8 KiB
CMake
# SPDX-FileCopyrightText: 2006 Blender Authors
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
set(INC
|
|
PUBLIC .
|
|
intern
|
|
../compositor
|
|
../compositor/cached_resources
|
|
../compositor/derived_resources
|
|
../draw/intern
|
|
../gpu/intern
|
|
../makesrna
|
|
../simulation
|
|
../../../intern/mikktspace
|
|
../../../intern/mantaflow/extern
|
|
)
|
|
|
|
set(INC_SYS
|
|
)
|
|
|
|
set(SRC
|
|
intern/bake.cc
|
|
intern/compositor.cc
|
|
intern/engine.cc
|
|
intern/initrender.cc
|
|
intern/multires_bake.cc
|
|
intern/pipeline.cc
|
|
intern/render_result.cc
|
|
intern/render_types.cc
|
|
intern/texture_image.cc
|
|
intern/texture_margin.cc
|
|
intern/texture_pointdensity.cc
|
|
intern/texture_procedural.cc
|
|
intern/tile_highlight.cc
|
|
intern/zbuf.cc
|
|
|
|
RE_bake.h
|
|
RE_compositor.hh
|
|
RE_engine.h
|
|
RE_multires_bake.h
|
|
RE_pipeline.h
|
|
RE_texture.h
|
|
RE_texture_margin.h
|
|
|
|
intern/pipeline.hh
|
|
intern/render_result.h
|
|
intern/render_types.h
|
|
intern/texture_common.h
|
|
intern/tile_highlight.h
|
|
intern/zbuf.h
|
|
)
|
|
|
|
set(LIB
|
|
PRIVATE bf::blenkernel
|
|
PRIVATE bf::blenlib
|
|
PRIVATE bf::blentranslation
|
|
PRIVATE bf::depsgraph
|
|
PRIVATE bf::dna
|
|
PRIVATE bf::draw
|
|
PRIVATE bf::extern::fmtlib
|
|
PRIVATE bf::gpu
|
|
PRIVATE bf::imbuf
|
|
PRIVATE bf::imbuf::movie
|
|
PRIVATE bf::intern::guardedalloc
|
|
bf_compositor
|
|
PRIVATE bf::intern::atomic
|
|
PRIVATE bf::nodes
|
|
PRIVATE bf::sequencer
|
|
PRIVATE bf::windowmanager
|
|
)
|
|
|
|
if(WITH_PYTHON)
|
|
add_definitions(-DWITH_PYTHON)
|
|
list(APPEND INC
|
|
../python
|
|
)
|
|
endif()
|
|
|
|
if(WITH_IMAGE_OPENEXR)
|
|
list(APPEND LIB
|
|
bf_imbuf_openexr
|
|
)
|
|
add_definitions(-DWITH_OPENEXR)
|
|
endif()
|
|
|
|
if(WITH_FREESTYLE)
|
|
list(APPEND INC
|
|
../freestyle
|
|
)
|
|
list(APPEND LIB
|
|
bf_freestyle
|
|
)
|
|
add_definitions(-DWITH_FREESTYLE)
|
|
endif()
|
|
|
|
if(WITH_HYDRA)
|
|
add_subdirectory(hydra)
|
|
endif()
|
|
|
|
blender_add_lib_nolist(bf_render "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
|
add_library(bf::render ALIAS bf_render)
|