Gentoo Archives: gentoo-commits

From: Pacho Ramos <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/virtualgl/files/
Date: Fri, 05 Jun 2020 07:06:24
Message-Id: 1591340775.62f7a283d2c4e2d738a99d7d6b09ced2ee450e57.pacho@gentoo
1 commit: 62f7a283d2c4e2d738a99d7d6b09ced2ee450e57
2 Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 5 07:06:06 2020 +0000
4 Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 5 07:06:15 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62f7a283
7
8 x11-misc/virtualgl: Add forgotten patch
9
10 Package-Manager: Portage-2.3.100, Repoman-2.3.22
11 Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
12
13 .../files/virtualgl-2.6.3-mesa-19.3.patch | 105 +++++++++++++++++++++
14 1 file changed, 105 insertions(+)
15
16 diff --git a/x11-misc/virtualgl/files/virtualgl-2.6.3-mesa-19.3.patch b/x11-misc/virtualgl/files/virtualgl-2.6.3-mesa-19.3.patch
17 new file mode 100644
18 index 00000000000..6f45ba8a3ff
19 --- /dev/null
20 +++ b/x11-misc/virtualgl/files/virtualgl-2.6.3-mesa-19.3.patch
21 @@ -0,0 +1,105 @@
22 +From faedcc1e36b4ed89a325e01822447900840a0b77 Mon Sep 17 00:00:00 2001
23 +From: DRC <information@×××××××××.org>
24 +Date: Thu, 13 Feb 2020 19:11:46 -0600
25 +Subject: [PATCH] Faker: Fix build issue w/ Mesa 19.3.0+ headers
26 +
27 +Mesa changed the signatures for glXGetTransparentIndexSUN() and
28 +glXQueryGLXPbufferSGIX() to match the official GLX extension specs:
29 +https://www.khronos.org/registry/OpenGL/extensions/SUN/GLX_SUN_get_transparent_index.txt
30 +https://www.khronos.org/registry/OpenGL/extensions/SGIX/GLX_SGIX_pbuffer.txt
31 +
32 +Reference:
33 +https://gitlab.freedesktop.org/mesa/mesa/commit/3dd299c3d5b88114894ec30d1fac85fba688201f
34 +
35 +Fixes #109
36 +---
37 + ChangeLog.md | 2 ++
38 + server/faker-glx.cpp | 14 +++++++++++++-
39 + server/faker-sym.h | 8 +++++++-
40 + 3 files changed, 22 insertions(+), 2 deletions(-)
41 +
42 +diff --git a/ChangeLog.md b/ChangeLog.md
43 +index 8d092bd7..78391d06 100644
44 +--- a/ChangeLog.md
45 ++++ b/ChangeLog.md
46 +@@ -6,6 +6,8 @@
47 + 1. VirtualGL now works properly with 3D applications that use the
48 + `glDrawBuffers()` function and render to the front buffer.
49 +
50 ++2. VirtualGL can now be built using the GLX headers from Mesa 19.3.0 and later.
51 ++
52 +
53 + 2.6.3
54 + =====
55 +diff --git a/server/faker-glx.cpp b/server/faker-glx.cpp
56 +index faea37b6..6e7beb63 100644
57 +--- a/server/faker-glx.cpp
58 ++++ b/server/faker-glx.cpp
59 +@@ -1,6 +1,6 @@
60 + // Copyright (C)2004 Landmark Graphics Corporation
61 + // Copyright (C)2005, 2006 Sun Microsystems, Inc.
62 +-// Copyright (C)2009, 2011-2019 D. R. Commander
63 ++// Copyright (C)2009, 2011-2020 D. R. Commander
64 + //
65 + // This library is free software and may be redistributed and/or modified under
66 + // the terms of the wxWindows Library License, Version 3.1 or (at your option)
67 +@@ -2192,11 +2192,18 @@ void glXQueryDrawable(Display *dpy, GLXDrawable draw, int attribute,
68 + CATCH();
69 + }
70 +
71 ++#if defined(GLX_GLXEXT_VERSION) && GLX_GLXEXT_VERSION >= 20190000
72 ++void glXQueryGLXPbufferSGIX(Display *dpy, GLXPbuffer pbuf, int attribute,
73 ++ unsigned int *value)
74 ++#else
75 + int glXQueryGLXPbufferSGIX(Display *dpy, GLXPbuffer pbuf, int attribute,
76 + unsigned int *value)
77 ++#endif
78 + {
79 + glXQueryDrawable(dpy, pbuf, attribute, value);
80 ++ #if !defined(GLX_GLXEXT_VERSION) || GLX_GLXEXT_VERSION < 20190000
81 + return 0;
82 ++ #endif
83 + }
84 +
85 +
86 +@@ -2358,8 +2365,13 @@ void glXSwapBuffers(Display *dpy, GLXDrawable drawable)
87 +
88 + // Returns the transparent index from the overlay visual on the 2D X server
89 +
90 ++#if defined(GLX_GLXEXT_VERSION) && GLX_GLXEXT_VERSION >= 20190000
91 ++int glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay,
92 ++ unsigned long *transparentIndex)
93 ++#else
94 + int glXGetTransparentIndexSUN(Display *dpy, Window overlay, Window underlay,
95 + long *transparentIndex)
96 ++#endif
97 + {
98 + int retval = False;
99 + XWindowAttributes xwa;
100 +diff --git a/server/faker-sym.h b/server/faker-sym.h
101 +index b9aa30d0..0168ac7b 100644
102 +--- a/server/faker-sym.h
103 ++++ b/server/faker-sym.h
104 +@@ -1,6 +1,6 @@
105 + // Copyright (C)2004 Landmark Graphics Corporation
106 + // Copyright (C)2005, 2006 Sun Microsystems, Inc.
107 +-// Copyright (C)2009, 2011, 2013-2016, 2018-2019 D. R. Commander
108 ++// Copyright (C)2009, 2011, 2013-2016, 2018-2020 D. R. Commander
109 + //
110 + // This library is free software and may be redistributed and/or modified under
111 + // the terms of the wxWindows Library License, Version 3.1 or (at your option)
112 +@@ -535,8 +535,14 @@ FUNCDEF2(GLXFBConfigSGIX, glXGetFBConfigFromVisualSGIX, Display *, dpy,
113 +
114 + // GLX_SUN_get_transparent_index
115 +
116 ++#if defined(GLX_GLXEXT_VERSION) && GLX_GLXEXT_VERSION >= 20190000
117 ++FUNCDEF4(int, glXGetTransparentIndexSUN, Display *, dpy, Window, overlay,
118 ++ Window, underlay, unsigned long *, transparentIndex,
119 ++ glXGetTransparentIndexSUN)
120 ++#else
121 + FUNCDEF4(int, glXGetTransparentIndexSUN, Display *, dpy, Window, overlay,
122 + Window, underlay, long *, transparentIndex, glXGetTransparentIndexSUN);
123 ++#endif
124 +
125 +
126 + // GL functions