From 215925e04c6c7c7d852a56b5a17059942fc978a2 Mon Sep 17 00:00:00 2001 From: William Leeson Date: Fri, 2 Jun 2023 10:23:06 +0200 Subject: [PATCH 1/2] FIX #108019: Detect absence of ray tracing support on late 2015 iMac On an iMac (Retina 5K, 27-inch, Late 2015) it crashed when rendering using Cycles. This was due to the fact that it incorrectly detected that the machine supported ray tracing. This uses the device.supportsRaytracing flag to fill in the use_hardware_raytracing flag for the device. --- intern/cycles/device/metal/device.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/intern/cycles/device/metal/device.mm b/intern/cycles/device/metal/device.mm index 2a517f67a06..917b7a8573e 100644 --- a/intern/cycles/device/metal/device.mm +++ b/intern/cycles/device/metal/device.mm @@ -59,7 +59,13 @@ void device_metal_info(vector &devices) info.has_nanovdb = vendor == METAL_GPU_APPLE; info.has_light_tree = vendor != METAL_GPU_AMD; + info.use_hardware_raytracing = vendor != METAL_GPU_INTEL; + if (info.use_hardware_raytracing) { + if (@available(macos 11.0, *)) { + info.use_hardware_raytracing = device.supportsRaytracing; + } + } devices.push_back(info); device_index++; From 9d00d1376726c734358dd8d12c8af911713f5ac4 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Fri, 2 Jun 2023 10:37:03 +0200 Subject: [PATCH 2/2] Fix #108501: Image Editor glitch after texture painting undo When doing the second undo, the image wasn't properly marked for full update. There reason was that in some cases the partial_updater was totally reconstructed: `first_changeset_id` and `last_changeset_id` were both 0. While the `user_imp->last_changeset_id` was still its last value (e.g., 3). The fix is to have the partial updater validator to check for the last change set as well (it was only checking for the first change set). This way we cover both scenarios when user_imp->last_changeset_id is out of the range of the partial update history. Pull Request: https://projects.blender.org/blender/blender/pulls/108533 --- .../blender/blenkernel/intern/image_partial_update.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/image_partial_update.cc b/source/blender/blenkernel/intern/image_partial_update.cc index 4de807c0706..8639ef48af9 100644 --- a/source/blender/blenkernel/intern/image_partial_update.cc +++ b/source/blender/blenkernel/intern/image_partial_update.cc @@ -419,7 +419,15 @@ struct PartialUpdateRegisterImpl { */ bool can_construct(ChangesetID changeset_id) { - return changeset_id >= first_changeset_id; + if (changeset_id < first_changeset_id) { + return false; + } + + if (changeset_id > last_changeset_id) { + return false; + } + + return true; } /**