Search Issue Tracker

Fixed in 7.1.1

Votes

3

Found in [Package]

5.7.2

Issue ID

1156241

Regression

No

[LWRP] PlayerLoop > RenderPipelineManager.DoRenderLoop_Internal > GC.Alloc allocates around 2.6kb for every Camera in the Scene

Package: Scriptable Render Pipeline Lightweight

-

How to reproduce:
1. Open the "SampleScene" Scene in the attached "Repro1165372.zip" Project
2. Enter Play Mode
3. Open Window > Analysis > Profiler
4. Observe the PlayerLoop > RenderPipelineManager.DoRenderLoop_Interna > GC.Alloc in the Cpu Profiler's Hierarchy

Expected Behaviour: The GC.Alloc is 0b
Actual Behaviour: The GC.Alloc is 2.6kb

Reproducible with(Package Versions): 4.0.0 Preview (2018.3.0b1) 4.10.0 Preview (2018.4.3f1), 5.2.3 (2019.2.0a1), 5.7.2, 5.16.1 (2019.1.8f1), 6.7.1 (2019.3.0a7)

Reproducible with(Unity Versions): 2018.4.3f1, 2019.1.8f1, 2019.2.0b7, 2019.3.0a7

Note: Could not check on 2017.4 because there are no Packages.

  1. Resolution Note (fix version 7.1.1):

    fixed in 2020.1.0a2, backported to 2019.3.0b2, 2019.2.18f1

Comments (1)

  1. DesertImageProd

    Aug 05, 2019 09:12

    There are three places with garbage allocation:
    1) LightweightRenderPipeline.InitializeShadowData: GetComponent<LWRPAdditionalLightData>
    2) LightweightRenderPipeline.InitializeCameraData: camera.GetComponent<PostProcessLayer>()
    3) ScriptableRender.ExecuteBlock : there is LinQ expression

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.