“Unexpected” Allocations
VRAM Memory Pool
- [Applicable for platforms Traveo, Traveo II, RH850]
- Why in the VRAM 4 buffers are allocated for render buffers of a single Render Target?
- What happens:
- During a transition first scene is unloaded, next scene is loaded
- In case of startup, the first scene is the only one existing
- Default Behavior of Courier:
- when the last View on a Render Target is unloaded, the Render Target is also unloaded
- when the last View on a Render Target is unloaded, the Render Target is also unloaded
- The VramAllocator does never immediately free the memory, because the GPU might still write to it (Note: GPU runs
- asynchronously to the CPU)
- -> New 2 buffers are allocated when the second scene is loaded
- During a transition first scene is unloaded, next scene is loaded
- How to fix it?
- Send on startup a ViewPlaceholderReqMsg
- increases the reference counter on Render target.
- The message has two parameters
- ViewId: this is a "reference" view which is used to determine the render target object
- Load: true means to increase the reference count, false would decrease it (removes this placeholder from the internal list)
- increases the reference counter on Render target.
- Alternatively, you can also use a dummy scene with just a camera
- This view would be always active and never unloaded.
- This view would be always active and never unloaded.
Asset Cache
- From the Memory Pool Analysis Sheet:
16384
C:\CGI-Studio_3.10\cgi_studio_candera\src\CanderaAssetLoader\AssetLoaderBase\AssetCache.cpp(38)
- -> This is the cache used by the Asset Loader when copying images from flash to RAM
- Most or all images are directly rendered from flash
- The cache size is best practice for many platforms, but not when flash is directly accessible!
- -> Proposal: If flash is directly accessible, reduce the cache
- E.g., to 1 kB (you win 15 kB!)
- E.g., to 1 kB (you win 15 kB!)
- CMake flag CANDERA_ASSET_CACHE_SIZE