Skip to content

Commit e35aec4

Browse files
authored
RPRBLND-2221: RAM leak with multiple material set with Displacement only (ALTERNATIVE) (#558)
PURPOSE RAM leak with multiple material set with Displacement only. EFFECT OF CHANGE Fixed Blender memory leak in certain cases.
1 parent b82fe90 commit e35aec4

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/rprblender/export/mesh.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,20 @@ def assign_materials(rpr_context: RPRContext, rpr_shape: pyrpr.Shape, obj: bpy.t
263263
rpr_shape.set_displacement_material(rpr_displacement)
264264
# if no subdivision set that up to 'high' so displacement looks good
265265
# note subdivision is capped to resolution
266-
if rpr_shape.subdivision is None:
267-
rpr_shape.subdivision = {
268-
'level': 10,
269-
'boundary': pyrpr.SUBDIV_BOUNDARY_INTERFOP_TYPE_EDGE_AND_CORNER,
270-
'crease_weight': 10
271-
}
266+
267+
# TODO
268+
# Turn off this params to avoid memory leak in certain cases.
269+
# Second, majority of user cases it doesn't take into account at all but should.
270+
# Verify after this https://amdrender.atlassian.net/browse/RPR-1149
271+
# PR to apply https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRenderBlenderAddon/pull/557
272+
#
273+
# if rpr_shape.subdivision is None:
274+
# rpr_shape.subdivision = {
275+
# 'level': 10,
276+
# 'boundary': pyrpr.SUBDIV_BOUNDARY_INTERFOP_TYPE_EDGE_AND_CORNER,
277+
# 'crease_weight': 10
278+
# }
279+
272280
else:
273281
rpr_shape.set_displacement_material(None)
274282

0 commit comments

Comments
 (0)