Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-10-26 00:54:58 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-10-26 01:44:50 +0300
commit18330592417e4a5a7ffb805945b2aec8c4dd41bd (patch)
treea0c061c40fd36a2d42b732c0a9a79985e011604f
parent8b46b9cdb7ed2f04a94dc9aa36173828e5790b2b (diff)
Fixes for Cycles source reorganizetemp-cycles-source-reorganize
-rw-r--r--intern/cycles/CMakeLists.txt7
-rw-r--r--intern/cycles/blender/curves.cpp8
-rw-r--r--intern/cycles/blender/mesh.cpp10
-rw-r--r--intern/cycles/blender/object.cpp10
-rw-r--r--intern/cycles/blender/session.h2
-rw-r--r--intern/cycles/device/CMakeLists.txt3
-rw-r--r--intern/cycles/device/device.cpp2
-rw-r--r--intern/cycles/scene/scene.cpp2
-rw-r--r--intern/cycles/session/tile.cpp24
-rw-r--r--source/blender/makesrna/intern/rna_attribute.c6
10 files changed, 36 insertions, 38 deletions
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index b6f3926f329..1500743763b 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -295,13 +295,6 @@ if(WITH_OPENIMAGEDENOISE)
)
endif()
-if(WITH_CYCLES_STANDALONE)
- set(WITH_CYCLES_DEVICE_CUDA TRUE)
- set(WITH_CYCLES_DEVICE_HIP TRUE)
-endif()
-# TODO(sergey): Consider removing it, only causes confusion in interface.
-set(WITH_CYCLES_DEVICE_MULTI TRUE)
-
# Logging capabilities using GLog library.
if(WITH_CYCLES_LOGGING)
add_definitions(-DWITH_CYCLES_LOGGING)
diff --git a/intern/cycles/blender/curves.cpp b/intern/cycles/blender/curves.cpp
index 816b296519b..fb2b329e61d 100644
--- a/intern/cycles/blender/curves.cpp
+++ b/intern/cycles/blender/curves.cpp
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-#include "scene/curves.h"
+#include "blender/sync.h"
+#include "blender/util.h"
+
#include "scene/attribute.h"
#include "scene/camera.h"
+#include "scene/curves.h"
#include "scene/hair.h"
#include "scene/object.h"
#include "scene/scene.h"
-#include "blender/sync.h"
-#include "blender/util.h"
-
#include "util/color.h"
#include "util/foreach.h"
#include "util/hash.h"
diff --git a/intern/cycles/blender/mesh.cpp b/intern/cycles/blender/mesh.cpp
index 93af36ed5be..b69bf88c213 100644
--- a/intern/cycles/blender/mesh.cpp
+++ b/intern/cycles/blender/mesh.cpp
@@ -14,16 +14,16 @@
* limitations under the License.
*/
-#include "scene/mesh.h"
+#include "blender/session.h"
+#include "blender/sync.h"
+#include "blender/util.h"
+
#include "scene/camera.h"
#include "scene/colorspace.h"
+#include "scene/mesh.h"
#include "scene/object.h"
#include "scene/scene.h"
-#include "blender/session.h"
-#include "blender/sync.h"
-#include "blender/util.h"
-
#include "subd/patch.h"
#include "subd/split.h"
diff --git a/intern/cycles/blender/object.cpp b/intern/cycles/blender/object.cpp
index 1c638d0e18c..9919b9d1836 100644
--- a/intern/cycles/blender/object.cpp
+++ b/intern/cycles/blender/object.cpp
@@ -14,22 +14,22 @@
* limitations under the License.
*/
-#include "scene/object.h"
+#include "blender/object_cull.h"
+#include "blender/sync.h"
+#include "blender/util.h"
+
#include "scene/alembic.h"
#include "scene/camera.h"
#include "scene/integrator.h"
#include "scene/light.h"
#include "scene/mesh.h"
+#include "scene/object.h"
#include "scene/particles.h"
#include "scene/scene.h"
#include "scene/shader.h"
#include "scene/shader_graph.h"
#include "scene/shader_nodes.h"
-#include "blender/object_cull.h"
-#include "blender/sync.h"
-#include "blender/util.h"
-
#include "util/foreach.h"
#include "util/hash.h"
#include "util/log.h"
diff --git a/intern/cycles/blender/session.h b/intern/cycles/blender/session.h
index 516cd86ac6d..fa24b5f7467 100644
--- a/intern/cycles/blender/session.h
+++ b/intern/cycles/blender/session.h
@@ -17,6 +17,8 @@
#ifndef __BLENDER_SESSION_H__
#define __BLENDER_SESSION_H__
+#include "MEM_guardedalloc.h"
+
#include "RNA_blender_cpp.h"
#include "device/device.h"
diff --git a/intern/cycles/device/CMakeLists.txt b/intern/cycles/device/CMakeLists.txt
index 39de4bec799..99b1fc8135d 100644
--- a/intern/cycles/device/CMakeLists.txt
+++ b/intern/cycles/device/CMakeLists.txt
@@ -158,9 +158,6 @@ endif()
if(WITH_CYCLES_DEVICE_OPTIX)
add_definitions(-DWITH_OPTIX)
endif()
-if(WITH_CYCLES_DEVICE_MULTI)
- add_definitions(-DWITH_MULTI)
-endif()
if(WITH_OPENIMAGEDENOISE)
list(APPEND LIB
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp
index 5179f3bacdb..69e959b6f7b 100644
--- a/intern/cycles/device/device.cpp
+++ b/intern/cycles/device/device.cpp
@@ -71,14 +71,12 @@ void Device::build_bvh(BVH *bvh, Progress &progress, bool refit)
Device *Device::create(const DeviceInfo &info, Stats &stats, Profiler &profiler)
{
-#ifdef WITH_MULTI
if (!info.multi_devices.empty()) {
/* Always create a multi device when info contains multiple devices.
* This is done so that the type can still be e.g. DEVICE_CPU to indicate
* that it is a homogeneous collection of devices, which simplifies checks. */
return device_multi_create(info, stats, profiler);
}
-#endif
Device *device = NULL;
diff --git a/intern/cycles/scene/scene.cpp b/intern/cycles/scene/scene.cpp
index 1fd63ad7f7c..586f63346b3 100644
--- a/intern/cycles/scene/scene.cpp
+++ b/intern/cycles/scene/scene.cpp
@@ -505,8 +505,8 @@ void Scene::update_kernel_features()
kernel_features |= KERNEL_FEATURE_SHADOW_CATCHER;
}
if (geom->is_mesh()) {
- Mesh *mesh = static_cast<Mesh *>(geom);
#ifdef WITH_OPENSUBDIV
+ Mesh *mesh = static_cast<Mesh *>(geom);
if (mesh->get_subdivision_type() != Mesh::SUBDIVISION_NONE) {
kernel_features |= KERNEL_FEATURE_PATCH_EVALUATION;
}
diff --git a/intern/cycles/session/tile.cpp b/intern/cycles/session/tile.cpp
index 816bf4d5fa0..56bc519378f 100644
--- a/intern/cycles/session/tile.cpp
+++ b/intern/cycles/session/tile.cpp
@@ -367,20 +367,26 @@ void TileManager::update(const BufferParams &params, const Scene *scene)
buffer_params_ = params;
- /* TODO(sergey): Proper Error handling, so that if configuration has failed we don't attempt to
- * write to a partially configured file. */
- configure_image_spec_from_buffer(&write_state_.image_spec, buffer_params_, tile_size_);
+ if (has_multiple_tiles()) {
+ /* TODO(sergey): Proper Error handling, so that if configuration has failed we don't attempt to
+ * write to a partially configured file. */
+ configure_image_spec_from_buffer(&write_state_.image_spec, buffer_params_, tile_size_);
- const DenoiseParams denoise_params = scene->integrator->get_denoise_params();
- const AdaptiveSampling adaptive_sampling = scene->integrator->get_adaptive_sampling();
+ const DenoiseParams denoise_params = scene->integrator->get_denoise_params();
+ const AdaptiveSampling adaptive_sampling = scene->integrator->get_adaptive_sampling();
- node_to_image_spec_atttributes(
- &write_state_.image_spec, &denoise_params, ATTR_DENOISE_SOCKET_PREFIX);
+ node_to_image_spec_atttributes(
+ &write_state_.image_spec, &denoise_params, ATTR_DENOISE_SOCKET_PREFIX);
- if (adaptive_sampling.use) {
- overscan_ = 4;
+ if (adaptive_sampling.use) {
+ overscan_ = 4;
+ }
+ else {
+ overscan_ = 0;
+ }
}
else {
+ write_state_.image_spec = ImageSpec();
overscan_ = 0;
}
}
diff --git a/source/blender/makesrna/intern/rna_attribute.c b/source/blender/makesrna/intern/rna_attribute.c
index f1831bca0fe..dbf20896463 100644
--- a/source/blender/makesrna/intern/rna_attribute.c
+++ b/source/blender/makesrna/intern/rna_attribute.c
@@ -323,8 +323,10 @@ static void rna_AttributeGroup_next_domain(ID *id,
int(skip)(CollectionPropertyIterator *iter, void *data))
{
do {
- CustomDataLayer *prev_layers = (CustomDataLayer *)iter->internal.array.endptr -
- iter->internal.array.length;
+ CustomDataLayer *prev_layers = (iter->internal.array.endptr == NULL) ?
+ NULL :
+ (CustomDataLayer *)iter->internal.array.endptr -
+ iter->internal.array.length;
CustomData *customdata = BKE_id_attributes_iterator_next_domain(id, prev_layers);
if (customdata == NULL) {
return;