Really release pool resources in Renderer::releaseCachedResources

resize(0) only sets the size and doesn't deallocate anything.
Conversely, shrink(0), which was used before it was changed
to resize(0) doesn't change the size and only deallocates.
Use a mix of both for now.

Pick-to: 6.5
Change-Id: I3e36a766ef7483158a5a300351b0d7864d24e184
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Mårten Nordheim 2023-04-25 16:53:53 +02:00
parent 2e6403f8bf
commit e061d654ea
1 changed files with 4 additions and 2 deletions

View File

@ -960,8 +960,10 @@ void Renderer::releaseCachedResources()
m_rhi->releaseCachedResources();
m_vertexUploadPool.resize(0);
m_indexUploadPool.resize(0);
m_vertexUploadPool.shrink(0);
m_vertexUploadPool.reset();
m_indexUploadPool.shrink(0);
m_indexUploadPool.reset();
}
void Renderer::invalidateAndRecycleBatch(Batch *b)