This message shows up when lots of textures (and/or big textures) are being loaded and the memory pool is being overwhelmed. Probably from a call to either waitForStreamingCompletion or TextureGpu->waitForData (explicit or implicit: a Low level material in a compositor pass may be forcing a wait call. There's
a recent commit where we fixed a potential bug caused in low level materials used by a compositor which references a texture in disk... it must call waitForData which is forced in TextureUnitState::ensureLoaded
)
If you're loading lots of textures, then this is normal, use TextureGpuManager::dumpMemoryUsage to see if you see if the textures being loaded that shouldn't.
You can also see MemoryGameState::setRelaxedMemoryBudget and setTightMemoryBudget from Samples/2.0/Tutorials/Tutorial_Memory/Tutorial_MemoryGameState.cpp which lets you trade off allocating more memory for streaming in exchange for fewer stalls.
The best solution, after looking at the contents of dumpMemoryUsage and identifying the big textures, you may want to:
- Create workspace as late as possible, to give time for streaming without stalls (not recommended, it's hard to get this right)
- Create workspace as early as possible, before the big textures get loaded (recommended)
- Identify which textures are blocking inside workspace creation e.g. place a breakpoint in the blocking call from OgreCompositorPassQuad.cpp, and force-load them by scheduling them to resident them as early as possible (extremely recommended)
UPDATE: To clarify on the problem. If you do:
Code: Select all
smallTexture->scheduleTransitionTo( GpuResidency::Resident );
bigTexture->scheduleTransitionTo( GpuResidency::Resident );
smallTexture->waitForData();
Then it becomes extremely likely that 'bigTexture' will delay smallTexture's waitForData. If you have loaded lots of big textures between smallTexture->scheduleTransitionTo and smallTexture->waitForData, then stalls likely going to happen.
However if you do:
Code: Select all
smallTexture->scheduleTransitionTo( GpuResidency::Resident );
smallTexture->waitForData();
bigTexture->scheduleTransitionTo( GpuResidency::Resident );
bigTexture2->scheduleTransitionTo( GpuResidency::Resident );
bigTexture3->scheduleTransitionTo( GpuResidency::Resident );
...
Then smallTexture->waitForData will return very fast, while the rest of the big textures will keep streaming in the background.
That's why it's important in determining which textures are blocking, identify them, and load them first; so their blocking gets as minimal as possible, instead of being mixed up with big textures that can easily stream in the background