Commit graph

6 commits

Author SHA1 Message Date
Martin Gräßlin
388edab9e5 Add support for OpenGL in VirtualBox
OpenGL is properly working if there is a direct rendering context.
If LIBGL_ALWAYS_INDIRECT is set VirtualBox falls back to Mesa's software
rasterizer. So in order to get OpenGL the driver is now whitelisted in
the opengltest.

GLPlatform is extended to recognize the VirtualBox driver and has new
methods to report whether it is a virtual machine and VirtualBox. The
detection is rather limited as we don't get access to the underlying
hardware, so we do not know whether the features are really supported.
We need to trust the driver here in announcing the right extensions.

The driver does not provide glxQueryDrawable although it is part of
GLX 1.3. A hack is added in the glxbackend to set the function pointer to
NULL. This can unfortunately not be done in glxResolveFunctions() as
QueryDrawable seems not to be provided by an extension (at least not
listed in the OpenGL registry) and getProcAddress resolves a function but
it only prints an OpenGL Warning to stderr.

As a note: the driver reports that it is using XSHM for
GLX_EXT_texture_from_pixmap.

REVIEW: 106821
2012-10-25 11:27:28 +02:00
Jammy Zhou
26430f1d60 Whitelist AMD Catalyst for kwin direct rendering
BUG: 301103
FIXED-IN: 4.10
REVIEW: 106050
2012-08-22 20:35:05 +02:00
Martin Gräßlin
067ca63239 Enable direct rendering for all Mesa drivers
As KWin requires at least Mesa 7.10 for OpenGL we can be sure
that all Mesa drivers support DRI2 and can enable direct rendering
for it.

Parsing the version string to identify if it is a mesa driver.
This can cause breakage again in future versions of Mesa.
Unfortunately version, vendor and renderer are the only information
queryable just with OpenGL API.
BUG: 270942
FIXED-IN: 4.7.0
2011-05-01 11:52:19 +02:00
Fredrik Höglund
abdd055665 Allow direct rendering with GLX versions older than 1.3 if the GLX
extensions list includes "GLX_EXT_texture_from_pixmap".

BUG: 240956

svn path=/trunk/KDE/kdebase/workspace/; revision=1137668
2010-06-13 23:05:37 +00:00
Fredrik Höglund
07a26a2569 Allow direct rendering with drivers that have "GEM" or "Gallium" in their
GL_RENDERER strings.

Possible fix for bug 239890.
CCBUG: 239890

svn path=/trunk/KDE/kdebase/workspace/; revision=1131729
2010-05-28 20:41:58 +00:00
Fredrik Höglund
bcd8d3f476 - Add an external helper program that initializes GLX and checks if kwin can
use direct rendering.
- Move the LIBGL_ALWAYS_INDIRECT code to CompositingPrefs::detect(), and use
  the external helper program to determine if the variable needs to be set.

svn path=/trunk/KDE/kdebase/workspace/; revision=1096554
2010-02-26 20:47:00 +00:00