diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-06-16 20:39:13 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-06-17 15:08:14 +0300 |
commit | 2c1bffa286b9551c0533081cb16f497058974b03 (patch) | |
tree | d0b12d9a78bc798fcfa1754cbc7077f9b3bbf9f7 /intern/cycles/scene/light.cpp | |
parent | 24246d98707096f16d5ab48f673f49354eac87a1 (diff) |
Cleanup: add verbose logging category names instead of numbers
And use them more consistently than before.
Diffstat (limited to 'intern/cycles/scene/light.cpp')
-rw-r--r-- | intern/cycles/scene/light.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/intern/cycles/scene/light.cpp b/intern/cycles/scene/light.cpp index 5e311d3051f..2b0d0c807a7 100644 --- a/intern/cycles/scene/light.cpp +++ b/intern/cycles/scene/light.cpp @@ -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); |