Avoid using GLX Pbuffers on Catalyst
Trigger QOffscreenSurface's fallback mode (hidden QWindow and a regular window surface) instead. queryDummyContext() already works like this but the same must be done for any QOffscreenSurface. Task-number: QTBUG-36900 Change-Id: I64176ac6704e9d6ed768fa3d456c40c8818be6dc Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
parent
1e413e01e0
commit
3c50119625
@ -253,7 +253,18 @@ QPlatformBackingStore *QXcbIntegration::createPlatformBackingStore(QWindow *wind
|
||||
QPlatformOffscreenSurface *QXcbIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const
|
||||
{
|
||||
#if defined(XCB_USE_GLX)
|
||||
return new QGLXPbuffer(surface);
|
||||
static bool vendorChecked = false;
|
||||
static bool glxPbufferUsable = true;
|
||||
if (!vendorChecked) {
|
||||
vendorChecked = true;
|
||||
const char *glxvendor = glXGetClientString(glXGetCurrentDisplay(), GLX_VENDOR);
|
||||
if (glxvendor && !strcmp(glxvendor, "ATI"))
|
||||
glxPbufferUsable = false;
|
||||
}
|
||||
if (glxPbufferUsable)
|
||||
return new QGLXPbuffer(surface);
|
||||
else
|
||||
return 0; // trigger fallback to hidden QWindow
|
||||
#elif defined(XCB_USE_EGL)
|
||||
QXcbScreen *screen = static_cast<QXcbScreen *>(surface->screen()->handle());
|
||||
return new QEGLPbuffer(screen->connection()->egl_display(), surface->requestedFormat(), surface);
|
||||
|
Loading…
x
Reference in New Issue
Block a user