From 545e8122a748dab4a857a35f59a09b73b728eb45 Mon Sep 17 00:00:00 2001 From: Rafael Roquetto Date: Thu, 28 Jul 2022 11:11:15 +1000 Subject: [PATCH] Fix QtOpenGL tracepoints Make use of supported types only. As such, QOpenGL2PaintEngineExPrivate_drawTexture_entry has to be adjusted so that it does not exceed the maximum number of supported parameters by LTTNG, and thus the 'pattern' argument had to be dropped. Change-Id: I8d1c1dea7de82063926502d77dde1063b2096b73 Reviewed-by: Shawn Rutledge --- src/opengl/qopenglpaintengine.cpp | 11 ++++++++++- src/opengl/qopengltexturecache.cpp | 2 +- src/opengl/qtopengl.tracepoints | 6 +++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/opengl/qopenglpaintengine.cpp b/src/opengl/qopenglpaintengine.cpp index 2556881e12..451b808101 100644 --- a/src/opengl/qopenglpaintengine.cpp +++ b/src/opengl/qopenglpaintengine.cpp @@ -608,7 +608,16 @@ static inline void setCoords(GLfloat *coords, const QOpenGLRect &rect) void QOpenGL2PaintEngineExPrivate::drawTexture(const QOpenGLRect& dest, const QOpenGLRect& src, const QSize &textureSize, bool opaque, bool pattern) { - Q_TRACE_SCOPE(QOpenGL2PaintEngineExPrivate_drawTexture, dest, src, textureSize, opaque, pattern); + Q_TRACE_SCOPE(QOpenGL2PaintEngineExPrivate_drawTexture, + dest.left, + dest.top, + dest.right, + dest.bottom, + src.left, + src.top, + src.right, + src.bottom, + textureSize, opaque); // Setup for texture drawing currentBrush = noBrush; diff --git a/src/opengl/qopengltexturecache.cpp b/src/opengl/qopengltexturecache.cpp index f2b7565316..6d706325a5 100644 --- a/src/opengl/qopengltexturecache.cpp +++ b/src/opengl/qopengltexturecache.cpp @@ -123,7 +123,7 @@ GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, const QImage &i GLuint QOpenGLTextureCache::bindTexture(QOpenGLContext *context, qint64 key, const QImage &image, QOpenGLTextureUploader::BindOptions options) { - Q_TRACE_SCOPE(QOpenGLTextureCache_bindTexture, context, key, image, options); + Q_TRACE_SCOPE(QOpenGLTextureCache_bindTexture, context, key, image.bits(), options); GLuint id; QOpenGLFunctions *funcs = context->functions(); diff --git a/src/opengl/qtopengl.tracepoints b/src/opengl/qtopengl.tracepoints index 1602f572d4..d609e7c9ba 100644 --- a/src/opengl/qtopengl.tracepoints +++ b/src/opengl/qtopengl.tracepoints @@ -4,9 +4,9 @@ #include } -QOpenGLFramebufferObjectPrivate_init_entry(QOpenGLFramebufferObject *qfbo, const QSize &size, QOpenGLFramebufferObject::Attachment attachment, GLenum texture_target, GLenum internal_format, GLint samples, bool mipmap) +QOpenGLFramebufferObjectPrivate_init_entry(QOpenGLFramebufferObject *qfbo, const QSize &size, int attachment, int texture_target, int internal_format, int samples, bool mipmap) QOpenGLFramebufferObjectPrivate_init_exit() -QOpenGL2PaintEngineExPrivate_drawTexture_entry(const QOpenGLRect& dest, const QOpenGLRect& src, const QSize &textureSize, bool opaque, bool pattern) +QOpenGL2PaintEngineExPrivate_drawTexture_entry(float dl, float dt, float dr, float db, float sl, float st, float sr, float sb, const QSize &textureSize, bool opaque) QOpenGL2PaintEngineExPrivate_drawTexture_exit() -QOpenGLTextureCache_bindTexture_entry(QOpenGLContext *context, qint64 key, const QImage &image, QOpenGLTextureUploader::BindOptions options) +QOpenGLTextureCache_bindTexture_entry(QOpenGLContext *context, qint64 key, const unsigned char *image, int options) QOpenGLTextureCache_bindTexture_exit()