[Mesa-dev] Request to revert commit [3d81e11b49366b5636b8524ba0f8c7076e3fdf34] mesa: remove, unnecessary, 'sort by year' for the GL extensions

Emil Velikov emil.l.velikov at gmail.com
Fri Sep 21 15:30:38 UTC 2018

Hi all,

On 20 September 2018 at 15:22, Roland Scheidegger <sroland at vmware.com> wrote:
> Am 20.09.2018 um 16:10 schrieb Ian Romanick:
>> On 09/20/2018 07:04 AM, Roland Scheidegger wrote:
>>> Am 20.09.2018 um 15:09 schrieb Ian Romanick:
>>>> On 09/19/2018 11:36 PM, Federico Dossena wrote:
>>>>> As most of you are probably aware of, id2 and id3 games store GL
>>>>> extensions in a buffer that's too small for modern systems. This usually
>>>>> leads to a crash when MESA_EXTENSION_MAX_YEAR is not set, but what the
>>>>> creator of this commit didn't know is that some id3 games (the more
>>>>> "recent" ones) don't crash, they just truncate the string. As a result
>>>>> of this commit, these games can't detect some extensions and therefore
>>>>> don't work properly.
>>>> It sounds like the problem is still that MESA_EXTENSION_MAX_YEAR is not
>>>> set, so why not just set it?  Doesn't that fix the problem?
>>> Yes it does.
>>> It is however not really obvious why an app is failing (in this case the
>>> game still ran, just shadows were broken - I suppose they were not
>>> tested without some extensions being available).
>>> I suppose we could try detecting affected apps by name, but I have no
>>> idea which are (possibly some later published games using id tech 3 have
>>> it fixed for real, I have no idea).
>>> It is not a mesa specific problem neither, since apparently windows AMD
>>> drivers suffer from the same issue. Maybe nvidia always reorders
>>> extensions (or recognizes affected apps).
>> Or maybe NVIDIA changes the extension string based on the app?
> Yes, that's what I basically meant. They could reorder (or cut down) the
> string based on app detection. Or they do it always.
Here is the official note from NVIDIA


In brief - games will crash (likely due to buffer overflow),
workaround by 'selecting' the driver version number.
This is more or less what our comment way saying.

They are likely to be using a quirks database and applying those
locally, Ideally we'll do the same.

That said, Star Trek Voyager Elite Force (2000) is doing something
slightly different (changes strcpy to strncpy perhaps?), so reverting
the patch makes sense.
As others have said though - please document things though.


More information about the mesa-dev mailing list