From c7dcb02e6a1c8fe4cc4a24cbe2c1b6d2663ee3d9 Mon Sep 17 00:00:00 2001 From: Paul Lemire Date: Wed, 25 Jun 2014 16:08:30 +0200 Subject: Rendering using QFrameAllocator Renderer contains a QThreadStorage object containing a vector of QFrameAllocator. Each Renderview Jobs calls the Renderer to retrieve the QFrameAllocator for their thread and their frame index (between 0 and the maximum number of cached frames). If the QThreadStorage hasn't been initialized, it is initialized, otherwise the QFrameAllocator is returned directly. The QFrameAllocator is automatically cleared if the previous call wasn't for the same frame index. QUniformValues and RenderViews have been updated to used QFrameAllocator to allocate objects instead of using new. RenderQueue has been slightly modified. It is now possible to retrieve the RenderQueue to render without popping it out of the QCircularBuffer of RenderQueues. A call to popFrameQueue does that. This is needed to be sure that we won't be rendering a RenderQueue that could have been cleared because the backend is rebuilding a newer frame. This forces the Renderer to render the whole frame before allowing the Jobs to build other frames if there are more than the maximum amount of cached frames. Change-Id: Ie7718e201e2f6b420903092d1706277e9786916e Reviewed-by: Sean Harmer --- src/render/renderlogging.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/render/renderlogging.cpp') diff --git a/src/render/renderlogging.cpp b/src/render/renderlogging.cpp index c17c011ad..57a3b46be 100644 --- a/src/render/renderlogging.cpp +++ b/src/render/renderlogging.cpp @@ -54,6 +54,7 @@ Q_LOGGING_CATEGORY(Jobs, "Qt3D.Render.Jobs") Q_LOGGING_CATEGORY(Framegraph, "Qt3D.Render.Framegraph") Q_LOGGING_CATEGORY(RenderNodes, "Qt3D.Render.RenderNodes") Q_LOGGING_CATEGORY(Rendering, "Qt3D.Render.Rendering") +Q_LOGGING_CATEGORY(Memory, "Qt3D.Render.Memory") } // Render -- cgit v1.2.3