I feel like there is some kind of underlying lesson that we, OpenGL app programmers, should be getting out of this...<br><br><div>What about a psuedo-database of app -> extension list rather than by year? Surely Quake3 doesn't make use of but <= 10 extensions. I'd imagine the same holds true for other old games as well. A simple "strings" on their binary could figure that out...<br>
<div><br><div class="gmail_quote">On Fri, Mar 11, 2011 at 2:14 PM, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Friday, March 11, 2011 10:46:31 AM José Fonseca wrote:<br>
> On Fri, 2011-03-11 at 09:04 -0800, Eric Anholt wrote:<br>
> > On Fri, 11 Mar 2011 10:33:13 +0000, José Fonseca <<a href="mailto:jfonseca@vmware.com">jfonseca@vmware.com</a>><br>
wrote:<br>
> > > The problem from<br>
> > ><br>
> > > <a href="http://www.mail-archive.com/mesa3d-dev@lists.sourceforge.net/msg12493.h" target="_blank">http://www.mail-archive.com/mesa3d-dev@lists.sourceforge.net/msg12493.h</a><br>
> > > tml<br>
> > ><br>
> > > is back, and now a bit worse -- it causes Quake3 arena demo to crash<br>
> > > (at least the windows version). The full version works fine. I'm not<br>
> > > sure what other applications are hit by this. See the above thread for<br>
> > > more background.<br>
> > ><br>
> > ><br>
> > > There are two major approaches:<br>
> > ><br>
> > > 1) sort extensions chronologically instead of alphabetically. See<br>
> > > attached patch for that<br>
> > ><br>
> > > - for those who prefer to see extensions sorted alphabetically in<br>
> > ><br>
> > > glxinfo, we could modify glxinfo to sort then before displaying<br>
> > ><br>
> > > 2) detect broken applications (i.e., by process name), and only sort<br>
> > > extensions strings chronologically then<br>
> > ><br>
> > > Personally I think that varying behavior based on process name is a<br>
> > > ugly and brittle hack, so I'd prefer 1), but I just want to put this<br>
> > > on my back above all, so whatever works is also fine by me.<br>
> ><br>
> > If this is just a hack for one broken application, and we think that<br>
> > building in a workaround for this particular broken application is<br>
> > important (I don't), I still prefer an obvious hack for that broken<br>
> > application like feeding it a tiny extension string that it cares about,<br>
> > instead of reordering the extension list.<br>
><br>
> There are many versions of Quake3 out there, some fixed, others not, and<br>
> others enhanced. This means a tiny string would prevent any Quake3<br>
> application from finding newer extensions. So I think that if we go for<br>
> the application name detection then we should present the whole<br>
> extension string sorted chronologically, instead of giving a tiny<br>
> string.<br>
><br>
> Jose<br>
<br>
</div></div>I agree with José - it's not one broken application, it's a number of old,<br>
sometimes closed-source games that we can't change.<br>
<br>
I'm not sure how changing the sorting solves the problem, anyway - the amount<br>
of data returned would still overflow the buffer, possibly wreaking havoc. I'd<br>
rather avoid that.<br>
<br>
Ian and I talked about this a year ago, and the solution I believe we came up<br>
with was to use a driconf option or environment variable:<br>
<br>
If MESA_MAX_EXTENSION_YEAR=2006, then glGetString would only return extensions<br>
created in 2006 or earlier. The rationale is that if a game came out in 2006,<br>
it won't know about any extensions from 2007 anyway, so advertising them is<br>
useless. The fixed-size buffer is also almost certainly large enough to handle<br>
this cut-down list of extensions.<br>
<br>
This should be trivial to do now that you already have the years for each<br>
extension...just store them in the table, rather than in comments, and check<br>
before listing an extension.<br>
<br>
A driconf option is nice because it allows this to be overridden in .drirc on<br>
a per-app basis, rather than having to set an environment variable. It might<br>
be a bit more work though.<br>
<font color="#888888"><br>
--Kenneth<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div></div>