summaryrefslogtreecommitdiffstats
path: root/src/render/renderlogging.cpp
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2014-06-25 16:08:30 +0200
committerSean Harmer <sean.harmer@kdab.com>2014-07-03 00:10:31 +0200
commitc7dcb02e6a1c8fe4cc4a24cbe2c1b6d2663ee3d9 (patch)
treef118fa5440e5a384b89c45a143a4fa3eb451e2bf /src/render/renderlogging.cpp
parent6f7a5c92e2a989eb7207f4d2e5a66fb431b9f538 (diff)
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 <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/renderlogging.cpp')
-rw-r--r--src/render/renderlogging.cpp1
1 files changed, 1 insertions, 0 deletions
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