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:
Diffstat (limited to 'intern/cycles/scene')
-rw-r--r--intern/cycles/scene/alembic.cpp2
-rw-r--r--intern/cycles/scene/camera.cpp4
-rw-r--r--intern/cycles/scene/colorspace.cpp19
-rw-r--r--intern/cycles/scene/constant_fold.cpp13
-rw-r--r--intern/cycles/scene/film.cpp8
-rw-r--r--intern/cycles/scene/geometry.cpp50
-rw-r--r--intern/cycles/scene/image.cpp6
-rw-r--r--intern/cycles/scene/image_oiio.cpp4
-rw-r--r--intern/cycles/scene/image_vdb.cpp2
-rw-r--r--intern/cycles/scene/integrator.cpp6
-rw-r--r--intern/cycles/scene/light.cpp23
-rw-r--r--intern/cycles/scene/object.cpp2
-rw-r--r--intern/cycles/scene/osl.cpp4
-rw-r--r--intern/cycles/scene/particles.cpp2
-rw-r--r--intern/cycles/scene/scene.cpp165
-rw-r--r--intern/cycles/scene/scene.h2
-rw-r--r--intern/cycles/scene/shader_graph.cpp4
-rw-r--r--intern/cycles/scene/shader_nodes.cpp12
-rw-r--r--intern/cycles/scene/svm.cpp12
-rw-r--r--intern/cycles/scene/tables.cpp2
-rw-r--r--intern/cycles/scene/volume.cpp10
21 files changed, 182 insertions, 170 deletions
diff --git a/intern/cycles/scene/alembic.cpp b/intern/cycles/scene/alembic.cpp
index c1e2d306fcc..e6f39bf8625 100644
--- a/intern/cycles/scene/alembic.cpp
+++ b/intern/cycles/scene/alembic.cpp
@@ -1514,7 +1514,7 @@ void AlembicProcedural::build_caches(Progress &progress)
}
}
- VLOG(1) << "AlembicProcedural memory usage : " << string_human_readable_size(memory_used);
+ VLOG_WORK << "AlembicProcedural memory usage : " << string_human_readable_size(memory_used);
}
CCL_NAMESPACE_END
diff --git a/intern/cycles/scene/camera.cpp b/intern/cycles/scene/camera.cpp
index 710f1c5ee90..eec269ab542 100644
--- a/intern/cycles/scene/camera.cpp
+++ b/intern/cycles/scene/camera.cpp
@@ -530,7 +530,7 @@ void Camera::device_update_volume(Device * /*device*/, DeviceScene *dscene, Scen
if (object->get_geometry()->has_volume &&
viewplane_boundbox.intersects(object->bounds)) {
/* TODO(sergey): Consider adding more grained check. */
- VLOG(1) << "Detected camera inside volume.";
+ VLOG_INFO << "Detected camera inside volume.";
kcam->is_inside_volume = 1;
parallel_for_cancel();
break;
@@ -539,7 +539,7 @@ void Camera::device_update_volume(Device * /*device*/, DeviceScene *dscene, Scen
});
if (!kcam->is_inside_volume) {
- VLOG(1) << "Camera is outside of the volume.";
+ VLOG_INFO << "Camera is outside of the volume.";
}
}
diff --git a/intern/cycles/scene/colorspace.cpp b/intern/cycles/scene/colorspace.cpp
index f87b4c62ab2..189e3bc752d 100644
--- a/intern/cycles/scene/colorspace.cpp
+++ b/intern/cycles/scene/colorspace.cpp
@@ -55,8 +55,8 @@ ColorSpaceProcessor *ColorSpaceManager::get_processor(ustring colorspace)
}
catch (OCIO::Exception &exception) {
cached_processors[colorspace] = OCIO::ConstProcessorRcPtr();
- VLOG(1) << "Colorspace " << colorspace.c_str()
- << " can't be converted to scene_linear: " << exception.what();
+ VLOG_WARNING << "Colorspace " << colorspace.c_str()
+ << " can't be converted to scene_linear: " << exception.what();
}
}
@@ -132,12 +132,12 @@ ustring ColorSpaceManager::detect_known_colorspace(ustring colorspace,
thread_scoped_lock cache_lock(cache_colorspaces_mutex);
if (is_scene_linear) {
- VLOG(1) << "Colorspace " << colorspace.string() << " is no-op";
+ VLOG_INFO << "Colorspace " << colorspace.string() << " is no-op";
cached_colorspaces[colorspace] = u_colorspace_raw;
return u_colorspace_raw;
}
else if (is_srgb) {
- VLOG(1) << "Colorspace " << colorspace.string() << " is sRGB";
+ VLOG_INFO << "Colorspace " << colorspace.string() << " is sRGB";
cached_colorspaces[colorspace] = u_colorspace_srgb;
return u_colorspace_srgb;
}
@@ -146,22 +146,23 @@ ustring ColorSpaceManager::detect_known_colorspace(ustring colorspace,
if (!get_processor(colorspace)) {
OCIO::ConstConfigRcPtr config = OCIO::GetCurrentConfig();
if (!config || !config->getColorSpace(colorspace.c_str())) {
- VLOG(1) << "Colorspace " << colorspace.c_str() << " not found, using raw instead";
+ VLOG_WARNING << "Colorspace " << colorspace.c_str() << " not found, using raw instead";
}
else {
- VLOG(1) << "Colorspace " << colorspace.c_str()
- << " can't be converted to scene_linear, using raw instead";
+ VLOG_WARNING << "Colorspace " << colorspace.c_str()
+ << " can't be converted to scene_linear, using raw instead";
}
cached_colorspaces[colorspace] = u_colorspace_raw;
return u_colorspace_raw;
}
/* Convert to/from colorspace with OpenColorIO. */
- VLOG(1) << "Colorspace " << colorspace.string() << " handled through OpenColorIO";
+ VLOG_INFO << "Colorspace " << colorspace.string() << " handled through OpenColorIO";
cached_colorspaces[colorspace] = colorspace;
return colorspace;
#else
- VLOG(1) << "Colorspace " << colorspace.c_str() << " not available, built without OpenColorIO";
+ VLOG_WARNING << "Colorspace " << colorspace.c_str()
+ << " not available, built without OpenColorIO";
return u_colorspace_raw;
#endif
}
diff --git a/intern/cycles/scene/constant_fold.cpp b/intern/cycles/scene/constant_fold.cpp
index 46ffbe9043a..4bce5661f9b 100644
--- a/intern/cycles/scene/constant_fold.cpp
+++ b/intern/cycles/scene/constant_fold.cpp
@@ -30,8 +30,8 @@ bool ConstantFolder::all_inputs_constant() const
void ConstantFolder::make_constant(float value) const
{
- VLOG(3) << "Folding " << node->name << "::" << output->name() << " to constant (" << value
- << ").";
+ VLOG_DEBUG << "Folding " << node->name << "::" << output->name() << " to constant (" << value
+ << ").";
foreach (ShaderInput *sock, output->links) {
sock->set(value);
@@ -43,7 +43,8 @@ void ConstantFolder::make_constant(float value) const
void ConstantFolder::make_constant(float3 value) const
{
- VLOG(3) << "Folding " << node->name << "::" << output->name() << " to constant " << value << ".";
+ VLOG_DEBUG << "Folding " << node->name << "::" << output->name() << " to constant " << value
+ << ".";
foreach (ShaderInput *sock, output->links) {
sock->set(value);
@@ -99,8 +100,8 @@ void ConstantFolder::bypass(ShaderOutput *new_output) const
{
assert(new_output);
- VLOG(3) << "Folding " << node->name << "::" << output->name() << " to socket "
- << new_output->parent->name << "::" << new_output->name() << ".";
+ VLOG_DEBUG << "Folding " << node->name << "::" << output->name() << " to socket "
+ << new_output->parent->name << "::" << new_output->name() << ".";
/* Remove all outgoing links from socket and connect them to new_output instead.
* The graph->relink method affects node inputs, so it's not safe to use in constant
@@ -118,7 +119,7 @@ void ConstantFolder::discard() const
{
assert(output->type() == SocketType::CLOSURE);
- VLOG(3) << "Discarding closure " << node->name << ".";
+ VLOG_DEBUG << "Discarding closure " << node->name << ".";
graph->disconnect(output);
}
diff --git a/intern/cycles/scene/film.cpp b/intern/cycles/scene/film.cpp
index 7f69df7b321..8239ee84b82 100644
--- a/intern/cycles/scene/film.cpp
+++ b/intern/cycles/scene/film.cpp
@@ -152,7 +152,7 @@ void Film::device_update(Device *device, DeviceScene *dscene, Scene *scene)
KernelFilm *kfilm = &dscene->data.film;
- /* update __data */
+ /* update data */
kfilm->exposure = exposure;
kfilm->pass_alpha_threshold = pass_alpha_threshold;
kfilm->pass_flag = 0;
@@ -580,10 +580,10 @@ void Film::update_passes(Scene *scene, bool add_sample_count_pass)
tag_modified();
/* Debug logging. */
- if (VLOG_IS_ON(2)) {
- VLOG(2) << "Effective scene passes:";
+ if (VLOG_INFO_IS_ON) {
+ VLOG_INFO << "Effective scene passes:";
for (const Pass *pass : scene->passes) {
- VLOG(2) << "- " << *pass;
+ VLOG_INFO << "- " << *pass;
}
}
}
diff --git a/intern/cycles/scene/geometry.cpp b/intern/cycles/scene/geometry.cpp
index 9152abacbdb..bdc8839e277 100644
--- a/intern/cycles/scene/geometry.cpp
+++ b/intern/cycles/scene/geometry.cpp
@@ -407,43 +407,47 @@ void GeometryManager::update_osl_attributes(Device *device,
/* Generate a normal attribute map entry from an attribute descriptor. */
static void emit_attribute_map_entry(
- uint4 *attr_map, int index, uint id, TypeDesc type, const AttributeDescriptor &desc)
+ AttributeMap *attr_map, int index, uint id, TypeDesc type, const AttributeDescriptor &desc)
{
- attr_map[index].x = id;
- attr_map[index].y = desc.element;
- attr_map[index].z = as_uint(desc.offset);
+ attr_map[index].id = id;
+ attr_map[index].element = desc.element;
+ attr_map[index].offset = as_uint(desc.offset);
if (type == TypeDesc::TypeFloat)
- attr_map[index].w = NODE_ATTR_FLOAT;
+ attr_map[index].type = NODE_ATTR_FLOAT;
else if (type == TypeDesc::TypeMatrix)
- attr_map[index].w = NODE_ATTR_MATRIX;
+ attr_map[index].type = NODE_ATTR_MATRIX;
else if (type == TypeFloat2)
- attr_map[index].w = NODE_ATTR_FLOAT2;
+ attr_map[index].type = NODE_ATTR_FLOAT2;
else if (type == TypeFloat4)
- attr_map[index].w = NODE_ATTR_FLOAT4;
+ attr_map[index].type = NODE_ATTR_FLOAT4;
else if (type == TypeRGBA)
- attr_map[index].w = NODE_ATTR_RGBA;
+ attr_map[index].type = NODE_ATTR_RGBA;
else
- attr_map[index].w = NODE_ATTR_FLOAT3;
+ attr_map[index].type = NODE_ATTR_FLOAT3;
- attr_map[index].w |= desc.flags << 8;
+ attr_map[index].flags = desc.flags;
}
/* Generate an attribute map end marker, optionally including a link to another map.
* Links are used to connect object attribute maps to mesh attribute maps. */
-static void emit_attribute_map_terminator(uint4 *attr_map, int index, bool chain, uint chain_link)
+static void emit_attribute_map_terminator(AttributeMap *attr_map,
+ int index,
+ bool chain,
+ uint chain_link)
{
for (int j = 0; j < ATTR_PRIM_TYPES; j++) {
- attr_map[index + j].x = ATTR_STD_NONE;
- attr_map[index + j].y = chain; /* link is valid flag */
- attr_map[index + j].z = chain ? chain_link + j : 0; /* link to the correct sub-entry */
- attr_map[index + j].w = 0;
+ attr_map[index + j].id = ATTR_STD_NONE;
+ attr_map[index + j].element = chain; /* link is valid flag */
+ attr_map[index + j].offset = chain ? chain_link + j : 0; /* link to the correct sub-entry */
+ attr_map[index + j].type = 0;
+ attr_map[index + j].flags = 0;
}
}
/* Generate all necessary attribute map entries from the attribute request. */
static void emit_attribute_mapping(
- uint4 *attr_map, int index, Scene *scene, AttributeRequest &req, Geometry *geom)
+ AttributeMap *attr_map, int index, Scene *scene, AttributeRequest &req, Geometry *geom)
{
uint id;
@@ -501,8 +505,8 @@ void GeometryManager::update_svm_attributes(Device *,
}
/* create attribute map */
- uint4 *attr_map = dscene->attributes_map.alloc(attr_map_size);
- memset(attr_map, 0, dscene->attributes_map.size() * sizeof(uint));
+ AttributeMap *attr_map = dscene->attributes_map.alloc(attr_map_size);
+ memset(attr_map, 0, dscene->attributes_map.size() * sizeof(*attr_map));
for (size_t i = 0; i < scene->geometry.size(); i++) {
Geometry *geom = scene->geometry[i];
@@ -1288,7 +1292,7 @@ void GeometryManager::device_update_bvh(Device *device,
bparams.bvh_type = scene->params.bvh_type;
bparams.curve_subdivisions = scene->params.curve_subdivisions();
- VLOG(1) << "Using " << bvh_layout_name(bparams.bvh_layout) << " layout.";
+ VLOG_INFO << "Using " << bvh_layout_name(bparams.bvh_layout) << " layout.";
const bool can_refit = scene->bvh != nullptr &&
(bparams.bvh_layout == BVHLayout::BVH_LAYOUT_OPTIX ||
@@ -1799,7 +1803,7 @@ void GeometryManager::device_update(Device *device,
if (!need_update())
return;
- VLOG(1) << "Total " << scene->geometry.size() << " meshes.";
+ VLOG_INFO << "Total " << scene->geometry.size() << " meshes.";
bool true_displacement_used = false;
bool curve_shadow_transparency_used = false;
@@ -1953,7 +1957,7 @@ void GeometryManager::device_update(Device *device,
{
/* Copy constant data needed by shader evaluation. */
- device->const_copy_to("__data", &dscene->data, sizeof(dscene->data));
+ device->const_copy_to("data", &dscene->data, sizeof(dscene->data));
scoped_callback_timer timer([scene](double time) {
if (scene->update_stats) {
@@ -2038,7 +2042,7 @@ void GeometryManager::device_update(Device *device,
TaskPool::Summary summary;
pool.wait_work(&summary);
- VLOG(2) << "Objects BVH build pool statistics:\n" << summary.full_report();
+ VLOG_WORK << "Objects BVH build pool statistics:\n" << summary.full_report();
}
foreach (Shader *shader, scene->shaders) {
diff --git a/intern/cycles/scene/image.cpp b/intern/cycles/scene/image.cpp
index 1b44162351a..0352ed3e66c 100644
--- a/intern/cycles/scene/image.cpp
+++ b/intern/cycles/scene/image.cpp
@@ -653,8 +653,8 @@ bool ImageManager::file_load_image(Image *img, int texture_limit)
while (max_size * scale_factor > texture_limit) {
scale_factor *= 0.5f;
}
- VLOG(1) << "Scaling image " << img->loader->name() << " by a factor of " << scale_factor
- << ".";
+ VLOG_WORK << "Scaling image " << img->loader->name() << " by a factor of " << scale_factor
+ << ".";
vector<StorageType> scaled_pixels;
size_t scaled_width, scaled_height, scaled_depth;
util_image_resize_pixels(pixels_storage,
@@ -697,7 +697,7 @@ void ImageManager::device_load_image(Device *device, Scene *scene, int slot, Pro
ImageDataType type = img->metadata.type;
/* Name for debugging. */
- img->mem_name = string_printf("__tex_image_%s_%03d", name_from_type(type), slot);
+ img->mem_name = string_printf("tex_image_%s_%03d", name_from_type(type), slot);
/* Free previous texture in slot. */
if (img->mem) {
diff --git a/intern/cycles/scene/image_oiio.cpp b/intern/cycles/scene/image_oiio.cpp
index 09676455308..500e53ed763 100644
--- a/intern/cycles/scene/image_oiio.cpp
+++ b/intern/cycles/scene/image_oiio.cpp
@@ -22,11 +22,11 @@ bool OIIOImageLoader::load_metadata(const ImageDeviceFeatures & /*features*/,
{
/* Perform preliminary checks, with meaningful logging. */
if (!path_exists(filepath.string())) {
- VLOG(1) << "File '" << filepath.string() << "' does not exist.";
+ VLOG_WARNING << "File '" << filepath.string() << "' does not exist.";
return false;
}
if (path_is_directory(filepath.string())) {
- VLOG(1) << "File '" << filepath.string() << "' is a directory, can't use as image.";
+ VLOG_WARNING << "File '" << filepath.string() << "' is a directory, can't use as image.";
return false;
}
diff --git a/intern/cycles/scene/image_vdb.cpp b/intern/cycles/scene/image_vdb.cpp
index 2209be60a97..059eb09fef4 100644
--- a/intern/cycles/scene/image_vdb.cpp
+++ b/intern/cycles/scene/image_vdb.cpp
@@ -70,7 +70,7 @@ struct ToNanoOp {
nanogrid = nanovdb::openToNanoVDB(floatgrid);
}
catch (const std::exception &e) {
- VLOG(1) << "Error converting OpenVDB to NanoVDB grid: " << e.what();
+ VLOG_WARNING << "Error converting OpenVDB to NanoVDB grid: " << e.what();
}
return true;
}
diff --git a/intern/cycles/scene/integrator.cpp b/intern/cycles/scene/integrator.cpp
index fda6ecc8d14..aa11004fb48 100644
--- a/intern/cycles/scene/integrator.cpp
+++ b/intern/cycles/scene/integrator.cpp
@@ -338,7 +338,7 @@ AdaptiveSampling Integrator::get_adaptive_sampling() const
if (aa_samples > 0 && adaptive_threshold == 0.0f) {
adaptive_sampling.threshold = max(0.001f, 1.0f / (float)aa_samples);
- VLOG(1) << "Cycles adaptive sampling: automatic threshold = " << adaptive_sampling.threshold;
+ VLOG_INFO << "Cycles adaptive sampling: automatic threshold = " << adaptive_sampling.threshold;
}
else {
adaptive_sampling.threshold = adaptive_threshold;
@@ -350,8 +350,8 @@ AdaptiveSampling Integrator::get_adaptive_sampling() const
* in various test scenes. */
const int min_samples = (int)ceilf(16.0f / powf(adaptive_sampling.threshold, 0.3f));
adaptive_sampling.min_samples = max(4, min_samples);
- VLOG(1) << "Cycles adaptive sampling: automatic min samples = "
- << adaptive_sampling.min_samples;
+ VLOG_INFO << "Cycles adaptive sampling: automatic min samples = "
+ << adaptive_sampling.min_samples;
}
else {
adaptive_sampling.min_samples = max(4, adaptive_min_samples);
diff --git a/intern/cycles/scene/light.cpp b/intern/cycles/scene/light.cpp
index 5e311d3051f..ea1f45793fa 100644
--- a/intern/cycles/scene/light.cpp
+++ b/intern/cycles/scene/light.cpp
@@ -34,7 +34,7 @@ static void shade_background_pixels(Device *device,
Progress &progress)
{
/* Needs to be up to data for attribute access. */
- device->const_copy_to("__data", &dscene->data, sizeof(dscene->data));
+ device->const_copy_to("data", &dscene->data, sizeof(dscene->data));
const int size = width * height;
const int num_channels = 3;
@@ -215,7 +215,9 @@ void LightManager::test_enabled_lights(Scene *scene)
*/
Shader *shader = scene->background->get_shader(scene);
const bool disable_mis = !(has_portal || shader->has_surface_spatial_varying);
- VLOG_IF(1, disable_mis) << "Background MIS has been disabled.\n";
+ if (disable_mis) {
+ VLOG_INFO << "Background MIS has been disabled.\n";
+ }
foreach (Light *light, scene->lights) {
if (light->light_type == LIGHT_BACKGROUND) {
light->is_enabled = !disable_mis;
@@ -309,7 +311,7 @@ void LightManager::device_update_distribution(Device *,
}
size_t num_distribution = num_triangles + num_lights;
- VLOG(1) << "Total " << num_distribution << " of light distribution primitives.";
+ VLOG_INFO << "Total " << num_distribution << " of light distribution primitives.";
/* emission area */
KernelLightDistribution *distribution = dscene->light_distribution.alloc(num_distribution + 1);
@@ -655,13 +657,14 @@ void LightManager::device_update_background(Device *device,
if (res.x == 0) {
res = environment_res;
if (res.x > 0 && res.y > 0) {
- VLOG(2) << "Automatically set World MIS resolution to " << res.x << " by " << res.y << "\n";
+ VLOG_INFO << "Automatically set World MIS resolution to " << res.x << " by " << res.y
+ << "\n";
}
}
/* If it's still unknown, just use the default. */
if (res.x == 0 || res.y == 0) {
res = make_int2(1024, 512);
- VLOG(2) << "Setting World MIS resolution to default\n";
+ VLOG_INFO << "Setting World MIS resolution to default\n";
}
kbackground->map_res_x = res.x;
kbackground->map_res_y = res.y;
@@ -704,7 +707,7 @@ void LightManager::device_update_background(Device *device,
marg_cdf[res.y].y = 1.0f;
- VLOG(2) << "Background MIS build time " << time_dt() - time_start << "\n";
+ VLOG_WORK << "Background MIS build time " << time_dt() - time_start << "\n";
/* update device */
dscene->light_background_marginal_cdf.copy_to_device();
@@ -725,7 +728,7 @@ void LightManager::device_update_points(Device *, DeviceScene *dscene, Scene *sc
KernelLight *klights = dscene->lights.alloc(num_lights);
if (num_lights == 0) {
- VLOG(1) << "No effective light, ignoring points update.";
+ VLOG_WORK << "No effective light, ignoring points update.";
return;
}
@@ -955,9 +958,9 @@ void LightManager::device_update_points(Device *, DeviceScene *dscene, Scene *sc
light_index++;
}
- VLOG(1) << "Number of lights sent to the device: " << light_index;
+ VLOG_INFO << "Number of lights sent to the device: " << light_index;
- VLOG(1) << "Number of lights without contribution: " << num_scene_lights - light_index;
+ VLOG_INFO << "Number of lights without contribution: " << num_scene_lights - light_index;
dscene->lights.copy_to_device();
}
@@ -976,7 +979,7 @@ void LightManager::device_update(Device *device,
}
});
- VLOG(1) << "Total " << scene->lights.size() << " lights.";
+ VLOG_INFO << "Total " << scene->lights.size() << " lights.";
/* Detect which lights are enabled, also determines if we need to update the background. */
test_enabled_lights(scene);
diff --git a/intern/cycles/scene/object.cpp b/intern/cycles/scene/object.cpp
index ddd89a16640..3a1c177fe3b 100644
--- a/intern/cycles/scene/object.cpp
+++ b/intern/cycles/scene/object.cpp
@@ -688,7 +688,7 @@ void ObjectManager::device_update(Device *device,
dscene->objects.tag_modified();
}
- VLOG(1) << "Total " << scene->objects.size() << " objects.";
+ VLOG_INFO << "Total " << scene->objects.size() << " objects.";
device_free(device, dscene, false);
diff --git a/intern/cycles/scene/osl.cpp b/intern/cycles/scene/osl.cpp
index 6698e6e2cce..f5ee0c0f1d3 100644
--- a/intern/cycles/scene/osl.cpp
+++ b/intern/cycles/scene/osl.cpp
@@ -92,7 +92,7 @@ void OSLShaderManager::device_update_specific(Device *device,
}
});
- VLOG(1) << "Total " << scene->shaders.size() << " shaders.";
+ VLOG_INFO << "Total " << scene->shaders.size() << " shaders.";
device_free(device, dscene, scene);
@@ -240,7 +240,7 @@ void OSLShaderManager::shading_system_init()
ss_shared->attribute("searchpath:shader", shader_path);
ss_shared->attribute("greedyjit", 1);
- VLOG(1) << "Using shader search path: " << shader_path;
+ VLOG_INFO << "Using shader search path: " << shader_path;
/* our own ray types */
static const char *raytypes[] = {
diff --git a/intern/cycles/scene/particles.cpp b/intern/cycles/scene/particles.cpp
index a05acf17ccf..b527dd0ebe8 100644
--- a/intern/cycles/scene/particles.cpp
+++ b/intern/cycles/scene/particles.cpp
@@ -105,7 +105,7 @@ void ParticleSystemManager::device_update(Device *device,
}
});
- VLOG(1) << "Total " << scene->particle_systems.size() << " particle systems.";
+ VLOG_INFO << "Total " << scene->particle_systems.size() << " particle systems.";
device_free(device, dscene);
diff --git a/intern/cycles/scene/scene.cpp b/intern/cycles/scene/scene.cpp
index 8b5604eba72..1fcc3331337 100644
--- a/intern/cycles/scene/scene.cpp
+++ b/intern/cycles/scene/scene.cpp
@@ -34,49 +34,49 @@
CCL_NAMESPACE_BEGIN
DeviceScene::DeviceScene(Device *device)
- : bvh_nodes(device, "__bvh_nodes", MEM_GLOBAL),
- bvh_leaf_nodes(device, "__bvh_leaf_nodes", MEM_GLOBAL),
- object_node(device, "__object_node", MEM_GLOBAL),
- prim_type(device, "__prim_type", MEM_GLOBAL),
- prim_visibility(device, "__prim_visibility", MEM_GLOBAL),
- prim_index(device, "__prim_index", MEM_GLOBAL),
- prim_object(device, "__prim_object", MEM_GLOBAL),
- prim_time(device, "__prim_time", MEM_GLOBAL),
- tri_verts(device, "__tri_verts", MEM_GLOBAL),
- tri_shader(device, "__tri_shader", MEM_GLOBAL),
- tri_vnormal(device, "__tri_vnormal", MEM_GLOBAL),
- tri_vindex(device, "__tri_vindex", MEM_GLOBAL),
- tri_patch(device, "__tri_patch", MEM_GLOBAL),
- tri_patch_uv(device, "__tri_patch_uv", MEM_GLOBAL),
- curves(device, "__curves", MEM_GLOBAL),
- curve_keys(device, "__curve_keys", MEM_GLOBAL),
- curve_segments(device, "__curve_segments", MEM_GLOBAL),
- patches(device, "__patches", MEM_GLOBAL),
- points(device, "__points", MEM_GLOBAL),
- points_shader(device, "__points_shader", MEM_GLOBAL),
- objects(device, "__objects", MEM_GLOBAL),
- object_motion_pass(device, "__object_motion_pass", MEM_GLOBAL),
- object_motion(device, "__object_motion", MEM_GLOBAL),
- object_flag(device, "__object_flag", MEM_GLOBAL),
- object_volume_step(device, "__object_volume_step", MEM_GLOBAL),
- object_prim_offset(device, "__object_prim_offset", MEM_GLOBAL),
- camera_motion(device, "__camera_motion", MEM_GLOBAL),
- attributes_map(device, "__attributes_map", MEM_GLOBAL),
- attributes_float(device, "__attributes_float", MEM_GLOBAL),
- attributes_float2(device, "__attributes_float2", MEM_GLOBAL),
- attributes_float3(device, "__attributes_float3", MEM_GLOBAL),
- attributes_float4(device, "__attributes_float4", MEM_GLOBAL),
- attributes_uchar4(device, "__attributes_uchar4", MEM_GLOBAL),
- light_distribution(device, "__light_distribution", MEM_GLOBAL),
- lights(device, "__lights", MEM_GLOBAL),
- light_background_marginal_cdf(device, "__light_background_marginal_cdf", MEM_GLOBAL),
- light_background_conditional_cdf(device, "__light_background_conditional_cdf", MEM_GLOBAL),
- particles(device, "__particles", MEM_GLOBAL),
- svm_nodes(device, "__svm_nodes", MEM_GLOBAL),
- shaders(device, "__shaders", MEM_GLOBAL),
- lookup_table(device, "__lookup_table", MEM_GLOBAL),
- sample_pattern_lut(device, "__sample_pattern_lut", MEM_GLOBAL),
- ies_lights(device, "__ies", MEM_GLOBAL)
+ : bvh_nodes(device, "bvh_nodes", MEM_GLOBAL),
+ bvh_leaf_nodes(device, "bvh_leaf_nodes", MEM_GLOBAL),
+ object_node(device, "object_node", MEM_GLOBAL),
+ prim_type(device, "prim_type", MEM_GLOBAL),
+ prim_visibility(device, "prim_visibility", MEM_GLOBAL),
+ prim_index(device, "prim_index", MEM_GLOBAL),
+ prim_object(device, "prim_object", MEM_GLOBAL),
+ prim_time(device, "prim_time", MEM_GLOBAL),
+ tri_verts(device, "tri_verts", MEM_GLOBAL),
+ tri_shader(device, "tri_shader", MEM_GLOBAL),
+ tri_vnormal(device, "tri_vnormal", MEM_GLOBAL),
+ tri_vindex(device, "tri_vindex", MEM_GLOBAL),
+ tri_patch(device, "tri_patch", MEM_GLOBAL),
+ tri_patch_uv(device, "tri_patch_uv", MEM_GLOBAL),
+ curves(device, "curves", MEM_GLOBAL),
+ curve_keys(device, "curve_keys", MEM_GLOBAL),
+ curve_segments(device, "curve_segments", MEM_GLOBAL),
+ patches(device, "patches", MEM_GLOBAL),
+ points(device, "points", MEM_GLOBAL),
+ points_shader(device, "points_shader", MEM_GLOBAL),
+ objects(device, "objects", MEM_GLOBAL),
+ object_motion_pass(device, "object_motion_pass", MEM_GLOBAL),
+ object_motion(device, "object_motion", MEM_GLOBAL),
+ object_flag(device, "object_flag", MEM_GLOBAL),
+ object_volume_step(device, "object_volume_step", MEM_GLOBAL),
+ object_prim_offset(device, "object_prim_offset", MEM_GLOBAL),
+ camera_motion(device, "camera_motion", MEM_GLOBAL),
+ attributes_map(device, "attributes_map", MEM_GLOBAL),
+ attributes_float(device, "attributes_float", MEM_GLOBAL),
+ attributes_float2(device, "attributes_float2", MEM_GLOBAL),
+ attributes_float3(device, "attributes_float3", MEM_GLOBAL),
+ attributes_float4(device, "attributes_float4", MEM_GLOBAL),
+ attributes_uchar4(device, "attributes_uchar4", MEM_GLOBAL),
+ light_distribution(device, "light_distribution", MEM_GLOBAL),
+ lights(device, "lights", MEM_GLOBAL),
+ light_background_marginal_cdf(device, "light_background_marginal_cdf", MEM_GLOBAL),
+ light_background_conditional_cdf(device, "light_background_conditional_cdf", MEM_GLOBAL),
+ particles(device, "particles", MEM_GLOBAL),
+ svm_nodes(device, "svm_nodes", MEM_GLOBAL),
+ shaders(device, "shaders", MEM_GLOBAL),
+ lookup_table(device, "lookup_table", MEM_GLOBAL),
+ sample_pattern_lut(device, "sample_pattern_lut", MEM_GLOBAL),
+ ies_lights(device, "ies", MEM_GLOBAL)
{
memset((void *)&data, 0, sizeof(data));
}
@@ -366,18 +366,18 @@ void Scene::device_update(Device *device_, Progress &progress)
dscene.data.volume_stack_size = get_volume_stack_size();
progress.set_status("Updating Device", "Writing constant memory");
- device->const_copy_to("__data", &dscene.data, sizeof(dscene.data));
+ device->const_copy_to("data", &dscene.data, sizeof(dscene.data));
}
if (print_stats) {
size_t mem_used = util_guarded_get_mem_used();
size_t mem_peak = util_guarded_get_mem_peak();
- VLOG(1) << "System memory statistics after full device sync:\n"
- << " Usage: " << string_human_readable_number(mem_used) << " ("
- << string_human_readable_size(mem_used) << ")\n"
- << " Peak: " << string_human_readable_number(mem_peak) << " ("
- << string_human_readable_size(mem_peak) << ")";
+ VLOG_INFO << "System memory statistics after full device sync:\n"
+ << " Usage: " << string_human_readable_number(mem_used) << " ("
+ << string_human_readable_size(mem_used) << ")\n"
+ << " Peak: " << string_human_readable_number(mem_peak) << " ("
+ << string_human_readable_size(mem_peak) << ")";
}
}
@@ -586,35 +586,38 @@ bool Scene::update(Progress &progress)
static void log_kernel_features(const uint features)
{
- VLOG(2) << "Requested features:\n";
- VLOG(2) << "Use BSDF " << string_from_bool(features & KERNEL_FEATURE_NODE_BSDF) << "\n";
- VLOG(2) << "Use Principled BSDF " << string_from_bool(features & KERNEL_FEATURE_PRINCIPLED)
- << "\n";
- VLOG(2) << "Use Emission " << string_from_bool(features & KERNEL_FEATURE_NODE_EMISSION) << "\n";
- VLOG(2) << "Use Volume " << string_from_bool(features & KERNEL_FEATURE_NODE_VOLUME) << "\n";
- VLOG(2) << "Use Bump " << string_from_bool(features & KERNEL_FEATURE_NODE_BUMP) << "\n";
- VLOG(2) << "Use Voronoi " << string_from_bool(features & KERNEL_FEATURE_NODE_VORONOI_EXTRA)
- << "\n";
- VLOG(2) << "Use Shader Raytrace " << string_from_bool(features & KERNEL_FEATURE_NODE_RAYTRACE)
- << "\n";
- VLOG(2) << "Use MNEE" << string_from_bool(features & KERNEL_FEATURE_MNEE) << "\n";
- VLOG(2) << "Use Transparent " << string_from_bool(features & KERNEL_FEATURE_TRANSPARENT) << "\n";
- VLOG(2) << "Use Denoising " << string_from_bool(features & KERNEL_FEATURE_DENOISING) << "\n";
- VLOG(2) << "Use Path Tracing " << string_from_bool(features & KERNEL_FEATURE_PATH_TRACING)
- << "\n";
- VLOG(2) << "Use Hair " << string_from_bool(features & KERNEL_FEATURE_HAIR) << "\n";
- VLOG(2) << "Use Pointclouds " << string_from_bool(features & KERNEL_FEATURE_POINTCLOUD) << "\n";
- VLOG(2) << "Use Object Motion " << string_from_bool(features & KERNEL_FEATURE_OBJECT_MOTION)
- << "\n";
- VLOG(2) << "Use Camera Motion " << string_from_bool(features & KERNEL_FEATURE_CAMERA_MOTION)
- << "\n";
- VLOG(2) << "Use Baking " << string_from_bool(features & KERNEL_FEATURE_BAKING) << "\n";
- VLOG(2) << "Use Subsurface " << string_from_bool(features & KERNEL_FEATURE_SUBSURFACE) << "\n";
- VLOG(2) << "Use Volume " << string_from_bool(features & KERNEL_FEATURE_VOLUME) << "\n";
- VLOG(2) << "Use Patch Evaluation "
- << string_from_bool(features & KERNEL_FEATURE_PATCH_EVALUATION) << "\n";
- VLOG(2) << "Use Shadow Catcher " << string_from_bool(features & KERNEL_FEATURE_SHADOW_CATCHER)
- << "\n";
+ VLOG_INFO << "Requested features:\n";
+ VLOG_INFO << "Use BSDF " << string_from_bool(features & KERNEL_FEATURE_NODE_BSDF) << "\n";
+ VLOG_INFO << "Use Principled BSDF " << string_from_bool(features & KERNEL_FEATURE_PRINCIPLED)
+ << "\n";
+ VLOG_INFO << "Use Emission " << string_from_bool(features & KERNEL_FEATURE_NODE_EMISSION)
+ << "\n";
+ VLOG_INFO << "Use Volume " << string_from_bool(features & KERNEL_FEATURE_NODE_VOLUME) << "\n";
+ VLOG_INFO << "Use Bump " << string_from_bool(features & KERNEL_FEATURE_NODE_BUMP) << "\n";
+ VLOG_INFO << "Use Voronoi " << string_from_bool(features & KERNEL_FEATURE_NODE_VORONOI_EXTRA)
+ << "\n";
+ VLOG_INFO << "Use Shader Raytrace " << string_from_bool(features & KERNEL_FEATURE_NODE_RAYTRACE)
+ << "\n";
+ VLOG_INFO << "Use MNEE" << string_from_bool(features & KERNEL_FEATURE_MNEE) << "\n";
+ VLOG_INFO << "Use Transparent " << string_from_bool(features & KERNEL_FEATURE_TRANSPARENT)
+ << "\n";
+ VLOG_INFO << "Use Denoising " << string_from_bool(features & KERNEL_FEATURE_DENOISING) << "\n";
+ VLOG_INFO << "Use Path Tracing " << string_from_bool(features & KERNEL_FEATURE_PATH_TRACING)
+ << "\n";
+ VLOG_INFO << "Use Hair " << string_from_bool(features & KERNEL_FEATURE_HAIR) << "\n";
+ VLOG_INFO << "Use Pointclouds " << string_from_bool(features & KERNEL_FEATURE_POINTCLOUD)
+ << "\n";
+ VLOG_INFO << "Use Object Motion " << string_from_bool(features & KERNEL_FEATURE_OBJECT_MOTION)
+ << "\n";
+ VLOG_INFO << "Use Camera Motion " << string_from_bool(features & KERNEL_FEATURE_CAMERA_MOTION)
+ << "\n";
+ VLOG_INFO << "Use Baking " << string_from_bool(features & KERNEL_FEATURE_BAKING) << "\n";
+ VLOG_INFO << "Use Subsurface " << string_from_bool(features & KERNEL_FEATURE_SUBSURFACE) << "\n";
+ VLOG_INFO << "Use Volume " << string_from_bool(features & KERNEL_FEATURE_VOLUME) << "\n";
+ VLOG_INFO << "Use Patch Evaluation "
+ << string_from_bool(features & KERNEL_FEATURE_PATCH_EVALUATION) << "\n";
+ VLOG_INFO << "Use Shadow Catcher " << string_from_bool(features & KERNEL_FEATURE_SHADOW_CATCHER)
+ << "\n";
}
bool Scene::load_kernels(Progress &progress, bool lock_scene)
@@ -675,8 +678,8 @@ int Scene::get_max_closure_count()
* closures discarded due to mixing or low weights. We need to limit
* to MAX_CLOSURE as this is hardcoded in CPU/mega kernels, and it
* avoids excessive memory usage for split kernels. */
- VLOG(2) << "Maximum number of closures exceeded: " << max_closure_global << " > "
- << MAX_CLOSURE;
+ VLOG_WARNING << "Maximum number of closures exceeded: " << max_closure_global << " > "
+ << MAX_CLOSURE;
max_closure_global = MAX_CLOSURE;
}
@@ -723,7 +726,7 @@ int Scene::get_volume_stack_size() const
volume_stack_size = min(volume_stack_size, MAX_VOLUME_STACK_SIZE);
- VLOG(3) << "Detected required volume stack size " << volume_stack_size;
+ VLOG_WORK << "Detected required volume stack size " << volume_stack_size;
return volume_stack_size;
}
diff --git a/intern/cycles/scene/scene.h b/intern/cycles/scene/scene.h
index a0d2f4a6c06..d04c6a27f11 100644
--- a/intern/cycles/scene/scene.h
+++ b/intern/cycles/scene/scene.h
@@ -98,7 +98,7 @@ class DeviceScene {
device_vector<DecomposedTransform> camera_motion;
/* attributes */
- device_vector<uint4> attributes_map;
+ device_vector<AttributeMap> attributes_map;
device_vector<float> attributes_float;
device_vector<float2> attributes_float2;
device_vector<packed_float3> attributes_float3;
diff --git a/intern/cycles/scene/shader_graph.cpp b/intern/cycles/scene/shader_graph.cpp
index f25d0b7c7b9..ef3f142ed4e 100644
--- a/intern/cycles/scene/shader_graph.cpp
+++ b/intern/cycles/scene/shader_graph.cpp
@@ -659,7 +659,7 @@ void ShaderGraph::deduplicate_nodes()
}
if (num_deduplicated > 0) {
- VLOG(1) << "Deduplicated " << num_deduplicated << " nodes.";
+ VLOG_DEBUG << "Deduplicated " << num_deduplicated << " nodes.";
}
}
@@ -700,7 +700,7 @@ void ShaderGraph::verify_volume_output()
}
}
if (!has_valid_volume) {
- VLOG(1) << "Disconnect meaningless volume output.";
+ VLOG_DEBUG << "Disconnect meaningless volume output.";
disconnect(volume_in->link);
}
}
diff --git a/intern/cycles/scene/shader_nodes.cpp b/intern/cycles/scene/shader_nodes.cpp
index 3b58556f601..f93a1a5231a 100644
--- a/intern/cycles/scene/shader_nodes.cpp
+++ b/intern/cycles/scene/shader_nodes.cpp
@@ -2391,7 +2391,7 @@ void GlossyBsdfNode::simplify_settings(Scene *scene)
* NOTE: Keep the epsilon in sync with kernel!
*/
if (!roughness_input->link && roughness <= 1e-4f) {
- VLOG(3) << "Using sharp glossy BSDF.";
+ VLOG_DEBUG << "Using sharp glossy BSDF.";
distribution = CLOSURE_BSDF_REFLECTION_ID;
}
}
@@ -2400,7 +2400,7 @@ void GlossyBsdfNode::simplify_settings(Scene *scene)
* benefit from closure blur to remove unwanted noise.
*/
if (roughness_input->link == NULL && distribution == CLOSURE_BSDF_REFLECTION_ID) {
- VLOG(3) << "Using GGX glossy with filter glossy.";
+ VLOG_DEBUG << "Using GGX glossy with filter glossy.";
distribution = CLOSURE_BSDF_MICROFACET_GGX_ID;
roughness = 0.0f;
}
@@ -2484,7 +2484,7 @@ void GlassBsdfNode::simplify_settings(Scene *scene)
* NOTE: Keep the epsilon in sync with kernel!
*/
if (!roughness_input->link && roughness <= 1e-4f) {
- VLOG(3) << "Using sharp glass BSDF.";
+ VLOG_DEBUG << "Using sharp glass BSDF.";
distribution = CLOSURE_BSDF_SHARP_GLASS_ID;
}
}
@@ -2493,7 +2493,7 @@ void GlassBsdfNode::simplify_settings(Scene *scene)
* benefit from closure blur to remove unwanted noise.
*/
if (roughness_input->link == NULL && distribution == CLOSURE_BSDF_SHARP_GLASS_ID) {
- VLOG(3) << "Using GGX glass with filter glossy.";
+ VLOG_DEBUG << "Using GGX glass with filter glossy.";
distribution = CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID;
roughness = 0.0f;
}
@@ -2577,7 +2577,7 @@ void RefractionBsdfNode::simplify_settings(Scene *scene)
* NOTE: Keep the epsilon in sync with kernel!
*/
if (!roughness_input->link && roughness <= 1e-4f) {
- VLOG(3) << "Using sharp refraction BSDF.";
+ VLOG_DEBUG << "Using sharp refraction BSDF.";
distribution = CLOSURE_BSDF_REFRACTION_ID;
}
}
@@ -2586,7 +2586,7 @@ void RefractionBsdfNode::simplify_settings(Scene *scene)
* benefit from closure blur to remove unwanted noise.
*/
if (roughness_input->link == NULL && distribution == CLOSURE_BSDF_REFRACTION_ID) {
- VLOG(3) << "Using GGX refraction with filter glossy.";
+ VLOG_DEBUG << "Using GGX refraction with filter glossy.";
distribution = CLOSURE_BSDF_MICROFACET_GGX_REFRACTION_ID;
roughness = 0.0f;
}
diff --git a/intern/cycles/scene/svm.cpp b/intern/cycles/scene/svm.cpp
index 484a7d6de72..4bc5a1b9cc2 100644
--- a/intern/cycles/scene/svm.cpp
+++ b/intern/cycles/scene/svm.cpp
@@ -51,9 +51,9 @@ void SVMShaderManager::device_update_shader(Scene *scene,
compiler.background = (shader == scene->background->get_shader(scene));
compiler.compile(shader, *svm_nodes, 0, &summary);
- VLOG(3) << "Compilation summary:\n"
- << "Shader name: " << shader->name << "\n"
- << summary.full_report();
+ VLOG_WORK << "Compilation summary:\n"
+ << "Shader name: " << shader->name << "\n"
+ << summary.full_report();
}
void SVMShaderManager::device_update_specific(Device *device,
@@ -72,7 +72,7 @@ void SVMShaderManager::device_update_specific(Device *device,
const int num_shaders = scene->shaders.size();
- VLOG(1) << "Total " << num_shaders << " shaders.";
+ VLOG_INFO << "Total " << num_shaders << " shaders.";
double start_time = time_dt();
@@ -148,8 +148,8 @@ void SVMShaderManager::device_update_specific(Device *device,
update_flags = UPDATE_NONE;
- VLOG(1) << "Shader manager updated " << num_shaders << " shaders in " << time_dt() - start_time
- << " seconds.";
+ VLOG_INFO << "Shader manager updated " << num_shaders << " shaders in " << time_dt() - start_time
+ << " seconds.";
}
void SVMShaderManager::device_free(Device *device, DeviceScene *dscene, Scene *scene)
diff --git a/intern/cycles/scene/tables.cpp b/intern/cycles/scene/tables.cpp
index bb35880d37e..3e57b535f35 100644
--- a/intern/cycles/scene/tables.cpp
+++ b/intern/cycles/scene/tables.cpp
@@ -34,7 +34,7 @@ void LookupTables::device_update(Device *, DeviceScene *dscene, Scene *scene)
}
});
- VLOG(1) << "Total " << lookup_tables.size() << " lookup tables.";
+ VLOG_INFO << "Total " << lookup_tables.size() << " lookup tables.";
if (lookup_tables.size() > 0)
dscene->lookup_table.copy_to_device();
diff --git a/intern/cycles/scene/volume.cpp b/intern/cycles/scene/volume.cpp
index 39e9b0bbbf4..77955350305 100644
--- a/intern/cycles/scene/volume.cpp
+++ b/intern/cycles/scene/volume.cpp
@@ -754,11 +754,11 @@ void GeometryManager::create_volume_mesh(const Scene *scene, Volume *volume, Pro
}
/* Print stats. */
- VLOG(1) << "Memory usage volume mesh: "
- << ((vertices.size() + face_normals.size()) * sizeof(float3) +
- indices.size() * sizeof(int)) /
- (1024.0 * 1024.0)
- << "Mb.";
+ VLOG_WORK << "Memory usage volume mesh: "
+ << ((vertices.size() + face_normals.size()) * sizeof(float3) +
+ indices.size() * sizeof(int)) /
+ (1024.0 * 1024.0)
+ << "Mb.";
}
CCL_NAMESPACE_END