diff options
author | Liang Qi <liang.qi@qt.io> | 2016-11-26 12:53:14 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-11-28 12:24:13 +0100 |
commit | 9044800083ccffe4d0b732f8b3b60512f32d8f8a (patch) | |
tree | cdd6d2038d53e99a5a9326be6b47a68553830480 /src/plugins/scenegraph/d3d12 | |
parent | 8bf579d8d4feb13ca8651e98dd762b28483abe9e (diff) | |
parent | cc1c3d0e2be6dfea6befebdc5f25e519e3fe79b2 (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
The renderers added in 5.8 had to be adapted to the changed profiling
macros from 5.6.
Conflicts:
src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp
src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp
src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp
src/quick/scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp
src/quick/util/qquickprofiler_p.h
tests/auto/qml/qjsengine/tst_qjsengine.cpp
tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp
Change-Id: Icb370b7c95aab12589ad73881ac6d178759a5c6b
Diffstat (limited to 'src/plugins/scenegraph/d3d12')
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp | 12 | ||||
-rw-r--r-- | src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp | 24 |
2 files changed, 24 insertions, 12 deletions
diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp index c53a1fa6c1..60b76deb2e 100644 --- a/src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12renderloop.cpp @@ -421,7 +421,8 @@ void QSGD3D12RenderLoop::renderWindow(QQuickWindow *window) if (profileFrames) polishTime = renderTimer.nsecsElapsed(); Q_QUICK_SG_PROFILE_SWITCH(QQuickProfiler::SceneGraphPolishFrame, - QQuickProfiler::SceneGraphRenderLoopFrame); + QQuickProfiler::SceneGraphRenderLoopFrame, + QQuickProfiler::SceneGraphPolishPolish); emit window->afterAnimating(); @@ -463,13 +464,15 @@ void QSGD3D12RenderLoop::renderWindow(QQuickWindow *window) if (profileFrames) syncTime = renderTimer.nsecsElapsed(); - Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphRenderLoopFrame); + Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphRenderLoopFrame, + QQuickProfiler::SceneGraphRenderLoopSync); wd->renderSceneGraph(window->size()); if (profileFrames) renderTime = renderTimer.nsecsElapsed(); - Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphRenderLoopFrame); + Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphRenderLoopFrame, + QQuickProfiler::SceneGraphRenderLoopRender); if (!data.grabOnly) { // The engine is able to have multiple frames in flight. This in effect is @@ -496,7 +499,8 @@ void QSGD3D12RenderLoop::renderWindow(QQuickWindow *window) qint64 swapTime = 0; if (profileFrames) swapTime = renderTimer.nsecsElapsed(); - Q_QUICK_SG_PROFILE_END(QQuickProfiler::SceneGraphRenderLoopFrame); + Q_QUICK_SG_PROFILE_END(QQuickProfiler::SceneGraphRenderLoopFrame, + QQuickProfiler::SceneGraphRenderLoopSwap); if (Q_UNLIKELY(debug_time())) { static QTime lastFrameTime = QTime::currentTime(); diff --git a/src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp b/src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp index a803f67380..317471eeec 100644 --- a/src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp +++ b/src/plugins/scenegraph/d3d12/qsgd3d12threadedrenderloop.cpp @@ -597,7 +597,8 @@ void QSGD3D12RenderThread::syncAndRender() if (Q_UNLIKELY(debug_time())) syncTime = threadTimer.nsecsElapsed(); #endif - Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphRenderLoopFrame); + Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphRenderLoopFrame, + QQuickProfiler::SceneGraphRenderLoopSync); if (!syncResultedInChanges && !repaintRequested) { if (Q_UNLIKELY(debug_loop())) @@ -632,7 +633,8 @@ void QSGD3D12RenderThread::syncAndRender() wd->renderSceneGraph(engine->windowSize()); if (Q_UNLIKELY(debug_time())) renderTime = threadTimer.nsecsElapsed(); - Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphRenderLoopFrame); + Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphRenderLoopFrame, + QQuickProfiler::SceneGraphRenderLoopRender); // The engine is able to have multiple frames in flight. This in effect is // similar to BufferQueueingOpenGL. Provide an env var to force the @@ -649,7 +651,8 @@ void QSGD3D12RenderThread::syncAndRender() // blockOnEachFrame is not used, but emit it for compatibility. wd->fireFrameSwapped(); } else { - Q_QUICK_SG_PROFILE_SKIP(QQuickProfiler::SceneGraphRenderLoopFrame, 1); + Q_QUICK_SG_PROFILE_SKIP(QQuickProfiler::SceneGraphRenderLoopFrame, + QQuickProfiler::SceneGraphRenderLoopSync, 1); if (Q_UNLIKELY(debug_loop())) qDebug("RT - window not ready, skipping render"); } @@ -671,7 +674,8 @@ void QSGD3D12RenderThread::syncAndRender() int((renderTime - syncTime) / 1000000), int(threadTimer.elapsed() - renderTime / 1000000)); - Q_QUICK_SG_PROFILE_END(QQuickProfiler::SceneGraphRenderLoopFrame); + Q_QUICK_SG_PROFILE_END(QQuickProfiler::SceneGraphRenderLoopFrame, + QQuickProfiler::SceneGraphRenderLoopSwap); static int devLossTest = qEnvironmentVariableIntValue("QT_D3D_TEST_DEVICE_LOSS"); if (devLossTest > 0) { @@ -1127,7 +1131,8 @@ void QSGD3D12ThreadedRenderLoop::polishAndSync(WindowData *w, bool inExpose) if (Q_UNLIKELY(debug_time())) polishTime = timer.nsecsElapsed(); - Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphPolishAndSync); + Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphPolishAndSync, + QQuickProfiler::SceneGraphPolishAndSyncPolish); w->updateDuringSync = false; @@ -1144,7 +1149,8 @@ void QSGD3D12ThreadedRenderLoop::polishAndSync(WindowData *w, bool inExpose) qDebug("polishAndSync - wait for sync"); if (Q_UNLIKELY(debug_time())) waitTime = timer.nsecsElapsed(); - Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphPolishAndSync); + Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphPolishAndSync, + QQuickProfiler::SceneGraphPolishAndSyncWait); w->thread->waitCondition.wait(&w->thread->mutex); lockedForSync = false; w->thread->mutex.unlock(); @@ -1153,7 +1159,8 @@ void QSGD3D12ThreadedRenderLoop::polishAndSync(WindowData *w, bool inExpose) if (Q_UNLIKELY(debug_time())) syncTime = timer.nsecsElapsed(); - Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphPolishAndSync); + Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphPolishAndSync, + QQuickProfiler::SceneGraphPolishAndSyncSync); if (!animationTimer && anim->isRunning()) { if (Q_UNLIKELY(debug_loop())) @@ -1175,7 +1182,8 @@ void QSGD3D12ThreadedRenderLoop::polishAndSync(WindowData *w, bool inExpose) << ", animations=" << (timer.nsecsElapsed() - syncTime) / 1000000 << " - (on gui thread) " << window; - Q_QUICK_SG_PROFILE_END(QQuickProfiler::SceneGraphPolishAndSync); + Q_QUICK_SG_PROFILE_END(QQuickProfiler::SceneGraphPolishAndSync, + QQuickProfiler::SceneGraphPolishAndSyncAnimations); } #include "qsgd3d12threadedrenderloop.moc" |