[Mesa-dev] [PATCH 0/2] Allow redeclaration of GLSL builtins; fixes Dying Light and Dead Island Definitive Edition
John Brooks
john at fastquake.com
Mon May 15 22:52:32 UTC 2017
On 2017-05-15 06:04 PM, Ian Romanick wrote:
> On 05/12/2017 06:39 AM, John Brooks wrote:
>> Since release, Dying Light and Dead Island Definitive Edition have been broken
>> on Mesa, producing at best only a black screen after loading. I found that the
>> root of the problem is that their vertex shaders redeclare the GLSL builtin
>> gl_VertexID, which Mesa's compiler considers to be an error:
>>
>> error: `gl_VertexID' redeclared
> Sorry for not responding to this sooner. I've been away for the last
> few weeks.
>
> I believe that we enforce this as the result of a conformance test that
> does almost exactly this thing. We didn't used to enforce it, but after
> discussion with Khronos (which I can dig up), we began enforcing it.
> This also led to a clarification in the GLSL spec. Section 3.7
> (Identifiers) of the GLSL 4.50 spec says:
>
> However, as noted in the specification, there are some cases where
> previously declared variables can be redeclared, and predeclared
> "gl_" names are allowed to be redeclared in a shader only for these
> specific purposes. More generally, it is a compile-time error to
> redeclare a variable, including those starting “gl_”.
>
> Redeclaring gl_VertexID is clearly a bug in the game. Has anyone
> reported this to them?
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
I posted this on the Steam forums:
http://steamcommunity.com/app/239140/discussions/0/1326718197205660517/#c1326718197205867749
I'll put what I wrote there in a support ticket on support.techland.pl. If
we're lucky maybe they'll do something about it, though I'm not terribly
optimistic.
--
John Brooks (Frogging101)
More information about the mesa-dev
mailing list