mirror of
https://github.com/blender/blender
synced 2026-10-25 03:07:01 +03:00
Evict unused texture cache tiles between render tiles and multiviews, to reduce memory usage. Tiles that were loaded but not accessed during the previous render tile are freed before the next tile begins rendering. A per-tile access state byte tracks three values (NONE, REQUESTED, USED) and is used both to drive tile loading from cache misses and to decide which loaded tiles can be evicted at tile boundaries. Cache eviction is automatically enabled, but there is a debug option to disable it. There is also an debug option to preserve a specified amount of unused image texture memory to aoid avoid trashing unnecessarily in simple cases. It increases peak memory usage to render faster, however in tests on a Macbook M3 it did not seem worth it. But left in to experiment on other devices and scenes. Pull Request: https://projects.blender.org/blender/blender/pulls/157244
42 lines
595 B
CMake
42 lines
595 B
CMake
# SPDX-FileCopyrightText: 2011-2022 Blender Foundation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
set(INC
|
|
..
|
|
)
|
|
|
|
set(INC_SYS
|
|
)
|
|
|
|
set(SRC
|
|
buffers.cpp
|
|
cache_eviction.cpp
|
|
denoising.cpp
|
|
display_driver.cpp
|
|
merge.cpp
|
|
session.cpp
|
|
tile.cpp
|
|
)
|
|
|
|
set(SRC_HEADERS
|
|
buffers.h
|
|
cache_eviction.h
|
|
denoising.h
|
|
display_driver.h
|
|
merge.h
|
|
output_driver.h
|
|
session.h
|
|
tile.h
|
|
)
|
|
|
|
set(LIB
|
|
PUBLIC cycles_device
|
|
PUBLIC cycles_integrator
|
|
PUBLIC cycles_util
|
|
)
|
|
|
|
include_directories(${INC})
|
|
include_directories(SYSTEM ${INC_SYS})
|
|
|
|
cycles_add_library(cycles_session "${LIB}" ${SRC} ${SRC_HEADERS})
|