Search Unity

  1. Unity 2020.2 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Render pipeline memory allocation and caching

Discussion in 'Graphics Experimental Previews' started by adbourdages, Nov 28, 2018.

  1. adbourdages

    adbourdages

    Joined:
    Jul 8, 2012
    Posts:
    55
    I've been testing a super simple 2D render pipeline and in itself it saves about 5% processing time over the standard camera processing. However, I've recently noticed that every call to CullResults.Cull allocates 96B of memory, which is not great (this is with v3.0.0). Then creating the clear depth command buffer adds another 48B.

    It would be nice to be able to:
    - do custom culling or cache culling results (It is a 2d game with a very structured object setup so we already know which object are on screen and it doesn't change very often) ...
    - cache CommandBuffers (like the clear depth buffer, it never changes between frames)

    Cheers,
    Alain-Daniel
     
  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,160
    In the latest versions we do no allocate anything on the cull call :) It can still be a good idea to cache non changing command buffers.
     
unityunity