Commit: 33a98c19f7f0e157acf70bacba3d982705408ad2 Author: Kévin Dietrich Date: Sat Oct 31 18:29:39 2020 +0100 Branches: cycles_procedural_api https://developer.blender.org/rB33a98c19f7f0e157acf70bacba3d982705408ad2
Merge branch 'master' into arcpatch-D8544 =================================================================== =================================================================== diff --cc intern/cycles/blender/blender_light.cpp index 6c9f61e6caa,6f95821e31e..ff4ecc5a3f9 --- a/intern/cycles/blender/blender_light.cpp +++ b/intern/cycles/blender/blender_light.cpp @@@ -39,10 -39,10 +39,10 @@@ void BlenderSync::sync_light(BL::Objec BL::Light b_light(b_ob.data()); /* Update if either object or light data changed. */ - if (!light_map.add_or_update(scene, &light, b_ob, b_parent, key)) { + if (!light_map.add_or_update(&light, b_ob, b_parent, key)) { Shader *shader; - if (!shader_map.add_or_update(scene, &shader, b_light)) { + if (!shader_map.add_or_update(&shader, b_light)) { - if (light->is_portal) + if (light->get_is_portal()) *use_portal = true; return; } @@@ -176,21 -176,21 +176,21 @@@ void BlenderSync::sync_background_light Light *light; ObjectKey key(b_world, 0, b_world, false); - if (light_map.add_or_update(scene, &light, b_world, b_world, key) || world_recalc || + if (light_map.add_or_update(&light, b_world, b_world, key) || world_recalc || b_world.ptr.data != world_map) { - light->type = LIGHT_BACKGROUND; + light->set_light_type(LIGHT_BACKGROUND); if (sampling_method == SAMPLING_MANUAL) { - light->map_resolution = get_int(cworld, "sample_map_resolution"); + light->set_map_resolution(get_int(cworld, "sample_map_resolution")); } else { - light->map_resolution = 0; + light->set_map_resolution(0); } - light->shader = scene->default_background; - light->use_mis = sample_as_light; - light->max_bounces = get_int(cworld, "max_bounces"); + light->set_shader(scene->default_background); + light->set_use_mis(sample_as_light); + light->set_max_bounces(get_int(cworld, "max_bounces")); /* force enable light again when world is resynced */ - light->is_enabled = true; + light->set_is_enabled(true); int samples = get_int(cworld, "samples"); if (get_boolean(cscene, "use_square_samples")) diff --cc intern/cycles/blender/blender_particles.cpp index 6f9a0da9d67,e5eab1ae62b..ca221b229b4 --- a/intern/cycles/blender/blender_particles.cpp +++ b/intern/cycles/blender/blender_particles.cpp @@@ -53,12 -53,10 +53,11 @@@ bool BlenderSync::sync_dupli_particle(B ParticleSystem *psys; bool first_use = !particle_system_map.is_used(key); - bool need_update = particle_system_map.add_or_update( - scene, &psys, b_ob, b_instance.object(), key); + bool need_update = particle_system_map.add_or_update(&psys, b_ob, b_instance.object(), key); /* no update needed? */ - if (!need_update && !object->geometry->need_update && !scene->object_manager->need_update) + if (!need_update && !object->get_geometry()->is_modified() && + !scene->object_manager->need_update) return true; /* first time used in this sync loop? clear and tag update */ diff --cc intern/cycles/render/geometry.cpp index e73234240b8,9457d5e0205..0c45ef2c8e5 --- a/intern/cycles/render/geometry.cpp +++ b/intern/cycles/render/geometry.cpp @@@ -1260,7 -1249,10 +1260,10 @@@ void GeometryManager::device_update_pre } } - if (geom->need_update_rebuild && geom->geometry_type == Geometry::VOLUME) { + /* Re-create volume mesh if we will rebuild or refit the BVH. Note we + * should only do it in that case, otherwise the BVH and mesh can go + * out of sync. */ - if (geom->need_update && geom->type == Geometry::VOLUME) { ++ if (geom->is_modified() && geom->geometry_type == Geometry::VOLUME) { /* Create volume meshes if there is voxel data. */ if (!volume_images_updated) { progress.set_status("Updating Meshes Volume Bounds"); diff --cc intern/cycles/render/session.cpp index 7560511f97d,3e12e183771..a60542259f6 --- a/intern/cycles/render/session.cpp +++ b/intern/cycles/render/session.cpp @@@ -1067,11 -1161,11 +1157,12 @@@ void Session::render(bool need_denoise task.get_cancel = function_bind(&Progress::get_cancel, &this->progress); task.update_tile_sample = function_bind(&Session::update_tile_sample, this, _1); task.update_progress_sample = function_bind(&Progress::add_samples, &this->progress, _1, _2); + task.get_tile_stolen = function_bind(&Session::get_tile_stolen, this); task.need_finish_queue = params.progressive_refine; - task.integrator_branched = scene->integrator->method == Integrator::BRANCHED_PATH; + task.integrator_branched = scene->integrator->get_method() == Integrator::BRANCHED_PATH; - task.adaptive_sampling.use = (scene->integrator->sampling_pattern == SAMPLING_PATTERN_PMJ) && + task.adaptive_sampling.use = (scene->integrator->get_sampling_pattern() == + SAMPLING_PATTERN_PMJ) && scene->dscene.data.film.pass_adaptive_aux_buffer; task.adaptive_sampling.min_samples = scene->dscene.data.integrator.adaptive_min_samples; task.adaptive_sampling.adaptive_step = scene->dscene.data.integrator.adaptive_step; diff --cc intern/cycles/render/volume.cpp index 77a8db7aa9b,a8edc04f8a9..547d0fa0d94 --- a/intern/cycles/render/volume.cpp +++ b/intern/cycles/render/volume.cpp @@@ -584,7 -582,8 +584,8 @@@ void GeometryManager::create_volume_mes volume->clear(); volume->reserve_mesh(vertices.size(), indices.size() / 3); - volume->used_shaders.push_back(volume_shader); - volume->need_update = true; + volume->used_shaders.push_back_slow(volume_shader); ++ volume->tag_modified(); volume->need_update_rebuild = true; for (size_t i = 0; i < vertices.size(); ++i) { _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs