From 22a247047dd5b20ae074902eecad0a9b86499812 Mon Sep 17 00:00:00 2001 From: Roderick Colenbrander Date: Thu, 11 Mar 2010 14:10:51 +0100 Subject: [PATCH] wgl: Add more OpenGL diagnosing checks. --- dlls/winex11.drv/opengl.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index e7848444fe2..859cf94c2f9 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -375,6 +375,21 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void) if(!getsockname(fd, (struct sockaddr *)&uaddr, &uaddrlen) && uaddr.sun_family == AF_UNIX) ERR_(winediag)("Direct rendering is disabled, most likely your OpenGL drivers haven't been installed correctly\n"); } + else + { + /* In general you would expect that if direct rendering is returned, that you receive hardware + * accelerated OpenGL rendering. The definition of direct rendering is that rendering is performed + * client side without sending all GL commands to X using the GLX protocol. When Mesa falls back to + * software rendering, it shows direct rendering. + * + * Depending on the cause of software rendering a different rendering string is shown. In case Mesa fails + * to load a DRI module 'Software Rasterizer' is returned. When Mesa is compiled as a OpenGL reference driver + * it shows 'Mesa X11'. + */ + const char *gl_renderer = (const char *)pglGetString(GL_RENDERER); + if(!strcmp(gl_renderer, "Software Rasterizer") || !strcmp(gl_renderer, "Mesa X11")) + ERR_(winediag)("The Mesa OpenGL driver is using software rendering, most likely your OpenGL drivers haven't been installed correctly\n"); + } if(vis) XFree(vis); if(ctx) {