diff options
-rw-r--r-- | intern/cycles/blender/addon/properties.py | 9 | ||||
-rw-r--r-- | intern/cycles/blender/shader.cpp | 13 | ||||
-rw-r--r-- | intern/cycles/blender/sync.cpp | 9 | ||||
-rw-r--r-- | intern/cycles/blender/sync.h | 2 | ||||
-rw-r--r-- | intern/cycles/device/metal/device_impl.mm | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_snap_object.c | 2 |
6 files changed, 20 insertions, 17 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index 4e62bae6fe3..e3e5734c6b6 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -1514,9 +1514,12 @@ class CyclesPreferences(bpy.types.AddonPreferences): row.prop(self, "peer_memory") if compute_device_type == 'METAL': - row = layout.row() - row.use_property_split = True - row.prop(self, "use_metalrt") + import platform + # MetalRT only works on Apple Silicon at present, pending argument encoding fixes on AMD + if platform.machine() == 'arm64': + row = layout.row() + row.use_property_split = True + row.prop(self, "use_metalrt") def draw(self, context): diff --git a/intern/cycles/blender/shader.cpp b/intern/cycles/blender/shader.cpp index 9d696aaeeb2..ec50ad9db9a 100644 --- a/intern/cycles/blender/shader.cpp +++ b/intern/cycles/blender/shader.cpp @@ -1574,18 +1574,13 @@ void BlenderSync::sync_lights(BL::Depsgraph &b_depsgraph, bool update_all) } } -void BlenderSync::sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d) +void BlenderSync::sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d, bool update_all) { - /* for auto refresh images */ - 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(); - sync_world(b_depsgraph, b_v3d, auto_refresh_update); - sync_lights(b_depsgraph, auto_refresh_update); - sync_materials(b_depsgraph, auto_refresh_update); + sync_world(b_depsgraph, b_v3d, update_all); + sync_lights(b_depsgraph, update_all); + sync_materials(b_depsgraph, update_all); } CCL_NAMESPACE_END diff --git a/intern/cycles/blender/sync.cpp b/intern/cycles/blender/sync.cpp index 0b11af2dbf9..d4949a5ff30 100644 --- a/intern/cycles/blender/sync.cpp +++ b/intern/cycles/blender/sync.cpp @@ -246,7 +246,12 @@ void BlenderSync::sync_data(BL::RenderSettings &b_render, int height, void **python_thread_state) { - if (!has_updates_) { + /* For auto refresh images. */ + 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); + + if (!has_updates_ && !auto_refresh_update) { return; } @@ -261,7 +266,7 @@ void BlenderSync::sync_data(BL::RenderSettings &b_render, sync_view_layer(b_view_layer); sync_integrator(b_view_layer, background); sync_film(b_view_layer, b_v3d); - sync_shaders(b_depsgraph, b_v3d); + sync_shaders(b_depsgraph, b_v3d, auto_refresh_update); sync_images(); geometry_synced.clear(); /* use for objects and motion sync */ diff --git a/intern/cycles/blender/sync.h b/intern/cycles/blender/sync.h index d92efb80a5d..5cc18452ac1 100644 --- a/intern/cycles/blender/sync.h +++ b/intern/cycles/blender/sync.h @@ -114,7 +114,7 @@ class BlenderSync { /* Shader */ array<Node *> find_used_shaders(BL::Object &b_ob); void sync_world(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d, bool update_all); - void sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d); + void sync_shaders(BL::Depsgraph &b_depsgraph, BL::SpaceView3D &b_v3d, bool update_all); void sync_nodes(Shader *shader, BL::ShaderNodeTree &b_ntree); /* Object */ diff --git a/intern/cycles/device/metal/device_impl.mm b/intern/cycles/device/metal/device_impl.mm index 593c9c3cf06..c01f51fb506 100644 --- a/intern/cycles/device/metal/device_impl.mm +++ b/intern/cycles/device/metal/device_impl.mm @@ -77,11 +77,11 @@ MetalDevice::MetalDevice(const DeviceInfo &info, Stats &stats, Profiler &profile } case METAL_GPU_APPLE: { max_threads_per_threadgroup = 512; + use_metalrt = info.use_metalrt; break; } } - use_metalrt = info.use_metalrt; if (auto metalrt = getenv("CYCLES_METALRT")) { use_metalrt = (atoi(metalrt) != 0); } diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index f30da3ff6f3..8b7133892ff 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -477,7 +477,7 @@ static void iter_snap_objects(SnapObjectContext *sctx, } } else if (snap_select == SNAP_NOT_SELECTED) { - if (is_object_active && !(base->object->mode & OB_MODE_OBJECT)) { + if (is_object_active && base->object->mode != OB_MODE_OBJECT) { /* Pass. Consider the selection of elements being edited. */ } else if ((base->flag & BASE_SELECTED) || (base->flag_legacy & BA_WAS_SEL)) { |