diff options
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 2 | ||||
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 9 | ||||
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 10 | ||||
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 7 | ||||
-rw-r--r-- | intern/cycles/device/opencl/device_opencl_impl.cpp | 5 |
5 files changed, 16 insertions, 17 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 9aea7725810..ce93bd96bd5 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -725,7 +725,7 @@ class CYCLES_RENDER_PT_performance_tiles(CyclesButtonsPanel, Panel): col.prop(cscene, "tile_order", text="Order") sub = col.column() - sub.active = not rd.use_save_buffers + sub.active = not rd.use_save_buffers and not cscene.use_adaptive_sampling sub.prop(cscene, "use_progressive_refine") diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index 3c41c831723..cb84013c551 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -261,10 +261,8 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph, } /* test if we need to sync */ - bool object_updated = false; - - if (object_map.add_or_update(&object, b_ob, b_parent, key)) - object_updated = true; + bool object_updated = object_map.add_or_update(&object, b_ob, b_parent, key) || + (tfm != object->get_tfm()); /* mesh sync */ /* b_ob is owned by the iterator and will go out of scope at the end of the block. @@ -313,8 +311,7 @@ Object *BlenderSync::sync_object(BL::Depsgraph &b_depsgraph, * transform comparison should not be needed, but duplis don't work perfect * in the depsgraph and may not signal changes, so this is a workaround */ if (object->is_modified() || object_updated || - (object->get_geometry() && object->get_geometry()->is_modified()) || - tfm != object->get_tfm()) { + (object->get_geometry() && object->get_geometry()->is_modified())) { object->name = b_ob.name().c_str(); object->set_pass_id(b_ob.pass_index()); object->set_color(get_float3(b_ob.color())); diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index 72328333732..736c10e8881 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -1553,13 +1553,9 @@ void BlenderSync::sync_lights(BL::Depsgraph &b_depsgraph, bool update_all) void BlenderSync::sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d) { /* for auto refresh images */ - bool auto_refresh_update = false; - - if (preview) { - ImageManager *image_manager = scene->image_manager; - int frame = b_scene.frame_current(); - auto_refresh_update = image_manager->set_animation_frame_update(frame); - } + ImageManager *image_manager = scene->image_manager; + const int frame = b_scene.frame_current(); + const bool auto_refresh_update = image_manager->set_animation_frame_update(frame); shader_map.pre_sync(); diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index 4ec0477c585..4af8da402b1 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -875,6 +875,9 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine &b_engine, /* Clamp samples. */ params.samples = min(params.samples, Integrator::MAX_SAMPLES); + /* Adaptive sampling. */ + params.adaptive_sampling = RNA_boolean_get(&cscene, "use_adaptive_sampling"); + /* tiles */ const bool is_cpu = (params.device.type == DEVICE_CPU); if (!is_cpu && !background) { @@ -927,7 +930,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine &b_engine, BL::RenderSettings b_r = b_scene.render(); params.progressive_refine = b_engine.is_preview() || get_boolean(cscene, "use_progressive_refine"); - if (b_r.use_save_buffers()) + if (b_r.use_save_buffers() || params.adaptive_sampling) params.progressive_refine = false; if (background) { @@ -963,8 +966,6 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine &b_engine, params.use_profiling = params.device.has_profiling && !b_engine.is_preview() && background && BlenderSession::print_render_stats; - params.adaptive_sampling = RNA_boolean_get(&cscene, "use_adaptive_sampling"); - return params; } diff --git a/intern/cycles/device/opencl/device_opencl_impl.cpp b/intern/cycles/device/opencl/device_opencl_impl.cpp index d378d32914c..b1d6284171a 100644 --- a/intern/cycles/device/opencl/device_opencl_impl.cpp +++ b/intern/cycles/device/opencl/device_opencl_impl.cpp @@ -569,6 +569,11 @@ class OpenCLSplitKernel : public DeviceSplitKernel { size_t num_elements = max_elements_for_max_buffer_size(kg, data, max_buffer_size); int2 global_size = make_int2(max(round_down((int)sqrt(num_elements), 64), 64), (int)sqrt(num_elements)); + + if (device->info.description.find("Intel") != string::npos) { + global_size = make_int2(min(512, global_size.x), min(512, global_size.y)); + } + VLOG(1) << "Global size: " << global_size << "."; return global_size; } |