Last active
January 14, 2019 05:32
-
-
Save GloriousEggroll/169874b1ed1549c5cdd5ff4473e536f0 to your computer and use it in GitHub Desktop.
this patch allows divinity original sin to run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c | |
index 3d5ae0b694..b5116c6029 100644 | |
--- a/src/mesa/main/getstring.c | |
+++ b/src/mesa/main/getstring.c | |
@@ -123,6 +123,13 @@ _mesa_GetString( GLenum name ) | |
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, NULL); | |
+ boolean *forcedvendor = getenv("allow_vendor_override_ati"); | |
+ if ((forcedvendor) && (name==GL_VENDOR)) { | |
+ if (ctx->Driver.GetString(ctx, name)=="X.Org") { | |
+ return (const GLubyte *) "ATI Technologies, Inc."; | |
+ } | |
+ } | |
+ | |
/* this is a required driver function */ | |
assert(ctx->Driver.GetString); | |
{ | |
diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf | |
index cb0e6e659e..ccc6d16e93 100644 | |
--- a/src/util/00-mesa-defaults.conf | |
+++ b/src/util/00-mesa-defaults.conf | |
@@ -128,6 +128,7 @@ TODO: document the other workarounds. | |
<application name="Divinity: Original Sin Enhanced Edition" executable="EoCApp"> | |
<option name="allow_glsl_extension_directive_midshader" value="true" /> | |
+ <option name="allow_vendor_override_ati" value="true"/> | |
</application> | |
<application name="Metro 2033 Redux / Metro Last Night Redux" executable="metro"> | |
diff --git a/src/gallium/state_trackers/dri/dri_context.c b/src/gallium/state_trackers/dri/dri_context.c | |
index af9e3325f9..873bd72e29 100644 | |
--- a/src/gallium/state_trackers/dri/dri_context.c | |
+++ b/src/gallium/state_trackers/dri/dri_context.c | |
@@ -79,6 +79,10 @@ dri_create_context(gl_api api, const struct gl_config * visual, | |
goto fail; | |
} | |
+ if (driQueryOptionb(optionCache, "allow_vendor_override_ati")) { | |
+ setenv("allow_vendor_override_ati", "true", 1); | |
+ } | |
+ | |
memset(&attribs, 0, sizeof(attribs)); | |
switch (api) { | |
case API_OPENGLES: | |
diff --git a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | |
index 9db0dc0111..932e7a5ab7 100644 | |
--- a/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | |
+++ b/src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | |
@@ -31,6 +31,7 @@ DRI_CONF_SECTION_DEBUG | |
DRI_CONF_GLSL_CORRECT_DERIVATIVES_AFTER_DISCARD("false") | |
DRI_CONF_ALLOW_GLSL_LAYOUT_QUALIFIER_ON_FUNCTION_PARAMETERS("false") | |
DRI_CONF_FORCE_COMPAT_PROFILE("false") | |
+ DRI_CONF_ALLOW_VENDOR_OVERRIDE_ATI("false") | |
DRI_CONF_SECTION_END | |
DRI_CONF_SECTION_MISCELLANEOUS | |
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c | |
index bde461b43a..044dc9174f 100644 | |
--- a/src/glx/glxcmds.c | |
+++ b/src/glx/glxcmds.c | |
@@ -2603,6 +2603,13 @@ _GLX_PUBLIC void (*glXGetProcAddressARB(const GLubyte * procName)) (void) | |
typedef void (*gl_function) (void); | |
gl_function f; | |
+ if (strcmp((const char *) procName, "glNamedStringARB") == 0 || | |
+ strcmp((const char *) procName, "glDeleteNamedStringARB") == 0 || | |
+ strcmp((const char *) procName, "glCompileShaderIncludeARB") == 0 || | |
+ strcmp((const char *) procName, "glIsNamedStringARB") == 0 || | |
+ strcmp((const char *) procName, "glGetNamedStringARB") == 0 || | |
+ strcmp((const char *) procName, "glGetNamedStringivARB") == 0) | |
+ return NULL; | |
/* Search the table of GLX and internal functions first. If that | |
* fails and the supplied name could be a valid core GL name, try | |
diff --git a/src/util/xmlpool/t_options.h b/src/util/xmlpool/t_options.h | |
index 80ddf0e203..7c2b9212ff 100644 | |
--- a/src/util/xmlpool/t_options.h | |
+++ b/src/util/xmlpool/t_options.h | |
@@ -140,6 +140,11 @@ DRI_CONF_OPT_BEGIN_B(allow_glsl_layout_qualifier_on_function_parameters, def) \ | |
DRI_CONF_DESC(en,gettext("Allow layout qualifiers on function parameters.")) \ | |
DRI_CONF_OPT_END | |
+#define DRI_CONF_ALLOW_VENDOR_OVERRIDE_ATI(def) \ | |
+DRI_CONF_OPT_BEGIN_B(allow_vendor_override_ati, def) \ | |
+ DRI_CONF_DESC(en,gettext("Allow GPU vendor to be overridden as ATI Technologies, Inc.")) \ | |
+DRI_CONF_OPT_END | |
+ | |
#define DRI_CONF_FORCE_COMPAT_PROFILE(def) \ | |
DRI_CONF_OPT_BEGIN_B(force_compat_profile, def) \ | |
DRI_CONF_DESC(en,gettext("Force an OpenGL compatibility context")) \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment