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
This commit is contained in:
parent
5b2e2d5fe6
commit
07a26a2569
1 changed files with 9 additions and 1 deletions
|
@ -75,11 +75,19 @@ int main(int argc, char *argv[])
|
|||
CWBackPixel | CWBorderPixel | CWColormap, &attr);
|
||||
glXMakeCurrent(dpy, win, ctx);
|
||||
|
||||
// Assume that glXCreatePixmap() works with DRI2 drivers, and the NVidia driver
|
||||
// Assume that glXCreatePixmap() works with DRI2 drivers
|
||||
const GLubyte *renderer = glGetString(GL_RENDERER);
|
||||
if (strstr((const char *)renderer, "DRI2"))
|
||||
return 0;
|
||||
|
||||
// The Intel driver doesn't have DRI2 in the renderer string
|
||||
if (strstr((const char *)renderer, "GEM"))
|
||||
return 0;
|
||||
|
||||
if (strstr((const char *)renderer, "Gallium"))
|
||||
return 0;
|
||||
|
||||
// Direct contexts also work with the NVidia driver
|
||||
const GLubyte *vendor = glGetString(GL_VENDOR);
|
||||
if (strstr((const char *)vendor, "NVIDIA"))
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue