Fix GLX_SGIX_fbconfig extension, this fixes games such as "The Binding of
Isaac: Rebirth" and "Crypt of the NecroDancer" from Steam not working
This commit is contained in:
parent
39deb04760
commit
740acac7a4
78
0007-GLX-Add-GLX_SGIX_fbconfig-functions.patch
Normal file
78
0007-GLX-Add-GLX_SGIX_fbconfig-functions.patch
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
From caa4eb0c34b19b694a8fe886411e012d3beb6b36 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
Date: Thu, 2 Feb 2017 13:34:29 +0100
|
||||||
|
Subject: [PATCH 7/7] GLX: Add GLX_SGIX_fbconfig functions
|
||||||
|
|
||||||
|
Some older apps, e.g. games using version 3.0 or older of the glfw library
|
||||||
|
try to use the old GLX_SGIX_fbconfig extension functions if present instead
|
||||||
|
of the regular glXGetFBConfigs, glXGetFBConfigAttrib and glXCreateNewContext
|
||||||
|
functions.
|
||||||
|
|
||||||
|
This commit adds implementations of these to libglvnd's libGLX fixing e.g.
|
||||||
|
the "The Binding if Isaac: Rebirth" and "Crypt of the NecroDancer" games from
|
||||||
|
Steam failing with a "GLX: Failed to retrieve visual for GLXFBConfig" error.
|
||||||
|
|
||||||
|
Note this commit does not add implementations for
|
||||||
|
glXCreateGLXPixmapWithConfigSGIX and glXGetFBConfigFromVisualSGIX as these
|
||||||
|
cannot be simply mapped to non extension functions and in practice these
|
||||||
|
do not seem to be used.
|
||||||
|
|
||||||
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
---
|
||||||
|
src/GLX/libglx.c | 33 +++++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 33 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/GLX/libglx.c b/src/GLX/libglx.c
|
||||||
|
index a2a9502..13434c0 100644
|
||||||
|
--- a/src/GLX/libglx.c
|
||||||
|
+++ b/src/GLX/libglx.c
|
||||||
|
@@ -1579,6 +1579,33 @@ PUBLIC GLXFBConfig *glXGetFBConfigs(Display *dpy, int screen, int *nelements)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
+PUBLIC int glXGetFBConfigAttribSGIX(Display *dpy, GLXFBConfigSGIX config,
|
||||||
|
+ int attribute, int *value)
|
||||||
|
+{
|
||||||
|
+ return glXGetFBConfigAttrib(dpy, (GLXFBConfig)config, attribute, value);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+PUBLIC GLXFBConfigSGIX *glXChooseFBConfigSGIX(Display *dpy, int screen,
|
||||||
|
+ const int *attrib_list, int *nelements)
|
||||||
|
+{
|
||||||
|
+ return glXChooseFBConfig(dpy, screen, attrib_list, nelements);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+PUBLIC GLXContext glXCreateContextWithConfigSGIX (Display *dpy,
|
||||||
|
+ GLXFBConfigSGIX config, int render_type,
|
||||||
|
+ GLXContext share_list, Bool direct)
|
||||||
|
+{
|
||||||
|
+ return glXCreateNewContext(dpy, (GLXFBConfig)config, render_type,
|
||||||
|
+ share_list, direct);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+PUBLIC XVisualInfo *
|
||||||
|
+glXGetVisualFromFBConfigSGIX(Display *dpy, GLXFBConfigSGIX config)
|
||||||
|
+{
|
||||||
|
+ return glXGetVisualFromFBConfig(dpy, (GLXFBConfig)config);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
PUBLIC void glXGetSelectedEvent(Display *dpy, GLXDrawable draw,
|
||||||
|
unsigned long *event_mask)
|
||||||
|
{
|
||||||
|
@@ -1680,6 +1707,12 @@ const __GLXlocalDispatchFunction LOCAL_GLX_DISPATCH_FUNCTIONS[] =
|
||||||
|
|
||||||
|
LOCAL_FUNC_TABLE_ENTRY(glXImportContextEXT)
|
||||||
|
LOCAL_FUNC_TABLE_ENTRY(glXFreeContextEXT)
|
||||||
|
+
|
||||||
|
+ LOCAL_FUNC_TABLE_ENTRY(glXGetFBConfigAttribSGIX)
|
||||||
|
+ LOCAL_FUNC_TABLE_ENTRY(glXChooseFBConfigSGIX)
|
||||||
|
+ LOCAL_FUNC_TABLE_ENTRY(glXCreateContextWithConfigSGIX)
|
||||||
|
+ LOCAL_FUNC_TABLE_ENTRY(glXGetVisualFromFBConfigSGIX)
|
||||||
|
+
|
||||||
|
#undef LOCAL_FUNC_TABLE_ENTRY
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
--
|
||||||
|
2.9.3
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: libglvnd
|
Name: libglvnd
|
||||||
Version: 0.2.999
|
Version: 0.2.999
|
||||||
Release: 7%{?commit0:.git%{shortcommit0}}%{?dist}
|
Release: 8%{?commit0:.git%{shortcommit0}}%{?dist}
|
||||||
# Provide an upgrade path from the negativo17.org pkgs which have Epoch 1
|
# Provide an upgrade path from the negativo17.org pkgs which have Epoch 1
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: The GL Vendor-Neutral Dispatch library
|
Summary: The GL Vendor-Neutral Dispatch library
|
||||||
@ -20,6 +20,8 @@ Patch4: 0004-armv7-make-sure-asm-is-compiled-in-unified-syntax-mo.patch
|
|||||||
Patch5: 0005-Treat-armv7hl-as-armv7l.patch
|
Patch5: 0005-Treat-armv7hl-as-armv7l.patch
|
||||||
# WIP
|
# WIP
|
||||||
Patch6: 0006-skip-tests-that-cannot-pass-with-pure-c-dispatch.patch
|
Patch6: 0006-skip-tests-that-cannot-pass-with-pure-c-dispatch.patch
|
||||||
|
# https://github.com/NVIDIA/libglvnd/pull/114
|
||||||
|
Patch7: 0007-GLX-Add-GLX_SGIX_fbconfig-functions.patch
|
||||||
|
|
||||||
BuildRequires: libtool
|
BuildRequires: libtool
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
@ -217,6 +219,10 @@ xvfb-run -a make check V=1 || cat `find . -name test-suite.log`
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 2 2017 Hans de Goede <hdegoede@redhat.com> - 1:0.2.999-8.gitdc16f8c
|
||||||
|
- Fix GLX_SGIX_fbconfig extension, this fixes games such as "The Binding of
|
||||||
|
Isaac: Rebirth" and "Crypt of the NecroDancer" from Steam not working
|
||||||
|
|
||||||
* Wed Jan 11 2017 Hans de Goede <hdegoede@redhat.com> - 1:0.2.999-7.gitdc16f8c
|
* Wed Jan 11 2017 Hans de Goede <hdegoede@redhat.com> - 1:0.2.999-7.gitdc16f8c
|
||||||
- Epoch:1 to provide upgrade path from negativo17.org rpms
|
- Epoch:1 to provide upgrade path from negativo17.org rpms
|
||||||
- New snapshot
|
- New snapshot
|
||||||
|
Loading…
Reference in New Issue
Block a user