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, ) 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; 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 88dfe30bd30..579103a91b6 100644 --- a/scripts/startup/bl_operators/node.py +++ b/scripts/startup/bl_operators/node.py @@ -669,12 +669,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( @@ -691,12 +691,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/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() 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);