GPUOpen-LibrariesAndSDKs / RadeonProRenderBlenderAddon

This hardware-agnostic rendering plug-in for Blender uses accurate ray-tracing technology to produce images and animations of your scenes, and provides real-time interactive rendering and continuous adjustment of effects.
https://gpuopen.com/radeon-prorender-suite/
Apache License 2.0
488 stars 57 forks source link

RPRBLND-2221: RAM leak with multiple material set with Displacement only (ALTERNATIVE) #558

Closed VascoPi closed 1 year ago

VascoPi commented 2 years ago

PURPOSE

RAM leak with multiple material set with Displacement only.

EFFECT OF CHANGE

Fixed Blender memory leak in certain cases.

TECHNICAL STEPS

Commented unused code. Added comments.

NOTES FOR REVIEWERS

This changes should be verified after this https://amdrender.atlassian.net/browse/RPR-1149 PR to apply after adaptive_subdivision improvements from core side https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRenderBlenderAddon/pull/557

bsavery commented 1 year ago

I thought the whole point of the subdivision cap was it would limit things. Guess that doesn't work as we expected.

mudapanda2 commented 1 year ago

Is this what's been nuking my machine in #564 ?

bsavery commented 1 year ago

@mudapanda2 what version RPR plugin do you have there? This should be fixed in 3.5

mudapanda2 commented 1 year ago

@bsavery 3.5

Did a new rprtrace at debug level and the new play1 got to this in a render of default cube after using displacement fuzzy carpet material

//rprFrameBufferGetInfo(framebuffer_0x000001732F1C67A0,RPR_FRAMEBUFFER_DATA,(size_t)5519280,); RPRTRACE_CHECK status = rprContextResolveFrameBuffer(context_0x000001732F1C7C40,framebuffer_0x000001732F1C6200,framebuffer_0x000001732F1C67A0,true); RPRTRACE_CHECK status = rprContextSetParameterByKey1u(context_0x000001732F1C7C40,RPR_CONTEXT_FRAMECOUNT,(rpr_uint)98); RPRTRACE_CHECK status = rprContextSetParameterByKey1u(context_0x000001732F1C7C40,RPR_CONTEXT_ITERATIONS,(rpr_uint)30); RPRTRACE_CHECK status = rprContextRender(context_0x000001732F1C7C40); RPRTRACE_CHECK //rprFrameBufferSaveToFile(framebuffer_0x000001732F1C6200, "img_00765.png"); // <-- uncomment if you want export image

In the viewport, the .bin rprtrace data .bin is 2gb,