New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed references to probes not cleared when unloading a scene #5945
Conversation
Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed. HDRP Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure. |
It appears that you made a non-draft PR! |
com.unity.render-pipelines.high-definition/Runtime/Lighting/LightLoop/LightLoop.cs
Outdated
Show resolved
Hide resolved
all good, waiting for QA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a quick check to validate lights, reflection probes and planar probes, no repro indeed with lights and cube reflection probes anymore, but planar probes fill up Scene Memory -> Render Texture section when switching scenes.
2021-11-08.17-22-07.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! Not encountering any leaks anymore shuffling through the test project with additional lights and planar probes
* Fixed references to probes not cleared when unloading a scene #5945 * [Fogbugz # 1365368] Fixing debug views for drs #5948 * [HDRP] Stacklit RTR: Fix issues with RTR reflections from stacklit materials #6103 * [HDRP] Lit coat ssr-rtr: Fix various issues with using SSR lighting with IBL fallback (case 1380351) #6106 * [HDRP] StackLit coat ssr-rtr light hierarchy and IBL fallback fixes. #6107 * AxF ssr-rtr: Implement refined light reflection hierarchy with separate weight for coat and base lobe to correctly fallback from SSR light to light reflection probes and also implement the same coat-traced light "reuse" as Lit for bottom lobe when roughnesses are similar. (#6108) This also cleans up the overlapping contributing reflection probes / dual normal setup problem in EvaluateBSDF_Env(). Based on previously discussed #4968. * Fix issue with reflection probe normalization via APV (#6140) * fix issue * - * [not ready] HDRP Scene Template: Bumped up IET framework version to 2.1 and better default layout for 1080p monitors (#6153) * bumped up iet framework to 2.1, created new 1080p and 4k friendly layout * Merge branch 'master' into hdrp-template-bumpup-iet-framework-version Co-authored-by: sebastienlagarde <sebastien@unity3d.com> * [HDRP] Fix custom pass utils in XR #6271 * Update reference screenshots Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com> Co-authored-by: Kleber Garcia <kleber.garcia@unity3d.com> Co-authored-by: slunity <37302815+slunity@users.noreply.github.com> Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com> Co-authored-by: pierre-unity <39901544+pierre-unity@users.noreply.github.com> Co-authored-by: Antoine Lelievre <antoinel@unity3d.com>
Purpose of this PR
https://fogbugz.unity3d.com/f/cases/1357459/
HDRP stores probes in a global array, but when a probe is removed, the reference is not removed from the array.
Also the probe was added to a lightmapper callback at OnEnable but not removed during OnDisable
Testing status
tested the repro steps, the probes don't appear anymore in the memory profiler
For QA: HDRP also has a global array for planar probes and lights. So I cleared references for planar probes, I suppose they have the same issue but didn't try to test. I didn't manage to repro anything similar for lights though, so didn't change anything for them