[Mesa-dev] [PATCH] drirc: Allow extension midshader for Divinity: Original Sin (EE)

Karol Herbst karolherbst at gmail.com
Sat Jan 7 18:56:24 UTC 2017


that game still depends on ARB_shading_language_include and it checks
for that extension by checking if the function pointers are there. One
hacky solution is this:

diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 63f4921..e1ab885 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -2611,6 +2611,13 @@ _X_EXPORT 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

2017-01-07 15:48 GMT+01:00 Marek Olšák <maraeo at gmail.com>:
> Pushed.
>
> Can you close the bugs if it's fixed?
>
> Thanks,
> Marek
>
> On Sat, Jan 7, 2017 at 2:38 PM, Kai Wasserbäch
> <kai at dev.carbon-project.org> wrote:
>> See also <https://bugs.freedesktop.org/show_bug.cgi?id=93551#c27> where
>> this was first observed as a requirement.
>>
>> Signed-off-by: Kai Wasserbäch <kai at dev.carbon-project.org>
>> ---
>>  src/mesa/drivers/dri/common/drirc | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/src/mesa/drivers/dri/common/drirc b/src/mesa/drivers/dri/common/drirc
>> index af84ee82e8..798283fd3e 100644
>> --- a/src/mesa/drivers/dri/common/drirc
>> +++ b/src/mesa/drivers/dri/common/drirc
>> @@ -100,5 +100,9 @@ TODO: document the other workarounds.
>>          <application name="Rust" executable="rust">
>>              <option name="glsl_zero_init" value="true"/>
>>          </application>
>> +
>> +        <application name="Divinity: Original Sin Enhanced Edition" executable="EoCApp">
>> +            <option name="allow_glsl_extension_directive_midshader" value="true" />
>> +        </application>
>>      </device>
>>  </driconf>
>> --
>> 2.11.0
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list