wine-staging/patches/Pipelight/0004-winex11.drv-Indicate-direct-rendering-through-OpenGL.patch
2018-02-18 13:53:50 -08:00

45 lines
1.9 KiB
Diff

From 7d77edaea3c4ba8067e4b73034df5c58940daebc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 1 Jun 2014 22:51:32 +0200
Subject: winex11.drv: Indicate direct rendering through OpenGL extension
---
dlls/winex11.drv/opengl.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 71af3db..966d32d 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -440,6 +440,7 @@ static int GLXErrorHandler(Display *dpy,
static BOOL X11DRV_WineGL_InitOpenglInfo(void)
{
static const char legacy_extensions[] = " WGL_EXT_extensions_string WGL_EXT_swap_control";
+ static const char direct_extension[] = " WINE_EXT_direct_rendering";
int screen = DefaultScreen(gdi_display);
Window win = 0, root = 0;
@@ -493,16 +494,18 @@ static BOOL X11DRV_WineGL_InitOpenglInfo
}
gl_renderer = (const char *)opengl_funcs.gl.p_glGetString(GL_RENDERER);
gl_version = (const char *)opengl_funcs.gl.p_glGetString(GL_VERSION);
+ glx_direct = pglXIsDirect(gdi_display, ctx);
str = (const char *) opengl_funcs.gl.p_glGetString(GL_EXTENSIONS);
- glExtensions = HeapAlloc(GetProcessHeap(), 0, strlen(str)+sizeof(legacy_extensions));
+ glExtensions = HeapAlloc(GetProcessHeap(), 0, strlen(str)+sizeof(legacy_extensions)+sizeof(direct_extension));
strcpy(glExtensions, str);
strcat(glExtensions, legacy_extensions);
+ if (glx_direct)
+ strcat(glExtensions, direct_extension);
/* Get the common GLX version supported by GLX client and server ( major/minor) */
pglXQueryVersion(gdi_display, &glxVersion[0], &glxVersion[1]);
glxExtensions = pglXQueryExtensionsString(gdi_display, screen);
- glx_direct = pglXIsDirect(gdi_display, ctx);
TRACE("GL version : %s.\n", gl_version);
TRACE("GL renderer : %s.\n", gl_renderer);
--
1.7.9.5