From 29022554241d637f7f1ebad2bb78aa9b18b17691 Mon Sep 17 00:00:00 2001 From: Pratik Borhade Date: Fri, 17 Oct 2025 15:32:49 +0200 Subject: [PATCH 1/4] Fix #147535: Regression: Rest Position toggle only shows when shapekeys list is not empty Since "Add Rest Position" is not a shape key property, move it out of `draw_shape_key_properties`. That way property will be drawn even when list is empty. See PR description for photos Pull Request: https://projects.blender.org/blender/blender/pulls/147685 --- scripts/startup/bl_ui/properties_data_mesh.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/startup/bl_ui/properties_data_mesh.py b/scripts/startup/bl_ui/properties_data_mesh.py index e2860b835e3..533559b8589 100644 --- a/scripts/startup/bl_ui/properties_data_mesh.py +++ b/scripts/startup/bl_ui/properties_data_mesh.py @@ -294,9 +294,6 @@ def draw_shape_key_properties(context, layout): row.active = enable_edit_value row.prop(key, "eval_time") - if ob.type == 'MESH': - layout.prop(ob, "add_rest_position_attribute") - class DATA_PT_shape_keys(MeshButtonsPanel, Panel): bl_label = "Shape Keys" @@ -338,6 +335,12 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel): col.menu("MESH_MT_shape_key_context_menu", icon='DOWNARROW_HLT', text="") + if ob.type == 'MESH': + row = layout.row(align=True) + row.use_property_split = False + row.alignment = 'LEFT' + row.prop(ob, "add_rest_position_attribute") + if kb: col.separator() From 58b8ae1717cf2b8c1a0442f28fb27a957216e985 Mon Sep 17 00:00:00 2001 From: Damien Picard Date: Fri, 17 Oct 2025 16:13:30 +0200 Subject: [PATCH 2/4] UI: Fix a few typos - "Acion Slot" -> "Action": typo. - "Specifies the input node used the created zone" -> "by the created zone": typo. - "No reference available {!r}, Update..." -> "update": lower case. - "uninitialized file-list" -> "Uninitialized": sentence case. Some issues reported by Alexandr Fatih. Pull Request: https://projects.blender.org/blender/blender/pulls/148265 --- scripts/addons_core/rigify/operators/action_layers.py | 2 +- scripts/startup/bl_operators/node.py | 8 ++++---- scripts/startup/bl_operators/wm.py | 2 +- source/blender/makesrna/intern/rna_space_api.cc | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/addons_core/rigify/operators/action_layers.py b/scripts/addons_core/rigify/operators/action_layers.py index d17d5710a70..760332c7e47 100644 --- a/scripts/addons_core/rigify/operators/action_layers.py +++ b/scripts/addons_core/rigify/operators/action_layers.py @@ -107,7 +107,7 @@ class ActionSlot(PropertyGroup, ActionSlotBase): return str(action_slot.handle) action_slot_ui: StringProperty( - name="Acion Slot", + name="Action Slot", description="Slot of the Action to use for the Action Constraints", # These callbacks let us store the action slot's `handle` property # under the hood (which is unique and never changes), while acting diff --git a/scripts/startup/bl_operators/node.py b/scripts/startup/bl_operators/node.py index 43fb87b06b3..c5befc9af99 100644 --- a/scripts/startup/bl_operators/node.py +++ b/scripts/startup/bl_operators/node.py @@ -667,12 +667,12 @@ class NODE_OT_add_zone(NodeAddZoneOperator, Operator): input_node_type: StringProperty( name="Input Node", - description="Specifies the input node used the created zone", + description="Specifies the input node used by the created zone", ) output_node_type: StringProperty( name="Output Node", - description="Specifies the output node used the created zone", + description="Specifies the output node used by the created zone", ) add_default_geometry_link: BoolProperty( @@ -689,12 +689,12 @@ class NODE_OT_swap_zone(ZoneOperator, NodeSwapOperator, Operator): input_node_type: StringProperty( name="Input Node", - description="Specifies the input node used the created zone", + description="Specifies the input node used by the created zone", ) output_node_type: StringProperty( name="Output Node", - description="Specifies the output node used the created zone", + description="Specifies the output node used by the created zone", ) add_default_geometry_link: BoolProperty( diff --git a/scripts/startup/bl_operators/wm.py b/scripts/startup/bl_operators/wm.py index 0a08c084248..fc212200a51 100644 --- a/scripts/startup/bl_operators/wm.py +++ b/scripts/startup/bl_operators/wm.py @@ -1342,7 +1342,7 @@ class WM_OT_doc_view_manual(Operator): self.report( {'WARNING'}, rpt_("No reference available {!r}, " - "Update info in '_rna_manual_reference.py' " + "update info in '_rna_manual_reference.py' " "or callback to bpy.utils.manual_map()").format(self.doc_id) ) return {'CANCELLED'} diff --git a/source/blender/makesrna/intern/rna_space_api.cc b/source/blender/makesrna/intern/rna_space_api.cc index 949bd6d2163..400c6070a0b 100644 --- a/source/blender/makesrna/intern/rna_space_api.cc +++ b/source/blender/makesrna/intern/rna_space_api.cc @@ -81,7 +81,7 @@ static void rna_FileBrowser_deselect_all(SpaceFile *sfile, ReportList *reports) if (sfile->files == nullptr) { /* Likely to happen in background mode. * We could look into initializing this on demand, see: #141547. */ - BKE_report(reports, RPT_ERROR, "uninitialized file-list"); + BKE_report(reports, RPT_ERROR, "Uninitialized file-list"); return; } ED_fileselect_deselect_all(sfile); From b491002a9d158bf4cb725c7953e8145c6f5b7622 Mon Sep 17 00:00:00 2001 From: salipour Date: Fri, 17 Oct 2025 16:32:23 +0200 Subject: [PATCH 3/4] Fix: Cyles HIP-RT random crashes editing the scene Perform delayed freeing of the geometry BVHs similar to OptiX. Previously BLAS memory was allocated in the device class as part of device_update, but released in the BVHHIPRT destructor which gets called when deleting geometry outside of device_update. To avoid the GPU accessing unmapped memory, do a delayed free of this memory in the device class as part of either device_update or device destruction. This ensures it is in sync with other device memory changes. Fix #148276 Fix #139013 Fix #138043 Fix #140763 Pull Request: https://projects.blender.org/blender/blender/pulls/147247 --- intern/cycles/bvh/hiprt.cpp | 4 +--- intern/cycles/device/hiprt/device_impl.cpp | 25 +++++++++++++++++++++- intern/cycles/device/hiprt/device_impl.h | 11 +++++++++- 3 files changed, 35 insertions(+), 5 deletions(-) diff --git a/intern/cycles/bvh/hiprt.cpp b/intern/cycles/bvh/hiprt.cpp index 363d53b3a8a..5aa57a6d40f 100644 --- a/intern/cycles/bvh/hiprt.cpp +++ b/intern/cycles/bvh/hiprt.cpp @@ -30,12 +30,10 @@ BVHHIPRT::BVHHIPRT(const BVHParams ¶ms, BVHHIPRT::~BVHHIPRT() { - HIPRTDevice *hiprt_device = static_cast(device); - hiprtContext hiprt_context = hiprt_device->get_hiprt_context(); custom_primitive_bound.free(); triangle_index.free(); vertex_data.free(); - hiprtDestroyGeometry(hiprt_context, hiprt_geom); + device->release_bvh(this); } CCL_NAMESPACE_END diff --git a/intern/cycles/device/hiprt/device_impl.cpp b/intern/cycles/device/hiprt/device_impl.cpp index 7ffa202b408..c251a8d09cf 100644 --- a/intern/cycles/device/hiprt/device_impl.cpp +++ b/intern/cycles/device/hiprt/device_impl.cpp @@ -114,6 +114,7 @@ HIPRTDevice::HIPRTDevice(const DeviceInfo &info, HIPRTDevice::~HIPRTDevice() { HIPContextScope scope(this); + free_bvh_memory_delayed(); user_instance_id.free(); prim_visibility.free(); hiprt_blas_ptr.free(); @@ -1150,12 +1151,33 @@ hiprtScene HIPRTDevice::build_tlas(BVHHIPRT *bvh, return scene; } +void HIPRTDevice::free_bvh_memory_delayed() +{ + thread_scoped_lock lock(hiprt_mutex); + if (stale_bvh.size()) { + for (int bvh_index = 0; bvh_index < stale_bvh.size(); bvh_index++) { + hiprtGeometry hiprt_geom = stale_bvh[bvh_index]; + hiprtDestroyGeometry(hiprt_context, hiprt_geom); + hiprt_geom = nullptr; + } + stale_bvh.clear(); + } +} + +void HIPRTDevice::release_bvh(BVH *bvh) +{ + BVHHIPRT *current_bvh = static_cast(bvh); + thread_scoped_lock lock(hiprt_mutex); + /* Tracks BLAS pointers whose BVH destructors have been called. */ + stale_bvh.push_back(current_bvh->hiprt_geom); +} + void HIPRTDevice::build_bvh(BVH *bvh, Progress &progress, bool refit) { if (have_error()) { return; } - + free_bvh_memory_delayed(); progress.set_substatus("Building HIPRT acceleration structure"); hiprtBuildOptions options; @@ -1173,6 +1195,7 @@ void HIPRTDevice::build_bvh(BVH *bvh, Progress &progress, bool refit) if (scene) { hiprtDestroyScene(hiprt_context, scene); + scene = nullptr; } scene = build_tlas(bvh_rt, bvh_rt->objects, options, refit); } diff --git a/intern/cycles/device/hiprt/device_impl.h b/intern/cycles/device/hiprt/device_impl.h index a6465d787dd..02f44b65485 100644 --- a/intern/cycles/device/hiprt/device_impl.h +++ b/intern/cycles/device/hiprt/device_impl.h @@ -46,6 +46,8 @@ class HIPRTDevice : public HIPDevice { void build_bvh(BVH *bvh, Progress &progress, bool refit) override; + void release_bvh(BVH *bvh) override; + hiprtContext get_hiprt_context() { return hiprt_context; @@ -65,7 +67,7 @@ class HIPRTDevice : public HIPDevice { const vector &objects, hiprtBuildOptions options, bool refit); - + void free_bvh_memory_delayed(); hiprtContext hiprt_context; hiprtScene scene; hiprtFuncTable functions_table; @@ -74,6 +76,13 @@ class HIPRTDevice : public HIPDevice { size_t scratch_buffer_size; device_vector scratch_buffer; + /* This vector tracks the hiprt_geom members of BVHRT so that device memory + * can be managed/released in HIPRTDevice. + * Even if synchronization occurs before memory release, a GPU job may still + * launch between synchronization and release, potentially causing the GPU + * to access unmapped memory. */ + vector stale_bvh; + /* Is this scene using motion blur? Note there might exist motion data even if * motion blur is disabled, for render passes. */ bool use_motion_blur = false; From acb20247a5c4ac9cc2017da2b1ad629234bb8450 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 17 Oct 2025 16:29:54 +0200 Subject: [PATCH 4/4] Cycles: Remove HIP-RT stability warning now that this has been fixed Ref #147247 --- intern/cycles/blender/addon/properties.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index c3df6037bf9..8379a7ede3f 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -1624,9 +1624,8 @@ class CyclesPreferences(bpy.types.AddonPreferences): ) use_hiprt: BoolProperty( - name="HIP RT (Unstable)", - description="HIP RT enables AMD hardware ray tracing on RDNA2 and above. This currently has known stability " - "issues, that are expected to be solved before the next release.", + name="HIP RT", + description="HIP RT enables AMD hardware ray tracing on RDNA2 and above", default=False, )