Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

4.2: Any way to turn off the "Tiled GPU perf. warning"?

Discussion in 'Editor & General Support' started by VIC20, Jul 22, 2013.

  1. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,687
    Tiled GPU perf. warning: Backbuffer was not cleared/discarded, doing Render.OpaqueGeometry/RenderForwardOpaque.Render/MeshRenderer.Render

    It's pretty annoying to get this message all of the time when working with more than one camera. Is there a way to turn it off?
     
  2. fstaber

    fstaber

    Joined:
    Sep 7, 2012
    Posts:
    2
    I upgraded to Unity 4.2.0f4, and I am getting similar warnings continuously. It kills my framerate. I am also using multiple cameras in the scene. I have some meshes with toon shaders in the scene, as well.

    Here are the warnings:

    *Tiled GPU perf. warning: RenderTexture color surface (1024x768) was not cleared/discarded, doing <run with profiler for info>

    *Tiled GPU perf. warning: Backbuffer was not cleared/discarded, doing <run with profiler for info>
     
  3. JohnBaker

    JohnBaker

    Joined:
    Oct 21, 2012
    Posts:
    2
    I have been getting the same repeating warning message since upgrading today. My scene has two cameras. I toggled off warnings in the console, and I have not noticed an effect on performance.
     
  4. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Am seeing the same warning every single frame, not hurting performance in my menu right now. What's going on, any word from Unity?
     
  5. tnaseem

    tnaseem

    Joined:
    Oct 23, 2009
    Posts:
    149
    Add me to the list too. I wasn't sure if it was upgrading to 4.2 that did it, as I was sure it was working earlier today! (upgraded a couple of days ago). Having said that I have been mucking around with my dual camera set up, and scenes management.

    Now, it only seems to happen when an object layer is being used in both cameras. If I remove the layer from one, I don't get these errors. It also only does it when the secondary camera is set to clear "Depth Only" or "Don't Clear".

    Not sure if this sheds any more light on it. Very annoying though...

    Edit: Also, I've noticed it has something to do with the Directional light in my scene. If it's set to light the 'shared' layers, this error pops up. If I remove this layer from the light settings, the warning goes away... Very peculiar.
     
    Last edited: Jul 26, 2013
    lishali12345 likes this.
  6. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Me as well. I have a separate camera set up specifically for rendering first-person weapons, and this warning clogs up my console very quickly. I don't even have any shared layers between cameras - one camera renders all layers EXCEPT for first person, and the other camera ONLY renders first person. But turning off the main directional light disables the error - WTF?
     
  7. gateway69

    gateway69

    Joined:
    Feb 18, 2010
    Posts:
    94
    not sure if this is the issue, we ran into this as well, in the release notes it states:

    Editor: When in mobile graphics emulation mode, the editor will show a warning when RenderTexture usage is not optimal for tile-based or multi-GPU systems.

    fun fun stuff
     
  8. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    I should also say, I did test on my target device (targetting OUYA) and it seems to present absolutely no performance issues, so I would love to turn off the warning as it does not apply to me. Or at least be able to turn off graphics emulation, as it defaults to GLES 2.0 EVERY TIME I open my project.
     
  9. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    How do I debug this? my scene has 12 render textures from the statistics, I already remove all post processing and not creating render texture myself.
     
  10. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    I have already delete everything in the scene except 1 mesh, and it's showing this error
     
  11. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    700
    I'm getting lots of these to, I isolated a model giving these warnings -

    Tiled GPU perf. warning: RenderTexture depth surface (512x512) was not cleared/discarded, doing <run with profiler for info>
    Tiled GPU perf. warning: RenderTexture (512x512) was not cleared/discarded, doing <run with profiler for info>
    Tiled GPU perf. warning: RenderTexture (512x512) was not cleared/discarded, doing <run with profiler for info>

    And looked at the models Shader and Texture, the shader is a Mobile/VetexLit and the texture is a 512 x 512 .png .. Unity Pro, iOS

    All looks fine to me .. anyone know why I would get these warnings with what I think are correct settings ?

    EDIT .. also isolated on a particle effect .. settings - Mobile/Particles/Addictive .. ??
     

    Attached Files:

    Last edited: Jul 28, 2013
  12. Jason-King

    Jason-King

    Joined:
    Oct 28, 2010
    Posts:
    56
    I'm getting this as well. The only way I've been able to prevent it is by making my geometry not cast shadows. I can also resolve by placing all shadow casters into a single layer and cull my dir light to only one layer. What's up with that?
     
  13. danilonishimura

    danilonishimura

    Joined:
    Jul 13, 2010
    Posts:
    70
    It's on What's New (http://unity3d.com/unity/whats-new/unity-4.2)

    Mobile Features:
    Editor: When in mobile graphics emulation mode, editor will show a warning when RenderTexture usage is not optimal for tile-based or multi-GPU systems. Use RenderTexture.MarkRestoreExpected() to suppress the warning if needed.
     
  14. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    It's pretty darn silly that Unity's builtin rendering pipeline generates these warnings. I guess it's because I use more than one camera, one overlays on top of the other? I suppose if they use render textures internally, that might cause the warning, but they should seriously suppress them in that case. There's no way I can get away with NOT using multiple cameras as overlays, it's just not possible, so I'd like to get rid of that warning somehow.
     
  15. unimechanic

    unimechanic

    Joined:
    Jan 9, 2013
    Posts:
    155
    Please submit a bug report and reply here with the bug case number. Don't forget to add a minimal repro project to your report. Thanks!
     
  16. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I'm very grateful for this warning. By listening to it, and dealing with why it happens I was able to gain a solid 10fps (a lot for some devices). I did have a lot of render texture stuff happening.
     
    pea, QuantumRyan and temptest123 like this.
  17. Karsnen_2

    Karsnen_2

    Joined:
    Nov 28, 2011
    Posts:
    89
    @hippocoder : How did you resolve it?

    I just have particle system on my gameobject and I keep getting this as soon as I click on the GameObject in the scene.
     
  18. rbarbosa

    rbarbosa

    Joined:
    Jun 20, 2012
    Posts:
    61
    Well I'm no expert, but a couple of carefully placed calls to YourRenderTexture.DiscardContents() did the trick. In my code, the RenderTextures were mostly used in calls to Graphics.Blit().

    So when I say carefully placed, I mean be wary of whether or not your RT is going to be used again before you clear its contents.

    In my case, I had two temporary RTs.

    They were being used like so:

    Graphics.Blit(SomeSource, tempRT1, SomeMaterial);
    Graphics.Blit(tempRT1, tempRT2, SomeMaterial);

    After this call, some more code was in place followed by this:

    Graphics.Blit(tempRT2, tempRT1, SomeMaterial);

    This call overwrote the contents of tempRT1 (but I hadn't discarded those contents). So anywhere I saw these overwrites about to occur...I preceded the call to Blit() with a call to RT.DiscardContents().

    So the above code became:

    tempRT1.DiscardContents();
    Graphics.Blit(tempRT2, tempRT1, SomeMaterial);

    Then at the end of the method...I made sure to call DiscardContents() on all the temporary RTs and on those that were going out of scope at the end of the method call.

    That eliminated all my warnings and brought my frame rate from 20 FPS to 60 FPS in the editor.

    It should be stated though, that my target platform (the Ouya) did not experience a performance gain from these changes. Also, changing my target platform in the editor to standalone/PC eliminates the warnings and brings the frame rate up to 60 FPS.

    At the end of the day...resolving the warnings in code is far more valuable than suppressing them in the editor. Fix these things...you will be glad you did, and you'll learn a little bit in the process.
     
  19. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    I would if I could. Unfortunately, I cannot, as it appears to be solely a result of using more than one camera, with some of them set to Depth Only clear mode. I understand why, but I simply cannot do it any other way and therefore for me the warning is meaningless/does not apply.

    On a side note, it means I can't even try to suppress the warnings, since I don't have a reference to the render textures being used internally ;)
     
    Last edited: Aug 2, 2013
  20. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Please file a bug report with the scene that triggers it. I think we fixed all the built-in Unity effects that were triggering this issue, but we might have missed some.

    The warning only shows up when you're in mobile graphics emulation mode (so turning off the emulation under Edit -> Graphics Emulation) would get rid of it.
     
  21. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Done that, and indeed it fixes the warning, but whenever I restart Unity it turns mobile emulation back on automagically (because I'm targetting Android, I think).
    I'll see if I can reproduce the multiple camera warning in an empty project.

    EDIT: AHA! I found the problem.

    When I have more than one camera, one is set to Depth Only Clear, and I enable shadows, it gives me this warning. If I turn off shadows, no warning. If I have the Depth Only camera rendering a specific layer, and for all objects on that layer I turn off shadow casting/receiving, the warning also goes away.

    So it's related to shadow casting with more than one camera, apparently. (that is, the underlying camera seems to handle shadow casting fine, but the Depth Only camera generates warnings if any object it renders casts or receives shadows)
     
    Last edited: Aug 2, 2013
    Feelnside and MadMapp like this.
  22. Cannaan

    Cannaan

    Joined:
    Mar 15, 2013
    Posts:
    12
    Seems that this warning comes out when invoking Graphics.blit() with custom shader. Any suggestions?
     
  23. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,259
    According to the Stats, my scene has 4 render textures, but I don't know what that means (what's a render texture?). I'm not explicitly using a render texture. The only texture that's 1024 x 768 is the splash screen, which isn't in the scene. I only have two cameras, one for the scene and one for GUI set to Depth Only. Shadows are off. Each camera only renders one layer, there's no overlap.

    Performance is VERY BAD, down to about 16 fps on iPad 3 (should be around 60). I don't know if it was better before updating to Unity 4.2, as this is a port from a web player version, which has a very high frame rate. Turning off the warnings doesn't make a difference.

    Interesting thing: while running, if I select the main camera in the Hierarchy view, Stats says I have 8 render textures, but if the main camera is not selected, I have 4 render textures.
     
    Last edited: Aug 8, 2013
  24. theHost

    theHost

    Joined:
    Nov 30, 2009
    Posts:
    37
    I get this warning while in mobile emulation mode. I have a single render texture that I am drawing on frequently without clearing it. If I clear it I don't get this warning. If I don't draw on it, I don't get the warning.

    My question to Unity or anyone else is whether this is actually bad in my case? I can't clear the previous contents of the render texture because I need them there.
     
  25. God-at-play

    God-at-play

    Joined:
    Nov 3, 2006
    Posts:
    330
    Eureka! I had this same problem with Android (building for OUYA) and it was quite annoying and stumped me for quite a while. In the Stats I noticed I had 4 RenderTextures, even though I had turned off all my camera post effects (and even removed the components for good measure. I had even removed the 2nd debug camera I had, even though it was disabled anyway.

    But it turns out my camera was (improperly) set to Deferred Lighting. *sigh. I swear I had it set to Forward, but messing with shadows I must have switched it back accidentally.

    So for some of you, that could be all it is.
     
  26. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,259
    My camera is set to Use Player Settings which, according to the Stats, uses 4 render textures. Changing the main camera to Forward gets rid of the render textures and the warning, but drops the frame rate in the Editor significantly, from 225 to around 110 fps. Forward rendering also looks like it's casting shadows (sort of), although shadows are all turned off (Quality is Fast). So, it gets rid of that error, but screws up my frame rate.

    I guess I don't really understand how a rendering path is set. Use Player Settings says it uses the render path set in player settings, but I can find no player setting for the render path. How should I set the render path for best performance on iOS?
     
    sutingwei likes this.
  27. God-at-play

    God-at-play

    Joined:
    Nov 3, 2006
    Posts:
    330
    Yeah, that setting is kind of annoying because you can't find it in a mobile tab. Go to the Standalone tab and you'll see it; it's a shared setting. I wish Unity would put shared settings in every tab so you don't miss them.
     
  28. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Not sure if this will help others, but I found that I was getting this warning due to having my main camera and my GUI (NGUI, specifically) camera in the scene. I manually set the NGUI camera to Vertex Lit. This killed the warning and did boost my FPS by a pretty significant amount. Was actually running an FPS script at the time because I'm working on performance improvement at the moment.

    Anyway, I don't know the technicals of it, but if you're running NGUI, this might be the "solution" for you too.

    EDIT: Worth noting that I'm only seeing that FPS boost in the Editor (using the wiki FPS script). On the iPhone physical hardware, I'm still getting the same performance as previously.
     
    Last edited: Sep 7, 2013
  29. _Max_

    _Max_

    Joined:
    Feb 21, 2013
    Posts:
    160
    Any news from Unity3d team on this, happens to me also when conducting iOS project.
     
  30. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,259
    As far as I've been able to determine, you can no longer set your camera's rendering path to Deferred Lighting for iOS. Setting it to Forward gets rid of the warning, though you may need to adjust your lights a bit to get it to look like it did with Deferred Lighting. You can also use Vertex Lit, but that can change the appearance of your scene dramatically.
     
  31. _Max_

    _Max_

    Joined:
    Feb 21, 2013
    Posts:
    160
    Sorry for the n00b question, I'm struggling to find this setting in Unity, can you guide me through the menu.
     
  32. John-B

    John-B

    Joined:
    Nov 14, 2009
    Posts:
    1,259
    Select a camera in your scene, and then in the Inspector select from the Rendering Path popup.
     
  33. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Im getting this on 4.3, what is the end conclusion/solution? Is this a bug, and how does one optimize the image so the error goes away.
     
  34. davvilla

    davvilla

    Joined:
    Mar 28, 2012
    Posts:
    18
    Might be a bit old but thanks for this. It removed all my warnings and gave me a nice framerate boost!

     
  35. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I set the camera to forward and still get these error messages, it seems to happen more when I pause my game, trying hard find something in the source code. I guess where can I check the shadow options?
     
  36. avatara359

    avatara359

    Joined:
    May 12, 2010
    Posts:
    41
    Setting NGUI camera to vertex lit got rid of the problem for me too. Thanks!

     
  37. nedelkosm

    nedelkosm

    Joined:
    Dec 6, 2013
    Posts:
    10
    Hey guys i had the same error repeating each frame. I noticed i had the same name for a GameObject as a custom Layer so i changed the object's name and all was well. Hope yours is the same case
     
  38. dasu

    dasu

    Joined:
    Apr 26, 2013
    Posts:
    5
    great bro it worked for me thanks a lot
     
  39. dasu

    dasu

    Joined:
    Apr 26, 2013
    Posts:
    5
    great bro it worked for me thanks a lot

     
  40. pietwelve2

    pietwelve2

    Joined:
    Sep 15, 2012
    Posts:
    13
    You're absolutly right Aras about turning off the emulation.
    In my case switching from WaterPro to Simple Water got rid of the warning (keeping on the emulation).
     
  41. Wahooney

    Wahooney

    Joined:
    Mar 8, 2010
    Posts:
    281
    Did you ever post a bug report on this? I'm having the same problem in 4.5 and I'd love to know if this is officially on UT's radar.
     
  42. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    495
    I get rid of the msg by removing all the listener ,fare and GUILayer component from second camera.

    Also set camera depth -1 and 0.
     
  43. retox

    retox

    Joined:
    Sep 12, 2012
    Posts:
    29
    Hi thank goodness for this thread.

    Setting Rendering path of my camera to Forward resolved the issue for me. Was set to 'Use player settings'.

    Much appreciated. ^_^
     
  44. aditya_patel

    aditya_patel

    Joined:
    Jan 20, 2014
    Posts:
    1
    set Rendering Path (Component) of Camera as " Vertax Lit".
     
  45. codeage

    codeage

    Joined:
    Feb 7, 2015
    Posts:
    14
    Yes, same problem here. Had to change render path to forward lighting (Mac OS X).
     
  46. avatara359

    avatara359

    Joined:
    May 12, 2010
    Posts:
    41
    I was getting this error: Tiled GPU perf. warning: RenderTexture color surface (954x596) was not cleared/discarded, doing Render.OpaqueGeometry/RenderForwardOpaque.Render/MeshRenderer.Render

    I finally figured out that one of my render textures didn't have a camera that was set to "Solid Color", it was on "Depth Only". Apparently every render texture needs at least one camera with the SolidColor flag. The Skybox flag might work too.
     
  47. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,117
    Sorry to resurrect this, but can you explain why it happens? What does this warning even mean?
    How can I prevent it from happening?
     
  48. dos911

    dos911

    Joined:
    Oct 14, 2012
    Posts:
    1
    I solved the problem using Directional light's Culling Mask. Just don't let it shadow everything. Hope it will help anyone have same problem.

    and also try this
    if you have 3 cameras, Depth -1 to Solid color, Depth 0 to Dont clear, Depth 1 to Depth only.
     
    Last edited: Dec 29, 2015
  49. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    I tried the above but still getting this error with Unity 5.3.3p3
    I have multiple cameras in scene with Clear Flags: Skybox.
    The issue is linked to one camera that contains a Glow effect script and shader.

    Code (CSharp):
    1. Tiled GPU perf. warning: RenderTexture color surface  (243x137) was not cleared/discarded, doing <run with profiler for info>
    2. UnityEngine.Graphics:BlitMultiTap(Texture, RenderTexture, Material, Vector2[])
    3. GlowEffect:FourTapCone(RenderTexture, RenderTexture, Int32)
    4.  
    5. (at Assets/Plugins/GlowEffect.cs:168)
    6. GlowEffect:OnRenderImage(RenderTexture, RenderTexture) (at Assets/Plugins/GlowEffect.cs:207)
    Any ideas?
     
  50. mulagraphics

    mulagraphics

    Joined:
    Apr 8, 2017
    Posts:
    2
    Fix................... Edit -> Graphic Emulation -> No Emulation
     
    WoodcockCreative and Aslan85 like this.