eglfs: Detect llvmpipe and show a warning
Do ourselves and our users a favor by pointing out why Qt (Quick) apps perform horribly on commonly used distros on the RPi. Using a software rasterizer on such boards is not going to cut it. Task-number: QTBUG-50533 Change-Id: I087f502ddb9c6bdde84343e6abd85c87cdc474f0 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
This commit is contained in:
parent
205987750d
commit
7edd488a5f
@ -275,6 +275,12 @@ void QEGLPlatformContext::destroyTemporaryOffscreenSurface(EGLSurface surface)
|
||||
eglDestroySurface(m_eglDisplay, surface);
|
||||
}
|
||||
|
||||
void QEGLPlatformContext::runGLChecks()
|
||||
{
|
||||
// Nothing to do here, subclasses may override in order to perform OpenGL
|
||||
// queries needing a context.
|
||||
}
|
||||
|
||||
void QEGLPlatformContext::updateFormatFromGL()
|
||||
{
|
||||
#ifndef QT_NO_OPENGL
|
||||
@ -346,6 +352,7 @@ void QEGLPlatformContext::updateFormatFromGL()
|
||||
}
|
||||
}
|
||||
}
|
||||
runGLChecks();
|
||||
eglMakeCurrent(prevDisplay, prevSurfaceDraw, prevSurfaceRead, prevContext);
|
||||
} else {
|
||||
qWarning("QEGLPlatformContext: Failed to make temporary surface current, format not updated (%x)", eglGetError());
|
||||
|
@ -84,6 +84,7 @@ protected:
|
||||
virtual EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) = 0;
|
||||
virtual EGLSurface createTemporaryOffscreenSurface();
|
||||
virtual void destroyTemporaryOffscreenSurface(EGLSurface surface);
|
||||
virtual void runGLChecks();
|
||||
|
||||
private:
|
||||
void init(const QSurfaceFormat &format, QPlatformOpenGLContext *share);
|
||||
|
@ -85,6 +85,16 @@ void QEglFSContext::destroyTemporaryOffscreenSurface(EGLSurface surface)
|
||||
}
|
||||
}
|
||||
|
||||
void QEglFSContext::runGLChecks()
|
||||
{
|
||||
// Note that even though there is an EGL context current here,
|
||||
// QOpenGLContext and QOpenGLFunctions are not yet usable at this stage.
|
||||
const char *renderer = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
|
||||
// Be nice and warn about a common source of confusion.
|
||||
if (renderer && strstr(renderer, "llvmpipe"))
|
||||
qWarning("Running on a software rasterizer (LLVMpipe), expect limited performance.");
|
||||
}
|
||||
|
||||
void QEglFSContext::swapBuffers(QPlatformSurface *surface)
|
||||
{
|
||||
// draw the cursor
|
||||
|
@ -48,6 +48,7 @@ public:
|
||||
EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) Q_DECL_OVERRIDE;
|
||||
EGLSurface createTemporaryOffscreenSurface() Q_DECL_OVERRIDE;
|
||||
void destroyTemporaryOffscreenSurface(EGLSurface surface) Q_DECL_OVERRIDE;
|
||||
void runGLChecks() Q_DECL_OVERRIDE;
|
||||
void swapBuffers(QPlatformSurface *surface) Q_DECL_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user