aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-06-17 16:27:12 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-06-18 12:18:53 +0200
commit58ed7422f550d32b5ace9edc7a4887727f53493a (patch)
tree02d92822097b91b4c8d1105d046838ff11d54a86 /src/quick/scenegraph
parentf4b1e41748adcb9189edf56545bbc2cde7138d9e (diff)
Remove broken profiler/trace points in the scenegraph
As the todo note says: this profiling is all wrong Not reporting something is better than reporting something bogus. The other profiling points, f.ex. in the render loops, seem to work as expected and give reasonable results in the QML Profiler view in Creator. The autotest needs fixing because there is no SGContextFrame events left with the rhi code path either atm, just like with the software backend. Change-Id: Iee2d3feb586108db50c83c6c03ea415384561ede Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp22
-rw-r--r--src/quick/scenegraph/util/qsgrhiatlastexture.cpp34
2 files changed, 1 insertions, 55 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index 23469ddcdf..e1507ce6a7 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -49,13 +49,10 @@
#include <QtGui/QGuiApplication>
#include <private/qnumeric_p.h>
-#include <private/qquickprofiler_p.h>
#include "qsgmaterialshader_p.h"
#include "qsgrhivisualizer_p.h"
-#include <qtquick_tracepoints_p.h>
-
#include <algorithm>
QT_BEGIN_NAMESPACE
@@ -251,11 +248,6 @@ ShaderManager::Shader *ShaderManager::prepareMaterial(QSGMaterial *material,
if (shader)
return shader;
- Q_TRACE_SCOPE(QSG_prepareMaterial);
- if (QSG_LOG_TIME_COMPILATION().isDebugEnabled())
- qsg_renderer_timer.start();
- Q_QUICK_SG_PROFILE_START(QQuickProfiler::SceneGraphContextFrame);
-
shader = new Shader;
QSGMaterialShader *s = static_cast<QSGMaterialShader *>(material->createShader(renderMode));
context->initializeRhiShader(s, QShader::BatchableVertexShader);
@@ -269,11 +261,6 @@ ShaderManager::Shader *ShaderManager::prepareMaterial(QSGMaterial *material,
shader->lastOpacity = 0;
- qCDebug(QSG_LOG_TIME_COMPILATION, "material shaders prepared in %dms", (int) qsg_renderer_timer.elapsed());
-
- Q_QUICK_SG_PROFILE_END(QQuickProfiler::SceneGraphContextFrame,
- QQuickProfiler::SceneGraphContextMaterialCompile);
-
rewrittenShaders[key] = shader;
return shader;
}
@@ -289,11 +276,6 @@ ShaderManager::Shader *ShaderManager::prepareMaterialNoRewrite(QSGMaterial *mate
if (shader)
return shader;
- Q_TRACE_SCOPE(QSG_prepareMaterial);
- if (QSG_LOG_TIME_COMPILATION().isDebugEnabled())
- qsg_renderer_timer.start();
- Q_QUICK_SG_PROFILE_START(QQuickProfiler::SceneGraphContextFrame);
-
shader = new Shader;
QSGMaterialShader *s = static_cast<QSGMaterialShader *>(material->createShader(renderMode));
context->initializeRhiShader(s, QShader::StandardShader);
@@ -309,10 +291,6 @@ ShaderManager::Shader *ShaderManager::prepareMaterialNoRewrite(QSGMaterial *mate
stockShaders[key] = shader;
- qCDebug(QSG_LOG_TIME_COMPILATION, "shader compiled in %dms (no rewrite)", (int) qsg_renderer_timer.elapsed());
-
- Q_QUICK_SG_PROFILE_END(QQuickProfiler::SceneGraphContextFrame,
- QQuickProfiler::SceneGraphContextMaterialCompile);
return shader;
}
diff --git a/src/quick/scenegraph/util/qsgrhiatlastexture.cpp b/src/quick/scenegraph/util/qsgrhiatlastexture.cpp
index ce697a13fc..82aa680faf 100644
--- a/src/quick/scenegraph/util/qsgrhiatlastexture.cpp
+++ b/src/quick/scenegraph/util/qsgrhiatlastexture.cpp
@@ -46,19 +46,11 @@
#include <QtGui/QWindow>
#include <private/qqmlglobal_p.h>
-#include <private/qquickprofiler_p.h>
#include <private/qsgdefaultrendercontext_p.h>
#include <private/qsgtexture_p.h>
#include <private/qsgcompressedtexture_p.h>
#include <private/qsgcompressedatlastexture_p.h>
-#include <qtquick_tracepoints_p.h>
-
-#if 0
-#include <private/qsgcompressedtexture_p.h>
-#include <private/qsgcompressedatlastexture_p.h>
-#endif
-
QT_BEGIN_NAMESPACE
int qt_sg_envInt(const char *name, int defaultValue);
@@ -183,33 +175,9 @@ void AtlasBase::commitTextureOperations(QRhiResourceUpdateBatch *resourceUpdates
}
}
- for (TextureBase *t : m_pending_uploads) {
- // ### this profiling is all wrong, the real work is done elsewhere
- bool profileFrames = QSG_LOG_TIME_TEXTURE().isDebugEnabled();
- if (profileFrames)
- qsg_renderer_timer.start();
-
- Q_TRACE_SCOPE(QSG_texture_prepare);
- Q_QUICK_SG_PROFILE_START(QQuickProfiler::SceneGraphTexturePrepare);
-
- // Skip bind, convert, swizzle; they're irrelevant
- Q_QUICK_SG_PROFILE_SKIP(QQuickProfiler::SceneGraphTexturePrepare,
- QQuickProfiler::SceneGraphTexturePrepareStart, 3);
- Q_TRACE(QSG_texture_upload_entry);
-
+ for (TextureBase *t : m_pending_uploads)
enqueueTextureUpload(t, resourceUpdates);
- Q_TRACE(QSG_texture_upload_exit);
- Q_QUICK_SG_PROFILE_RECORD(QQuickProfiler::SceneGraphTexturePrepare,
- QQuickProfiler::SceneGraphTexturePrepareUpload);
-
- // Skip mipmap; unused
- Q_QUICK_SG_PROFILE_SKIP(QQuickProfiler::SceneGraphTexturePrepare,
- QQuickProfiler::SceneGraphTexturePrepareUpload, 1);
- Q_QUICK_SG_PROFILE_REPORT(QQuickProfiler::SceneGraphTexturePrepare,
- QQuickProfiler::SceneGraphTexturePrepareMipmap);
- }
-
m_pending_uploads.clear();
}