Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/x11/standalone/glxbackend.cpp
Context not available. | |||||
431 | 0 | 431 | 0 | ||
---|---|---|---|---|---|
432 | }; | 432 | }; | ||
433 | 433 | | |||
434 | bool llvmpipe = false; | ||||
435 | | ||||
436 | // Note that we cannot use GLPlatform::driver() here, because it has not been initialized at this point | ||||
437 | if (hasExtension(QByteArrayLiteral("GLX_MESA_query_renderer"))) { | ||||
438 | const QByteArray device = glXQueryRendererStringMESA(display(), DefaultScreen(display()), 0, GLX_RENDERER_DEVICE_ID_MESA); | ||||
439 | if (device.contains(QByteArrayLiteral("llvmpipe"))) { | ||||
440 | llvmpipe = true; | ||||
441 | } | ||||
442 | } | ||||
443 | | ||||
434 | // Try to find a double buffered sRGB capable configuration | 444 | // Try to find a double buffered sRGB capable configuration | ||
435 | int count = 0; | 445 | int count = 0; | ||
436 | GLXFBConfig *configs = glXChooseFBConfig(display(), DefaultScreen(display()), attribs_srgb, &count); | 446 | GLXFBConfig *configs = nullptr; | ||
447 | | ||||
448 | // Don't request an sRGB configuration with LLVMpipe when the default depth is 16. See bug #408594. | ||||
449 | if (!llvmpipe || Xcb::defaultDepth() > 16) { | ||||
450 | configs = glXChooseFBConfig(display(), DefaultScreen(display()), attribs_srgb, &count); | ||||
451 | } | ||||
437 | 452 | | |||
438 | if (count == 0) { | 453 | if (count == 0) { | ||
439 | // Try to find a double buffered non-sRGB capable configuration | 454 | // Try to find a double buffered non-sRGB capable configuration | ||
Context not available. |